From 194ae95f03b987ecef632b19f4a62091ffec50d5 Mon Sep 17 00:00:00 2001 From: akremin Date: Fri, 23 Aug 2024 14:55:50 -0500 Subject: [PATCH] remove script desi_run_night --- bin/desi_run_night | 123 --------------------------------------------- 1 file changed, 123 deletions(-) delete mode 100755 bin/desi_run_night diff --git a/bin/desi_run_night b/bin/desi_run_night deleted file mode 100755 index 316eadbd9..000000000 --- a/bin/desi_run_night +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env python -# coding: utf-8 - -import argparse - -import os, sys -from desispec.scripts.submit_night import submit_night - -def parse_args(): # options=None): - """ - Creates an arguments parser for the desi run production - """ - parser = argparse.ArgumentParser(description="Submit a one past night of data for processing with the DESI data pipeline.") - - parser.add_argument("-n","--night", type=int, required=True, help="The night you want processed.") - parser.add_argument("--proc-obstypes", type=str, default=None, required=False, - help="The basic data obstypes to submit for processing. " + - "E.g. science, dark, twilight, flat, arc, zero.") - parser.add_argument("--z-submit-types", type=str, default='perexp,pernight', required=False, - help="The group types of redshifts that should be submitted with each exposure. If not "+ - "specified, default is 'perexp,pernight'. If "+ - "'false' or 'None' then no redshifts are submitted") - parser.add_argument("--dry-run-level", type=int, default=0, required=False, - help="If nonzero, this is a simulated run. If level=1 the scripts will be written but not submitted. "+ - "If level=2, the scripts will not be written or submitted. Logging will remain the same "+ - "for testing as though scripts are being submitted. Default is 0 (false).") - parser.add_argument("--tiles", type=str, required=False, default=None, - help="Comma separated list of TILEIDs to include; use -99 to include arcs/flats") - parser.add_argument("--surveys", type=str, required=False, default=None, - help="Comma separated list of surveys to include (e.g. sv1,sv3 or main); "+ - "use --proc-obstypes to filter out arcs/flats if desired") - parser.add_argument("--laststeps", type=str, required=False, default=None, - help="Comma separated list of LASTSTEP's to process " - + "(e.g. all, skysub, fluxcalib, ignore); " - + "by default we only process 'all'.") - # File and dir defs - #parser.add_argument("-s", "--specprod", type=str, required=False, default=None, - # help="Subdirectory under DESI_SPECTRO_REDUX to write the output files. "+\ - # "Overwrites the environment variable SPECPROD") - parser.add_argument("-q", "--queue", type=str, required=False, default='regular', - help="The queue to submit jobs to. Default is realtime.") - parser.add_argument("-r", "--reservation", type=str, required=False, default=None, - help="The reservation to submit jobs to. If None, it is not submitted to a reservation.") - parser.add_argument("--system-name", type=str, required=False, default=None, - help="Batch system name, e.g. cori-haswell, cori-knl, perlmutter-gpu, ...") - parser.add_argument("--exp-table-path", type=str, required=False, default=None, - help="Directory name where the output exposure table should be saved.") - parser.add_argument("--proc-table-path", type=str, required=False, default=None, - help="Directory name where the output processing table should be saved.") - parser.add_argument("--tab-filetype", type=str, required=False, default='csv', - help="File format and extension for the exp and proc tables.") - parser.add_argument("--complete-tiles-thrunight", type=int, required=False, default=None, - help="Only tiles completed on or before the supplied YYYYMMDD are " - +"considered complete and will be processed. None will process " - +"all completed tiles.") - # Code Flags - parser.add_argument("--dry-run", action="store_true", - help="Perform a dry run where no jobs are actually created or submitted. Overwritten if "+ - "dry-run-level is defined as nonzero.") - parser.add_argument("--no-redshifts", action="store_true", - help="Whether to submit redshifts or not. If set, redshifts are not submitted.") - parser.add_argument("--error-if-not-available", action="store_true", - help="Raise an error instead of reporting and moving on if an exposure "+\ - "table doesn't exist.") - parser.add_argument("--append-to-proc-table", action="store_true", - help="Give this flag if you want to submit jobs even if proc table exists."+ - " Note this will skip existing exposures present in proc table.") - parser.add_argument("--ignore-proc-table-failures", action="store_true", - help="Give this flag if you want to submit jobs even if "+ - " there are incomplete jobs in the existing proc table."+ - " Only to be used after vetting proc table failures.") - parser.add_argument("--dont-check-job-outputs", action="store_true", - help="If all files for a pending job exist and this is False, then the script will not be "+ - "submitted. If some files exist and this is True, only the "+ - "subset of the cameras without the final data products will be generated and submitted.") - parser.add_argument("--dont-resubmit-partial-jobs", action="store_true", - help="Must be False if --dont-check-job-outputs is False. If False, jobs with some prior data "+ - "are pruned using PROCCAMWORD to only process the remaining cameras not found to exist.") - parser.add_argument("--use-tilenight", action=argparse.BooleanOptionalAction, - help="Use desi_proc_tilenight (or not) for prestdstar, stdstar, and poststdstar steps. "+ - "Default False for NERSC Cori, True otherwise") - parser.add_argument("--all-tiles", action="store_true", - help="Set to NOT restrict to completed tiles as defined by the table pointed to by specstatus_path.") - parser.add_argument("--all-cumulatives", action="store_true", - help="Set to run cumulative redshifts for all tiles" - + "even if the tile has observations on a later night.") - parser.add_argument("--specstatus-path", type=str, required=False, default=None, - help="Location of the surveyops specstatus table. Default is "+ - "$DESI_SURVEYOPS/ops/tiles-specstatus.ecsv") - parser.add_argument("--use-specter", action="store_true", - help="Use specter. Default is to use gpu_specter") - parser.add_argument("--do-cte-flat", action="store_true", - help="If flag set then one second flat exposures are " - + "processed for cte identification.") - - args = parser.parse_args() - - # convert str lists to actual lists - if args.proc_obstypes is not None: - args.proc_obstypes = [pobstype.strip().lower() for pobstype in - args.proc_obstypes.split(',')] - - if args.tiles is not None: - args.tiles = [int(tileid) for tileid in args.tiles.split(',')] - - if args.surveys is not None: - args.surveys = [survey.strip().lower() for survey in args.surveys.split(',')] - - if args.laststeps is not None: - args.laststeps = [laststep.strip().lower() for laststep in args.laststeps.split(',')] - - if args.use_tilenight is None: - if 'NERSC_HOST' in os.environ and os.environ['NERSC_HOST'] == 'cori': - args.use_tilenight = False - else: - args.use_tilenight = True - - return args - -if __name__ == '__main__': - args = parse_args() - - sys.exit(submit_night(**args.__dict__))