Skip to content

Commit

Permalink
[BUG] multiple space chars causing wrong entities for FSL parser
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Oct 3, 2024
1 parent 7bcf386 commit 5b9d420
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bids_prov/fsl/description_functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Name": "fslmaths",
"Used": [0, "-add","-sub","-mul","-div","-rem","-mas","-max","-min","-seed","-restart","-save"],
"GeneratedBy": [1],
"ParametersValue" : ["-dt", "-odt","-thr","-thrp","-thrP","-uthr","-uthrp","-uthrP",
"ParametersValue" : ["-dt", "-odt","-thr","-thrp","-thrP","-uthr","-uthrp","-uthrP", "-bptf",
{
"Name": "-grid",
"Index": ["0:2"]
Expand Down
3 changes: 3 additions & 0 deletions bids_prov/fsl/fsl_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ def build_records(groups: Mapping[str, List[str]], agent_id: str, verbose: bool
for cmd in v:
# process to remove + and - in pngappend command
cmd = cmd.replace(" + ", " ").replace(" - ", " ")
# remove multiple spaces
cmd = ' '.join(cmd.split())
# split according to the following chars " ", "|", and "="
cmd_s = re.split(" |=", cmd)
activity_name = cmd_s[0]

Expand Down

0 comments on commit 5b9d420

Please sign in to comment.