BU-hammerTeam / PyHammer

A Python Spectral Typing Suite
MIT License
53 stars 14 forks source link

Fine Tune PyHammer So that Results File Shows Best Fit #27

Open JosephKarpinski opened 5 years ago

JosephKarpinski commented 5 years ago

Take the simple case of four FITS files under template A3_-05Dwarf. Run PyHammer against them. Notice they are not reported as A3-05. Visually tune each file to A3_-05 and notice the smaller Template Match Metric for each as best match. PyHammer should be tuned to do this by default, for each template. Whatever logic PyHammer is using to create the Results file, it is not selecting the best match, based on the lowest Template Match Metric. At a minimum, PyHammer should report the FITS files that make up a template, as matching the template in question and the associated metallicity. This is really needed for processing a large group of FITS files, where we are relying on the accuracy of the Results file, and where visually tuning is not an option. github_1

zephyr5050 commented 5 years ago

I will say that the Template Match Metric was never intended for robust matching. It is simply a rough calculation which finds the "distance" between your spectra and one of the templates. The full algorithm performs redshift corrections and matches based on specific spectral features and lines.

I do have to wonder though if the spectra you chose are representative of how well the algorithm as a whole can work. It certainly is interesting that files which made up the templates are not then matched to the template they should, but PyHammer does have a certain amount of error to it (as any process would) and I don't think there's much "fine-tuning" one could do to fix that, without changing the algorithm completely.

aurorayk commented 5 years ago

I will be doing some testing today and will report back about the Template Match Metric

JosephKarpinski commented 5 years ago

Seeing similar results across other PyHammer templates. Guessing Hammer was used to classify the template FITS files, that PyHammer uses, but PyHammer doesn't always classify the template FITS files the same way. See attached G0_-05_Dwarf_PyHammerResults as an example:

g0_-05_dwarf_pyhammerresults