yt.analysis_modules.ppv_cube.ppv_cube module

Generating PPV FITS cubes

class yt.analysis_modules.ppv_cube.ppv_cube.PPVCube(ds, normal, field, velocity_bounds, center='c', width=(1.0, 'unitary'), dims=100, thermal_broad=False, atomic_weight=56.0, depth=(1.0, 'unitary'), depth_res=256, method='integrate', weight_field=None, no_shifting=False, north_vector=None, no_ghost=True, data_source=None)[source]

Bases: object

reset_spectral_axis()[source]

Reset the spectral axis to the original velocity range and units.

transform_spectral_axis(rest_value, units)[source]

Change the units of the spectral axis to some equivalent unit, such as energy, wavelength, or frequency, by providing a rest_value and the units of the new spectral axis. This corresponds to the Doppler-shifting of lines due to gas motions and thermal broadening.

write_fits(filename, overwrite=False, length_unit=None, sky_scale=None, sky_center=None, **kwargs)[source]

Write the PPVCube to a FITS file.

Parameters:
  • filename (string) – The name of the file to write to.
  • overwrite (boolean, optional) – Whether to overwrite a file with the same name that already exists. Default False.
  • length_unit (string, optional) – The units to convert the coordinates to in the file.
  • sky_scale (tuple, optional) – Conversion between an angle unit and a length unit, if sky coordinates are desired, e.g. (1.0, “arcsec/kpc”)
  • sky_center (tuple, optional) – The (RA, Dec) coordinate in degrees of the central pixel. Must be specified with sky_scale.

Notes

Additional keyword arguments are passed to writeto().

Examples

>>> cube.write_fits("my_cube.fits", overwrite=False,
...                 sky_scale=(1.0,"arcsec/kpc"), sky_center=(30.,45.))
yt.analysis_modules.ppv_cube.ppv_cube.create_vlos(normal, no_shifting)[source]