Permalink
Browse files

fixes a bug when the hdf5 file does not contain element maps

  • Loading branch information...
1 parent 282a160 commit 527eaca65eb1681eef8c1e9a56284bc5f3394f04 @ddale ddale committed Dec 18, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 praxes/fluorescence/results.py
@@ -31,9 +31,10 @@ def __init__(self, storage, elements=None, shape=None):
element_maps.create_dataset(entry, type=cls, data=data)
with self._storage:
- shape = self._storage.entry.acquisition_shape
- for k, v in self._storage['element_maps'].items():
- self._cache[k] = v[()].reshape(shape)
+ if 'element_maps' in self._storage:
+ shape = self._storage.entry.acquisition_shape
+ for k, v in self._storage['element_maps'].items():
+ self._cache[k] = v[()].reshape(shape)
def update_fit(self, element, index, value):
with self._lock:

0 comments on commit 527eaca

Please sign in to comment.