|
| _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) |
|
Astrometricly and photometricly calibrate across multiple visits of the
same field.
Definition at line 576 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask._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 |
|
) |
| |
|
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 985 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask._iterate_fit |
( |
|
self, |
|
|
|
associations, |
|
|
|
fitter, |
|
|
|
max_steps, |
|
|
|
name, |
|
|
|
whatToFit, |
|
|
|
dataName = "" , |
|
|
|
sigmaRelativeTolerance = 0 , |
|
|
|
doRankUpdate = True , |
|
|
|
doLineSearch = False |
|
) |
| |
|
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 1399 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask._load_reference_catalog |
( |
|
self, |
|
|
|
refObjLoader, |
|
|
|
referenceSelector, |
|
|
|
center, |
|
|
|
radius, |
|
|
|
filterLabel, |
|
|
|
applyColorterms = False , |
|
|
|
epoch = None |
|
) |
| |
|
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 1071 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask._logChi2AndValidate |
( |
|
self, |
|
|
|
associations, |
|
|
|
fit, |
|
|
|
model, |
|
|
|
chi2Label, |
|
|
|
writeChi2Name = None |
|
) |
| |
|
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 1137 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask._make_output |
( |
|
self, |
|
|
|
ccdImageList, |
|
|
|
model, |
|
|
|
func |
|
) |
| |
|
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 1513 of file jointcal.py.
lsst.jointcal.jointcal.JointcalTask._put_output |
( |
|
self, |
|
|
|
butlerQC, |
|
|
|
outputs, |
|
|
|
outputRefs, |
|
|
|
camera, |
|
|
|
setter |
|
) |
| |
|
protected |
Persist the output datasets to their appropriate datarefs.
Parameters
----------
butlerQC : `lsst.pipe.base.ButlerQuantumContext`
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.connectionTypes.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 646 of file jointcal.py.