BU-hammerTeam / PyHammer

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

What is the distance measure? #17

Closed ctheissen closed 7 years ago

ctheissen commented 7 years ago

What is the distance measure? Is this supposed to be an estimate of the objects distance in parsecs? If so, it's way off.

zephyr5050 commented 7 years ago

Just want to say you can email me directly to avoid having to open an issue on the main branch of PyHammer and spamming all the developers.

In any case, to answer this question, this was a new feature I was trying out and still need to play around with. The idea came from Mark saying it might be useful to have a residual plot in the eyecheck GUI. For various reasons I didn't implement that, but decided to implement a similar feature which is this distance metric. Effectively, it treats the template and the user's spectrum as two vectors and calculates the euclidean distance between the two. If the two spectra match exactly, the distance between the two will be zero. It's meant to be some sort of measure of how well the current template matches your spectrum, where a lower number means a better match. You should see it change as you load new templates. It's just there to give the user some idea of how well their current template matches their spectra as a whole and provide them with some indication as to the correct match.