Skip to content

ICGEM Functions

Functions and types for discovering and downloading spherical harmonic gravity models from the International Centre for Global Earth Models (ICGEM).

All functions are available via brahe.datasets.icgem.<function_name>.

Loading a downloaded model into a propagator

To use an ICGEM model as the central-body field in a numerical propagator, build a GravityModelType from the same (body, name) pair via GravityModelType.icgem. The download and cache happen transparently on first use.

list_models

icgem_list_models builtin

icgem_list_models(body: str) -> list[ICGEMIndexEntry]

List ICGEM models for a body.

Parameters:

Name Type Description Default
body str

Body name. Known: "earth", "moon", "mars", "venus", "ceres". Any other name is treated as a custom celestial body and matched against the ICGEM celestial catalog.

required

Returns:

Type Description
list[ICGEMIndexEntry]

list[ICGEMIndexEntry]

download_model

icgem_download_model builtin

icgem_download_model(body: str, name: str, output_path: str = None) -> str

Download a .gfc file from ICGEM (with caching).

Parameters:

Name Type Description Default
body str

Body name.

required
name str

Model name, optionally suffixed with -DEGREE.

required
output_path str

Optional copy destination.

None

Returns:

Name Type Description
str str

Path to the resulting .gfc file.

refresh_index

icgem_refresh_index builtin

icgem_refresh_index(body) -> Any

Force-refresh the ICGEM index file for a single body.

refresh_all_indexes

icgem_refresh_all_indexes builtin

icgem_refresh_all_indexes() -> Any

Force-refresh both Earth and celestial index files.

ICGEMIndexEntry

ICGEMIndexEntry

ICGEMIndexEntry()

One ICGEM model index row.

Initialize instance.

body property

body: Any

Body string (e.g. "Earth", "Moon", "pluto").

degree property

degree: Any

Maximum spherical harmonic degree.

download_path property

download_path: Any

ICGEM relative download path (includes the opaque hash).

name property

name: Any

Model name.

year property

year: int

Publication year, if known.


See Also