Skip to content

Commit

Permalink
Merge pull request #248 from OHBA-analysis/maxfilter_fix
Browse files Browse the repository at this point in the history
Fix transsss filename issue in maxfilter
  • Loading branch information
matsvanes authored Jan 3, 2024
2 parents 66b2ccc + a754184 commit 7ada305
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions osl/maxfilter/maxfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ def run_maxfilter(infif, outfif, args, logfile_tag=''):

if ('tsss' in args) and args['tsss']:
outfif = outfif.replace('.fif', 'tsss.fif')
elif ('trans' in args) and args['trans']:
outfif = outfif.replace('.fif', 'trans.fif')
elif logfile_tag != '_trans':
outfif = outfif.replace('.fif', 'sss.fif')

Expand Down Expand Up @@ -498,8 +500,8 @@ def run_multistage_maxfilter(infif, outbase, args):
if ('trans' in args) and args['trans'] is not None:

infif = outfif # input is output from previous stage
outfif = outbase.format('trans.fif')
outlog = outbase.format('trans.log')
outfif = outbase.format('.fif')
outlog = outbase.format('.log')

if os.path.exists(outfif):
os.remove(outfif)
Expand Down Expand Up @@ -615,8 +617,8 @@ def run_cbu_3stage_maxfilter(infif, outbase, args):
# Stage 3 - Translate to default

infif = outfif # input is output from previous stage
outfif = outbase.format('trans.fif')
outlog = outbase.format('trans.log')
outfif = outbase.format('.fif')
outlog = outbase.format('.log')

if os.path.exists(outfif):
os.remove(outfif)
Expand Down

0 comments on commit 7ada305

Please sign in to comment.