add_objects_to_image

romanisim.image.add_objects_to_image(image, objlist, xpos, ypos, psf, flux_to_counts_factor, outputunit_to_electrons=None, bandpass=None, filter_name=None, add_noise=False, rng=None, seed=None, fastpointsources=True)

Add sources to an image.

Note: this includes Poisson noise when photon shooting is used (i.e., for chromatic source profiles), and otherwise is noise free, unless add_noise is set to True.

Parameters:
imagegalsim.Image

Image to which to add sources with associated WCS. Updated in place.

objlistlist[CatalogObject]

Objects to add to image. These may be chromatic or achromatic.

xpos, yposarray_like

x & y positions of sources (pixel) at which sources should be added

psfgalsim.Profile

PSF for image

flux_to_counts_factorfloat or list

physical fluxes in objlist (whether in profile SEDs or flux arrays) should be multiplied by this factor to convert to total electrons in the image

outputunit_to_electronsarray_like

One output image unit corresponds to this many electrons. If None, leave as electrons.

bandpassgalsim.Bandpass

bandpass in which image is being rendered. This is used only in cases where chromatic profiles & PSFs are being used.

filter_namestr

filter to use to select appropriate flux from objlist. This is only used when achromatic PSFs and sources are being rendered.

add_noisebool

if True, add Poisson noise to noiseless FFT simulated images produced when achromatic profiles are used.

rnggalsim.BaseDeviate

random number generator to use

seedint

seed to use for random number generator

Returns:
outinfonp.ndarray

Array structure containing rows for each source. The columns give the total number of electrons from the source entering the image and the time taken to render the source.