core module

This module contains the basic classes for coordinate systems and their position transformation:

class einsteinpy.coordinates.core.Cartesian(x, y, z)[source]

Bases: einsteinpy.coordinates.conversion.CartesianConversion

Class for Cartesian Coordinates and related transformations.

Constructor.

Parameters
si_values()[source]

Function for returning values in SI units.

Returns

Array containing values in SI units (m, m, m)

Return type

ndarray

norm()[source]

Function for finding euclidean norm of a vector.

Returns

Euclidean norm with units.

Return type

Quantity

dot(target)[source]

Dot product of two vectors.

Parameters

target (Cartesian) –

Returns

Dot product with units

Return type

Quantity

to_spherical()[source]

Method for conversion to spherical coordinates.

Returns

Spherical representation of the Cartesian Coordinates.

Return type

Spherical

to_bl(a)[source]

Method for conversion to boyer-lindquist coordinates.

Parameters

a (Quantity) – a = J/Mc , the angular momentum per unit mass of the black hole per speed of light.

Returns

BL representation of the Cartesian Coordinates.

Return type

BoyerLindquist

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

Bases: einsteinpy.coordinates.conversion.SphericalConversion

Class for Spherical Coordinates and related transformations.

Constructor.

Parameters
si_values()[source]

Function for returning values in SI units.

Returns

Array containing values in SI units (m, rad, rad)

Return type

ndarray

to_cartesian()[source]

Method for conversion to cartesian coordinates.

Returns

Cartesian representation of the Spherical Coordinates.

Return type

Cartesian

to_bl(a)[source]

Method for conversion to boyer-lindquist coordinates.

Parameters

a (Quantity) – a = J/Mc , the angular momentum per unit mass of the black hole per speed of light.

Returns

BL representation of the Spherical Coordinates.

Return type

BoyerLindquist

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

Bases: einsteinpy.coordinates.conversion.BoyerLindquistConversion

Class for Spherical Coordinates and related transformations.

Constructor.

Parameters
si_values()[source]

Function for returning values in SI units.

Returns

Array containing values in SI units (m, rad, rad)

Return type

ndarray

to_cartesian()[source]

Method for conversion to cartesian coordinates.

Returns

Cartesian representation of the BL Coordinates.

Return type

Cartesian

to_spherical()[source]

Method for conversion to spherical coordinates.

Returns

Spherical representation of the BL Coordinates.

Return type

Spherical