Geometry
- class dysmalpy.models.Geometry(obs_name=None, **kwargs)[source]
Bases:
_DysmalFittable3DModel
Model component defining the transformation from galaxy to sky coordinates
- Parameters:
inc (float) – Inclination of the model in degrees
pa (float) – Position angle East of North of the blueshifted side of the model in degrees
xshift (float) – x-coordinate of the center of the model relative to center of data cube in pixels
yshift (float) – y-coordinate of the center of the model relative to center of data cube in pixels
vel_shift (float) – Systemic velocity shift that will be applied to the whole cube in km/s
obs_name (string) – (Attribute): Name of the observation to which this geometry belongs.
- coord_transform:
Transform from sky to galaxy coordinates.
- inverse_coord_transform:
Transform from galaxy to sky coordinates.
Notes
This model component takes as input sky coordinates and converts them to galaxy frame coordinates.
vel_shift
instead is used withinModelSet.simulate_cube
to apply the necessary velocity shift.Attributes Summary
Names of the parameters that describe models of this type.
Methods Summary
LOS_direction_emitframe
([inc])Method to return the LOS direction in terms of the emission frame.
coord_transform
(x, y, z[, inc, pa, xshift, ...])Transform sky coordinates to galaxy/model reference frame
evaluate
(x, y, z, inc, pa, xshift, yshift, ...)Transform sky coordinates to galaxy/model reference frame
inverse_coord_transform
(xgal, ygal, zgal[, ...])Transform galaxy/model reference frame to sky coordinates
project_velocity_along_LOS
(model, vel, x, y, z)Method to project velocities in models' emission frame along the LOS (zsky direction).
transform_cube_affine
(cube[, inc, pa, ...])Incline and transform a cube from galaxy/model reference frame to sky frame.
Attributes Documentation
- inc = DysmalParameter('inc', value=45.0, bounds=(0, 90), prior=<dysmalpy.parameters.UniformPrior object>)
- obs_name = 'galaxy'
- outputs = ('xp', 'yp', 'zp')
- pa = DysmalParameter('pa', value=0.0, bounds=(-180, 180), prior=<dysmalpy.parameters.UniformPrior object>)
- param_names = ('inc', 'pa', 'xshift', 'yshift', 'vel_shift')
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.
- vel_shift = DysmalParameter('vel_shift', value=0.0, fixed=True, prior=<dysmalpy.parameters.UniformPrior object>)
- xshift = DysmalParameter('xshift', value=0.0, prior=<dysmalpy.parameters.UniformPrior object>)
- yshift = DysmalParameter('yshift', value=0.0, prior=<dysmalpy.parameters.UniformPrior object>)
Methods Documentation
- LOS_direction_emitframe(inc=None)[source]
Method to return the LOS direction in terms of the emission frame. This just accounts for the inclination.
- Returns:
LOS_unit_vector – Direction of the LOS vector in (xyz).
This describes the inclination, so returns [0, sin(i), -cos(i)] Note the zsky direction is TOWARDS from the observer, so the LOS is -zsky, where zsky is in the direction [0, -sin(i), cos(i)].
- Return type:
3-element array
- coord_transform(x, y, z, inc=None, pa=None, xshift=None, yshift=None)[source]
Transform sky coordinates to galaxy/model reference frame
- static evaluate(x, y, z, inc, pa, xshift, yshift, vel_shift)[source]
Transform sky coordinates to galaxy/model reference frame
- inverse_coord_transform(xgal, ygal, zgal, inc=None, pa=None, xshift=None, yshift=None)[source]
Transform galaxy/model reference frame to sky coordinates
- project_velocity_along_LOS(model, vel, x, y, z, inc=None)[source]
Method to project velocities in models’ emission frame along the LOS (zsky direction).
- Parameters:
model (
_DysmalModel
) – Model component from which the velocity was calculated.vel (float or array or tuple of arrays) – Amplitude of the velocity. If model._multicoord_velocity is True, must pass a tuple of velocity components for each coordinate in the model’s native geometry.
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.
inc (float, optional) – Specify a separate inclination. Default: uses self.inc
- Returns:
v_LOS – Projection of velocity ‘vel’ along the LOS.
- Return type:
float or array