Skip to content

Commit

Permalink
feat: handle xypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Lan Le committed Mar 19, 2024
1 parent 0c2c3a3 commit b736350
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nmrglue/fileio/jcampdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def getdataarray(dic, show_all_data=False):

if data is None: # XYDATA
try:
valuelist = dic["XYDATA"]
valuelist = valuelist = dic["XYDATA"] if "XYDATA" in dic.keys() else dic["XYPOINTS"]
if len(valuelist) > 1:
warn("Multiple XYDATA arrays in JCAMP-DX file, \
returning first one only")
Expand Down Expand Up @@ -695,7 +695,7 @@ def read(filename, show_all_data=False, read_err=None):
try:
subdiclist = dic["_datatype_NA"]
for subdic in subdiclist:
data = getdataarray(subdic)
data = getdataarray(subdic, show_all_data)
if data is not None:
correctdic = subdic
break
Expand Down

0 comments on commit b736350

Please sign in to comment.