The SED code computes both the fixed 95% upper limit and the user-requested confidence upper limit, but the FITS writer always stores the 95% value in the norm_ul column and hard-codes the metadata confidence to 0.95.
This becomes a science-output bug when sed.ul_confidence is set to anything other than 0.95. In that case, norm_ul and the UL_CONF metadata do not represent the configured confidence level, even though the code separately computes the requested-confidence norm_ul.
Expected behavior:
norm_ul should use sed['norm_ul']
UL_CONF should reflect the configured ul_confidence
- If the fixed 95% value is intentionally preserved, it should remain in a clearly named
norm_ul95 column rather than being written as norm_ul
Suggested fix:
Update the FITS writer so norm_ul is written from the requested-confidence value and UL_CONF is set from ul_confidence. Add a regression test that runs SED output with a non-default ul_confidence, e.g. 0.90 or 0.99, and checks that the FITS column and metadata match the requested confidence.
The SED code computes both the fixed 95% upper limit and the user-requested confidence upper limit, but the FITS writer always stores the 95% value in the
norm_ulcolumn and hard-codes the metadata confidence to 0.95.This becomes a science-output bug when
sed.ul_confidenceis set to anything other than 0.95. In that case,norm_uland theUL_CONFmetadata do not represent the configured confidence level, even though the code separately computes the requested-confidencenorm_ul.Expected behavior:
norm_ulshould usesed['norm_ul']UL_CONFshould reflect the configuredul_confidencenorm_ul95column rather than being written asnorm_ulSuggested fix:
Update the FITS writer so
norm_ulis written from the requested-confidence value andUL_CONFis set fromul_confidence. Add a regression test that runs SED output with a non-defaultul_confidence, e.g. 0.90 or 0.99, and checks that the FITS column and metadata match the requested confidence.