Skip to content

Commit

Permalink
#119 #H label delimiters
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Dec 14, 2017
1 parent d4eb61d commit d93cecf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/spec2nexus/plugins/unicat_spec2nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import re
from spec2nexus.plugin import ControlLineHandler
from spec2nexus.utils import strip_first_word, split_column_labels
from spec2nexus.utils import strip_first_word
from spec2nexus import eznx


Expand Down Expand Up @@ -53,7 +53,8 @@ class UNICAT_MetadataMnemonics(ControlLineHandler):
key = '#H\d+'

def process(self, text, spec_obj, *args, **kws):
labels = strip_first_word(text).split()
row_text = strip_first_word(text)
labels = re.split(r" +", row_text)
spec_obj.H.append(labels)


Expand Down Expand Up @@ -95,7 +96,7 @@ def process(self, text, scan, *args, **kws):
values = re.split(delimiter, row_text)
if len(scan.header.H[index]) == len(values):
break
# issue #107: values = split_column_labels(row_text)

scan.V.append(values)
scan.addPostProcessor('unicat_metadata', self.postprocess)

Expand Down

0 comments on commit d93cecf

Please sign in to comment.