inject_galsim_objects_into_exposure¶
- lsst.source.injection.inject_galsim_objects_into_exposure(exposure: ExposureF, objects: Generator[tuple[lsst.geom.SpherePoint, lsst.geom.Point2D, int, galsim.gsobject.GSObject], None, None], mask_plane_name: str = 'INJECTED', calib_flux_radius: float = 12.0, draw_size_max: int = 1000, logger: Any | None = None) tuple[list[int], list[galsim.bounds.BoundsI], list[bool], list[bool]] ¶
Inject sources into given exposure using GalSim.
- Parameters:
- exposure
lsst.afw.image.ExposureF
The exposure to inject synthetic sources into.
- objects
Generator
[tuple
, None, None] An iterator of tuples that contains (or generates) locations and object surface brightness profiles to inject. The tuples should contain the following elements:
lsst.geom.SpherePoint
,lsst.geom.Point2D
,int
,galsim.gsobject.GSObject
.- mask_plane_name
str
Name of the mask plane to use for the injected sources.
- calib_flux_radius
float
Radius in pixels to use for the flux calibration. This is used to produce the correct instrumental fluxes within the radius. The value should match that of the field defined in slot_CalibFlux_instFlux.
- draw_size_max
int
Maximum allowed size of the drawn object. If the object is larger than this, the draw size will be clipped to this size.
- logger
lsst.utils.logging.LsstLogAdapter
, optional Logger to use for logging messages.
- exposure
- Returns:
- draw_sizes
list
[int
] Draw sizes of the injected sources.
- common_bounds
list
[galsim.BoundsI
] Common bounds of the drawn objects.
- fft_size_errors
list
[bool
] Boolean flags indicating whether a GalSimFFTSizeError was raised.
- psf_compute_errors
list
[bool
] Boolean flags indicating whether a PSF computation error was raised.
- draw_sizes