|
LSST Applications g013ef56533+63812263fb,g083dd6704c+a047e97985,g199a45376c+0ba108daf9,g1fd858c14a+fde7a7a78c,g210f2d0738+db0c280453,g262e1987ae+abed931625,g29ae962dfc+058d1915d8,g2cef7863aa+aef1011c0b,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+64337f1634,g47891489e3+f459a6810c,g53246c7159+8c5ae1fdc5,g54cd7ddccb+890c8e1e5d,g5a60e81ecd+d9e514a434,g64539dfbff+db0c280453,g67b6fd64d1+f459a6810c,g6ebf1fc0d4+8c5ae1fdc5,g7382096ae9+36d16ea71a,g74acd417e5+c70e70fbf6,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+f459a6810c,g8d7436a09f+1b779678e3,g8ea07a8fe4+81eaaadc04,g90f42f885a+34c0557caf,g97be763408+9583a964dd,g98a1a72a9c+028271c396,g98df359435+530b675b85,gb8cb2b794d+4e54f68785,gbf99507273+8c5ae1fdc5,gc2a301910b+db0c280453,gca7fc764a6+f459a6810c,gd7ef33dd92+f459a6810c,gdab6d2f7ff+c70e70fbf6,ge410e46f29+f459a6810c,ge41e95a9f2+db0c280453,geaed405ab2+e3b4b2a692,gf9a733ac38+8c5ae1fdc5,w.2025.43
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.