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: CartesianConversion

Class for defining 3-Position & 4-Position in Cartesian Coordinates using SI units

Constructor

Parameters:
  • t (float) – Time

  • x (float) – x-Component of 3-Position

  • y (float) – y-Component of 3-Position

  • z (float) – z-Component of 3-Position

position()[source]

Returns Position 4-Vector in SI units

Returns:

4-Tuple, containing Position 4-Vector in SI units

Return type:

tuple

to_spherical(**kwargs)[source]

Method for conversion to Spherical Polar Coordinates

Parameters:

**kwargs (dict) – Keyword Arguments

Returns:

Spherical representation of the Cartesian Coordinates

Return type:

Spherical

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

  • M (float) – Mass of gravitating body Required to calculate alpha, the rotational length parameter

  • a (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:

BoyerLindquist

class einsteinpy.coordinates.core.Spherical(t, r, theta, phi)[source]

Bases: SphericalConversion

Class for defining 3-Position & 4-Position in Spherical Polar Coordinates using SI units

Constructor

Parameters:
  • t (float) – Time

  • r (float) – r-Component of 3-Position

  • theta (float) – theta-Component of 3-Position

  • phi (float) – phi-Component of 3-Position

position()[source]

Returns Position 4-Vector in SI units

Returns:

4-Tuple, containing Position 4-Vector in SI units

Return type:

tuple

to_cartesian(**kwargs)[source]

Method for conversion to Cartesian Coordinates

Parameters:

**kwargs (dict) – Keyword Arguments

Returns:

Cartesian representation of the Spherical Polar Coordinates

Return type:

Cartesian

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

  • M (float) – Mass of gravitating body Required to calculate alpha, the rotational length parameter

  • a (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:

BoyerLindquist

class einsteinpy.coordinates.core.BoyerLindquist(t, r, theta, phi)[source]

Bases: BoyerLindquistConversion

Class for defining 3-Position & 4-Position in Boyer-Lindquist Coordinates using SI units

Constructor

Parameters:
  • t (float) – Time

  • r (float) – r-Component of 3-Position

  • theta (float) – theta-Component of 3-Position

  • phi (float) – phi-Component of 3-Position

position()[source]

Returns Position 4-Vector in SI units

Returns:

4-Tuple, containing Position 4-Vector in SI units

Return type:

tuple

to_cartesian(**kwargs)[source]

Method for conversion to Cartesian Coordinates

Parameters:
  • **kwargs (dict) – Keyword Arguments Expects two arguments, M and ``a, as described below

  • M (float) – Mass of gravitating body Required to calculate alpha, the rotational length parameter

  • a (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:

Cartesian

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

  • M (float) – Mass of gravitating body Required to calculate alpha, the rotational length parameter

  • a (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:

Spherical