differential module

This module contains the basic classes for time differentials of coordinate systems and the transformations:

class einsteinpy.coordinates.differential.CartesianDifferential(t, x, y, z, v_x, v_y, v_z)[source]

Bases: CartesianConversion

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

Constructor

Parameters:
  • t (Quantity) – Time

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

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

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

  • v_x (Quantity, optional) – x-Component of 3-Velocity

  • v_y (Quantity, optional) – y-Component of 3-Velocity

  • v_z (Quantity, optional) – z-Component of 3-Velocity

position()[source]

Returns Position 4-Vector in SI units

Returns:

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

Return type:

tuple

property v_t

Returns the Timelike component of 4-Velocity

velocity(metric)[source]

Returns Velocity 4-Vector in SI units

Parameters:

metric (*) – Metric object, in which the coordinates are defined

Returns:

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

Return type:

tuple

spherical_differential(**kwargs)[source]

Converts to Spherical Polar Coordinates

Parameters:

**kwargs (dict) – Keyword Arguments

Returns:

Spherical Polar representation of velocity

Return type:

SphericalDifferential

bl_differential(**kwargs)[source]

Converts to Boyer-Lindquist Coordinates

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

  • M (float) – Mass of the gravitating body, around which, spacetime has been defined

  • a (float) – Spin Parameter of the gravitating body, around which, spacetime has been defined

Returns:

Boyer-Lindquist representation of velocity

Return type:

BoyerLindquistDifferential

class einsteinpy.coordinates.differential.SphericalDifferential(t, r, theta, phi, v_r, v_th, v_p)[source]

Bases: SphericalConversion

Class for defining 3-Velocity & 4-Velocity 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

  • v_r (float, optional) – r-Component of 3-Velocity

  • v_th (float, optional) – theta-Component of 3-Velocity

  • v_p (float, optional) – phi-Component of 3-Velocity

position()[source]

Returns Position 4-Vector in SI units

Returns:

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

Return type:

tuple

property v_t

Returns the Timelike component of 4-Velocity

velocity(metric)[source]

Returns Velocity 4-Vector in SI units

Parameters:

metric (*) – Metric object, in which the coordinates are defined

Returns:

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

Return type:

tuple

cartesian_differential(**kwargs)[source]

Converts to Cartesian Coordinates

Parameters:

**kwargs (dict) – Keyword Arguments

Returns:

Cartesian representation of velocity

Return type:

CartesianDifferential

bl_differential(**kwargs)[source]

Converts to Boyer-Lindquist coordinates

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

  • M (float) – Mass of the gravitating body, around which, spacetime has been defined

  • a (float) – Spin Parameter of the gravitating body, around which, spacetime has been defined

Returns:

Boyer-Lindquist representation of velocity

Return type:

BoyerLindquistDifferential

class einsteinpy.coordinates.differential.BoyerLindquistDifferential(t, r, theta, phi, v_r, v_th, v_p)[source]

Bases: BoyerLindquistConversion

Class for defining 3-Velocity & 4-Velocity 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

  • v_r (float, optional) – r-Component of 3-Velocity

  • v_th (float, optional) – theta-Component of 3-Velocity

  • v_p (float, optional) – phi-Component of 3-Velocity

position()[source]

Returns Position 4-Vector in SI units

Returns:

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

Return type:

tuple

property v_t

Returns the Timelike component of 4-Velocity

velocity(metric)[source]

Returns Velocity 4-Vector in SI units

Parameters:

metric (*) – Metric object, in which the coordinates are defined

Returns:

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

Return type:

tuple

cartesian_differential(**kwargs)[source]

Converts to Cartesian Coordinates

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

  • M (float) – Mass of the gravitating body, around which, spacetime has been defined

  • a (float) – Spin Parameter of the gravitating body, around which, spacetime has been defined

Returns:

Cartesian representation of velocity

Return type:

CartesianDifferential

spherical_differential(**kwargs)[source]

Converts to Spherical Polar Coordinates

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

  • M (float) – Mass of the gravitating body, around which, spacetime has been defined

  • a (float) – Spin Parameter of the gravitating body, around which, spacetime has been defined

Returns:

Spherical representation of velocity

Return type:

SphericalDifferential