Skip to content

Commit

Permalink
fix : sub_name is now cleaned (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitberanger committed Jan 19, 2022
1 parent 7b8633d commit d30b8fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion niix2bids/decision_tree/siemens.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,15 @@ def run(volume_list: List[Volume], config: list) -> None:

# call each routine depending on the sequence name
for sub_name, df_subject in df_by_subject: # loop over subjects
sub_name_clean = utils.clean_name(sub_name)
for seq_regex, fcn_name in config: # loop over sequence decision tree

# get list of corresponding sequence
seqinfo = utils.slice_with_genericfield(df_subject, 'PulseSequenceDetails', seq_regex)
if seqinfo.empty: continue # just to run the code faster

func = eval(fcn_name) # fetch the name of the prog_ to call dynamically
func(seqinfo, sub_name) # execute the prog_
func(seqinfo, sub_name_clean) # execute the prog_

# deal with unknown sequences
prog_UNKNOWN(df)
Expand Down

0 comments on commit d30b8fa

Please sign in to comment.