Skip to content

Commit

Permalink
Merge pull request #42 from acisops/Use_CR_Backstop_Files
Browse files Browse the repository at this point in the history
Write .hist files to --outdir directory
  • Loading branch information
Gregg140 authored Oct 22, 2021
2 parents 65639e9 + 6640e21 commit 88c3f8e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 4 additions & 3 deletions acis_thermal_check/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions acis_thermal_check/state_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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__()

Expand Down
1 change: 1 addition & 0 deletions acis_thermal_check/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 88c3f8e

Please sign in to comment.