Closed gmace closed 2 years ago
:pray: Thank you Greg for filing this Issue! I am see the problem! It occurs here:
The x_values
are the native IGRINS pixels, and muler
aspires to maintain this ancillary pixel label through all operations. Somehow that aspiration has fallen short here, which has caused a bug. The offending spectrum is the final order, number 27. If you isolate that spectrum: spec = spec_list[27]
, you can see that the pixels are not getting properly accounted for in the masking process:
I will take a look at why the masking is not correctly applied to the x_values.
An alternative solution is that specutils should keep track of the pixel labels. They might have a mechanism for doing that, and if they do I'd prefer to use their method over ours!
Thanks again for raising the issue! :)
Hi @gmace I found the problem, it was due to line 542 above--- a dictionary key is not considered an attribute, so the conditional on line 542 was never met. This bug appeared in two places, so I have fixed both locations. You can now conduct trim_edges
and remove_nans
in any order. :pray: Thank you again for filing the Issue, which brought the problem to our attention.
Moving forward we have also added this scenario as a test case so that everytime the code changes, we will make sure routine operations like these successfully commute.
Please update your muler
installation with git pull origin main
, restart your Jupyter notebook, and verify that the solution resolved your Issue. Thanks again!