make_2d_trace_image

specreduce.utils.synth_data.make_2d_trace_image(nx=3000, ny=1000, background=5, trace_center=None, trace_order=3, trace_coeffs={'c0': 0, 'c1': 50, 'c2': 100}, source_amplitude=10, source_alpha=0.1, add_noise=True)[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:
nxint (default=3000)

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

nyint (default=1000)

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

backgroundint (default=5)

Level of constant background in counts

trace_centerint (default=None)

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

trace_orderint (default=3)

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

trace_coeffsdict (default={‘c0’: 0, ‘c1’: 50, ‘c2’: 100})

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

source_amplitudeint (default=10)

Amplitude of modeled source in counts

source_alphafloat (default=0.1)

Power index of the source’s Moffat profile. Use small number here to emulate extended source.

add_noisebool (default=True)

If True, add Poisson noise to the image; requires photutils to be installed.

Returns
——-
ccd_imCCDData

CCDData instance containing synthetic 2D spectroscopic image