Coverage for python/lsst/pipe/tasks/mocks/mockObservation.py : 95%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# # LSST Data Management System # Copyright 2008, 2009, 2010, 2011, 2012 LSST Corporation. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. #
dtype=float, default=0.2, optional=False, doc="Pixel scale for mock WCSs in arcseconds/pixel" ) dtype=bool, default=True, optional=False, doc="Whether to randomly rotate observations relative to the tract Wcs" ) dtype=float, default=1E11, optional=False, doc="Flux at zero magnitude used to define Calibs." ) dtype=float, default=100.0, optional=False, doc="Error on flux at zero magnitude used to define Calibs; used to add scatter as well." ) dtype=float, default=60.0, optional=False, doc="Exposure time set in generated Calibs (does not affect flux or noise level)" ) dtype=int, default=21, optional=False, doc="Image width and height of generated Psfs." ) dtype=float, default=1.5, optional=False, doc="Minimum radius for generated Psfs." ) dtype=float, default=3.0, optional=False, doc="Maximum radius for generated Psfs." ) dtype=int, default=1, optional=False, doc="Polynomial order for aperture correction fields" )
"""Task to generate mock Exposure parameters (Wcs, Psf, Calib), intended for use as a subtask of MockCoaddTask.
@todo: - document "pa" in detail; angle of what to what? - document the catalog parameter of the run method """
"""Driver that generates an ExposureCatalog of mock observations.
@param[in] butler: a data butler @param[in] n: number of pointings @param[in] camera: camera geometry (an lsst.afw.cameraGeom.Camera) @param[in] catalog: catalog to which to add observations (an ExposureCatalog); if None then a new catalog is created.
@todo figure out what `pa` is and use that knowledge to set `boresightRotAng` and `rotType` """ else: if not catalog.getSchema().contains(self.schema): raise ValueError("Catalog schema does not match Task schema")
exposureTime=self.config.expTime, date=lsst.daf.base.DateTime.now(), boresightRaDec=position, )
"""Generate (celestial) positions and rotation angles that define field locations.
Default implementation draws random pointings that are uniform in the tract's image coordinate system.
@param[in] n: number of pointings @param[in] tractInfo: skymap tract (a lsst.skymap.TractInfo) @return a Python iterable over (coord, angle) pairs: - coord is an ICRS object position (an lsst.afw.geom.SpherePoint) - angle is a position angle (???) (an lsst.afw.geom.Angle)
The default implementation returns an iterator (i.e. the function is a "generator"), but derived-class overrides may return any iterable. """
"""Build a simple TAN Wcs with no distortion and exactly-aligned CCDs.
@param[in] position: ICRS object position on sky (on lsst.afw.geom.SpherePoint) @param[in] pa: position angle (an lsst.afw.geom.Angle) @param[in] detector: detector information (an lsst.afw.cameraGeom.Detector) """ lsst.afw.geom.LinearTransform.makeRotation(pa))
"""Build a simple Calib object with exposure time fixed by config, fluxMag0 drawn from a Gaussian defined by config, and mid-time set to DateTime.now(). """ self.rng.randn() * self.config.fluxMag0Sigma + self.config.fluxMag0, self.config.fluxMag0Sigma )
"""Build a simple Gaussian Psf with linearly-varying ellipticity and size.
The Psf pattern increases sigma_x linearly along the x direction, and sigma_y linearly along the y direction.
@param[in] detector: detector information (an lsst.afw.cameraGeom.Detector) @return a psf (an instance of lsst.meas.algorithms.KernelPsf) """ self.config.psfImageSize, self.config.psfImageSize, lsst.afw.math.GaussianFunction2D(self.config.psfMinSigma, self.config.psfMinSigma), spatialFuncList )
"""Build an ApCorrMap with random linearly-varying fields for all flux fields registered for aperture correction.
These flux field names are used only as strings; there is no connection to any actual algorithms with those names or the PSF model. """
"""Make an upper-left triangular coefficient array appropriate for a 2-d polynomial."""
"""Build a random spacially-varying TransmissionCurve.""" |