LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Calibrate an exposure: measure PSF, subtract background, measure astrometry and photometry. More...
Public Member Functions | |
def | __init__ |
Create the calibration task. More... | |
def | getCalibKeys |
Return a sequence of schema keys that represent fields that should be propagated from icSrc to src by ProcessCcdTask. More... | |
def | run |
Run the calibration task on an exposure. More... | |
def | installInitialPsf |
Initialise the calibration procedure by setting the PSF to a configuration-defined guess. More... | |
Public Attributes | |
schema1 | |
algMetadata | |
schemaMapper | |
schema | |
Static Public Attributes | |
ConfigClass = CalibrateConfig | |
Static Private Attributes | |
string | _DefaultName = "calibrate" |
Calibrate an exposure: measure PSF, subtract background, measure astrometry and photometry.
Calculate an Exposure's zero-point given a set of flux measurements of stars matched to an input catalogue. The type of flux to use is specified by CalibrateConfig.fluxField.
The algorithm clips outliers iteratively, with parameters set in the configuration.
Create the calibration task.
**kwargs | keyword arguments to be passed to lsst.pipe.base.task.Task.__init__ |
CalibrateTask delegates most of its work to a set of sub-Tasks:
astrometry
was successfully run. You can replace any of these subtasks if you wish, see Using a Custom Astrometry Task.
Run the calibration task on an exposure.
[in,out] | exposure | Exposure to calibrate; measured PSF will be installed there as well |
[in] | defects | List of defects on exposure |
[in] | idFactory | afw.table.IdFactory to use for source catalog. |
It is moderately important to provide a decent initial guess for the seeing if you want to deal with cosmic rays. If there's a PSF in the exposure it'll be used; failing that the CalibrateConfig.initialPsf is consulted (although the pixel scale will be taken from the WCS if available).
If the exposure contains an lsst.afw.image.Calib object with the exposure time set, MAGZERO will be set in the task metadata.
See CalibrateConfig
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The command line task interface supports a flag -d
to import debug.py from your PYTHONPATH
; see Using lsstDebug to control debugging output for more about debug.py files.
The calibrate task has a debug dictionary with keys which correspond to stages of the CalibrationTask processing:
The values are the ds9
frame to display in (if >= 1); if <= 0, nothing's displayed. There's an example here.
Some subtasks may also have their own debug information; see individual Task documentation.
This code is in calibrateTask.py in the examples directory, and can be run as e.g.
Import the task (there are some other standard imports; read the file if you're curious)
Create the detection task
We're now ready to process the data (we could loop over multiple exposures/catalogues using the same task objects) and unpack the results
We then might plot the results (e.g. if you set –ds9
on the command line)
The first thing to do is define my own task:
Then we need our own run
method. First unpack the filtername and wcs
filterName
due to a bug in the photometric calibration code; DM-933).
Then "match" by zipping up the two catalogs,
To investigate the Debug variables, put something like
into your debug.py file and run calibrateTask.py with the –debug
flag.
Definition at line 155 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.__init__ | ( | self, | |
kwargs | |||
) |
Create the calibration task.
**kwargs | keyword arguments to be passed to lsst.pipe.base.task.Task.__init__ |
Definition at line 347 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.getCalibKeys | ( | self | ) |
Return a sequence of schema keys that represent fields that should be propagated from icSrc to src by ProcessCcdTask.
Definition at line 392 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.installInitialPsf | ( | self, | |
exposure | |||
) |
Initialise the calibration procedure by setting the PSF to a configuration-defined guess.
[in,out] | exposure | Exposure to process; fake PSF will be installed here. |
AssertionError | If exposure or exposure.getWcs() are None |
Definition at line 554 of file calibrate.py.
def lsst.pipe.tasks.calibrate.CalibrateTask.run | ( | self, | |
exposure, | |||
defects = None , |
|||
idFactory = None |
|||
) |
Run the calibration task on an exposure.
[in,out] | exposure | Exposure to calibrate; measured PSF will be installed there as well |
[in] | defects | List of defects on exposure |
[in] | idFactory | afw.table.IdFactory to use for source catalog. |
It is moderately important to provide a decent initial guess for the seeing if you want to deal with cosmic rays. If there's a PSF in the exposure it'll be used; failing that the CalibrateConfig.initialPsf is consulted (although the pixel scale will be taken from the WCS if available).
If the exposure contains an lsst.afw.image.Calib object with the exposure time set, MAGZERO will be set in the task metadata.
Definition at line 403 of file calibrate.py.
|
staticprivate |
Definition at line 345 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.algMetadata |
Definition at line 360 of file calibrate.py.
|
static |
Definition at line 344 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.schema |
Definition at line 390 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.schema1 |
Definition at line 359 of file calibrate.py.
lsst.pipe.tasks.calibrate.CalibrateTask.schemaMapper |
Definition at line 372 of file calibrate.py.