Skip to content

Commit

Permalink
fixing madspeedfilder
Browse files Browse the repository at this point in the history
max_dilation speed was initialized as np.empty but should be an array of np.nans
  • Loading branch information
LinaTeichmann1 authored Mar 5, 2024
1 parent 81b50f9 commit bf5db9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nih2mne/eyetracking_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def madspeedfilter(tv,dia,is_valid):
fwd_dilation = np.pad(cur_dia_speed,(0,1),constant_values=np.nan)
back_fwd_dilation = np.vstack([back_dilation,fwd_dilation])

max_dilation_speed = np.empty_like(dia)
max_dilation_speed = np.full_like(dia,np.nan)
max_dilation_speed[is_valid] = np.nanmax(np.abs(back_fwd_dilation),axis=0)
max_dilation_speed

Expand Down Expand Up @@ -346,4 +346,4 @@ def process_run(raw_fname):
args = parser.parse_args()

raw_fname = args.fname
process_run(raw_fname)
process_run(raw_fname)

0 comments on commit bf5db9f

Please sign in to comment.