Skip to content

Write SED FITS norm_ul at the configured ul_confidence - #682

Open
shaneraphel wants to merge 1 commit into
fermiPy:masterfrom
shaneraphel:sed-fits-ul-conf-673
Open

shaneraphel wants to merge 1 commit into
fermiPy:masterfrom
shaneraphel:sed-fits-ul-conf-673

Conversation

@shaneraphel

@shaneraphel shaneraphel commented Sep 16, 2026

Copy link
Copy Markdown

Fixes #673.

_make_sed already fills norm_ul at the configured ul_confidence, and the FITS dnde_ul column already writes that occupancy. _make_sed_fits still stores sed['norm_ul95'] in the column named norm_ul and hard-codes UL_CONF=0.95. Whenever sed.ul_confidence is not 0.95, the FITS product and its metadata do not match the configured limit.

Unique rewrite:

                Column(name='norm_ul', dtype='f8', data=sed['norm_ul']),
        tab.meta['UL_CONF'] = kwargs.get('ul_confidence', 0.95)

The 95% scan (norm_ul95) is not dropped. dnde_ul is not rewritten.

Measured with astropy 8.0.1 on dummy one-bin SED dicts (n_paired=3; not Fermi event data):

ul_confidence current norm_ul / UL_CONF after rewrite
0.90 1.0 / 0.95 0.82 / 0.90
0.95 (control) 1.0 / 0.95 1.0 / 0.95
0.99 1.0 / 0.95 1.25 / 0.99

_make_sed already fills norm_ul at ul_confidence and dnde_ul already
uses that occupancy. The FITS writer still stored norm_ul95 under the
norm_ul column and hard-coded UL_CONF=0.95. Copy the configured values
instead. The 95% scan is unchanged.
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

Successfully merging this pull request may close these issues.

SED FITS output ignores configured ul_confidence for norm_ul

1 participant