def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", datasetType=cls.inputDataset, level="sensor", help="data ID, e.g. --id visit=12345 ccd=0") return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", cls.inputDataset, help="data ID, e.g. --id tract=12345", ContainerClass=TractObjectDataIdContainer) return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", cls.inputDataset, ContainerClass=CoaddDataIdContainer, help="data ID, e.g. --id tract=12345 patch=1,2") return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="dcrCoadd", help="data ID, e.g. --id tract=12345 patch=1,2 filter=g, subfilter=0", ContainerClass=ExistingCoaddDataIdContainer) return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) datasetType = ConfigDatasetType(name="calexpType") parser = ArgumentParser(name="skyCorr", *args, **kwargs) parser.add_id_argument("--id", datasetType=datasetType, level="visit", help="data ID, e.g. --id visit=12345") return parser
def _makeArgumentParser(cls, **kwargs): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", "raw", level="sensor", help="data ID, e.g. --id visit=12345 ccd=2", ContainerClass=RawDataIdContainer) return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", "jointcal_wcs", help="data ID, with raw CCD keys + tract", ContainerClass=PerTractCcdDataIdContainer) return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", "calexp", help="data ID, e.g. --id visit=12345", ContainerClass=VisitDataIdContainer) return parser
def _makeArgumentParser(cls, *args, **kwargs): parser = ArgumentParser(name="processBfdPatch", *args, **kwargs) parser.add_id_argument("--id", "deepCoadd", help="data ID, e.g. --id tract=12345 patch=1,2", ContainerClass=CoaddDataIdContainer) return parser
def _makeArgumentParser(cls): # Customize argument parsing for CmdLineTask. parser = ArgumentParser(name=cls._DefaultName) # This should be config.images.name, but there's no way to pass that # information in here in Gen2. parser.add_argument("--dir", dest="dir", default='./', help="location of files") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="sourceTableDriver", *args, **kwargs) parser.add_id_argument("--id", datasetType="src", level="sensor", help="data ID, e.g. --id visit=12345 ccd=67") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="singleFrameDriver", *args, **kwargs) parser.add_id_argument("--id", datasetType=ConfigDatasetType(name="processCcd.isr.datasetType"), level="sensor", help="data ID, e.g. --id visit=12345 ccd=67") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="forcedPhotCcdDiaDriver", *args, **kwargs) parser.add_id_argument("--id", "deepDiff_differenceExp", help="data ID with raw CCD keys" "e.g. --id visit=12345 ccd=1,2") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="visualizeVisit", *args, **kwargs) parser.add_id_argument("--id", datasetType="calexp", level="visit", help="data ID, e.g. --id visit=12345") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) #Not sure what this does or if it's necessary. parser = ArgumentParser(name=cls._DefaultName, *args, **kwargs) parser.add_id_argument("--id", "calexp", help="data ID, e.g. --id visit=12345 ccd=67") return parser
def _makeArgumentParser(cls, *args, **kwargs): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", datasetType="raw", help="input identifiers, e.g., --id visit=123 ccd=4") parser.add_argument("--lineList", help="Reference line list", default=os.path.join(getPackageDir("obs_pfs"), "pfs", "lineLists", "ArCdHgKrNeXe.txt")) return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop('doBatch', False) # Unused parser = ArgumentParser(name="demo", *args, **kwargs) parser.add_id_argument("--id", datasetType="raw", level="visit", help="data ID, e.g. --id visit=12345") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name=cls._DefaultName, *args, **kwargs) parser.add_id_argument("--id", "deepCoadd", help="data ID, e.g. --id tract=12345 patch=1,2", ContainerClass=TractDataIdContainer) return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="singleFrameDriver", *args, **kwargs) parser.add_id_argument( "--id", datasetType=ConfigDatasetType(name="processCcd.isr.datasetType"), level="sensor", help="data ID, e.g. --id visit=12345 ccd=67") return parser
def __init__(self, calibName, *args, **kwargs): """Add a --calibId argument to the standard pipe_base argument parser""" ArgumentParser.__init__(self, *args, **kwargs) self.calibName = calibName self.add_id_argument("--id", datasetType="raw", help="input identifiers, e.g., --id visit=123 ccd=4") self.add_argument("--calibId", nargs="*", action=CalibIdAction, default={}, help="identifiers for calib, e.g., --calibId version=1", metavar="KEY=VALUE1[^VALUE2[^VALUE3...]")
def _makeArgumentParser(cls, **kwargs): """ Selection references are not cheap (reads Wcs), so are generated only if we're not doing a batch submission. """ parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", "deepCoadd", help="data ID, e.g. --id tract=12345 patch=1,2", ContainerClass=TractDataIdContainer) parser.add_id_argument("--selectId", "calexp", help="data ID, e.g. --selectId visit=6789 ccd=0..9") return parser
def _makeArgumentParser(cls): # Customize argument parsing for CmdLineTask. parser = ArgumentParser(name=cls._DefaultName) # This should be config.images.name, but there's no way to pass that # information in here in Gen2. datasetType = "deepCoadd_calexp" parser.add_id_argument("--id", datasetType, ContainerClass=ExistingCoaddDataIdContainer, help="data ID, e.g. --id tract=12345 patch=1,2 filter=g^r^i") return parser
def _makeArgumentParser(cls, *args, **kwargs): """ makes the argument parser. this task won't work for tracts/patches as it's currently written """ doBatch = kwargs.pop("doBatch", False) parser = ArgumentParser(name=cls._DefaultName, *args, **kwargs) parser.add_id_argument("--id", datasetType="raw", level="visit", help="data ID, e.g. --id visit=12345") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="processCcdWithFakesDriver", *args, **kwargs) parser.add_id_argument( "--id", "fakes_calexp", help="data ID, e.g. --id visit=12345 ccd=67, tract=9813", ContainerClass=PerTractCcdDataIdContainer) return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="forcedPhotCoaddDiaDriver", *args, **kwargs) parser.add_id_argument("--id", "deepCoadd", help="data ID with coadd keys" "e.g. --id tract=1234^12345 filter=r^i^z", ContainerClass=TractDataIdContainer) return parser
def _makeArgumentParser(cls): """Create a suitable ArgumentParser We will use the ArgumentParser to get a provide a list of data references for patches; the RunnerClass will sort them into lists of data references for the same patch """ parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", "deepCoadd_" + cls.inputDataset, ContainerClass=ExistingCoaddDataIdContainer, help="data ID, e.g. --id tract=12345 patch=1,2 filter=g^r^i") return parser
def _makeArgumentParser(cls, *args, **kwargs): """ Make the argument parser. Modified by Song Huang; To work on coadd images """ kwargs.pop("doBatch", False) parser = ArgumentParser(name=cls._DefaultName, *args, **kwargs) parser.add_id_argument("--id", "deepCoadd_calexp", help="data ID, e.g. --id tract=12345", ContainerClass=TractDataIdContainer) return parser
def __init__(self, *args, **kwargs): ArgumentParser.__init__(self, *args, **kwargs) self.add_argument("-n", "--dry-run", dest="dryrun", action="store_true", default=False, help="Don't perform any action?") self.add_argument("--create", action="store_true", help="Create new registry?") self.add_argument("--validity", type=int, help="Calibration validity period (days)") self.add_argument("--calibType", type=str, default=None, choices=[None, "bias", "dark", "flat", "fringe", "defect"], help="Type of the calibration data to be ingested;" + " if omitted, the type is determined from" + " the file header information") self.add_argument("files", nargs="+", help="Names of file")
def makeMergeArgumentParser(name, dataset): """! @brief Create a suitable ArgumentParser. We will use the ArgumentParser to get a provide a list of data references for patches; the RunnerClass will sort them into lists of data references for the same patch """ parser = ArgumentParser(name) parser.add_id_argument("--id", "deepCoadd_" + dataset, ContainerClass=ExistingCoaddDataIdContainer, help="data ID, e.g. --id tract=12345 patch=1,2 filter=g^r^i") return parser
def _makeArgumentParser(cls): """Create a suitable ArgumentParser. We will use the ArgumentParser to get a provide a list of data references for patches; the RunnerClass will sort them into lists of data references for the same patch """ parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="dcrCoadd_" + cls.inputDataset, ContainerClass=ExistingCoaddDataIdContainer, help="data ID, e.g. --id tract=12345 patch=1,2 filter=g, subfilter=0^1^2") return parser
def __init__(self, calibName, *args, **kwargs): """Add a --calibId argument to the standard pipe_base argument parser""" ArgumentParser.__init__(self, *args, **kwargs) self.calibName = calibName self.add_id_argument( "--id", datasetType="raw", help="input identifiers, e.g., --id visit=123 ccd=4") self.add_argument( "--calibId", nargs="*", action=CalibIdAction, default={}, help="identifiers for calib, e.g., --calibId version=1", metavar="KEY=VALUE1[^VALUE2[^VALUE3...]")
def _makeArgumentParser(cls, **kwargs): """!Build argument parser Selection references are not cheap (reads Wcs), so are generated only if we're not doing a batch submission. """ parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument("--id", "deepCoadd", help="data ID, e.g. --id tract=12345 patch=1,2", ContainerClass=TractDataIdContainer) parser.add_id_argument( "--selectId", "calexp", help="data ID, e.g. --selectId visit=6789 ccd=0..9") parser.addReuseOption(["makeCoaddTempExp", "assembleCoadd", "detectCoaddSources"]) return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="dcrCoadd_calexp", help="data ID, e.g. --id tract=12345 patch=1,2 filter=g, subfilter=0", ContainerClass=ExistingCoaddDataIdContainer) parser.add_argument("--psfCache", type=int, default=100, help="Size of CoaddPsf cache") return parser
def parse_args(self, *args, **kwargs): """Parse arguments Checks that the "--calibId" provided works. """ namespace = ArgumentParser.parse_args(self, *args, **kwargs) keys = namespace.butler.getKeys(self.calibName) parsed = {} for name, value in namespace.calibId.items(): if name not in keys: self.error("%s is not a relevant calib identifier key (%s)" % (name, keys)) parsed[name] = keys[name](value) namespace.calibId = parsed return namespace
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name=cls._DefaultName, *args, **kwargs) parser.add_id_argument("--id", "deepCoadd", help="data ID, e.g. --id tract=12345 patch=1,2", ContainerClass=TractDataIdContainer) parser.addReuseOption([ "detectCoaddSources", "mergeCoaddDetections", "measureCoaddSources", "mergeCoaddMeasurements", "forcedPhotCoadd" ]) return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name=cls._DefaultName, *args, **kwargs) parser.add_id_argument( "--id", "deepCoadd", help="data ID, e.g. --id tract=12345 patch=1,2 filter=g^r^i", ContainerClass=TractDataIdContainer) parser.add_id_argument( "--selectId", "deepDiff_differenceExp", help="data ID, e.g. --selectId visit=6789 ccd=0..9", ContainerClass=SelectDataIdContainer) return parser
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. # from __future__ import absolute_import, division import sys import traceback from lsst.pipe.base import ArgumentParser from lsst.obs.lsstSim.processCalibLsstSim import ProcessCalibLsstSimTask as TaskClass if __name__ == "__main__": parser = ArgumentParser(name="argumentParser") namespace = parser.parse_args(config=TaskClass.ConfigClass()) sensorDataRefLists = {} typeMap = {'0': 'bias', '1': 'dark', '2': 'flat_u', '3': 'flat_g', '4': 'flat_r', '5': 'flat_i', '6': 'flat_z', '7': 'flat_y'} types = [] for dr in namespace.dataRefList: tdict = eval(dr.dataId.__repr__()) types.append(typeMap[str(tdict['visit'])[4]]) del tdict['visit'] dstr = tdict.__repr__() if dstr in sensorDataRefLists: sensorDataRefLists[dstr].append(dr) else: sensorDataRefLists[dstr] = [] sensorDataRefLists[dstr].append(dr)
def _makeArgumentParser(cls): """Make ArgumentParser""" parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="pfsMerged", help="data IDs, e.g. --id exp=12345") return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="calexp", help="data ID, e.g. --id visit=123 ccd=1,2") return parser
def _makeArgumentParser(cls, *args, **kwargs): kwargs.pop("doBatch", False) parser = ArgumentParser(name="processFocus", *args, **kwargs) parser.add_id_argument("--id", datasetType="raw", level="visit", help="data ID, e.g. --id visit=12345") return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="raw", level="Ccd", help="data ID, e.g. --id visit=12345") return parser
def _makeArgumentParser(cls): """Make an ArgumentParser""" parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="pfsArm", help="data IDs, e.g. --id exp=12345 spectrograph=1..3") return parser
def _makeArgumentParser(cls): parser = ArgumentParser(name=cls._DefaultName) parser.add_id_argument(name="--id", datasetType="raw", help="data IDs, e.g. --id exp=12345..23456") return parser