lsst.afw  21.0.0-27-g37a8c363b+c8448cd80e
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 35 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 65 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 76 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 137 of file utils.py.

◆ resetFilters()

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

Definition at line 56 of file utils.py.