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:
exposurelsst.afw.image.ExposureF

The exposure to inject synthetic sources into.

objectsGenerator [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_namestr

Name of the mask plane to use for the injected sources.

calib_flux_radiusfloat

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_maxint

Maximum allowed size of the drawn object. If the object is larger than this, the draw size will be clipped to this size.

loggerlsst.utils.logging.LsstLogAdapter, optional

Logger to use for logging messages.

Returns:
draw_sizeslist [int]

Draw sizes of the injected sources.

common_boundslist [galsim.BoundsI]

Common bounds of the drawn objects.

fft_size_errorslist [bool]

Boolean flags indicating whether a GalSimFFTSizeError was raised.

psf_compute_errorslist [bool]

Boolean flags indicating whether a PSF computation error was raised.