desihub / redrock

Redshift fitting for spectroperfectionism
BSD 3-Clause "New" or "Revised" License
22 stars 13 forks source link

Add Ldwarf templates #58

Closed sbailey closed 6 years ago

sbailey commented 6 years ago

Add a set of Ldwarf templates to redrock-templates.

See issue #57 with an odd spike in the galaxy redshift distribution. Many of these are mis-identified Ldwarf galaxies based upon SDSS classification.

sbailey commented 6 years ago

It would probably be easiest to add a new type of template for redrock containing archetypes with a single template per SPECTYPE/SUBTYPE, similar to BOSS stellar templates in idlspec2d/templates/spEigenStar-55734.fits . That would enable adding N>>1 types without requiring a new template file for each one. We could cherry pick the subset of BOSS archetypes that are not well-modeled by the existing redrock stellar templates. This would require an update to redrock.io.read_template to recognize this new format and convert them into individual templates. Algorithm code could also be streamlined to recognize that when there is a single template the coefficient can be solved with dot products instead of setting up a fill matrix just to solve for a single coefficient

londumas commented 6 years ago

Fixed by PR https://github.com/desihub/redrock/pull/78. Tested using rrtemplate-star-Ldwarf.fits (spEigenStar-55734.fits) with other redrock templates on a random sample of 10 plates.

sbailey commented 6 years ago

Let's leave this open until Ldwarf templates have actually been added to redrock-templates. This is waiting for a determination of how many other stellar archetypes need to be added.

sbailey commented 6 years ago

Fixed in redrock-templates 0.4, where the increased M-star training sample diversity was able to adequately model these. redrock PR #66 also provides the tools to convert SDSS Ldwarf templates to redrock format if needed later.