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

create a mask for large objects (galaxies, Messier objects, etc.) #19

Open
moustakas opened this issue Feb 3, 2017 · 3 comments
Open

Comments

@moustakas
Copy link
Member

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:
desihub/desitarget#41
and here:
desihub/desitarget#103

@moustakas
Copy link
Member Author

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

@rainwoodman
Copy link
Contributor

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.

@ekitanidis
Copy link
Collaborator

ekitanidis commented Feb 7, 2017

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

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

No branches or pull requests

3 participants