UniformBarFlow
- class dysmalpy.models.UniformBarFlow(**kwargs)[source]
Bases:
HigherOrderKinematicsPerturbation
,_DysmalFittable3DModel
Model for a uniform flow along a bar, along some axis in the galaxy midplane.
- Parameters:
vbar (float) – Bar streaming velocity in km/s. vbar > 0 for outflow, vbar < 0 for inflow
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.
Attributes Summary
Names of the parameters that describe models of this type.
Methods Summary
evaluate
(x, y, z, vbar, phi, bar_width)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, *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 = ('vbar', '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>)
- vbar = DysmalParameter('vbar', value=30.0, prior=<dysmalpy.parameters.UniformPrior object>)
Methods Documentation
- static evaluate(x, y, z, vbar, phi, bar_width)[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