Skip to content

Commit 5a1c93e

Browse files
Load event data from /fITS
1 parent 1a21b16 commit 5a1c93e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

hendrics/io.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def recognize_stingray_table(obj):
464464
return "AveragedPowerspectrum"
465465
if "counts" in obj.colnames:
466466
return "Lightcurve"
467-
if "time" in obj.colnames:
467+
if "time" in [c.lower() for c in obj.colnames]:
468468
return "EventList"
469469
raise ValueError(f"Object not recognized:\n{obj}")
470470

@@ -1075,11 +1075,14 @@ def load_data(fname):
10751075
elif fmt == "nc":
10761076
return _load_data_nc(fname)
10771077

1078+
if fmt == "ogip":
1079+
fmt = "fits"
1080+
10781081
try:
10791082
return Table.read(fname, format=fmt)
10801083
except Exception as e:
10811084
raise TypeError(
1082-
"The file type is not recognized. Did you convert the"
1085+
f"The file type is not recognized fmt={fmt}. Did you convert the"
10831086
" original files into HENDRICS format (e.g. with "
10841087
"HENreadevents or HENlcurve)?"
10851088
)

0 commit comments

Comments
 (0)