From 3e825fc64391c9016bca9bb6bf4232e6f178153d Mon Sep 17 00:00:00 2001 From: Blaise deB Frederick Date: Thu, 26 Oct 2023 16:01:05 -0400 Subject: [PATCH] Added a command line option to run without motion timecourses --- picachooser/scripts/PICAchooser | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/picachooser/scripts/PICAchooser b/picachooser/scripts/PICAchooser index 076aa78..6dd189f 100755 --- a/picachooser/scripts/PICAchooser +++ b/picachooser/scripts/PICAchooser @@ -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 @@ -661,7 +661,6 @@ def main(): mainwin = None verbose = False usereferencefile = False - domotion = True dotimecourse = True retainthresh = DEFAULT_RETAINTHRESH @@ -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", @@ -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 @@ -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." ) @@ -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