IdealImager¶
- class artpop.image.IdealImager[source]¶
Bases:
ImagerIdeal imager for making noise-free images.
Note
Stars are injected in the center of pixels even if subpixel coordinates are given. If you need subpixel precision, we recommend creating upsampled mock images and downsampling to the desired resolution.
Methods Summary
apply_seeing(image[, psf, boundary])Convolve mock image with psf.
inject_smooth_model(image, source, bandpass, zpt)Inject smooth component of the star system into image if it exists.
inject_stars(x, y, signal, xy_dim[, mask])Inject sources into image.
observe(source, bandpass[, psf, zpt, mask])Make ideal observation.
Methods Documentation
- apply_seeing(image, psf=None, boundary='wrap')¶
Convolve mock image with psf.
- Parameters
- image
ndarray The mock image.
- psf
ndarrayor None, optional The point-spread function. If None, will return the input image.
- boundary{‘fill’, ‘wrap’}, optional
A flag indicating how to handle boundaries:
‘fill’: set values outside the array boundary to fill_value (default)
‘wrap’: periodic boundary
The
Noneand ‘extend’ parameters are not supported for FFT-based convolution.
- image
- Returns
- inject_smooth_model(image, source, bandpass, zpt)[source]¶
Inject smooth component of the star system into image if it exists.
- Parameters
- Returns
- image
ndarray The artificial image with the smooth model injected into it. If no smooth model exists, the original image will be returned.
- image
- inject_stars(x, y, signal, xy_dim, mask=None)¶
Inject sources into image.
- Parameters
- x
ndarray Source x coordinates.
- y
ndarray Source y coordinates.
- signal
ndarray The signal to inject into image (e.g., flux, counts, etc…).
- xy_dimint or list-like
The dimensions of mock image in xy units. If
intis given, it is assumed to be both the x and y dimensions: (xy_dim, xy_dim).- mask
ndarray, optional Boolean mask that is set to True for stars you want to inject. If None, all stars will be injected.
- x
- Returns
- image
ndarray The mock image before psf convolution.
- image
- observe(source, bandpass, psf=None, zpt=27, mask=None, **kwargs)[source]¶
Make ideal observation.
- Parameters
- source
Source Source to mock observer.
- bandpassstr
Filter of observation. Must be a filter in the given photometric system(s).
- psf
ndarrayor None, optional The point-spread function. If None, will not psf-convolve image.
- zptfloat, optional
The magnitude zero point of the mock image.
- mask
ndarray, optional Boolean mask that is set to True for stars you want to inject. If None, all stars will be injected.
- source
- Returns
- observation
IdealObservation Observation object for the ideal imager.
- observation