LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Classes | |
class | FakeImageDataSource |
Functions | |
def | prepareWcsData |
Put Wcs from an Amp image into CCD coordinates. More... | |
def | plotFocalPlane |
Make a plot of the focal plane along with a set points that sample the Pupil. More... | |
def | makeImageFromAmp |
Make an image from an amp object. More... | |
def | calcRawCcdBBox |
Calculate the raw ccd bounding box. More... | |
def | makeImageFromCcd |
Make an Image of a Ccd. More... | |
def | overlayCcdBoxes |
Overlay bounding boxes on an image display. More... | |
def | showAmp |
Show an amp in an image display. More... | |
def | showCcd |
Show a CCD on display. More... | |
def | getCcdInCamBBoxList |
Get the bounding boxes of a list of Detectors within a camera sized pixel grid. More... | |
def | getCameraImageBBox |
Get the bounding box of a camera sized image in pixels. More... | |
def | makeImageFromCamera |
Make an Image of a Camera. More... | |
def | showCamera |
Show a Camera on display, with the specified display. More... | |
def | makeFocalPlaneWcs |
Make a WCS for the focal plane geometry (i.e. More... | |
def | findAmp |
Find the Amp with the specified pixel position within the composite. More... | |
Variables | |
display = False | |
def lsst.afw.cameraGeom.utils.calcRawCcdBBox | ( | ccd | ) |
Calculate the raw ccd bounding box.
[in] | ccd | Detector for with to calculate the un-trimmed bounding box |
Definition at line 184 of file utils.py.
def lsst.afw.cameraGeom.utils.findAmp | ( | ccd, | |
pixelPosition | |||
) |
Find the Amp with the specified pixel position within the composite.
[in] | ccd | Detector to look in |
[in] | pixelPosition | Point2I containing the pixel position |
Definition at line 612 of file utils.py.
def lsst.afw.cameraGeom.utils.getCameraImageBBox | ( | camBbox, | |
pixelSize, | |||
bufferSize | |||
) |
Get the bounding box of a camera sized image in pixels.
[in] | camBbox | Camera bounding box in focal plane coordinates (mm) |
[in] | pixelSize | Size of a detector pixel in mm |
[in] | bufferSize | Buffer around edge of image in pixels |
Definition at line 456 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.
[in] | ccdList | List of Detector |
[in] | binSize | Binning factor |
[in] | pixelSize_o | Size of the pixel in mm. |
[in] | origin | origin of the camera pixel grid in pixels |
Definition at line 425 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")
[in] | pixelSize | Size of the image pixels in physical units |
[in] | referencePixel | Pixel for origin of WCS |
Definition at line 589 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.
[in] | amp | Amp record to use for constructing the raw amp image |
[in] | imValue | Value to assign to the constructed image scaleGain(gain) is used if not set |
[in] | imageFactory | Type of image to construct |
[in] | markSize | Size of mark at read corner in pixels |
[in] | markValue | Value of pixels in the read corner mark |
[in] | scaleGain | The function by which to scale the gain |
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.
[in] | camera | Camera object to use to make the image |
[in] | detectorNameList | List of detector names to use in building the image. Use all Detectors if None. |
[in] | background | Value to use where there is no Detector |
[in] | bufferSize | Size of border in binned pixels to make around the camera image |
[in] | imageSource | Source to get ccd images. Must have a getCcdImage method |
[in] | imageFactory | Type of image to build |
[in] | binSize | bin factor |
Definition at line 473 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.
[in] | ccd | Detector to use in making the image |
[in] | isTrimmed | Assemble a trimmed Detector image if True |
[in] | showAmpGain | Use the per amp gain to color the pixels in the image |
[in] | imageFactory | Image type to generate |
[in] | rcMarkSize | Size of the mark to make in the amp images at the read corner |
[in] | binSize | Bin the image by this factor in both dimensions |
Definition at line 201 of file utils.py.
def lsst.afw.cameraGeom.utils.overlayCcdBoxes | ( | ccd, | |
untrimmedCcdBbox, | |||
nQuarter, | |||
isTrimmed, | |||
ccdOrigin, | |||
display, | |||
binSize | |||
) |
Overlay bounding boxes on an image display.
[in] | ccd | Detector to iterate for the amp bounding boxes |
[in] | untrimmedCcdBbox | Bounding box of the un-trimmed Detector |
[in] | nQuarter | number of 90 degree rotations to apply to the bounding boxes |
[in] | isTrimmed | Is the Detector image over which the boxes are layed trimmed? |
[in] | ccdOrigin | Detector origin relative to the parent origin if in a larger pixel grid |
[in] | display | image display to display on |
[in] | binSize | binning factor |
Definition at line 284 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.
[in] | camera | a camera object |
[in] | pupilSizeDeg_x | Amount of the pupil to sample in x in degrees |
[in] | pupilSizeDeg_y | Amount of the pupil to sample in y in degrees |
[in] | dx | Spacing of sample points in x in degrees |
[in] | dy | Spacing of sample points in y in degrees |
[in] | figsize | matplotlib style tuple indicating the size of the figure in inches |
[in] | showFig | Display the figure on the screen? |
[in] | savePath | If not None, save a copy of the figure to this name |
def lsst.afw.cameraGeom.utils.prepareWcsData | ( | wcs, | |
amp, | |||
isTrimmed = True |
|||
) |
Put Wcs from an Amp image into CCD coordinates.
[in,out] | wcs | WCS object to modify in place |
[in] | amp | Amp object to use |
[in] | isTrimmed | Is the image to which the WCS refers trimmed of non-imaging pixels? |
Definition at line 50 of file utils.py.
def lsst.afw.cameraGeom.utils.showAmp | ( | amp, | |
imageSource = FakeImageDataSource(isTrimmed=False) , |
|||
display = None , |
|||
overlay = True , |
|||
imageFactory = afwImage.ImageU |
|||
) |
Show an amp in an image display.
[in] | amp | amp record to use in display |
[in] | imageSource | Source for getting the amp image. Must have a getAmpImage method. |
[in] | display | image display to use |
[in] | overlay | Overlay bounding boxes? |
[in] | imageFactory | Type of image to display (only used if ampImage is None) |
Definition at line 355 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 = afwDisplay.GREEN , |
|||
textSize = 1.25 , |
|||
originAtCenter = True , |
|||
display = None , |
|||
kwargs | |||
) |
Show a Camera on display, with the specified display.
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 lower left corner (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
[in] | camera | Camera to show |
[in] | imageSource | Source to get Ccd images from. Must have a getCcdImage method. |
[in] | imageFactory | Type of image to make |
[in] | detectorNameList | List of names of Detectors to use. If None use all |
[in] | binSize | bin factor |
[in] | bufferSize | size of border in binned pixels to make around camera image. |
[in] | frame | specify image display ( |
[in] | overlay | Overlay Detector IDs and boundaries? |
[in] | title | Title in display |
[in] | ctype | Color to use when drawing Detector boundaries |
[in] | textSize | Size of detector labels |
[in] | originAtCenter | Put origin of the camera WCS at the center of the image? Else it will be LL |
[in] | display | image display on which to display |
[in] | **kwargs | all remaining keyword arguments are passed to makeImageFromCamera |
Definition at line 517 of file utils.py.
def lsst.afw.cameraGeom.utils.showCcd | ( | ccd, | |
imageSource = FakeImageDataSource() , |
|||
display = None , |
|||
overlay = True , |
|||
imageFactory = afwImage.ImageU , |
|||
binSize = 1 , |
|||
inCameraCoords = False |
|||
) |
Show a CCD on display.
[in] | ccd | Detector to use in display |
[in] | imageSource | Source for producing images to display. Must have a getCcdImage method. |
[in] | display | image display to use |
[in] | overlay | Show amp bounding boxes on the displayed image? |
[in] | imageFactory | The image factory to use in generating the images. |
[in] | binSize | Binning factor |
[in] | inCameraCoords | Show the Detector in camera coordinates? |
Definition at line 393 of file utils.py.