Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate simulation data for SPECTRUM/IMAGE attributes #159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kmadisa
Copy link
Contributor

@kmadisa kmadisa commented Sep 14, 2022

The GaussianSlewLimited quantity class only generated simulation values that are python primitive types (float in this case) which are appropriate for attributes with a SCALAR data format.

This is a problem for the attrbiutes with more complex data formats, SPECTRUM/IMAGE. When reading an attribute, the quantity returns a primitive type which PyTango is not expecting, therefore resulting in the error, Wrong Python type for attribute... Expected a sequence. This change here allows us to cater for the complex data formats. The method next_val now generates the simulation data according to the data format, given by the meta dictionary.

Resolves #157

Signed-off-by: Katleho Madisa [email protected]

Screenshots or code snippets (if appropriate):
N/A

Definition of Done Checklist

  • Code meets our python style guidelines?
  • Unit tested (coded, passed, included)?
  • Requested at least 2 reviewers?
  • Commented code, particularly in hard-to-understand areas?
  • Made corresponding changes to the documentation (e.g. Python documentation, System Engineering Documentation, version description updates, README file, etc)?

SKA-JIRA: 442

…es that are python primitive types (float in this case) which are appropriate for attributes with a SCALAR data format.

This is a problem for the attrbiutes with more complex data formats, SPECTRUM/IMAGE. When reading an attribute, the quantity returns a primitive type which PyTango is not expecting, therefore
resulting in the error, 'Wrong Python type for attribute... Expected a sequence'.
This change here allows us to cater for the complex data formats. The method next_val now generates the simulation data according to the data format, given by the meta dictionary.

Resolves #157

Signed-off-by: Katleho Madisa <[email protected]>
…LAR. It is implied to be 1. I have set default values

for the max_dim_x and max_dim_y properties, respectively, when the are not provided.

Resolves #157

Signed-off-by: Katleho Madisa <[email protected]>
Copy link
Contributor

@samueltwum1 samueltwum1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read and write Spectrum/Image attribute problem
2 participants