Reference/API

rbinvariantslib.invariants Module

Numerical calculation of adiabatic invariants.

Functions

calculate_K(model, starting_point[, ...])

Calculate the third adiabatic invariant, K.

calculate_LStar(model, starting_point[, ...])

Calculate the third adiabatic invariant, L*

Classes

CalculateKResult(K, Bm, Bmin, ...)

Class to hold the return value of calculate_K().

CalculateLStarResult(LStar, ...)

Class to hold the return value of calculate_LStar().

FieldLineTraceInsufficient

Raised when a field line trace is performed but the result is empty or is too small.

DriftShellSearchDoesntConverge

Raised when search to determine drift shell doesn't converge

DriftShellLinearSearchDoesntConverge

Raised when linear search to determine the drift shell doesn't converge.

DriftShellBisectionDoesntConverge

Raised when bisection serach to determine the drift shell doesn't converge.

Class Inheritance Diagram

Inheritance diagram of rbinvariantslib.invariants.CalculateKResult, rbinvariantslib.invariants.CalculateLStarResult, rbinvariantslib.invariants.FieldLineTraceInsufficient, rbinvariantslib.invariants.DriftShellSearchDoesntConverge, rbinvariantslib.invariants.DriftShellLinearSearchDoesntConverge, rbinvariantslib.invariants.DriftShellBisectionDoesntConverge

rbinvariantslib.models Module

Tools for obtaining models for use in calculating invariants. Models are grids + magnetic field vectors at those grid points. They are instances of MagneticFieldModel.

In this module, all grids returned are in units of Re and all magnetic fields are in units of Gauss.

Functions

get_dipole_model_on_lfm_grid(lfm_hdf4_path)

Get a dipole field on a LFM grid.

get_lfm_hdf4_model(lfm_hdf4_path)

Get a magnetic field data + grid from LFM output.

get_tsyganenko(model_name, params, time, ...)

Helper function to get one of the tsyganenko fields on an LFM grid.

get_tsyganenko_on_lfm_grid(model_name, ...)

Helper function to get one of the tsyganenko fields on an LFM grid.

get_tsyganenko_params(times)

Get parameters for tsyganenko models from CDAWeb API.

get_swmf_out_model(path[, xaxis, yaxis, ...])

Get a MagneticFieldModel from SWMF .out output.

get_generic_hdf5_model(path)

Load a MagneticFieldModel from a generic HDF5 file.

get_model(model_type, path, **kwargs)

Get a magnetic field mmodel_type, pathodel;

Classes

MagneticFieldModel(x, y, z, Bx, By, Bz, ...)

Represents a magnetic field model, with methods for sampling the magnetic field at an aribtrary point.

FieldLineTrace(points, B)

Class to hold the results of a field line trace.

Class Inheritance Diagram

Inheritance diagram of rbinvariantslib.models.MagneticFieldModel, rbinvariantslib.models.FieldLineTrace