Skip to content

Commit

Permalink
bug fix to splineSG
Browse files Browse the repository at this point in the history
  • Loading branch information
lauracarlton committed Mar 11, 2024
1 parent 4c1b2d6 commit fd7cecd
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 30 deletions.
77 changes: 48 additions & 29 deletions examples/splineSG_motion_correct.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/cedalion/sigproc/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def detect_baselineshift(fNIRSdata: cdt.NDTimeSeries, M: cdt.NDTimeSeries):

sig = channel.copy()
sig.values = np.ones(channel.shape) # initialize array for baseline shift detection
sig.values[np.where(channel_M.values == False)[0]] = 0 # set indices where motion is detected to 0
sig.values[np.where(channel_M.values == True)[0]] = 0 # set indices where motion is detected to 0

# find locations where signal goes from clean -> motion -> clean
temp = sig.diff('time')
Expand Down

0 comments on commit fd7cecd

Please sign in to comment.