Skip to content

Commit

Permalink
Added a command line option to run without motion timecourses
Browse files Browse the repository at this point in the history
  • Loading branch information
bbfrederick committed Oct 26, 2023
1 parent 2d5377c commit 3e825fc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions picachooser/scripts/PICAchooser
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def findfromfeatdir(featdir, initBGfile, initFuncfile, initMotionfile):
motionfile = initMotionfile
if not os.path.isfile(motionfile):
print("cannot find motion parameter file at", motionfile)
sys.exit()
# sys.exit()

return bgfile, Funcfile, motionfile

Expand Down Expand Up @@ -661,7 +661,6 @@ def main():
mainwin = None
verbose = False
usereferencefile = False
domotion = True
dotimecourse = True
retainthresh = DEFAULT_RETAINTHRESH

Expand Down Expand Up @@ -956,6 +955,13 @@ def main():
)

debugging = parser.add_argument_group("Debugging arguments")
debugging.add_argument(
"--nomotion",
dest="domotion",
action="store_false",
help=("Turn off motion timecourse tracking."),
default=True,
)
debugging.add_argument(
"--verbose",
action="store_true",
Expand All @@ -982,6 +988,7 @@ def main():
verbose = args.verbose
usereferencefile = args.usereferencefile
retainthresh = args.retainthresh
domotion = args.domotion

# make sure we can find the required input files
# first see if there are specific overrides
Expand Down Expand Up @@ -1010,7 +1017,7 @@ def main():
print("Cannot set functional file. Use either the --featdir or --Funcfile option.")
sys.exit()

if Motionfile is None and runmode != "groupmelodic":
if Motionfile is None and domotion and runmode != "groupmelodic":
print(
"Cannot set motion timecourse file. Use either the --featdir or --motionfile option."
)
Expand Down Expand Up @@ -1373,7 +1380,7 @@ def main():
whichcomponent = 0

# make the main window
if domotion:
if dotimecourse:
import picachooser.picachooserTemplate as uiTemplate
else:
import picachooser.picachooser_imonlyTemplate as uiTemplate
Expand Down

0 comments on commit 3e825fc

Please sign in to comment.