quatrope / ProperImage

Proper Image utils for astronomy.
BSD 3-Clause "New" or "Revised" License
26 stars 6 forks source link

Change property pixeldata to data #14

Closed martinberoiz closed 4 years ago

martinberoiz commented 4 years ago

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 commented 4 years ago

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

BrunoSanchez commented 4 years ago

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

martinberoiz commented 4 years ago

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.