cositools / cosipy

The COSI high-level data analysis tools
Apache License 2.0
3 stars 16 forks source link

Generalize getting the units from a 3ML/astromodels spectrum #82

Open israelmcmc opened 9 months ago

israelmcmc commented 9 months ago

Right now we need a switch that looks for the specific spectrum type. There should be a better way that works with all functions, including new ones in the future.

@lommler improved on the previous version, see #28

However, as it turned out during PR #78, other functions still need customized if statements https://github.com/cositools/cosipy/pull/78#discussion_r1337786622_

eneights commented 9 months ago

This should now be fixed in PR #78

israelmcmc commented 9 months ago

Cool! Looks much better! Thanks

israelmcmc commented 9 months ago

It seems that there are still some function in astromodels that do not have an explicit normalization parameter, so the current solution, while it's progress, doesn't work on all cases. I'll leave this issue open in the meanwhile.

eneights commented 9 months ago

I updated this in PR #78, but it still doesn't work for all cases, since I wasn't sure about the units for a few of the models.