lsst.obs.base
20.0.0-74-g0218c7a+939693069d
|
Public Member Functions | |
def | __init__ (self, config=None, *Butler3 butler3, Instrument instrument, **kwargs) |
def | isDatasetTypeIncluded (self, str datasetTypeName) |
str | useSkyMap (self, BaseSkyMap skyMap, str skyMapName) |
def | registerUsedSkyMaps (self, Optional[ConversionSubset] subset) |
def | useSkyPix (self, SkyPixDimension dimension) |
def | registerUsedSkyPix (self, Optional[ConversionSubset] subset) |
def | run (self, str root, *Optional[List[CalibRepo]] calibs=None, Optional[List[Rerun]] reruns=None, Optional[Iterable[int]] visits=None, Optional[Pool] pool=None, int processes=1) |
Public Attributes | |
butler3 | |
registry | |
universe | |
raws | |
defineVisits | |
instrument | |
translatorFactory | |
Static Public Attributes | |
ConfigClass = ConvertRepoConfig | |
A task that converts one or more related Gen2 data repositories to a single Gen3 data repository (with multiple collections). Parameters ---------- config: `ConvertRepoConfig` Configuration for this task. butler3: `lsst.daf.butler.Butler` A writeable Gen3 Butler instance that represents the data repository that datasets will be ingested into. If the 'raw' dataset is configured to be included in the conversion, ``butler3.run`` should be set to the name of the collection raws should be ingested into, and ``butler3.collections`` should include a calibration collection from which the ``camera`` dataset can be loaded, unless a calibration repo is converted and ``doWriteCuratedCalibrations`` is `True`. instrument : `lsst.obs.base.Instrument` The Gen3 instrument that should be used for this conversion. **kwargs Other keyword arguments are forwarded to the `Task` constructor. Notes ----- Most of the work of converting repositories is delegated to instances of the `RepoConverter` hierarchy. The `ConvertRepoTask` instance itself holds only state that is relevant for all Gen2 repositories being ingested, while each `RepoConverter` instance holds only state relevant for the conversion of a single Gen2 repository. Both the task and the `RepoConverter` instances are single use; `ConvertRepoTask.run` and most `RepoConverter` methods may only be called once on a particular instance.
Definition at line 390 of file convertRepo.py.
def lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.__init__ | ( | self, | |
config = None , |
|||
*Butler3 | butler3, | ||
Instrument | instrument, | ||
** | kwargs | ||
) |
Definition at line 426 of file convertRepo.py.
def lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.isDatasetTypeIncluded | ( | self, | |
str | datasetTypeName | ||
) |
Return `True` if configuration indicates that the given dataset type should be converted. This method is intended to be called primarily by the `RepoConverter` instances used interally by the task. Parameters ---------- datasetTypeName: str Name of the dataset type. Returns ------- included : `bool` Whether the dataset should be included in the conversion.
Definition at line 461 of file convertRepo.py.
def lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.registerUsedSkyMaps | ( | self, | |
Optional[ConversionSubset] | subset | ||
) |
Register all skymaps that have been marked as used. This method is intended to be called primarily by the `RepoConverter` instances used interally by the task. Parameters ---------- subset : `ConversionSubset`, optional Object that will be used to filter converted datasets by data ID. If given, it will be updated with the tracts of this skymap that overlap the visits in the subset.
Definition at line 520 of file convertRepo.py.
def lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.registerUsedSkyPix | ( | self, | |
Optional[ConversionSubset] | subset | ||
) |
Register all skymaps that have been marked as used. This method is intended to be called primarily by the `RepoConverter` instances used interally by the task. Parameters ---------- subset : `ConversionSubset`, optional Object that will be used to filter converted datasets by data ID. If given, it will be updated with the pixelization IDs that overlap the visits in the subset.
Definition at line 552 of file convertRepo.py.
def lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.run | ( | self, | |
str | root, | ||
*Optional[List[CalibRepo]] | calibs = None , |
||
Optional[List[Rerun]] | reruns = None , |
||
Optional[Iterable[int]] | visits = None , |
||
Optional[Pool] | pool = None , |
||
int | processes = 1 |
||
) |
Convert a group of related data repositories. Parameters ---------- root : `str` Complete path to the root Gen2 data repository. This should be a data repository that includes a Gen2 registry and any raw files and/or reference catalogs. calibs : `list` of `CalibRepo` Specifications for Gen2 calibration repos to convert. If `None` (default), curated calibrations only will be written to the default calibration collection for this instrument; set to ``()`` explictly to disable this. reruns : `list` of `Rerun` Specifications for rerun (processing output) repos to convert. If `None` (default), no reruns are converted. visits : iterable of `int`, optional The integer IDs of visits to convert. If not provided, all visits in the Gen2 root repository will be converted. pool : `multiprocessing.Pool`, optional If not `None`, a process pool with which to parallelize some operations. processes : `int`, optional The number of processes to use for conversion.
Definition at line 569 of file convertRepo.py.
str lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.useSkyMap | ( | self, | |
BaseSkyMap | skyMap, | ||
str | skyMapName | ||
) |
Indicate that a repository uses the given SkyMap. This method is intended to be called primarily by the `RepoConverter` instances used interally by the task. Parameters ---------- skyMap : `lsst.skymap.BaseSkyMap` SkyMap instance being used, typically retrieved from a Gen2 data repository. skyMapName : `str` The name of the gen2 skymap, for error reporting. Returns ------- name : `str` The name of the skymap in Gen3 data IDs. Raises ------ LookupError Raised if the specified skymap cannot be found.
Definition at line 485 of file convertRepo.py.
def lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.useSkyPix | ( | self, | |
SkyPixDimension | dimension | ||
) |
Indicate that a repository uses the given SkyPix dimension. This method is intended to be called primarily by the `RepoConverter` instances used interally by the task. Parameters ---------- dimension : `lsst.daf.butler.SkyPixDimension` Dimension represening a pixelization of the sky.
Definition at line 539 of file convertRepo.py.
lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.butler3 |
Definition at line 433 of file convertRepo.py.
|
static |
Definition at line 422 of file convertRepo.py.
lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.defineVisits |
Definition at line 441 of file convertRepo.py.
lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.instrument |
Definition at line 442 of file convertRepo.py.
lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.raws |
Definition at line 440 of file convertRepo.py.
lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.registry |
Definition at line 434 of file convertRepo.py.
lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.translatorFactory |
Definition at line 449 of file convertRepo.py.
lsst.obs.base.gen2to3.convertRepo.ConvertRepoTask.universe |
Definition at line 435 of file convertRepo.py.