make_2d_spec_image#
- specreduce.utils.synth_data.make_2d_spec_image(nx: int = 3000, ny: int = 1000, wcs: ~astropy.wcs.wcs.WCS | None = None, extent: ~typing.Sequence[int | float] = (6500, 9500), wave_unit: ~astropy.units.core.Unit = Unit("Angstrom"), wave_air: bool = False, background: int | float = 5, line_fwhm: float = 5.0, linelists: list[str] = ('OH_GMOS', ), amplitude_scale: float = 1.0, tilt_func: ~astropy.modeling.core.Model = <Legendre1D(0, c0=0.)>, trace_center: int | float | None = None, trace_order: int = 3, trace_coeffs: None | dict[str, int | float] = None, source_profile: ~astropy.modeling.core.Model = <Moffat1D(amplitude=10., x_0=0., gamma=1., alpha=0.1)>, add_noise: bool = True) CCDData[source]#
Make a synthetic 2D spectrum image containing both emission lines and a trace of a continuum source.
- Parameters:
- nx
Number of pixels in the dispersion direction.
- ny
Number of pixels in the spatial direction.
- wcs
2D WCS to apply to the image. Must have a spectral axis defined along with appropriate spectral wavelength units.
- extent
If
wcsis not provided, this defines the beginning and end wavelengths of the dispersion axis.- wave_unit
If
wcsis not provided, this defines the wavelength units of the dispersion axis.- wave_air
If True, convert the vacuum wavelengths used by
pypeitto air wavelengths.- background
Constant background level in counts.
- line_fwhm
Gaussian FWHM of the emission lines in pixels
- linelists
Specification for linelists to load from
pypeit- amplitude_scale
Scale factor to apply to amplitudes provided in the linelists
- tilt_func
The tilt function to apply along the cross-dispersion axis to simulate tilted or curved emission lines.
- 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
- source_profile
Model to use for the source’s spatial profile
- add_noise
If True, add Poisson noise to the image; requires
photutilsto be installed.
- Returns:
- ccd_im
CCDDatainstance containing synthetic 2D spectroscopic image