Skip to content

Instantly share code, notes, and snippets.

@joleroi
Created March 3, 2017 17:48
Show Gist options
  • Save joleroi/b8b35180d3956b933a4f451c8205cf66 to your computer and use it in GitHub Desktop.
Save joleroi/b8b35180d3956b933a4f451c8205cf66 to your computer and use it in GitHub Desktop.
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-56-9abdbbe5bae3> in <module>()
7 exclusion_mask=exclusion_mask)
8
----> 9 images = image_estimator.run(observation_list)
/home/kingj/Software/gammapy/gammapy/image/basic.pyc in run(self, observations, which)
246 for observation in observations:
247 if 'counts' in which:
--> 248 counts = self._counts(observation)
249 result['counts'].data += counts.data
250
/home/kingj/Software/gammapy/gammapy/image/basic.pyc in _counts(self, observation)
195 """
196 p = self.parameters
--> 197 events = observation.events.select_energy((p['emin'], p['emax']))
198
199 #TODO: check if a lower offset bound different from zero is needed.
/home/kingj/Software/miniconda3/envs/headversions/lib/python2.7/site-packages/astropy-1.3-py2.7-linux-x86_64.egg/astropy/utils/decorators.pyc in __get__(self, obj, owner)
720 return obj.__dict__[self._key]
721 except KeyError:
--> 722 val = self.fget(obj)
723 obj.__dict__[self._key] = val
724 return val
/home/kingj/Software/gammapy/gammapy/data/data_store.pyc in events(self)
492 def events(self):
493 """Load `gammapy.data.EventList` object (lazy property)."""
--> 494 return self.load(hdu_type='events')
495
496 @lazyproperty
/home/kingj/Software/gammapy/gammapy/data/data_store.pyc in load(self, hdu_type, hdu_class)
487 """
488 location = self.location(hdu_type=hdu_type, hdu_class=hdu_class)
--> 489 return location.load()
490
491 @lazyproperty
/home/kingj/Software/gammapy/gammapy/data/hdu_index_table.pyc in load(self)
77 if hdu_class == 'events':
78 from ..data import EventList
---> 79 return EventList.read(filename, hdu=hdu_name)
80 elif hdu_class == 'gti':
81 from ..data import GTI
/home/kingj/Software/gammapy/gammapy/data/event_list.pyc in read(cls, filename, **kwargs)
101 kwargs.update(hdu='EVENTS')
102
--> 103 table = Table.read(str(filename), **kwargs)
104 return cls(table=table)
105
/home/kingj/Software/miniconda3/envs/headversions/lib/python2.7/site-packages/astropy-1.3-py2.7-linux-x86_64.egg/astropy/table/table.pyc in read(cls, *args, **kwargs)
2428 passed through to the underlying data reader (e.g. `~astropy.io.ascii.read`).
2429 """
-> 2430 return io_registry.read(cls, *args, **kwargs)
2431
2432 def write(self, *args, **kwargs):
/home/kingj/Software/miniconda3/envs/headversions/lib/python2.7/site-packages/astropy-1.3-py2.7-linux-x86_64.egg/astropy/io/registry.pyc in read(cls, *args, **kwargs)
451 try:
452 ctx = get_readable_fileobj(args[0], encoding='binary')
--> 453 fileobj = ctx.__enter__()
454 except IOError:
455 raise
/home/kingj/Software/miniconda3/envs/headversions/lib/python2.7/contextlib.pyc in __enter__(self)
15 def __enter__(self):
16 try:
---> 17 return self.gen.next()
18 except StopIteration:
19 raise RuntimeError("generator didn't yield")
/home/kingj/Software/miniconda3/envs/headversions/lib/python2.7/site-packages/astropy-1.3-py2.7-linux-x86_64.egg/astropy/utils/data.pyc in get_readable_fileobj(name_or_obj, encoding, cache, show_progress, remote_timeout)
197 timeout=remote_timeout)
198 if six.PY2:
--> 199 fileobj = open(name_or_obj, 'rb')
200 else:
201 fileobj = io.FileIO(name_or_obj, 'r')
IOError: [Errno 2] No such file or directory: '/home/kingj/Work/cta-dc/data/1dc_test/data/gps_baseline_000001.fits'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment