AzimuthalPlanarRadialFlow

class dysmalpy.models.AzimuthalPlanarRadialFlow(vr=None, **kwargs)[source]

Bases: HigherOrderKinematicsPerturbation, _DysmalFittable3DModel

Model for a planar radial flow, with radial flow only in the plane of the galaxy,

but that can vary azimuthally with angle phi relative to the galaxy major axis.

Parameters:
  • m (int) – Number of modes in the azimuthal pattern. m=0 gives a purely radial profile.

  • phi0 (float) – Angle offset relative to the galaxy angle, so the azimuthal variation goes as cos(m(phi_gal - phi0))

Notes

The following functions must be specified, which take the galaxy radius R and model_set:

vr(R): Radial velocity in km/s. vr > 0 for outflow, vr < 0 for inflow

Attributes Summary

m

outputs

param_names

Names of the parameters that describe models of this type.

phi0

Methods Summary

evaluate(x, y, z, m, phi0, model_set)

Evaluate the radial velocity as a function of position x, y, z

vel_direction_emitframe(x, y, z[, _save_memory])

Method to return the velocity direction in the galaxy Cartesian frame.

velocity(x, y, z, model_set, *args)

Return the velocity as a function of x, y, z

Attributes Documentation

m = DysmalParameter('m', value=2.0, prior=<dysmalpy.parameters.UniformPrior object>)
outputs = ('vrad',)
param_names = ('m', 'phi0')

Names of the parameters that describe models of this type.

The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.

When defining a custom model class the value of this attribute is automatically set by the Parameter attributes defined in the class body.

phi0 = DysmalParameter('phi0', value=0.0, bounds=(0.0, 360.0), prior=<dysmalpy.parameters.UniformPrior object>)

Methods Documentation

evaluate(x, y, z, m, phi0, model_set)[source]

Evaluate the radial velocity as a function of position x, y, z

vel_direction_emitframe(x, y, z, _save_memory=False)[source]

Method to return the velocity direction in the galaxy Cartesian frame.

Parameters:
  • x (float or array) – xyz position in the radial flow reference frame.

  • y (float or array) – xyz position in the radial flow reference frame.

  • z (float or array) – xyz position in the radial flow reference frame.

  • _save_memory (bool, optional) – Option to save memory by only calculating the relevant matrices (eg during fitting). Default: False

Returns:

vel_dir_unit_vector – Direction of the velocity vector in (xyz).

For a planar uniform radial flow, this is the +Rhat direction, in cylindrical coordinates (R,phi,z).

Return type:

3-element array

velocity(x, y, z, model_set, *args)[source]

Return the velocity as a function of x, y, z