Skip to content

Commit

Permalink
Edited code
Browse files Browse the repository at this point in the history
  • Loading branch information
gifale95 committed Jan 17, 2025
1 parent 4d6d211 commit e4c0ed5
Show file tree
Hide file tree
Showing 3 changed files with 2,769 additions and 2,760 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ def load_stimulus_features(args, movie_split_names, movie_split_samples):
# using the corresponding stimulus feature sample minus the
# hrf_delay
elif mod == 'language':
idx = s + args.excluded_samples_start - args.hrf_delay
# In case there are no language features for the fMRI
# sample of interest minus the hrf_delay, model the fMRI
# sample using the first language feature sample
if s < args.hrf_delay:
idx = args.excluded_samples_start
else:
idx = s + args.excluded_samples_start - args.hrf_delay
# In case there are fewer language feature samples than
# fMRI samples minus the hrf_delay, use the last language
# feature sample available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ def load_stimulus_features(args, subject, fmri_samples):
# spanning several samples, only model each fMRI sample using
# the corresponding stimulus feature sample minus the hrf_delay
elif mod == 'language':
idx = s - args.hrf_delay
# In case there are no language features for the fMRI
# sample of interest minus the hrf_delay, model the fMRI
# sample using the first language feature sample
if s < args.hrf_delay:
idx = 0
else:
idx = s - args.hrf_delay
# In case there are fewer language feature samples than
# fMRI samples minus the hrf_delay, use the last language
# feature sample available
Expand Down
Loading

0 comments on commit e4c0ed5

Please sign in to comment.