LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
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 167 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 213 of file observation.py.
tuple lsst.scarlet.lite.observation.Observation.bands | ( | self | ) |
The bands in the observations.
Definition at line 268 of file observation.py.
Box lsst.scarlet.lite.observation.Observation.bbox | ( | self | ) |
The bounding box for the full observation.
Definition at line 273 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 368 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 277 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 363 of file observation.py.
|
static |
Definition at line 376 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 336 of file observation.py.
int lsst.scarlet.lite.observation.Observation.n_bands | ( | self | ) |
The number of bands in the observation
Definition at line 358 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 353 of file observation.py.
|
protected |
Definition at line 372 of file observation.py.
lsst.scarlet.lite.observation.Observation.diff_kernel |
Definition at line 262 of file observation.py.
lsst.scarlet.lite.observation.Observation.grad_kernel |
Definition at line 263 of file observation.py.
lsst.scarlet.lite.observation.Observation.images |
Definition at line 231 of file observation.py.
lsst.scarlet.lite.observation.Observation.mode |
Definition at line 244 of file observation.py.
lsst.scarlet.lite.observation.Observation.model_psf |
Definition at line 251 of file observation.py.
lsst.scarlet.lite.observation.Observation.noise_rms |
Definition at line 247 of file observation.py.
lsst.scarlet.lite.observation.Observation.padding |
Definition at line 252 of file observation.py.
lsst.scarlet.lite.observation.Observation.psfs |
Definition at line 237 of file observation.py.
lsst.scarlet.lite.observation.Observation.variance |
Definition at line 232 of file observation.py.
lsst.scarlet.lite.observation.Observation.weights |
Definition at line 233 of file observation.py.