LsstFrame¶
-
class
lsst.meas.extensions.scarlet.
LsstFrame
(shape_or_box, wcs=None, psfs=None, channels=None, dtype=<class 'numpy.float32'>)¶ Bases:
scarlet.frame.Frame
Attributes Summary
C
Number of channels in the model D
Dimensionality of this BBox Nx
Number of pixels in the x-direction Ny
Number of pixel in the y-direction psf
start
Tuple of start coordinates stop
Tuple of stop coordinates Methods Summary
contains
(p)Whether the box contains a given coordinate p
extract_from
(image[, sub])Extract sub-image described by this bbox from image from_bounds
(*bounds)Initialize a box from its bounds from_data
(X[, min_value])Define range of X
abovemin_value
from_image
(image)Initialize a box to cover image
get_pixel
(sky_coord)Get the pixel coordinate from a world coordinate If there is no WCS associated with the Scene
, meaning the data frame and model frame are the same, then this just returnssky_coord
.get_sky_coord
(pixel)Get the world coordinate for a pixel coordinate If there is no WCS associated with the Scene
, meaning the data frame and model frame are the same, then this just returnspixel
.insert_into
(image, sub)Insert sub
intoimage
according to this bboxslices_for
(im_or_shape)Slices for im_or_shape
to be limited to this bounding box.Attributes Documentation
-
C
¶ Number of channels in the model
-
D
¶ Dimensionality of this BBox
-
Nx
¶ Number of pixels in the x-direction
-
Ny
¶ Number of pixel in the y-direction
-
psf
¶
-
start
¶ Tuple of start coordinates
-
stop
¶ Tuple of stop coordinates
Methods Documentation
-
contains
(p)¶ Whether the box contains a given coordinate
p
-
extract_from
(image, sub=None)¶ Extract sub-image described by this bbox from image
Parameters: - image: array
Full image
- sub: array
Extracted image
Returns: - sub: array
-
static
from_bounds
(*bounds)¶ Initialize a box from its bounds
Parameters: - bounds: tuple of (min,max) pairs
Min/Max coordinate for every dimension
Returns: - bbox: :class:`scarlet.bbox.Box`
A new box bounded by the input bounds.
-
static
from_data
(X, min_value=0)¶ Define range of
X
abovemin_value
Parameters: - X: array-like
Data to threshold
- min_value: float
Minimum value of the result.
Returns: - bbox: :class:`scarlet.bbox.Box`
Bounding box for the thresholded
X
-
static
from_image
(image)¶ Initialize a box to cover
image
Parameters: - image: array-like
Returns: - bbox: `:class:`scarlet.bbox.Box`
A new box bounded by the image.
-
get_pixel
(sky_coord)¶ Get the pixel coordinate from a world coordinate If there is no WCS associated with the
Scene
, meaning the data frame and model frame are the same, then this just returnssky_coord
.
-
get_sky_coord
(pixel)¶ Get the world coordinate for a pixel coordinate If there is no WCS associated with the
Scene
, meaning the data frame and model frame are the same, then this just returnspixel
.
-
insert_into
(image, sub)¶ Insert
sub
intoimage
according to this bboxInverse operation to
extract_from()
.Parameters: - image: array
Full image
- sub: array
Extracted sub-image
Returns: - image: array
-
slices_for
(im_or_shape)¶ Slices for
im_or_shape
to be limited to this bounding box.Parameters: - im_or_shape: array or tuple
Array or shape of the array to be sliced
Returns: - slices for every dimension
-