Skip to content

Commit

Permalink
save NSID from list to dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Slautin committed Aug 23, 2024
1 parent b0e7526 commit d248b18
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SciFiReaders/readers/SID/Nsid_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,17 @@ def read_all(self, recursive=True, parent=None):
list_of_main = self._main_dsets
else:
list_of_main = []
keys = []
for key in h5_group:
if isinstance(h5_group[key], h5py.Dataset):
if check_if_main(h5_group[key]):
list_of_main.append(h5_group[key])
keys.append(key)

# Go through each of the identified
list_of_datasets = []
for dset in list_of_main:
list_of_datasets.append(read_h5py_dataset(dset))
list_of_datasets = {}
for i,dset in enumerate(list_of_main):
list_of_datasets[keys[i]] = read_h5py_dataset(dset)
return list_of_datasets

def close(self):
Expand Down

0 comments on commit d248b18

Please sign in to comment.