We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 588bb61 commit b0081b1Copy full SHA for b0081b1
src/pybkgmodel/data.py
@@ -585,11 +585,10 @@ def is_compatible(cls, file_name):
585
compatible = False
586
587
try:
588
- with fits.open(ext) as file:
589
- pass
590
- compatible = True
+ with fits.open(ext):
+ compatible = True
591
except OSError:
592
- compatible = False
+ pass
593
594
return compatible
595
@@ -646,8 +645,8 @@ def load_events(cls, file_name):
646
645
'ENERGY': 'event_energy',
647
}
648
649
- with fits.open(file_name, memmap=False) as input_file, \
650
- erfa_astrom.set(ErfaAstromInterpolator(1 * u.s)):
+ with (fits.open(file_name, memmap=False) as input_file,
+ erfa_astrom.set(ErfaAstromInterpolator(1 * u.s))):
651
652
evt_hdu = input_file["EVENTS"]
653
evt_head = evt_hdu.header
0 commit comments