From b736350f0842f49f84ec8aa3e07ed187f852d767 Mon Sep 17 00:00:00 2001 From: Lan Le Date: Tue, 19 Mar 2024 11:40:35 +0100 Subject: [PATCH] feat: handle xypoints --- nmrglue/fileio/jcampdx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nmrglue/fileio/jcampdx.py b/nmrglue/fileio/jcampdx.py index d602e803..ed7fb444 100644 --- a/nmrglue/fileio/jcampdx.py +++ b/nmrglue/fileio/jcampdx.py @@ -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") @@ -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