LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, np.ndarray|Image images, np.ndarray|Image variance, np.ndarray|Image weights, np.ndarray psfs, np.ndarray|None model_psf=None, np.ndarray|None noise_rms=None, Box|None bbox=None, tuple|None bands=None, int padding=3, str convolution_mode="fft") | |
tuple | bands (self) |
Box | bbox (self) |
Image | convolve (self, Image image, str|None mode=None, bool grad=False) |
float | log_likelihood (self, Image model) |
tuple[int, int, int] | shape (self) |
int | n_bands (self) |
npt.DTypeLike | dtype (self) |
tuple[int, int, int, int] | convolution_bounds (self) |
Static Public Member Functions | |
Observation | empty (tuple[Any] bands, np.ndarray psfs, np.ndarray model_psf, Box bbox, npt.DTypeLike dtype) |
Public Attributes | |
images | |
variance | |
weights | |
psfs | |
mode | |
noise_rms | |
model_psf | |
padding | |
diff_kernel | |
grad_kernel | |
Protected Attributes | |
_convolution_bounds | |
A single observation This class contains all of the observed images and derived properties, like PSFs, variance map, and weight maps, required for most optimizers. This includes methods to match a scarlet model PSF to the oberved PSF in each band. Notes ----- This is effectively a combination of the `Observation` and `Renderer` class from scarlet main, greatly simplified due to the assumptions that the observations are all resampled onto the same pixel grid and that the `images` contain all of the information for all of the model bands. Parameters ---------- images: (bands, y, x) array of observed images. variance: (bands, y, x) array of variance for each image pixel. weights: (bands, y, x) array of weights to use when calculate the likelihood of each pixel. psfs: (bands, y, x) array of the PSF image in each band. model_psf: (bands, y, x) array of the model PSF image in each band. If `model_psf` is `None` then convolution is performed, which should only be done when the observation is a PSF matched coadd, and the scarlet model has the same PSF. noise_rms: Per-band average noise RMS. If `noise_rms` is `None` then the mean of the sqrt of the variance is used. bbox: The bounding box containing the model. If `bbox` is `None` then a `Box` is created that is the shape of `images` with an origin at `(0, 0)`. padding: Padding to use when performing an FFT convolution. convolution_mode: The method of convolution. This should be either "fft" or "real".
Definition at line 166 of file observation.py.
lsst.scarlet.lite.observation.Observation.__init__ | ( | self, | |
np.ndarray | Image | images, | ||
np.ndarray | Image | variance, | ||
np.ndarray | Image | weights, | ||
np.ndarray | psfs, | ||
np.ndarray | None | model_psf = None, | ||
np.ndarray | None | noise_rms = None, | ||
Box | None | bbox = None, | ||
tuple | None | bands = None, | ||
int | padding = 3, | ||
str | convolution_mode = "fft" ) |
Reimplemented in lsst.scarlet.lite.models.fit_psf.FittedPsfObservation.
Definition at line 212 of file observation.py.
tuple lsst.scarlet.lite.observation.Observation.bands | ( | self | ) |
The bands in the observations.
Definition at line 267 of file observation.py.
Box lsst.scarlet.lite.observation.Observation.bbox | ( | self | ) |
The bounding box for the full observation.
Definition at line 272 of file observation.py.
tuple[int, int, int, int] lsst.scarlet.lite.observation.Observation.convolution_bounds | ( | self | ) |
Build the slices needed for convolution in real space
Definition at line 367 of file observation.py.
Image lsst.scarlet.lite.observation.Observation.convolve | ( | self, | |
Image | image, | ||
str | None | mode = None, | ||
bool | grad = False ) |
Convolve the model into the observed seeing in each band. Parameters ---------- image: The 3D image to convolve. mode: The convolution mode to use. This should be "real" or "fft" or `None`, where `None` will use the default `convolution_mode` specified during init. grad: Whether this is a backward gradient convolution (`grad==True`) or a pure convolution with the PSF. Returns ------- result: The convolved image.
Reimplemented in lsst.scarlet.lite.models.fit_psf.FittedPsfObservation.
Definition at line 276 of file observation.py.
npt.DTypeLike lsst.scarlet.lite.observation.Observation.dtype | ( | self | ) |
The dtype of the observation is the dtype of the images
Definition at line 362 of file observation.py.
|
static |
Definition at line 375 of file observation.py.
float lsst.scarlet.lite.observation.Observation.log_likelihood | ( | self, | |
Image | model ) |
Calculate the log likelihood of the given model Parameters ---------- model: Model to compare with the observed images. Returns ------- result: The log-likelihood of the given model.
Definition at line 335 of file observation.py.
int lsst.scarlet.lite.observation.Observation.n_bands | ( | self | ) |
The number of bands in the observation
Definition at line 357 of file observation.py.
tuple[int, int, int] lsst.scarlet.lite.observation.Observation.shape | ( | self | ) |
The shape of the images, variance, etc.
Definition at line 352 of file observation.py.
|
protected |
Definition at line 371 of file observation.py.
lsst.scarlet.lite.observation.Observation.diff_kernel |
Definition at line 261 of file observation.py.
lsst.scarlet.lite.observation.Observation.grad_kernel |
Definition at line 262 of file observation.py.
lsst.scarlet.lite.observation.Observation.images |
Definition at line 230 of file observation.py.
lsst.scarlet.lite.observation.Observation.mode |
Definition at line 243 of file observation.py.
lsst.scarlet.lite.observation.Observation.model_psf |
Definition at line 250 of file observation.py.
lsst.scarlet.lite.observation.Observation.noise_rms |
Definition at line 246 of file observation.py.
lsst.scarlet.lite.observation.Observation.padding |
Definition at line 251 of file observation.py.
lsst.scarlet.lite.observation.Observation.psfs |
Definition at line 236 of file observation.py.
lsst.scarlet.lite.observation.Observation.variance |
Definition at line 231 of file observation.py.
lsst.scarlet.lite.observation.Observation.weights |
Definition at line 232 of file observation.py.