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

float issues with wavelength axis in synthesize #365

Open
andrew-saydjari opened this issue Nov 18, 2024 · 5 comments
Open

float issues with wavelength axis in synthesize #365

andrew-saydjari opened this issue Nov 18, 2024 · 5 comments

Comments

@andrew-saydjari
Copy link
Collaborator

Here is a reproducer

ex_atm = Korg.interpolate_marcs(5750, 2.0, 1.0)
ex_spec = synthesize(ex_atm, lines, format_A_X(1.0), 3805.0, 5645.0)
extrema(ex_spec.wavelengths)

The result is :
(3805.0000000000005, 5645.0)

@andrew-saydjari
Copy link
Collaborator Author

This persists even when passing Ints, which is very concerning.

@andrew-saydjari
Copy link
Collaborator Author

ex_spec = synthesize(ex_atm, lines, format_A_X(1.0), 3805, 5645, 1)
extrema(ex_spec.wavelengths)

Also fails

@ajwheeler
Copy link
Owner

ajwheeler commented Nov 20, 2024

I will keep this in mind as something to improve on, but tbh it doesn't seem critical. It's already the case that to analyze real data you must buffer the wl range on either side in order to get the LSF right.

Open to being convinced that I should care more, though.

@andrew-saydjari
Copy link
Collaborator Author

I just hate Float issues like this and try to avoid them because I find they cause no end of annoying edge cases that bother me later down the road (and can be hard to run down). It is also non-Julian to not respect my type choice if I pass Ints.

Off my philosophical soapbox, I agree with your assessment of where your time investment is valuable and think you should back burner it, but keep the issue open.

@ajwheeler
Copy link
Owner

Definitely not claiming it's Julian. I would like to fix this at some point. Just being honest that it's not a priority. I'll definitely leave the issue open.

ajwheeler added a commit that referenced this issue Nov 22, 2024
filter out strong CH lines, because they appear to be problematic (see #365)
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

2 participants