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

Flux point estimator API #1276

Closed
cdeil opened this issue Jan 31, 2018 · 1 comment
Closed

Flux point estimator API #1276

cdeil opened this issue Jan 31, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@cdeil
Copy link
Contributor

cdeil commented Jan 31, 2018

I'm having some trouble with the gammapy.spectrum.FluxPointEstimator

For the HESS test data release I noticed that by default when one makes a FluxPointEstimator and runs compute_points it gives results where the energies are in keV (should be TeV) and column dnde_errp and dnde_errn are added but not computed, which means that when plotting the flux points, the errors from dnde_err don't show up. Also the __init__ or compute_points don't expose options what to do, e.g. whether to compute upper limits or asymmetric errors or not. As a workaround, here is what I did in the HESS data release check script:

    # We do some clean-up of the results table
    table = fpe.flux_points.table
    table['e_ref'] = table['e_ref'].quantity.to('TeV')
    table['e_min'] = table['e_min'].quantity.to('TeV')
    table['e_max'] = table['e_max'].quantity.to('TeV')
    table.remove_columns(['dnde_errp', 'dnde_errn'])
    for name in ['e_ref', 'e_min', 'e_max', 'dnde', 'dnde_err', 'dnde_ul', 'sqrt_ts']:
        table[name].format = '.5e'

I would suggest to either add more options to __init__ or compute_points, or alternatively to advertise how to use the lower-level API of doing separate computations for each point.

#1140 by @bkhelifi is related. CC @registerrier @adonath @joleroi @lmohrmann

@cdeil cdeil added the feature label Jan 31, 2018
@cdeil cdeil added this to the 0.8 milestone Jan 31, 2018
@cdeil cdeil modified the milestones: 0.8, 0.9 May 7, 2018
@joleroi joleroi added this to To do in gammapy.makers via automation Jun 27, 2018
@cdeil cdeil assigned adonath and unassigned registerrier Oct 31, 2018
@adonath
Copy link
Member

adonath commented Nov 20, 2018

Addressed by #1929, #1933 and #1934.

@adonath adonath closed this as completed Nov 20, 2018
gammapy.makers automation moved this from To do to Done Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants