Skip to content

Commit

Permalink
fix for missing meta keys
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Remy <[email protected]>
  • Loading branch information
QRemy committed Oct 17, 2024
1 parent 9b7f031 commit 38ca815
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gammapy/irf/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ def from_table(cls, table, format="gadf-dl3"):

if (
table.meta
and table.meta["CREATOR"] == "SASH FITS::EventListWriter"
and table.meta["HDUVERS"] == "0.2"
and table.meta.get("CREATOR", None) == "SASH FITS::EventListWriter"
and table.meta.get("HDUVERS", None) == "0.2"
):
# longitude is reverse in this production
data = data.value[:, :, ::-1]
values = data.value[:, :, ::-1]
else:
data = data.value
values = data.value

return cls(
axes=axes,
data=data,
data=values,
meta=table.meta,
unit=data.unit,
is_pointlike=gadf_is_pointlike(table.meta),
Expand Down

0 comments on commit 38ca815

Please sign in to comment.