VariableXBarFlow

class dysmalpy.models.VariableXBarFlow(vbar=None, **kwargs)[source]

Bases: HigherOrderKinematicsPerturbation, _DysmalFittable3DModel

Model for flow along a bar, along some axis in the galaxy midplane,

with flow velocity that varies with bar distance abs(xbar) (under reflection symmetry).

Parameters:
  • phi (float) – Azimuthal angle of bar, counter-clockwise from blue major axis. In degrees. Default is 90 (eg, along galaxy minor axis)

  • bar_width (float) – Width of the bar, in kpc. So bar velocity only is nonzero between -bar_width/2 < ygal < bar_width/2.

Notes

The following function must also be passed when setting up the model, which takes the bar coordinate xbar as an input:

vbar(xbar, model_set) [Amplidute of flow velocity as a function of bar coordinate abs(xbar). vbar > 0 for outflow, vbar < 0 for inflow.]

Attributes Summary

bar_width

outputs

param_names

Names of the parameters that describe models of this type.

phi

Methods Summary

evaluate(x, y, z, phi, bar_width, model_set)

Evaluate the bar velocity amplitude 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

bar_width = DysmalParameter('bar_width', value=2.0, bounds=(0.0, None), prior=<dysmalpy.parameters.UniformPrior object>)
outputs = ('vflow',)
param_names = ('phi', 'bar_width')

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.

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

Methods Documentation

evaluate(x, y, z, phi, bar_width, model_set)[source]

Evaluate the bar velocity amplitude 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 galaxy/bar reference frame.

  • y (float or array) – xyz position in the galaxy/bar reference frame.

  • z (float or array) – xyz position in the galaxy/bar 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 bar uniform flow, this is the sign(xbar) direction, in cartesian coordinates.

Return type:

3-element array

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

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