LSST Applications g0603fd7c41+501e3db9f9,g0aad566f14+23d8574c86,g0dd44d6229+a1a4c8b791,g2079a07aa2+86d27d4dc4,g2305ad1205+a62672bbc1,g2bbee38e9b+047b288a59,g337abbeb29+047b288a59,g33d1c0ed96+047b288a59,g3a166c0a6a+047b288a59,g3d1719c13e+23d8574c86,g487adcacf7+cb7fd919b2,g4be5004598+23d8574c86,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+4a9e435310,g63cd9335cc+585e252eca,g858d7b2824+23d8574c86,g88963caddf+0cb8e002cc,g99cad8db69+43388bcaec,g9ddcbc5298+9a081db1e4,ga1e77700b3+a912195c07,gae0086650b+585e252eca,gb0e22166c9+60f28cb32d,gb2522980b2+793639e996,gb3a676b8dc+b4feba26a1,gb4b16eec92+63f8520565,gba4ed39666+c2a2e4ac27,gbb8dafda3b+a5d255a82e,gc120e1dc64+d820f8acdb,gc28159a63d+047b288a59,gc3e9b769f7+f4f1cc6b50,gcf0d15dbbd+a1a4c8b791,gdaeeff99f8+f9a426f77a,gdb0af172c8+b6d5496702,ge79ae78c31+047b288a59,w.2024.19
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
lsst.scarlet.lite.models.parametric.CartesianFrame Class Reference
Inheritance diagram for lsst.scarlet.lite.models.parametric.CartesianFrame:
lsst.scarlet.lite.models.parametric.EllipseFrame

Public Member Functions

 __init__ (self, Box bbox)
 
tuple[int,...] shape (self)
 
Box bbox (self)
 
np.ndarray x_grid (self)
 
np.ndarray y_grid (self)
 

Protected Attributes

 _bbox
 
 _x
 
 _y
 
 _r
 
 _r2
 

Detailed Description

A grid of X and Y values contained in a bbox

Definition at line 60 of file parametric.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.scarlet.lite.models.parametric.CartesianFrame.__init__ ( self,
Box bbox )
Parameters
----------
bbox: Box
    The bounding box that contains this frame.

Reimplemented in lsst.scarlet.lite.models.parametric.EllipseFrame.

Definition at line 63 of file parametric.py.

63 def __init__(self, bbox: Box):
64 """
65 Parameters
66 ----------
67 bbox: Box
68 The bounding box that contains this frame.
69 """
70 # Store the new bounding box
71 self._bbox = bbox
72 # Get the range of x and y
73 yi, xi = bbox.start[-2:]
74 yf, xf = bbox.stop[-2:]
75 height, width = bbox.shape[-2:]
76 y = np.linspace(yi, yf - 1, height)
77 x = np.linspace(xi, xf - 1, width)
78 # Create the grid used to create the image of the frame
79 self._x, self._y = np.meshgrid(x, y)
80 self._r = None
81 self._r2 = None
82

Member Function Documentation

◆ bbox()

Box lsst.scarlet.lite.models.parametric.CartesianFrame.bbox ( self)
Bounding box containing the frame

Reimplemented in lsst.scarlet.lite.models.parametric.EllipseFrame.

Definition at line 89 of file parametric.py.

89 def bbox(self) -> Box:
90 """Bounding box containing the frame"""
91 return self._bbox
92
AmpInfoBoxKey bbox
Definition Amplifier.cc:117

◆ shape()

tuple[int, ...] lsst.scarlet.lite.models.parametric.CartesianFrame.shape ( self)
Shape of the frame.

Definition at line 84 of file parametric.py.

84 def shape(self) -> tuple[int, ...]:
85 """Shape of the frame."""
86 return self._bbox.shape
87

◆ x_grid()

np.ndarray lsst.scarlet.lite.models.parametric.CartesianFrame.x_grid ( self)
The grid of x-values for the entire frame

Definition at line 94 of file parametric.py.

94 def x_grid(self) -> np.ndarray:
95 """The grid of x-values for the entire frame"""
96 return self._x
97

◆ y_grid()

np.ndarray lsst.scarlet.lite.models.parametric.CartesianFrame.y_grid ( self)
The grid of y-values for the entire frame

Definition at line 99 of file parametric.py.

99 def y_grid(self) -> np.ndarray:
100 """The grid of y-values for the entire frame"""
101 return self._y
102
103

Member Data Documentation

◆ _bbox

lsst.scarlet.lite.models.parametric.CartesianFrame._bbox
protected

Definition at line 71 of file parametric.py.

◆ _r

lsst.scarlet.lite.models.parametric.CartesianFrame._r
protected

Definition at line 80 of file parametric.py.

◆ _r2

lsst.scarlet.lite.models.parametric.CartesianFrame._r2
protected

Definition at line 81 of file parametric.py.

◆ _x

lsst.scarlet.lite.models.parametric.CartesianFrame._x
protected

Definition at line 79 of file parametric.py.

◆ _y

lsst.scarlet.lite.models.parametric.CartesianFrame._y
protected

Definition at line 79 of file parametric.py.


The documentation for this class was generated from the following file: