LSST Applications g04dff08e69+42feea4ef2,g0fba68d861+a0b9de4ea6,g1ec0fe41b4+f536777771,g1fd858c14a+42269675ea,g35bb328faa+fcb1d3bbc8,g4af146b050+bbef1ba6f0,g4d2262a081+8f21adb3a6,g53246c7159+fcb1d3bbc8,g5a012ec0e7+b20b785ecb,g60b5630c4e+43e3f0d37c,g6273192d42+e9a7147bac,g67b6fd64d1+4086c0989b,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g7bbe65ff3e+43e3f0d37c,g8352419a5c+fcb1d3bbc8,g87b7deb4dc+43704db330,g8852436030+eb2388797a,g89139ef638+4086c0989b,g9125e01d80+fcb1d3bbc8,g94187f82dc+43e3f0d37c,g989de1cb63+4086c0989b,g9d31334357+43e3f0d37c,g9f33ca652e+9b312035f9,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+61f2793e68,gb58c049af0+f03b321e39,gb89ab40317+4086c0989b,gc0bb628dac+834c1753f9,gcf25f946ba+eb2388797a,gd6cbbdb0b4+af3c3595f5,gde0f65d7ad+9e0145b227,ge278dab8ac+d65b3c2b70,ge410e46f29+4086c0989b,gf23fb2af72+37a5db1cfd,gf67bdafdda+4086c0989b,v29.0.0.rc7
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, **kwargs) | |
runQuantum (self, butlerQC, inputRefs, outputRefs) | |
run (self, inputSourceTableVisit, inputVisitSummary, inputCamera, tract=None) | |
Public Attributes | |
astrometryRefObjLoader = None | |
photometryRefObjLoader = None | |
job = Job.load_metrics_package(subset='jointcal') | |
focalPlaneBBox = inputCamera.getFpBBox() | |
config | |
log | |
Static Public Attributes | |
ConfigClass = JointcalConfig | |
Protected Member Functions | |
_put_metrics (self, butlerQC, job, outputRefs) | |
_put_output (self, butlerQC, outputs, outputRefs, camera, setter) | |
_load_data (self, inputSourceTableVisit, inputVisitSummary, associations, jointcalControl, camera) | |
_make_one_input_data (self, visitRecord, catalog, detectorDict) | |
_build_ccdImage (self, data, associations, jointcalControl) | |
_getDebugPath (self, filename) | |
_prep_sky (self, associations, filters) | |
_get_refcat_coordinate_error_override (self, refCat, name) | |
_compute_proper_motion_epoch (self, ccdImageList) | |
_do_load_refcat_and_fit (self, associations, defaultFilter, center, radius, tract="", match_cut=3.0, reject_bad_fluxes=False, *, name="", refObjLoader=None, referenceSelector=None, fit_function=None, epoch=None) | |
_load_reference_catalog (self, refObjLoader, referenceSelector, center, radius, filterLabel, applyColorterms=False, epoch=None) | |
_check_star_lists (self, associations, name) | |
_logChi2AndValidate (self, associations, fit, model, chi2Label, writeChi2Name=None) | |
_fit_photometry (self, associations, dataName=None) | |
_fit_astrometry (self, associations, dataName=None) | |
_check_stars (self, associations) | |
_iterate_fit (self, associations, fitter, max_steps, name, whatToFit, dataName="", sigmaRelativeTolerance=0, doRankUpdate=True, doLineSearch=False) | |
_make_output (self, ccdImageList, model, func) | |
Static Protected Attributes | |
str | _DefaultName = "jointcal" |
Astrometricly and photometricly calibrate across multiple visits of the same field.
Definition at line 495 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.__init__ | ( | self, | |
** | kwargs ) |
Definition at line 503 of file jointcal.py.
|
protected |
Extract the necessary things from this catalog+metadata to add a new ccdImage. Parameters ---------- data : `JointcalInputData` The loaded input data. associations : `lsst.jointcal.Associations` Object to add the info to, to construct a new CcdImage jointcalControl : `jointcal.JointcalControl` Control object for associations management Returns ------ namedtuple or `None` ``wcs`` The TAN WCS of this image, read from the calexp (`lsst.afw.geom.SkyWcs`). ``key`` A key to identify this dataRef by its visit and ccd ids (`namedtuple`). `None` if there are no sources in the loaded catalog.
Definition at line 768 of file jointcal.py.
|
protected |
Definition at line 1047 of file jointcal.py.
|
protected |
Count measured and reference stars per ccd and warn/log them.
Definition at line 1305 of file jointcal.py.
|
protected |
Return the proper motion correction epoch of the provided images. Parameters ---------- ccdImageList : `list` [`lsst.jointcal.CcdImage`] The images to compute the appropriate epoch for. Returns ------- epoch : `astropy.time.Time` The date to use for proper motion corrections.
Definition at line 887 of file jointcal.py.
|
protected |
Load reference catalog, perform the fit, and return the result. Parameters ---------- associations : `lsst.jointcal.Associations` The star/reference star associations to fit. defaultFilter : `lsst.afw.image.FilterLabel` filter to load from reference catalog. center : `lsst.geom.SpherePoint` ICRS center of field to load from reference catalog. radius : `lsst.geom.Angle` On-sky radius to load from reference catalog. name : `str` Name of thing being fit: "astrometry" or "photometry". refObjLoader : `lsst.meas.algorithms.ReferenceObjectLoader` Reference object loader to use to load a reference catalog. referenceSelector : `lsst.meas.algorithms.ReferenceSourceSelectorTask` Selector to use to pick objects from the loaded reference catalog. fit_function : callable Function to call to perform fit (takes Associations object). tract : `str`, optional Name of tract currently being fit. match_cut : `float`, optional Radius in arcseconds to find cross-catalog matches to during associations.associateCatalogs. reject_bad_fluxes : `bool`, optional Reject refCat sources with NaN/inf flux or NaN/0 fluxErr. epoch : `astropy.time.Time`, optional Epoch to which to correct refcat proper motion and parallax, or `None` to not apply such corrections. Returns ------- result : `Photometry` or `Astrometry` Result of `fit_function()`
Definition at line 904 of file jointcal.py.
|
protected |
Fit the astrometric data. Parameters ---------- associations : `lsst.jointcal.Associations` The star/reference star associations to fit. dataName : `str` Name of the data being processed (e.g. "1234_HSC-Y"), for identifying debugging files. Returns ------- fit_result : `namedtuple` fit : `lsst.jointcal.AstrometryFit` The astrometric fitter used to perform the fit. model : `lsst.jointcal.AstrometryModel` The astrometric model that was fit. sky_to_tan_projection : `lsst.jointcal.ProjectionHandler` The model for the sky to tangent plane projection that was used in the fit.
Definition at line 1205 of file jointcal.py.
|
protected |
Fit the photometric data. Parameters ---------- associations : `lsst.jointcal.Associations` The star/reference star associations to fit. dataName : `str` Name of the data being processed (e.g. "1234_HSC-Y"), for identifying debugging files. Returns ------- fit_result : `namedtuple` fit : `lsst.jointcal.PhotometryFit` The photometric fitter used to perform the fit. model : `lsst.jointcal.PhotometryModel` The photometric model that was fit.
Definition at line 1099 of file jointcal.py.
|
protected |
Check whether we should override the refcat coordinate errors, and return the overridden error if necessary. Parameters ---------- refCat : `lsst.afw.table.SimpleCatalog` The reference catalog to check for a ``coord_raErr`` field. name : `str` Whether we are doing "astrometry" or "photometry". Returns ------- refCoordErr : `float` The refcat coordinate error to use, or NaN if we are not overriding those fields. Raises ------ lsst.pex.config.FieldValidationError Raised if the refcat does not contain coordinate errors and ``config.astrometryReferenceErr`` is not set.
Definition at line 840 of file jointcal.py.
|
protected |
Constructs a path to filename using the configured debug path.
Definition at line 813 of file jointcal.py.
|
protected |
Run fitter.minimize up to max_steps times, returning the final chi2. Parameters ---------- associations : `lsst.jointcal.Associations` The star/reference star associations to fit. fitter : `lsst.jointcal.FitterBase` The fitter to use for minimization. max_steps : `int` Maximum number of steps to run outlier rejection before declaring convergence failure. name : {'photometry' or 'astrometry'} What type of data are we fitting (for logs and debugging files). whatToFit : `str` Passed to ``fitter.minimize()`` to define the parameters to fit. dataName : `str`, optional Descriptive name for this dataset (e.g. tract and filter), for debugging. sigmaRelativeTolerance : `float`, optional Convergence tolerance for the fractional change in the chi2 cut level for determining outliers. If set to zero, iterations will continue until there are no outliers. doRankUpdate : `bool`, optional Do an Eigen rank update during minimization, or recompute the full matrix and gradient? doLineSearch : `bool`, optional Do a line search for the optimum step during minimization? Returns ------- chi2: `lsst.jointcal.Chi2Statistic` The final chi2 after the fit converges, or is forced to end. Raises ------ FloatingPointError Raised if the fitter fails with a non-finite value. RuntimeError Raised if the fitter fails for some other reason; log messages will provide further details.
Definition at line 1318 of file jointcal.py.
|
protected |
Read the data that jointcal needs to run. Modifies ``associations`` in-place with the loaded data. Parameters ---------- inputSourceTableVisit : `list` [`lsst.daf.butler.DeferredDatasetHandle`] References to visit-level DataFrames to load the catalog data from. inputVisitSummary : `list` [`lsst.daf.butler.DeferredDatasetHandle`] Visit-level exposure summary catalog with metadata. associations : `lsst.jointcal.Associations` Object to add the loaded data to by constructing new CcdImages. jointcalControl : `jointcal.JointcalControl` Control object for C++ associations management. camera : `lsst.afw.cameraGeom.Camera` Camera object for detector geometry. Returns ------- oldWcsList: `list` [`lsst.afw.geom.SkyWcs`] The original WCS of the input data, to aid in writing tests. bands : `list` [`str`] The filter bands of each input dataset.
Definition at line 677 of file jointcal.py.
|
protected |
Load the necessary reference catalog sources, convert fluxes to correct units, and apply color term corrections if requested. Parameters ---------- refObjLoader : `lsst.meas.algorithms.ReferenceObjectLoader` The reference catalog loader to use to get the data. referenceSelector : `lsst.meas.algorithms.ReferenceSourceSelectorTask` Source selector to apply to loaded reference catalog. center : `lsst.geom.SpherePoint` The center around which to load sources. radius : `lsst.geom.Angle` The radius around ``center`` to load sources in. filterLabel : `lsst.afw.image.FilterLabel` The camera filter to load fluxes for. applyColorterms : `bool` Apply colorterm corrections to the refcat for ``filterName``? epoch : `astropy.time.Time`, optional Epoch to which to correct refcat proper motion and parallax, or `None` to not apply such corrections. Returns ------- refCat : `lsst.afw.table.SimpleCatalog` The loaded reference catalog. fluxField : `str` The name of the reference catalog flux field appropriate for ``filterName``.
Definition at line 990 of file jointcal.py.
|
protected |
Compute chi2, log it, validate the model, and return chi2. Parameters ---------- associations : `lsst.jointcal.Associations` The star/reference star associations to fit. fit : `lsst.jointcal.FitterBase` The fitter to use for minimization. model : `lsst.jointcal.Model` The model being fit. chi2Label : `str` Label to describe the chi2 (e.g. "Initialized", "Final"). writeChi2Name : `str`, optional Filename prefix to write the chi2 contributions to. Do not supply an extension: an appropriate one will be added. Returns ------- chi2: `lsst.jointcal.Chi2Accumulator` The chi2 object for the current fitter and model. Raises ------ FloatingPointError Raised if chi2 is infinite or NaN. ValueError Raised if the model is not valid.
Definition at line 1056 of file jointcal.py.
|
protected |
Return a data structure for this detector+visit.
Definition at line 754 of file jointcal.py.
|
protected |
Return the internal jointcal models converted to the afw structures that will be saved to disk. Parameters ---------- ccdImageList : `lsst.jointcal.CcdImageList` The list of CcdImages to get the output for. model : `lsst.jointcal.AstrometryModel` or `lsst.jointcal.PhotometryModel` The internal jointcal model to convert for each `lsst.jointcal.CcdImage`. func : `str` The name of the function to call on ``model`` to get the converted structure. Must accept an `lsst.jointcal.CcdImage`. Returns ------- output : `dict` [`tuple`, `lsst.jointcal.AstrometryModel`] or `dict` [`tuple`, `lsst.jointcal.PhotometryModel`] The data to be saved, keyed on (visit, detector).
Definition at line 1432 of file jointcal.py.
|
protected |
Prepare on-sky and other data that must be computed after data has been read.
Definition at line 818 of file jointcal.py.
|
protected |
Persist all measured metrics stored in a job. Parameters ---------- butlerQC : `lsst.pipe.base.QuantumContext` A butler which is specialized to operate in the context of a `lsst.daf.butler.Quantum`; This is the input to `runQuantum`. job : `lsst.verify.job.Job` Measurements of metrics to persist. outputRefs : `list` [`lsst.pipe.base.OutputQuantizedConnection`] The DatasetRefs to persist the data to.
Definition at line 549 of file jointcal.py.
|
protected |
Persist the output datasets to their appropriate datarefs. Parameters ---------- butlerQC : `lsst.pipe.base.QuantumContext` A butler which is specialized to operate in the context of a `lsst.daf.butler.Quantum`; This is the input to `runQuantum`. outputs : `dict` [`tuple`, `lsst.afw.geom.SkyWcs`] or `dict` [`tuple, `lsst.afw.image.PhotoCalib`] The fitted objects to persist. outputRefs : `list` [`lsst.pipe.base.OutputQuantizedConnection`] The DatasetRefs to persist the data to. camera : `lsst.afw.cameraGeom.Camera` The camera for this instrument, to get detector ids from. setter : `str` The method to call on the ExposureCatalog to set each output.
Definition at line 565 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.run | ( | self, | |
inputSourceTableVisit, | |||
inputVisitSummary, | |||
inputCamera, | |||
tract = None ) |
Definition at line 624 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.runQuantum | ( | self, | |
butlerQC, | |||
inputRefs, | |||
outputRefs ) |
Definition at line 518 of file jointcal.py.
|
staticprotected |
Definition at line 501 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.astrometryRefObjLoader = None |
Definition at line 509 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.config |
Definition at line 875 of file jointcal.py.
|
static |
Definition at line 500 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.focalPlaneBBox = inputCamera.getFpBBox() |
Definition at line 633 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.job = Job.load_metrics_package(subset='jointcal') |
Definition at line 516 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.log |
Definition at line 1154 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.photometryRefObjLoader = None |
Definition at line 513 of file jointcal.py.