diff --git a/metabolabpy/nmr/acqPars.py b/metabolabpy/nmr/acqPars.py index e4d8837..be93a4e 100644 --- a/metabolabpy/nmr/acqPars.py +++ b/metabolabpy/nmr/acqPars.py @@ -193,7 +193,11 @@ def parse_reg_ex(self): except: pass - self.temperature = float(self.reg_ex.temperature.findall(self.acqus_text)[0]) + try: + self.temperature = float(self.reg_ex.temperature.findall(self.acqus_text)[0]) + except: + self.temperature = 300 + dd = self.reg_ex.cnst.search(self.acqus_text) dd = self.acqus_text[dd.span()[0]:] dd = dd[dd.find('\n') + 1:] diff --git a/metabolabpy/nmr/nmrData.py b/metabolabpy/nmr/nmrData.py index 8b66ded..f505cb3 100644 --- a/metabolabpy/nmr/nmrData.py +++ b/metabolabpy/nmr/nmrData.py @@ -343,7 +343,7 @@ def autobaseline1d(self, lam=1e6, alg='rolling_ball', max_iter=50, alpha=0.1, be if alg == 'irsqr': baseline_fitter = Baseline(spc, check_finite=False) baseline, params = baseline_fitter.irsqr(spc, lam=lam, quantile=quantile) # poly_order=poly_order, method='imodpoly') - if alg == 'irsqr': + if alg == 'airpls': baseline_fitter = Baseline(spc, check_finite=False) baseline, params = baseline_fitter.airpls(spc, 1e5) # poly_order=poly_order, method='imodpoly') #baseline = airpls(spc, lam=lam, max_iter=max_iter)