superbit-collaboration / superbit-metacal

Contains a collection of routines used to perform gmix/metacalibration on simulated SuperBIT images
4 stars 1 forks source link

Add segmentation into the CookieCutter mask #124

Open sweverett opened 1 year ago

sweverett commented 1 year ago

As the title says. We want to put segmentation information into the CookieCutter mask, but in a way that does not clobber with the OBA bit mask definition. This can probably be done by adding the number of bits reserved to the bit mask to the segmap numbers

sweverett commented 1 year ago

First pass: Add the actual segmentation values, plus the numbers used for the OBA bitmask. If the number of objects exceeds 2^16, replace w/ sentinel value (the code to recover the true value is the same amount of work as doing it for all, and we have to save 16 bit ints as a

second pass: remap all segmentation values into a this_obj, sky, and neighbor value in the bitmask

sweverett commented 1 year ago

After second thought, keeping all segmentation values will bump the mask requirement from a ui1 (8bit) to a ui2 (16 bit). While the first is overkill if we're not keeping all seg values, it is still likely more compressible.