LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
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 | |
photometryRefObjLoader | |
job | |
focalPlaneBBox | |
config | |
sourceSelector | |
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 |
Definition at line 509 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.config |
Definition at line 721 of file jointcal.py.
|
static |
Definition at line 500 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.focalPlaneBBox |
Definition at line 633 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.job |
Definition at line 516 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.log |
Definition at line 739 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.photometryRefObjLoader |
Definition at line 513 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask.sourceSelector |
Definition at line 722 of file jointcal.py.