Instrument

class dysmalpy.instrument.Instrument(beam=None, beam_type=None, lsf=None, pixscale=None, spec_type='velocity', spec_start=<Quantity -1000. km / s>, spec_step=<Quantity 10. km / s>, nspec=201, line_center=None, smoothing_type=None, smoothing_npix=None, moment=False, apertures=None, integrate_cube=True, slit_width=None, slit_pa=None, fov=None, ndim=None, name='Instrument')[source]

Bases: object

Base class to define an instrument to observe a model galaxy.

Parameters:
  • beam (2D array, GaussianBeam, DoubleBeam, or Moffat) – Object describing the PSF of the instrument

  • beam_type ({'analytic', 'empirical'}) –

    • 'analytic' implies the beam is one of the provided beams in dysmalpy.

    • 'empirical' implies the provided beam is a 2D array that describes

      the convolution kernel.

  • lsf (LSF object) – Object describing the line spread function of the instrument

  • pixscale (float or Quantity) – Size of one pixel on the sky. If no units are used, arcseconds are assumed.

  • spec_type ({'velocity', 'wavelength'}) – Whether the spectral axis is in velocity or wavelength space

  • spec_start (Quantity) – The value and unit of the first spectral channel

  • spec_step (Quantity) – The spacing of the spectral channels

  • nspec (int) – Number of spectral channels

  • fov (tuple) – x and y size of the FOV of the instrument in pixels

  • name (str) – Name of the instrument

Attributes Summary

beam

lsf

pixscale

spec_center

spec_step

Methods Summary

convolve(cube[, spec_center])

Perform convolutions that are associated with this Instrument

convolve_with_beam(cube)

Performs spatial broadening due to the point spread function

convolve_with_lsf(cube[, spec_center])

Performs line broadening due to the line spread function

set_beam_kernel([support_scaling])

Calculate and store the PSF convolution kernel

set_lsf_kernel([spec_center])

Calculate and store the LSF convolution kernel

Attributes Documentation

beam
lsf
pixscale
spec_center
spec_step

Methods Documentation

convolve(cube, spec_center=None)[source]

Perform convolutions that are associated with this Instrument

This method convolves the input cube such that the output cube has the correct PSF and/or LSF as given by the Instrument’s beam and lsf. The cube is first convolved to the PSF, then to the LSF.

Parameters:
  • cube (3D array) – Input model cube to convolve with the instrument PSF and/or LSF The first dimension is assumed to correspond to the spectral dimension.

  • spec_center (Quantity) – Central wavelength to define the conversion from velocity to wavelength Only necessary if the spectral type is ‘wavelength’ and using an LSF

Returns:

cube – New model cube after applying the PSF and LSF convolution

Return type:

3D array

convolve_with_beam(cube)[source]

Performs spatial broadening due to the point spread function

Parameters:

cube (3D array) – Input model cube to convolve with the instrument PSF The first dimension is assumed to correspond to the spectral dimension.

Returns:

cube – New model cube after applying the PSF convolution

Return type:

3D array

convolve_with_lsf(cube, spec_center=None)[source]

Performs line broadening due to the line spread function

Parameters:
  • cube (3D array) – Input model cube to convolve with the instrument LSF The first dimension is assumed to correspond to the spectral dimension.

  • spec_center (Quantity) – Central wavelength to define the conversion from velocity to wavelength Only necessary if the instrument spectral type is ‘wavelength’

Returns:

cube – New model cube after applying the LSF convolution

Return type:

3D array

set_beam_kernel(support_scaling=12.0)[source]

Calculate and store the PSF convolution kernel

Parameters:

support_scaling (int) – The amount to scale the stddev to determine the size of the kernel

set_lsf_kernel(spec_center=None)[source]

Calculate and store the LSF convolution kernel

Parameters:

spec_center (Quantity, optional) – Central wavelength that corresponds to 0 velocity Only necessary if Instrument.spec_type = 'wavelength' and Instrument.spec_center hasn’t been set.