spacepy.pybats.dipole

Some functions for the generation of a dipole field.

Copyright 2010 Los Alamos National Security, LLC.

Functions

b_hat(x, y)

For given parameters, return two arrays, x and y, corresponding to the x and y components of b_hat for a dipole field.

b_line(x, y[, npoints])

For a starting X, Y point return x and y vectors that trace the dipole field line that passes through the given point.

b_mag(x, y)

For a position x, y in units of planetary radius, return the strength of the dipole magnetic field in nanoTesla.

test()

A quick test of the dipole field functions.

spacepy.pybats.dipole.b_hat(x, y)[source]

For given parameters, return two arrays, x and y, corresponding to the x and y components of b_hat for a dipole field. Plotting these two matrices using MatPlotLib’s quiver function will create a beautiful dipole field for tracing and other stuff.

spacepy.pybats.dipole.b_line(x, y, npoints=30)[source]

For a starting X, Y point return x and y vectors that trace the dipole field line that passes through the given point.

spacepy.pybats.dipole.b_mag(x, y)[source]

For a position x, y in units of planetary radius, return the strength of the dipole magnetic field in nanoTesla.

spacepy.pybats.dipole.test()[source]

A quick test of the dipole field functions.