Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposure computation wrong for GBM data >~ 2017 #1

Open
giacomov opened this issue Jun 8, 2018 · 1 comment
Open

Exposure computation wrong for GBM data >~ 2017 #1

giacomov opened this issue Jun 8, 2018 · 1 comment
Assignees
Labels

Comments

@giacomov
Copy link

giacomov commented Jun 8, 2018

evtbin/src/MultiSpec.cxx

Lines 147 to 159 in bcd2493

KeyValuePairCont_t::iterator found2 = m_key_value_pairs.find("EVT_DEAD");
KeyValuePairCont_t::iterator found3 = m_key_value_pairs.find("EVTDEDHI");
if (m_key_value_pairs.end() != found2 && !found2->second.empty()) {
double deadtime;
found2->second.getValue(deadtime);
double evtdedhi;
found3->second.getValue(evtdedhi);
double gbm_exposure=(gti.computeOntime())-(total_counts*deadtime)-(total_error_channel*evtdedhi);
(*table_itor)["EXPOSURE"].set(gbm_exposure);
}
total_counts=0;
total_error_channel=0;
}

I discovered this bug investigating a request to the Fermi helpdesk (number 3694).

Circa 2018 the keyword EVT_DEAD and EVTDEDHI went respectively from 2.6E-6 and 1.04170E-5 to 2.6D-6 and 1.04170D-5, i.e., from single precision to double precision floating point.

This trips gtbin into computing the exposure wrong.

This happens in the lines linked above for PHA2 spectra, but I think it is more general about the way keywords are read (probably assuming single precision floating point).

giacomov added a commit to fermi-lat/pyBurstAnalysisGUI that referenced this issue Jun 8, 2018
@donhorner donhorner added the bug label Mar 15, 2019
@donhorner
Copy link

@dagorym Can you take a look at this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants