sep icon indicating copy to clipboard operation
sep copied to clipboard

Feature request: MASK_TYPE = CORRECT

Open gbrammer opened this issue 7 years ago • 1 comments

First, a quick thank you for producing and sharing this excellent package!

I'd like to submit a feature request of implementing an algorithm something like SExtractor behavior with "MASK_TYPE = CORRECT", which performs measurements of a given object after first masking pixels associated with other detected objects (MASK_TYPE = BLANK) and then second filling in the masked pixels with mirrored versions of the valid object pixels reflected about the object center. Even a fast implementation of MASK_TYPE=BLANK would be helpful.

I understand that this would require a rather significant shift from the current paradigm that separates the photometric measurements from the knowledge of the overall source list (i.e., the catalog and image segmentation)

gbrammer avatar May 03 '18 19:05 gbrammer

Thanks for the positive feedback! I agree this would be nice. It might not require a huge shift in implementation: a segmentation array could be passed to the C photometry function, along with a flag object_id. Within the C photometry function, a pixel would be treated as masked unless its segmentation array value is == 0 (no object) or == object_id (belongs to the object you're interested in). Wrapping this at the Python level would be fairly straightforward.

As you may have guessed from the huge delay in my response, unfortuantely I no longer have a lot of time to work on this, so I really can't do this myself. I would of course welcome PRs along these lines, and I'm happy to offer guidance for anyone interested in taking this on!

kbarbary avatar Jun 13 '18 05:06 kbarbary