Open moustakas opened 7 years ago
This comment sent by John Lucey may also be helpful:
One way to define a "large galaxy" mask would be to use the 2MASS XSC catalog which
lists isophotal sizes, position angles and axial ratios, see
http://www.ipac.caltech.edu/2mass/releases/allsky/doc/sec2_3a.html
As far as I can see the only downside is that the parameters are
poor determined for low surface galaxies because of the shallowness
of 2MASS. But otherwise it should be fine.
Regards
John Lucey
Thanks @moustakas . I don't have an efficient way to handle arbitrary ellipsis -- I wonder if it is feasible to cover these objects as a bunch of circles? The cover circles will be conservative. Do people do things like this? If the mask is digitized into circles I can use the same code for star mask to cut them.
The naive solution to cutting out arbitrarily oriented ellipses...
For each object to mask:
Pre-select points within a circle around the object, whose diameter is equal to the object's semi-major axis.
Use the object's position and "angle" parameter to define the affine transformation that translates and rotates our coordinate system into the coordinate system of the object.
For pre-selected points (e.g. ~100 objects for a 0.1 degree cutout), transform positions into the coordinate system of the object.
Check if the points fall into the ellipse: (x_transf / a) 2 + (y_transf / b) 2 <= 1
As I understand it bright stars are currently being masked, but it would be useful to also be able to mask large objects, including large galaxies, globular clusters, etc. on the fly.
Some additional information can be found here: https://github.com/desihub/desitarget/issues/41 and here: https://github.com/desihub/desitarget/issues/103