Skip to content

Commit 6bd5a20

Browse files
committed
Minor bugfix in loader, in processor : use the first slice for 2d basline correction.
1 parent 8b4eef8 commit 6bd5a20

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

eprpy/loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,11 @@ def integral(self):
426426

427427
_integrate(self)
428428

429-
def baseline_correction(eprdata,interactive=False,
429+
def baseline_correct(self,interactive=False,
430430
npts=10,method='linear',spline_smooth=1e-5,
431431
order=2):
432432

433-
_baseline_correct(eprdata,interactive,
433+
_baseline_correct(self,interactive,
434434
npts,method,spline_smooth,order)
435435

436436
def select_region(self,region):

eprpy/processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def _baseline_correct_2d(x,y,interactive=False,
220220
if interactive:
221221
baseline_points = interactive_points_selector(x,y[0])
222222
else:
223-
baseline_points=np.concatenate([np.arange(npts), np.arange(len(y) - npts, len(y))])
223+
baseline_points=np.concatenate([np.arange(npts), np.arange(len(y[0]) - npts, len(y[0]))])
224224

225225
baselines = np.empty_like(y)
226226
if baseline_points is not None and len(baseline_points) > 0:

0 commit comments

Comments
 (0)