diff --git a/acis_thermal_check/main.py b/acis_thermal_check/main.py index 79330400..fb67d8f2 100644 --- a/acis_thermal_check/main.py +++ b/acis_thermal_check/main.py @@ -141,11 +141,12 @@ def run(self, args, override_limits=None): print(f"acis_thermal_check version {version}") return - # First, record the selected state builder in the class attributes - self.state_builder = make_state_builder(args.state_builder, args) - + # First, do some initial setup and log important information. proc = self._setup_proc_and_logger(args) + # Record the selected state builder in the class attributes + self.state_builder = make_state_builder(args.state_builder, args) + # If args.run_start is not none, write validation and prediction # data to a pickle later self.write_pickle = args.run_start is not None diff --git a/acis_thermal_check/state_builder.py b/acis_thermal_check/state_builder.py index f474e837..4f9cc38b 100644 --- a/acis_thermal_check/state_builder.py +++ b/acis_thermal_check/state_builder.py @@ -199,8 +199,11 @@ def get_prediction_states(self, tbegin): #------------------------------------------------------------------------------- class ACISStateBuilder(StateBuilder): - def __init__(self, interrupt=False, backstop_file=None, nlet_file=None, - verbose=2, logger=None): + def __init__(self, interrupt=False, + backstop_file=None, + nlet_file=None, + outdir=None, + verbose=2, logger=None): """ Give the ACISStateBuilder arguments that were passed in from the command line and get the backstop commands from the load @@ -221,6 +224,7 @@ def __init__(self, interrupt=False, backstop_file=None, nlet_file=None, logger : Logger object, optional The Python Logger object to be used when logging. """ + # Import the BackstopHistory class from backstop_history import BackstopHistory @@ -230,6 +234,7 @@ def __init__(self, interrupt=False, backstop_file=None, nlet_file=None, # Create an instance of the Backstop command History Class self.BSC = BackstopHistory.Backstop_History_Class('ACIS-Continuity.txt', self.nlet_file, + outdir, verbose) super(ACISStateBuilder, self).__init__() diff --git a/acis_thermal_check/utils.py b/acis_thermal_check/utils.py index b98a0e76..b751c77f 100644 --- a/acis_thermal_check/utils.py +++ b/acis_thermal_check/utils.py @@ -428,6 +428,7 @@ def make_state_builder(name, args): state_builder = builder_class(interrupt=args.interrupt, backstop_file=args.backstop_file, nlet_file=args.nlet_file, + outdir=args.outdir, verbose=args.verbose, logger=mylog) else: