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

Change property pixeldata to data #14

Closed
martinberoiz opened this issue Aug 17, 2020 · 3 comments · Fixed by #29
Closed

Change property pixeldata to data #14

martinberoiz opened this issue Aug 17, 2020 · 3 comments · Fixed by #29

Comments

@martinberoiz
Copy link
Member

I think the method returning the ndarray pixels from SingleImage should be just data instead of pixeldata, since that seems to be the standard in masked numpy arrays, CCDData, NDData and HDUList.

Likewise it should have a property mask that returns the mask as a ndarray, but I think that is already implemented.

I don't know what you guys think.

@martinberoiz
Copy link
Member Author

Oh, and the __init__ method should have the keyword data for the ndarray instead of img as it is now.

@BrunoSanchez
Copy link
Collaborator

Would you prefer that mask is a property separated or that data is a masked array?

@martinberoiz
Copy link
Member Author

I think that data should return a plain ndarray (no mask) and mask return just the mask.
So, yes, the property mask to be separated from data, but internally you can keep them as a masked array, as long as this isn't exposed publicly.

BTW I think this change would break API.

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 a pull request may close this issue.

2 participants