|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
Classes | |
| class | FakeImageDataSource |
Functions | |
| def | prepareWcsData |
| def | plotFocalPlane |
| def | makeImageFromAmp |
| def | calcRawCcdBBox |
| def | makeImageFromCcd |
| def | overlayCcdBoxes |
| def | showAmp |
| def | showCcd |
| def | getCcdInCamBBoxList |
| def | getCameraImageBBox |
| def | makeImageFromCamera |
| def | showCamera |
| def | makeFocalPlaneWcs |
| def | findAmp |
Variables | |
| display = False | |
| def lsst.afw.cameraGeom.utils.calcRawCcdBBox | ( | ccd | ) |
Calculate the raw ccd bounding box @param[in] ccd: Detector for with to calculate the un-trimmed bounding box @return Box2I of the un-trimmed Detector or None if there is not enough information to calculate raw BBox
| def lsst.afw.cameraGeom.utils.findAmp | ( | ccd, | |
| pixelPosition | |||
| ) |
| def lsst.afw.cameraGeom.utils.getCameraImageBBox | ( | camBbox, | |
| pixelSize, | |||
| bufferSize | |||
| ) |
Get the bounding box of a camera sized image in pixels @param[in] camBbox: Camera bounding box in focal plane coordinates (mm) @param[in] pixelSize: Size of a detector pixel in mm @param[in] bufferSize: Buffer around edge of image in pixels @return the resulting bounding box
Definition at line 430 of file utils.py.
| def lsst.afw.cameraGeom.utils.getCcdInCamBBoxList | ( | ccdList, | |
| binSize, | |||
| pixelSize_o, | |||
| origin | |||
| ) |
Get the bounding boxes of a list of Detectors within a camera sized pixel grid @param[in] ccdList: List of Detector @param[in] binSize: Binning factor @param[in] pixelSize_o: Size of the pixel in mm. @param[in] origin: origin of the camera pixel grid in pixels @return a list of bounding boxes in camera pixel coordinates
Definition at line 402 of file utils.py.
| def lsst.afw.cameraGeom.utils.makeFocalPlaneWcs | ( | pixelSize, | |
| referencePixel | |||
| ) |
Make a WCS for the focal plane geometry (i.e. returning positions in "mm") @param[in] pixelSize: Size of the image pixels in physical units @param[in] referencePixel: Pixel for origin of WCS @return Wcs object for mapping between pixels and focal plane.
Definition at line 552 of file utils.py.
| def lsst.afw.cameraGeom.utils.makeImageFromAmp | ( | amp, | |
imValue = None, |
|||
imageFactory = afwImage.ImageU, |
|||
markSize = 10, |
|||
markValue = 0, |
|||
scaleGain = lambda gain: (gain*1000)//10 |
|||
| ) |
Make an image from an amp object. Since images are integer images by default, the gain needs to be scaled to give enough dynamic range to see variation from amp to amp. The scaling algorithm is assignable. @param[in] amp: Amp record to use for constructing the raw amp image @param[in] imValue: Value to assign to the constructed image scaleGain(gain) is used if not set @param[in] imageFactory: Type of image to construct @param[in] markSize: Size of mark at read corner in pixels @param[in] markValue: Value of pixels in the read corner mark @param[in] scaleGain: The function by which to scale the gain @return an untrimmed amp image
| def lsst.afw.cameraGeom.utils.makeImageFromCamera | ( | camera, | |
detectorNameList = None, |
|||
background = numpy.nan, |
|||
bufferSize = 10, |
|||
imageSource = FakeImageDataSource(), |
|||
imageFactory = afwImage.ImageU, |
|||
binSize = 1 |
|||
| ) |
Make an Image of a Camera
@param[in] camera: Camera object to use to make the image
@param[in] detectorNameList: List of detector names to use in building the image.
Use all Detectors if None.
@param[in] background: Value to use where there is no Detector
@param[in] bufferSize: Size of border in binned pixels to make around the camera image
@param[in] imageSource: Source to get ccd images. Must have a getCcdImage method
@param[in] imageFactory: Type of image to build
@param[in] binSize: bin factor
@return an image of the camera
Definition at line 444 of file utils.py.
| def lsst.afw.cameraGeom.utils.makeImageFromCcd | ( | ccd, | |
isTrimmed = True, |
|||
showAmpGain = True, |
|||
imageFactory = afwImage.ImageU, |
|||
rcMarkSize = 10, |
|||
binSize = 1 |
|||
| ) |
Make an Image of a Ccd @param[in] ccd: Detector to use in making the image @param[in] isTrimmed: Assemble a trimmed Detector image if True @param[in] showAmpGain: Use the per amp gain to color the pixels in the image @param[in] imageFactory: Image type to generate @param[in] rcMarkSize: Size of the mark to make in the amp images at the read corner @param[in] binSize: Bin the image by this factor in both dimensions @return Image of the Detector
Definition at line 196 of file utils.py.
| def lsst.afw.cameraGeom.utils.overlayCcdBoxes | ( | ccd, | |
| untrimmedCcdBbox, | |||
| nQuarter, | |||
| isTrimmed, | |||
| ccdOrigin, | |||
| frame, | |||
| binSize | |||
| ) |
Overlay bounding boxes on a frame in ds9 @param[in] ccd: Detector to iterate for the amp bounding boxes @param[in] untrimmedCcdBbox: Bounding box of the un-trimmed Detector @param[in] nQuarter: number of 90 degree rotations to apply to the bounding boxes @param[in] isTrimmed: Is the Detector image over which the boxes are layed trimmed? @param[in] ccdOrigin: Detector origin relative to the parent origin if in a larger pixel grid @param[in] frame: ds9 frame to display on @param[in] binSize: binning factor
Definition at line 272 of file utils.py.
| def lsst.afw.cameraGeom.utils.plotFocalPlane | ( | camera, | |
| pupilSizeDeg_x, | |||
| pupilSizeDeg_y, | |||
dx = 0.1, |
|||
dy = 0.1, |
|||
figsize = (10., 10., |
|||
showFig = True, |
|||
savePath = None |
|||
| ) |
Make a plot of the focal plane along with a set points that sample the Pupil @param[in] camera: a camera object @param[in] pupilSizeDeg_x: Amount of the pupil to sample in x in degrees @param[in] pupilSizeDeg_y: Amount of the pupil to sample in y in degrees @param[in] dx: Spacing of sample points in x in degrees @param[in] dy: Spacing of sample points in y in degrees @param[in] figsize: matplotlib style tuple indicating the size of the figure in inches @param[in] showFig: Display the figure on the screen? @param[in] savePath: If not None, save a copy of the figure to this name
Definition at line 71 of file utils.py.
| def lsst.afw.cameraGeom.utils.prepareWcsData | ( | wcs, | |
| amp, | |||
isTrimmed = True |
|||
| ) |
| def lsst.afw.cameraGeom.utils.showAmp | ( | amp, | |
imageSource = FakeImageDataSource(isTrimmed=False), |
|||
frame = None, |
|||
overlay = True, |
|||
imageFactory = afwImage.ImageU |
|||
| ) |
Show an amp in a ds9 frame @param[in] amp: amp record to use in display @param[in] imageSource: Source for getting the amp image. Must have a getAmpImage method. @param[in] frame: ds9 frame to display on; defaults to frame zero @param[in] overlay: Overlay bounding boxes? @param[in] imageFactory: Type of image to display (only used if ampImage is None)
Definition at line 338 of file utils.py.
| def lsst.afw.cameraGeom.utils.showCamera | ( | camera, | |
imageSource = FakeImageDataSource(), |
|||
imageFactory = afwImage.ImageU, |
|||
detectorNameList = None, |
|||
binSize = 10, |
|||
bufferSize = 10, |
|||
frame = None, |
|||
overlay = True, |
|||
title = "", |
|||
ctype = ds9.GREEN, |
|||
textSize = 1.25, |
|||
originAtCenter = True, |
|||
| kwargs | |||
| ) |
Show a Camera on ds9 (with the specified frame). The rotation of the sensors is snapped to the nearest multiple of 90 deg. Also note that the pixel size is constant over the image array. The LLC of each sensor amp is snapped to the LLC of the pixel containing the LLC of the image.; if overlay show the IDs and detector boundaries @param[in] Camera: Camera to show @param[in] ImageSource: Source to get Ccd images from. Must have a getCcdImage method. @param[in] ImageFactory: Type of image to make @param[in] DetectorNameList: List of names of Detectors to use. If None use all @param[in] BinSize: bin factor @param[in] BufferSize: size of border in binned pixels to make around camera image. @param[in] Frame: ds9 frame in which to display @param[in] Overlay: Overlay Detector boundaries? @param[in] Title: Title in ds9 frame @param[in] Ctype: Color to use when drawing Detector boundaries @param[in] TextSize: Size of detector labels @param[in] OriginAtCenter: Put the origin of the camera WCS at the center of the image? Else it will be LL @return the mosaic image
Definition at line 488 of file utils.py.
| def lsst.afw.cameraGeom.utils.showCcd | ( | ccd, | |
imageSource = FakeImageDataSource(), |
|||
frame = None, |
|||
overlay = True, |
|||
imageFactory = afwImage.ImageU, |
|||
binSize = 1, |
|||
inCameraCoords = False |
|||
| ) |
Show a CCD on ds9. @param[in] ccd: Detector to use in display @param[in] imageSource: Source for producing images to display. Must have a getCcdImage method. @param[in] frame: ds9 frame to use, defaults to frame zero @param[in] overlay: Show amp bounding boxes on the displayed image? @param[in] imageFactory: The image factory to use in generating the images. @param[in] binSize: Binning factor @param[in] inCameraCoords: Show the Detector in camera coordinates?
Definition at line 371 of file utils.py.
1.8.5