gaia-dpci / GaiaXPy

Gaia BP/RP spectra package
BSD 3-Clause "New" or "Revised" License
37 stars 9 forks source link

Does truncation only uses the Rp recommended_truncation? #39

Closed NPGFusillo closed 1 year ago

NPGFusillo commented 1 year ago

I am trying to figure out what the truncation option does exactly and I may have spotted a bug. In calibrator.py I see *_n_relevant_bases is passed to AbsoluteSampledSpectrum() However the _n_relevant_bases is not the same for Bp and Rp and only one single number can be passed to AbsoluteSampledSpectrum() for truncation. Since the Bp band is handled before Rp I believe only the Rp _n_relevant_bases is used for truncation and it gets applied to both bands.

Apologies if I am misinterpreting the code.

fdeangeli commented 1 year ago

I believe you are right. This would only affect the calibrator which is where the two spectra (BP and RP) are merged into a single absolute spectrum. Let me do some further test. I will get back to you later today. Thanks for noticing the issue and taking the time to inspect the code!

druzm commented 1 year ago

Hi @NPGFusillo,

Thank you for reporting the bug. GaiaXPy version 1.2.2, which fixes the issue, has just been released.