Static Space Weather provider with constant values.
Provides space weather data using fixed values that don't change with time. Useful for testing or scenarios where time-varying space weather data is not needed.
Example
| import brahe as bh
# Create static provider with default (uninitialized) values
sw = bh.StaticSpaceWeatherProvider()
# Create static provider with zero values
sw_zero = bh.StaticSpaceWeatherProvider.from_zero()
# Create with custom values
sw_custom = bh.StaticSpaceWeatherProvider.from_values(
kp=3.0, ap=15.0, f107=150.0, f107a=145.0, s=100
)
# Set as global provider
bh.set_global_space_weather_provider(sw_custom)
|
Initialize instance.
Get the extrapolation method.
Returns:
| Name | Type | Description |
str | str | Extrapolation method string |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Extrapolation: {sw.extrapolation()}") # "Hold"
|
from_values builtin
Create a static space weather provider with specified values.
Parameters:
| Name | Type | Description | Default |
kp | float | Kp geomagnetic index (0.0-9.0) | required |
ap | float | | required |
f107 | float | F10.7 solar radio flux in sfu | required |
f107a | float | 81-day average F10.7 flux in sfu | required |
s | int | International Sunspot Number | required |
Returns:
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(
kp=3.0, ap=15.0, f107=150.0, f107a=145.0, s=100
)
bh.set_global_space_weather_provider(sw)
|
from_zero builtin
Create a static space weather provider with all values set to zero.
Returns:
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
bh.set_global_space_weather_provider(sw)
|
get_ap method descriptor
Get Ap index for the specified MJD.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
ap = sw.get_ap(60000.0)
print(f"Ap: {ap}") # 15.0
|
get_ap_all method descriptor
Get all eight 3-hourly Ap indices for the day.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Type | Description |
list[float] | list[float]: Array of 8 Ap indices |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
ap_all = sw.get_ap_all(60000.0)
print(f"8 Ap indices: {ap_all}")
|
get_ap_daily method descriptor
Get daily average Ap index.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
ap_daily = sw.get_ap_daily(60000.0)
print(f"Daily Ap: {ap_daily}")
|
get_f107_adj_avg81 method descriptor
Get 81-day centered average adjusted F10.7 flux.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | 81-day average adjusted F10.7 flux in sfu |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
f107_adj_avg = sw.get_f107_adj_avg81(60000.0)
print(f"F10.7 adj 81-day avg: {f107_adj_avg} sfu")
|
get_f107_adjusted method descriptor
Get adjusted F10.7 solar flux.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | Adjusted F10.7 flux in sfu |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
f107_adj = sw.get_f107_adjusted(60000.0)
print(f"F10.7 adjusted: {f107_adj} sfu")
|
get_f107_obs_avg81 method descriptor
Get 81-day centered average observed F10.7 flux.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | 81-day average F10.7 flux in sfu |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
f107_avg = sw.get_f107_obs_avg81(60000.0)
print(f"F10.7 81-day avg: {f107_avg} sfu") # 145.0 sfu
|
get_f107_observed method descriptor
Get observed F10.7 solar flux.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
f107 = sw.get_f107_observed(60000.0)
print(f"F10.7: {f107} sfu") # 150.0 sfu
|
get_kp method descriptor
Get Kp index for the specified MJD.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
kp = sw.get_kp(60000.0)
print(f"Kp: {kp}") # 3.0
|
get_kp_all method descriptor
Get all eight 3-hourly Kp indices for the day.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Type | Description |
list[float] | list[float]: Array of 8 Kp indices |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
kp_all = sw.get_kp_all(60000.0)
print(f"8 Kp indices: {kp_all}")
|
get_kp_daily method descriptor
Get daily average Kp index.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
kp_daily = sw.get_kp_daily(60000.0)
print(f"Daily Kp: {kp_daily}")
|
get_last_ap method descriptor
Get the last N 3-hourly Ap values.
Parameters:
| Name | Type | Description | Default |
mjd | float | Modified Julian Date (end point) | required |
n | int | Number of values to return | required |
Returns:
| Type | Description |
list[float] | list[float]: Ap values, oldest first |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
ap_last = sw.get_last_ap(60000.0, 8)
print(f"Last 8 Ap values: {ap_last}")
|
get_last_daily_ap method descriptor
Get the last N daily average Ap values.
Parameters:
| Name | Type | Description | Default |
mjd | float | Modified Julian Date (end point) | required |
n | int | Number of values to return | required |
Returns:
| Type | Description |
list[float] | list[float]: Daily Ap values, oldest first |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
ap_daily_last = sw.get_last_daily_ap(60000.0, 7)
print(f"Last 7 daily Ap: {ap_daily_last}")
|
get_last_daily_epochs method descriptor
Get epochs for the last N daily values.
Parameters:
| Name | Type | Description | Default |
mjd | float | Modified Julian Date (end point) | required |
n | int | Number of epochs to return | required |
Returns:
| Type | Description |
list[Epoch] | list[Epoch]: Epoch objects, oldest first |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
epochs = sw.get_last_daily_epochs(60000.0, 7)
for epoch in epochs:
print(f"Epoch: {epoch}")
|
get_last_daily_kp method descriptor
Get the last N daily average Kp values.
Parameters:
| Name | Type | Description | Default |
mjd | float | Modified Julian Date (end point) | required |
n | int | Number of values to return | required |
Returns:
| Type | Description |
list[float] | list[float]: Daily Kp values, oldest first |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
kp_daily_last = sw.get_last_daily_kp(60000.0, 7)
print(f"Last 7 daily Kp: {kp_daily_last}")
|
get_last_f107 method descriptor
Get the last N daily F10.7 values.
Parameters:
| Name | Type | Description | Default |
mjd | float | Modified Julian Date (end point) | required |
n | int | Number of values to return | required |
Returns:
| Type | Description |
list[float] | list[float]: F10.7 values in sfu, oldest first |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
f107_last = sw.get_last_f107(60000.0, 7)
print(f"Last 7 F10.7 values: {f107_last}")
|
get_last_kp method descriptor
Get the last N 3-hourly Kp values.
Parameters:
| Name | Type | Description | Default |
mjd | float | Modified Julian Date (end point) | required |
n | int | Number of values to return | required |
Returns:
| Type | Description |
list[float] | list[float]: Kp values, oldest first |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
kp_last = sw.get_last_kp(60000.0, 8)
print(f"Last 8 Kp values: {kp_last}")
|
get_last_kpap_epochs method descriptor
Get epochs for the last N 3-hourly Kp/Ap intervals.
Parameters:
| Name | Type | Description | Default |
mjd | float | Modified Julian Date (end point) | required |
n | int | Number of epochs to return | required |
Returns:
| Type | Description |
list[Epoch] | list[Epoch]: Epoch objects, oldest first |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
epochs = sw.get_last_kpap_epochs(60000.0, 8)
for epoch in epochs:
print(f"Epoch: {epoch}")
|
get_sunspot_number method descriptor
Get International Sunspot Number.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
int | int | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_values(3.0, 15.0, 150.0, 145.0, 100)
ssn = sw.get_sunspot_number(60000.0)
print(f"Sunspot number: {ssn}") # 100
|
is_initialized method descriptor
Check if the provider is initialized.
Returns:
| Name | Type | Description |
bool | bool | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Initialized: {sw.is_initialized()}") # True
|
len method descriptor
Get the number of space weather data points.
Returns:
| Name | Type | Description |
int | int | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Data points: {sw.len()}") # 1
|
mjd_last_daily_predicted method descriptor
mjd_last_daily_predicted() -> float
Get the last MJD with daily predicted data.
Returns:
| Name | Type | Description |
float | float | Last MJD with daily predicted data |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Last daily predicted MJD: {sw.mjd_last_daily_predicted()}")
|
mjd_last_monthly_predicted method descriptor
mjd_last_monthly_predicted() -> float
Get the last MJD with monthly predicted data.
Returns:
| Name | Type | Description |
float | float | Last MJD with monthly predicted data |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Last monthly predicted MJD: {sw.mjd_last_monthly_predicted()}")
|
mjd_last_observed method descriptor
mjd_last_observed() -> float
Get the last MJD with observed data.
Returns:
| Name | Type | Description |
float | float | Last MJD with observed data |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Last observed MJD: {sw.mjd_last_observed()}")
|
mjd_max method descriptor
Get the maximum Modified Julian Date in the dataset.
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Max MJD: {sw.mjd_max()}")
|
mjd_min method descriptor
Get the minimum Modified Julian Date in the dataset.
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Min MJD: {sw.mjd_min()}")
|
sw_type method descriptor
Get the space weather data type.
Returns:
| Name | Type | Description |
str | str | Space weather type string |
Example
| import brahe as bh
sw = bh.StaticSpaceWeatherProvider.from_zero()
print(f"Type: {sw.sw_type()}") # "Static"
|