Skip to content

Commit

Permalink
Merge branch 'main' into info_fermi_catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
QRemy authored Oct 17, 2024
2 parents 1df95cc + 2a4d540 commit 5f34898
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gammapy/estimators/points/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def read(
format=None,
reference_model=None,
checksum=False,
table_format="ascii.ecsv",
**kwargs,
):
"""Read precomputed flux points.
Expand All @@ -198,6 +199,8 @@ def read(
Reference spectral model.
checksum : bool
If True checks both DATASUM and CHECKSUM cards in the file headers. Default is False.
table_format : str
Format string for the ~astropy.Table object. Default is "ascii.ecsv"
**kwargs : dict, optional
Keyword arguments passed to `astropy.table.Table.read`.
Expand All @@ -208,9 +211,8 @@ def read(
"""
filename = make_path(filename)
gti = None
kwargs.setdefault("format", "ascii.ecsv")
try:
table = Table.read(filename, **kwargs)
table = Table.read(filename, format=table_format, **kwargs)
except (IORegistryError, UnicodeDecodeError):
with fits.open(filename, checksum=checksum) as hdulist:
if "FLUXPOINTS" in hdulist:
Expand Down

0 comments on commit 5f34898

Please sign in to comment.