From 98c4dc4b79f4bafcf062f0874d276581935f6fd9 Mon Sep 17 00:00:00 2001 From: JenniferKarr Date: Wed, 16 Oct 2024 11:55:45 +0800 Subject: [PATCH] Added code to generate prototypes of the external/static calibration files. PRO.CATG is set according to DRLD values. Added a command line option --doStatic to run_recipes to trigger the code --- ESO/runRecipes.py | 10 +++++++++- ESO/run_recipes.py | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ESO/runRecipes.py b/ESO/runRecipes.py index c928b40..c9dd00f 100644 --- a/ESO/runRecipes.py +++ b/ESO/runRecipes.py @@ -47,6 +47,11 @@ def parseCommandLine(self,args): default=False, help=('use detectors of 32x32 pixels; ' + 'for running in the continuous integration')) + + parser.add_argument('-e', '--doStatic', action = "store_true", + default=False, + help=('Generate prototypes for static/external calibration files')) + parser.add_argument('-c', '--catg', type=str, help='comma-separated list of selected output file categories') parser.add_argument('--doCalib', type=int, @@ -97,7 +102,9 @@ def parseCommandLine(self,args): params['small'] = args.small - + + params['doStatic'] = args.doStatic + params['testRun'] = args.testRun params['calibFile'] = args.calibFile @@ -112,6 +119,7 @@ def parseCommandLine(self,args): print(f" Observation dates will be taken from YAML file if given") print(f" Automatically generated darks and flats {params['doCalib']}") print(f" Small output option {params['small']}") + print(f" Generate External Calibs {params['doCalib']}") self.params = params diff --git a/ESO/run_recipes.py b/ESO/run_recipes.py index d22cc52..c7d1d7a 100755 --- a/ESO/run_recipes.py +++ b/ESO/run_recipes.py @@ -55,7 +55,8 @@ def runRecipes(argv): if(not simulationSet.params['testRun']): simulationSet.updateHeaders() - makeCalibPrototypes.generateStaticCalibs(simulationSet.params['outputDir']) + if(simulationSet.params['doStatic']): + makeCalibPrototypes.generateStaticCalibs(simulationSet.params['outputDir']) if __name__ == "__main__":