redplanet.Mag.sh.get
get(
lon: float | numpy.ndarray,
lat: float | numpy.ndarray,
quantity: str = "total",
as_xarray: bool = False,
) -> (
float | numpy.ndarray | xarray.core.dataarray.DataArray
)
Get magnetic field values at the specified coordinates. Dataset must be loaded first, see redplanet.Mag.sh.load(...)
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lon
|
float | np.ndarray
|
Longitude coordinate(s) in range [-180, 360]. |
required |
lat
|
float | np.ndarray
|
Latitude coordinate(s) in range [-90, 90]. |
required |
quantity
|
str
|
Options are: ['radial', 'theta', 'phi', 'total', 'potential'], by default 'total'. |
'total'
|
as_xarray
|
bool
|
If True, return the data as an |
False
|
Returns:
Type | Description |
---|---|
float | np.ndarray | xr.DataArray
|
Data values at the the input coordinates. The return type is determined as follows:
Units are nanotesla [nT]. |
Raises:
Type | Description |
---|---|
ValueError
|
If |