geoist.magmod.magnetic_model package¶
Subpackages¶
- geoist.magmod.magnetic_model.tests package
- Subpackages
- Submodules
- geoist.magmod.magnetic_model.tests.coefficient_loaders module
- geoist.magmod.magnetic_model.tests.coefficients module
- geoist.magmod.magnetic_model.tests.coefficients_mio module
- geoist.magmod.magnetic_model.tests.field_lines module
- geoist.magmod.magnetic_model.tests.model_loaders module
- geoist.magmod.magnetic_model.tests.parser_emm module
- geoist.magmod.magnetic_model.tests.parser_igrf module
- geoist.magmod.magnetic_model.tests.parser_mio module
- geoist.magmod.magnetic_model.tests.parser_mma module
- geoist.magmod.magnetic_model.tests.parser_shc module
- geoist.magmod.magnetic_model.tests.parser_wmm module
- geoist.magmod.magnetic_model.tests.util module
- Module contents
Submodules¶
geoist.magmod.magnetic_model.coefficients module¶
-
class
geoist.magmod.magnetic_model.coefficients.
CombinedSHCoefficients
(*items)[源代码]¶ 基类:
geoist.magmod.magnetic_model.coefficients.SHCoefficients
Model composed of multiple coefficient sets.
-
property
degree
¶ Get [maximum] model degree.
-
property
min_degree
¶ Get minimum model degree. Below this degree all model coefficients are zero.
-
property
-
class
geoist.magmod.magnetic_model.coefficients.
SHCoefficients
(is_internal=True, **kwargs)[源代码]¶ 基类:
object
Abstract base class for the spherical harmonic coefficients.
-
property
degree
¶ Get [maximum] model degree.
-
property
min_degree
¶ Get minimum model degree. Below this degree all model coefficients are zero.
-
property
-
class
geoist.magmod.magnetic_model.coefficients.
SparseSHCoefficients
(indices, coefficients, **kwargs)[源代码]¶ 基类:
geoist.magmod.magnetic_model.coefficients.SHCoefficients
Base class for sparse spherical harmonic coefficients.
-
property
degree
¶ Get [maximum] model degree.
-
property
min_degree
¶ Get minimum model degree. Below this degree all model coefficients are zero.
-
property
-
class
geoist.magmod.magnetic_model.coefficients.
SparseSHCoefficientsConstant
(indices, coefficients, **kwargs)[源代码]¶ 基类:
geoist.magmod.magnetic_model.coefficients.SparseSHCoefficients
Time invariant sparse spherical harmonic coefficients.
-
class
geoist.magmod.magnetic_model.coefficients.
SparseSHCoefficientsTimeDependent
(indices, coefficients, times, **kwargs)[源代码]¶ 基类:
geoist.magmod.magnetic_model.coefficients.SparseSHCoefficients
Time dependent sparse spherical harmonic coefficients evaluated by piecewise linear interpolation of a time series of coefficients snapshots.
-
class
geoist.magmod.magnetic_model.coefficients.
SparseSHCoefficientsTimeDependentDecimalYear
(indices, coefficients, times, to_mjd2000=<built-in function decimal_year_to_mjd2000>, to_decimal_year=<built-in function mjd2000_to_decimal_year>, **kwargs)[源代码]¶ 基类:
geoist.magmod.magnetic_model.coefficients.SparseSHCoefficientsTimeDependent
Time dependent sparse spherical harmonic coefficients evaluated by piecewise linear interpolation of a time series of coefficients snapshots with time in decimal year interpolated in the decimal years time domain.
geoist.magmod.magnetic_model.coefficients_mio module¶
-
class
geoist.magmod.magnetic_model.coefficients_mio.
SparseSHCoefficientsMIO
(indices, coefficients, ps_extent, mjd2000_to_year_fraction=<built-in function mjd2000_to_year_fraction>, **kwargs)[源代码]¶ 基类:
geoist.magmod.magnetic_model.coefficients.SparseSHCoefficients
Time dependent 2D Fourier series Swarm MIO coefficients. :param indices - array if the nm indices: :param coefficients - gh or qs coefficients: :param ps_extent -: :type ps_extent -: pmin, pmax, smin, smax :param is_internal - set False for an external model:
geoist.magmod.magnetic_model.field_lines module¶
-
geoist.magmod.magnetic_model.field_lines.
trace_field_line
(model, time, point, input_coordinate_system=1, output_coordinate_system=1, trace_options=None, model_options=None)[源代码]¶ Trace field line passing trough the given point. Output:
coords - array of field line Cartesian coordinates. field - array of field vectors in the requested in the Cartesian
coordinate frame.
- 参数
- MJD2000 time used by the field model. (time) --
- stating point (point) --
- options used by the field line tracing. (trace_options) --
- dictionary of model options passed to the model.eval() (model_options) -- method.
geoist.magmod.magnetic_model.loader_emm module¶
geoist.magmod.magnetic_model.loader_igrf module¶
geoist.magmod.magnetic_model.loader_mio module¶
-
geoist.magmod.magnetic_model.loader_mio.
convert_external_mio_coeff
(degree, indices, coefficients, height)[源代码]¶ Convert external coefficients to internal ones.
-
geoist.magmod.magnetic_model.loader_mio.
load_coeff_swarm_mio_external
(path, above_ionosphere=True)[源代码]¶ Load external model coefficients from a Swarm MIO_SHA_2* product file. Use the above_ionosphere to pick the right model variant.
-
geoist.magmod.magnetic_model.loader_mio.
load_coeff_swarm_mio_internal
(path)[源代码]¶ Load internal model coefficients and other parameters from a Swarm MIO_SHA_2* product file.
geoist.magmod.magnetic_model.loader_shc module¶
-
geoist.magmod.magnetic_model.loader_shc.
load_coeff_shc
(path, interpolate_in_decimal_years=False, **kwargs)[源代码]¶ Load coefficients from an SHC file.
The interpolate_in_decimal_years flag forces interpolation of time dependent models to be performed in the decimal years rather then in the default.
-
geoist.magmod.magnetic_model.loader_shc.
load_coeff_shc_combined
(*paths, **kwargs)[源代码]¶ Load coefficients combined from multiple SHC files.
geoist.magmod.magnetic_model.loader_wmm module¶
geoist.magmod.magnetic_model.model module¶
-
class
geoist.magmod.magnetic_model.model.
DipoleSphericalHarmomicGeomagneticModel
(coefficients, north_pole)[源代码]¶ 基类:
geoist.magmod.magnetic_model.model.SphericalHarmomicGeomagneticModel
Earth magnetic field model calculated by the Spherical Harmonic Expansion in the dipole coordinates. The dipole coordinates are defined north latitude and longitude of the dipole axis.
-
class
geoist.magmod.magnetic_model.model.
GeomagneticModel
[源代码]¶ 基类:
object
Abstract base class of the Earth magnetic field model.
-
eval
(time, location, input_coordinate_system=1, output_coordinate_system=1, **options)[源代码]¶ Evaluate magnetic field for the given MJD2000 times and coordinates.
-
parameters
= ('time', 'location')¶
-
property
validity
¶ Get model's validity range as a tuple of two MJD2000 times. In case of an unconstrained validity rage (-inf, +inf) tuple is returned.
-
-
class
geoist.magmod.magnetic_model.model.
SphericalHarmomicGeomagneticModel
(coefficients)[源代码]¶ 基类:
geoist.magmod.magnetic_model.model.GeomagneticModel
Earth magnetic field model calculated by the Spherical Harmonic Expansion.
-
property
degree
¶ Get maximum degree of the model.
-
eval
(time, location, input_coordinate_system=1, output_coordinate_system=1, **options)[源代码]¶ Evaluate magnetic field for the given MJD2000 times and coordinates.
-
property
min_degree
¶ Get minimum degree of the model.
-
property
validity
¶ Get model's validity range as a tuple of two MJD2000 times. In case of an unconstrained validity rage (-inf, +inf) tuple is returned.
-
property
geoist.magmod.magnetic_model.model_composed module¶
-
geoist.magmod.magnetic_model.model_composed.
Component
¶ geoist.magmod.magnetic_model.model_composed._Component
的别名
-
class
geoist.magmod.magnetic_model.model_composed.
ComposedGeomagneticModel
(*models)[源代码]¶ 基类:
geoist.magmod.magnetic_model.model.GeomagneticModel
Composed Earth magnetic field model aggregating multiple models into one.
-
eval
(time, location, input_coordinate_system=1, output_coordinate_system=1, **options)[源代码]¶ Evaluate magnetic field for the given MJD2000 times and coordinates.
-
property
parameters
¶ required parameters.
-
property
validity
¶ Get model's validity range as a tuple of two MJD2000 times. In case of an unconstrained validity rage (-inf, +inf) tuple is returned.
-
geoist.magmod.magnetic_model.model_mio module¶
-
class
geoist.magmod.magnetic_model.model_mio.
DipoleMIOGeomagneticModel
(coefficients, north_pole, wolf_ratio=0.01485, height=110.0, earth_radius=6371.2)[源代码]¶ 基类:
geoist.magmod.magnetic_model.model.DipoleSphericalHarmomicGeomagneticModel
Swarm MIO model calculated by the Spherical Harmonic Expansion in the dipole coordinates. The dipole coordinates are defined by the north pole latitude and longitude. The model requires time dependent F10.7 index values.
- Options:
coefficients - spherical harmonic coefficients north_pole - a tuple of dipole north pole lat/lon coordinates
or callable returning a tuple of dipole north pole lat/lon coordinates for a given MJD2000 time.
wolf_ratio - Wolf ratio (F10.7 scale) height - radius of the ionosphere (a + h) earth_radius - mean Earth radius used by the MIO model.
-
eval
(time, location, input_coordinate_system=1, output_coordinate_system=1, **options)[源代码]¶ Evaluate magnetic field for the given MJD2000 times and coordinates.
-
parameters
= ('time', 'location', 'f107', 'subsolar_point')¶
-
class
geoist.magmod.magnetic_model.model_mio.
DipoleMIOPrimaryGeomagneticModel
(model_below_ionosphere, model_above_ionosphere, height=110.0, earth_radius=6371.2)[源代码]¶ 基类:
geoist.magmod.magnetic_model.model.GeomagneticModel
Composed model switching between MIO primary fields evaluation above and below the Ionosphere.
-
property
degree
¶ Get maximum degree of the model.
-
eval
(time, location, input_coordinate_system=1, output_coordinate_system=1, **options)[源代码]¶ Evaluate magnetic field for the given MJD2000 times and coordinates.
-
property
min_degree
¶ Get minimum degree of the model.
-
parameters
= ('time', 'location', 'f107', 'subsolar_point')¶
-
property
validity
¶ Get model's validity range as a tuple of two MJD2000 times. In case of an unconstrained validity rage (-inf, +inf) tuple is returned.
-
property
geoist.magmod.magnetic_model.parser_emm module¶
-
geoist.magmod.magnetic_model.parser_emm.
combine_emm_coefficients
(data_static, data_secvar)[源代码]¶ Combine coefficient read from the separate EMM files.
-
geoist.magmod.magnetic_model.parser_emm.
combine_emm_variable
(data_static, data_secvar)[源代码]¶ Combine EMM variable coefficient.
-
geoist.magmod.magnetic_model.parser_emm.
extract_emm_constant
(data_static, data_secvar)[源代码]¶ Extract EMM constant coefficient.
-
geoist.magmod.magnetic_model.parser_emm.
parse_emm_coefficients
(lines, data)[源代码]¶ Parse EMM coefficients.
geoist.magmod.magnetic_model.parser_igrf module¶
-
geoist.magmod.magnetic_model.parser_igrf.
parse_igrf_coefficients
(lines)[源代码]¶ Parse IGRF coefficients.
-
geoist.magmod.magnetic_model.parser_igrf.
parse_igrf_file
(file_in)[源代码]¶ Parse IGRF file format and return a dictionary containing the parsed model data.
geoist.magmod.magnetic_model.parser_mio module¶
-
geoist.magmod.magnetic_model.parser_mio.
parse_swarm_mio_coefficients
(lines, data)[源代码]¶ Parse the Swarm MIO_SHA_2* coefficients.
geoist.magmod.magnetic_model.parser_shc module¶
geoist.magmod.magnetic_model.parser_wmm module¶
-
geoist.magmod.magnetic_model.parser_wmm.
parse_wmm_coefficients
(lines, data)[源代码]¶ Parse the WMM COF coefficients.