core module¶
This module contains the basic classes for coordinate systems and their position transformation:
-
class
einsteinpy.coordinates.core.
Cartesian
(t, x, y, z)[source]¶ Bases:
einsteinpy.coordinates.conversion.CartesianConversion
Class for defining 3-Position & 4-Position in Cartesian Coordinates using SI units
Constructor
- Parameters
-
position
()[source]¶ Returns Position 4-Vector in SI units
- Returns
4-Tuple, containing Position 4-Vector in SI units
- Return type
-
to_spherical
(**kwargs)[source]¶ Method for conversion to Spherical Polar Coordinates
- Other Parameters
**kwargs (dict) – Keyword Arguments
- Returns
Spherical representation of the Cartesian Coordinates
- Return type
-
to_bl
(**kwargs)[source]¶ Method for conversion to Boyer-Lindquist (BL) Coordinates
- Parameters
**kwargs (dict) – Keyword Arguments Expects two arguments,
M and ``a
, as described below- Other Parameters
M (float) – Mass of gravitating body Required to calculate
alpha
, the rotational length parametera (float) – Spin Parameter of gravitating body 0 <= a <= 1 Required to calculate
alpha
, the rotational length parameter
- Returns
Boyer-Lindquist representation of the Cartesian Coordinates
- Return type
-
class
einsteinpy.coordinates.core.
Spherical
(t, r, theta, phi)[source]¶ Bases:
einsteinpy.coordinates.conversion.SphericalConversion
Class for defining 3-Position & 4-Position in Spherical Polar Coordinates using SI units
Constructor
- Parameters
-
position
()[source]¶ Returns Position 4-Vector in SI units
- Returns
4-Tuple, containing Position 4-Vector in SI units
- Return type
-
to_cartesian
(**kwargs)[source]¶ Method for conversion to Cartesian Coordinates
- Other Parameters
**kwargs (dict) – Keyword Arguments
- Returns
Cartesian representation of the Spherical Polar Coordinates
- Return type
-
to_bl
(**kwargs)[source]¶ Method for conversion to Boyer-Lindquist (BL) Coordinates
- Parameters
**kwargs (dict) – Keyword Arguments Expects two arguments,
M and ``a
, as described below- Other Parameters
M (float) – Mass of gravitating body Required to calculate
alpha
, the rotational length parametera (float) – Spin Parameter of gravitating body 0 <= a <= 1 Required to calculate
alpha
, the rotational length parameter
- Returns
Boyer-Lindquist representation of the Spherical Polar Coordinates
- Return type
-
class
einsteinpy.coordinates.core.
BoyerLindquist
(t, r, theta, phi)[source]¶ Bases:
einsteinpy.coordinates.conversion.BoyerLindquistConversion
Class for defining 3-Position & 4-Position in Boyer-Lindquist Coordinates using SI units
Constructor
- Parameters
-
position
()[source]¶ Returns Position 4-Vector in SI units
- Returns
4-Tuple, containing Position 4-Vector in SI units
- Return type
-
to_cartesian
(**kwargs)[source]¶ Method for conversion to Cartesian Coordinates
- Parameters
**kwargs (dict) – Keyword Arguments Expects two arguments,
M and ``a
, as described below- Other Parameters
M (float) – Mass of gravitating body Required to calculate
alpha
, the rotational length parametera (float) – Spin Parameter of gravitating body 0 <= a <= 1 Required to calculate
alpha
, the rotational length parameter
- Returns
Cartesian representation of the Boyer-Lindquist Coordinates
- Return type
-
to_spherical
(**kwargs)[source]¶ Method for conversion to Spherical Polar Coordinates
- Parameters
**kwargs (dict) – Keyword Arguments Expects two arguments,
M and ``a
, as described below- Other Parameters
M (float) – Mass of gravitating body Required to calculate
alpha
, the rotational length parametera (float) – Spin Parameter of gravitating body 0 <= a <= 1 Required to calculate
alpha
, the rotational length parameter
- Returns
Spherical Polar representation of the Boyer-Lindquist Coordinates
- Return type