IBIxTMS_2F (Ionospheric bubble index)#

Abstract: Access to the ionospheric bubble index (level 2 product).

%load_ext watermark
%watermark -i -v -p viresclient,pandas,xarray,matplotlib
Python implementation: CPython
Python version       : 3.11.6
IPython version      : 8.18.0

viresclient: 0.12.0
pandas     : 2.1.3
xarray     : 2023.12.0
matplotlib : 3.8.2
from viresclient import SwarmRequest
import datetime as dt
import numpy as np

request = SwarmRequest()

IBIxTMS_2F product information#

Ionospheric bubble index at 1Hz

Documentation:

Check what “IBI” data variables are available#

request.available_collections("IBI", details=False)
{'IBI': ['SW_OPER_IBIATMS_2F', 'SW_OPER_IBIBTMS_2F', 'SW_OPER_IBICTMS_2F']}
request.available_measurements("IBI")
['Bubble_Index',
 'Bubble_Probability',
 'Flags_Bubble',
 'Flags_F',
 'Flags_B',
 'Flags_q']

Fetch 3 minutes of IBI data#

request = SwarmRequest()
request.set_collection("SW_OPER_IBIATMS_2F")
request.set_products(measurements=request.available_measurements("IBI"))
data = request.get_between(
    dt.datetime(2016,1,1,9,7),
    dt.datetime(2016,1,1,9,10)
)
data.sources
['SW_OPER_IBIATMS_2F_20160101T000000_20160101T235959_0401']
df = data.as_dataframe()
df.head()
Bubble_Probability Flags_B Latitude Spacecraft Bubble_Index Flags_q Radius Flags_Bubble Longitude Flags_F
Timestamp
2016-01-01 09:07:00 0.0 0 -16.923659 A 0 5 6830079.64 0 -52.119907 1
2016-01-01 09:07:01 0.0 0 -16.987667 A 0 5 6830087.30 0 -52.120847 1
2016-01-01 09:07:02 0.0 0 -17.051675 A 0 5 6830094.95 0 -52.121785 1
2016-01-01 09:07:03 0.0 0 -17.115682 A 0 5 6830102.59 0 -52.122721 1
2016-01-01 09:07:04 0.0 0 -17.179689 A 0 5 6830110.23 0 -52.123655 1
df.plot(y=["Bubble_Index", "Bubble_Probability"], figsize=(20,5));
../_images/fc3cc3ec119d5cd0842c2c8a6e5646936def45603d5af37974594f5e3177b27d.png
ds = data.as_xarray()
ds
<xarray.Dataset>
Dimensions:             (Timestamp: 180)
Coordinates:
  * Timestamp           (Timestamp) datetime64[ns] 2016-01-01T09:07:00 ... 20...
Data variables:
    Spacecraft          (Timestamp) object 'A' 'A' 'A' 'A' ... 'A' 'A' 'A' 'A'
    Bubble_Probability  (Timestamp) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
    Flags_B             (Timestamp) uint8 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0
    Latitude            (Timestamp) float64 -16.92 -16.99 ... -28.31 -28.38
    Bubble_Index        (Timestamp) int8 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0
    Flags_q             (Timestamp) uint8 5 5 5 5 5 5 5 5 5 ... 5 5 5 5 5 5 5 5
    Radius              (Timestamp) float64 6.83e+06 6.83e+06 ... 6.831e+06
    Flags_Bubble        (Timestamp) uint8 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0
    Longitude           (Timestamp) float64 -52.12 -52.12 ... -52.24 -52.24
    Flags_F             (Timestamp) uint8 1 1 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1
Attributes:
    Sources:         ['SW_OPER_IBIATMS_2F_20160101T000000_20160101T235959_0401']
    MagneticModels:  []
    AppliedFilters:  []