Helper modules

pfsspy.coords Module

Helper functions for coordinate transformations used in the PFSS domain.

The PFSS solution is calculated on a “strumfric” grid defined by

  • \(\rho = \log (r)\)

  • \(s = \cos (\theta )\)

  • \(\phi\)

where \(r, \theta, \phi\) are spherical cooridnates that have ranges

  • \(1 < r < r_{ss}\)

  • \(0 < \theta < \pi\)

  • \(0 < \phi < 2\pi\)

The transformation between cartesian coordinates used by the tracer and the above coordinates is given by

  • \(x = r\sin (\theta) \cos (\phi)\)

  • \(y = r\sin (\theta) \sin (\phi)\)

  • \(z = r \cos (\theta)\)


cart2sph(x, y, z)

Convert cartesian coordinates to spherical coordinates.

cart2strum(x, y, z)

Convert cartesian coordinates to strumfric coordinates.

sph2cart(r, theta, phi)

Convert spherical coordinates to cartesian coordinates.

strum2cart(rho, s, phi)

Convert strumfric coordinates to cartesian coordinates.