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

DM-7477: Increase mask plane size to 32 bits #258

Merged
merged 3 commits into from Jul 13, 2017
Merged

Conversation

natelust
Copy link
Contributor

No description provided.

Copy link
Contributor

@PaulPrice PaulPrice left a comment

Choose a reason for hiding this comment

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

This looks great, except that I would love to see
afwImage.Mask[afwImage.MaskPixel].getPlaneBitMask(...) become afwImage.Mask.getPlaneBitMask(...) --- the user in python shouldn't have to know about MaskPixel. I've pushed some changes to util and afw in u/price/DM-7477 that should allow that.

Why MaskX instead of MaskI? I think I is what we use for int32 in other cases.

@@ -461,7 +461,7 @@ Mask<MaskPixelT>::Mask(fits::Fits& fitsfile, std::shared_ptr<daf::base::Property
afw::geom::Box2I const& bbox, ImageOrigin const origin, bool const conformMasks)
: ImageBase<MaskPixelT>(), _maskDict(detail::MaskDict::makeMaskDict()) {
// These are the permitted input file types
typedef boost::mpl::vector<unsigned char, unsigned short, short> fits_mask_types;
typedef boost::mpl::vector<unsigned char, unsigned short, short, std::int32_t> fits_mask_types;
Copy link
Contributor

Choose a reason for hiding this comment

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

MaskPixel instead of std::int32_t?

@PaulPrice
Copy link
Contributor

I think you need to add a test for the legacy HeavyFootprint support.

@PaulPrice PaulPrice changed the title Tickets/DM-7477 DM-7477: Increase mask plane size to 32 bits Jul 11, 2017
Changed Mask pixel type(def) to int32, adding alias to MaskPixel
in python as well. This change triggered a renaming of the python
template alias from MaskU to MaskX to avoid type confusion.
Because of the new pybind11 continue class abstract base classes
this new name could be mostly hidden behind the abc name "Mask",
as MaskX is now the default type to construct when calling the
abc.
Changing the mask pixel type necessitated creating a way to read
HeavyFootprints that were saved with the old MaskPixel type. Test
that a old HeavyFootprint is loadable, has the correct values,
and is comprised of the new MaskPixel type.
@natelust natelust merged commit c1b2468 into master Jul 13, 2017
@ktlim ktlim deleted the tickets/DM-7477 branch August 25, 2018 06:44
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.

None yet

2 participants