make_2d_trace_image#

specreduce.utils.synth_data.make_2d_trace_image(nx: int = 3000, ny: int = 1000, background: int | float = 5, trace_center: int | float | None = None, trace_order: int = 3, trace_coeffs: None | dict[str, int | float] = None, profile: ~astropy.modeling.core.Model = <Moffat1D(amplitude=10., x_0=0., gamma=1., alpha=0.1)>, add_noise: bool = True) CCDData[source]#

Create synthetic 2D spectroscopic image with a single source. The spatial (y-axis) position of the source along the dispersion (x-axis) direction is modeled using a Chebyshev polynomial. The flux units are counts and the noise is modeled as Poisson.

Parameters:
nx

Size of image in X axis which is assumed to be the dispersion axis

ny

Size of image in Y axis which is assumed to be the spatial axis

background

Level of constant background in counts

trace_center

Zeropoint of the trace. If None, then use center of Y (spatial) axis.

trace_order

Order of the Chebyshev polynomial used to model the source’s trace

trace_coeffs

Dict containing the Chebyshev polynomial coefficients to use in the trace model

profile

Model to use for the source’s spatial profile

add_noise

If True, add Poisson noise to the image

Returns:
ccd_im

CCDData instance containing synthetic 2D spectroscopic image