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.9.7
IPython version      : 8.0.1

viresclient: 0.10.3
pandas     : 1.4.1
xarray     : 0.21.1
matplotlib : 3.5.1
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_0301']
df = data.as_dataframe()
df.head()
Bubble_Index Longitude Flags_F Spacecraft Bubble_Probability Flags_q Radius Flags_Bubble Flags_B Latitude
Timestamp
2016-01-01 09:07:00 0 -52.119907 1 A 0.0 5 6830079.62 0 0 -16.923659
2016-01-01 09:07:01 0 -52.120848 1 A 0.0 5 6830087.28 0 0 -16.987667
2016-01-01 09:07:02 0 -52.121786 1 A 0.0 5 6830094.93 0 0 -17.051675
2016-01-01 09:07:03 0 -52.122722 1 A 0.0 5 6830102.57 0 0 -17.115682
2016-01-01 09:07:04 0 -52.123656 1 A 0.0 5 6830110.21 0 0 -17.179689
df.plot(y=["Bubble_Index", "Bubble_Probability"], figsize=(20,5));
../_images/03g__Demo-IBIxTMS_2F_11_0.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_Index        (Timestamp) int8 0 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
    Bubble_Probability  (Timestamp) float64 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
    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
Attributes:
    Sources:         ['SW_OPER_IBIATMS_2F_20160101T000000_20160101T235959_0301']
    MagneticModels:  []
    RangeFilters:    []