Skip to content

Commit

Permalink
fixes a bug when the hdf5 file does not contain element maps
Browse files Browse the repository at this point in the history
  • Loading branch information
ddale committed Dec 18, 2011
1 parent 282a160 commit 527eaca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions praxes/fluorescence/results.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def __init__(self, storage, elements=None, shape=None):
element_maps.create_dataset(entry, type=cls, data=data) element_maps.create_dataset(entry, type=cls, data=data)


with self._storage: with self._storage:
shape = self._storage.entry.acquisition_shape if 'element_maps' in self._storage:
for k, v in self._storage['element_maps'].items(): shape = self._storage.entry.acquisition_shape
self._cache[k] = v[()].reshape(shape) for k, v in self._storage['element_maps'].items():
self._cache[k] = v[()].reshape(shape)


def update_fit(self, element, index, value): def update_fit(self, element, index, value):
with self._lock: with self._lock:
Expand Down

0 comments on commit 527eaca

Please sign in to comment.