Flux unit of FluxPoints object inconsistent when read from an ecsv file · Issue #5783 · gammapy/gammapy · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, the results are correct, even if the internal representation of the RegionNDMap could be surprising.
I think that there is no bug here.
Granted, the plotting works as expected. But I would e.g. expect that when I do fp.to_table(), I get the values in the same unit as stored in the file. But also in this case, the unit is changed to GeV2 TeV-1 cm-2 s-1. That is very much non-intuitive. There must be a way to use as default the specified unit, at least for anything that is accessible for the user.
Hi @lmohrmann internally the FluxPoints is an energy axis (here in GeV) and a reference model (in this case an E^-2 PL with amplitude in TeV- 1cm-2s-1), hence the weird format.
When plotting default units are applied to each flux quantity. It is not the case for table export indeed. It could probably be improved by imposing the same default flux units for the various types.
Gammapy version
1.3
Bug description
I have the following flux points stored in
ascii.ecsv
format:Note the unit specified for the
e2dnde
columns: it iserg cm-2 s-1
.When I read these flux points using
fp = FluxPoints.read("<...>")
and then e.g. look atfp.e2dnde
, I getThe unit is now
GeV2 TeV-1 cm-2 s-1
, which does not make a lot of sense.Expected behavior
The unit of the
e2dnde
objects should be as specified in the file.The text was updated successfully, but these errors were encountered: