Skip to content

Commit

Permalink
fixes #191
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Nov 21, 2019
1 parent 470899c commit 553fe45
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/spec2nexus/plugins/spec_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from ..plugin import AutoRegister, ControlLineHandler
from ..scanf import scanf
from ..spec import SpecDataFileHeader, SpecDataFileScan, DuplicateSpecScanNumber, MCA_DATA_KEY
from ..utils import strip_first_word, iso8601, split_column_labels
from ..utils import strip_first_word, iso8601, split_column_labels, clean_name
from ..writer import CONTAINER_CLASS


Expand Down Expand Up @@ -824,7 +824,12 @@ def writer(self, h5parent, writer, scan, nxclass=None, *args, **kws):
"""Describe how to store this data in an HDF5 NeXus file"""
desc='SPEC positioners (#P & #O lines)'
group = makeGroup(h5parent, 'positioners', nxclass, description=desc)
writer.save_dict(group, scan.positioner)
# writer.save_dict(group, scan.positioner)
for k, v in scan.positioner.items():
safe_name = clean_name(k)
pg = openGroup(group, safe_name, "NXpositioner")
write_dataset(pg, "name", safe_name, spec_name = k)
write_dataset(pg, "value", v, spec_name = k)
nxinstrument = openGroup(h5parent, 'instrument', "NXinstrument")
makeLink(h5parent, group, nxinstrument.name + "/positioners")

Expand Down

0 comments on commit 553fe45

Please sign in to comment.