lsst.afw  20.0.0-9-g61a2a9a3d+63f5489896
Functions
lsst.afw.image.utils Namespace Reference

Functions

def clipImage (im, minClip, maxClip)
 
def resetFilters ()
 
def defineFilter (name, lambdaEff, lambdaMin=np.nan, lambdaMax=np.nan, alias=[], force=False)
 
def getProjectionIndices (imageBBox, targetBBox)
 
def projectImage (image, bbox, fill=0)
 

Function Documentation

◆ clipImage()

def lsst.afw.image.utils.clipImage (   im,
  minClip,
  maxClip 
)
Clip an image to lie between minClip and maxclip (None to ignore)

Definition at line 34 of file utils.py.

◆ defineFilter()

def lsst.afw.image.utils.defineFilter (   name,
  lambdaEff,
  lambdaMin = np.nan,
  lambdaMax = np.nan,
  alias = [],
  force = False 
)
Define a filter and its properties in the filter registry

Definition at line 59 of file utils.py.

◆ getProjectionIndices()

def lsst.afw.image.utils.getProjectionIndices (   imageBBox,
  targetBBox 
)
Get the indices to project an image

Given an image and target bounding box,
calculate the indices needed to appropriately
slice the input image and target image to
project the image to the target.

Parameters
----------
imageBBox: Box2I
    Bounding box of the input image
targetBBox: Box2I
    Bounding box of the target image

Returns
-------
targetSlices: tuple
    Slices of the target image in the form (by, bx), (iy, ix).
imageIndices: tuple
    Slices of the input image in the form (by, bx), (iy, ix).

Definition at line 70 of file utils.py.

◆ projectImage()

def lsst.afw.image.utils.projectImage (   image,
  bbox,
  fill = 0 
)
Project an image into a bounding box

Return a new image whose pixels are equal to those of
`image` within `bbox`, and equal to `fill` outside.

Parameters
----------
image: `afw.Image` or `afw.MaskedImage`
    The image to project
bbox: `Box2I`
    The bounding box to project onto.
fill: number
    The value to fill the region of the new
    image outside the bounding box of the original.

Returns
-------
newImage: `afw.Image` or `afw.MaskedImage`
    The new image with the input image projected
    into its bounding box.

Definition at line 131 of file utils.py.

◆ resetFilters()

def lsst.afw.image.utils.resetFilters ( )
Reset registry of filters and filter properties

Definition at line 53 of file utils.py.