Electron Losses and Fields Investigation (ELFIN)

The routines in this module can be used to load data from the Electron Losses and Fields Investigation (ELFIN) mission.

Fluxgate magnetometer (FGM)

pyspedas.projects.elfin.fgm(trange=['2022-08-19', '2022-08-19'], probe='a', datatype='survey', level='l1', suffix='', get_support_data=False, varformat=None, varnames=[], downloadonly=False, notplot=False, no_update=False, time_clip=False, force_download=False)

This function loads data from the ELFIN Fluxgate Magnetometer (FGM)

Parameters:
  • trange (list of str) – time range of interest [starttime, endtime] with the format ‘YYYY-MM-DD’,’YYYY-MM-DD’] or to specify more or less than a day [‘YYYY-MM-DD/hh:mm:ss’,’YYYY-MM-DD/hh:mm:ss’] Default: [‘2022-08-19’, ‘2022-08-19’]

  • probe (str) – Spacecraft identifier (‘a’ or ‘b’) Default: ‘a’

  • datatype (str) –

    Data type; Valid options:

    'fast', 'survey' for L1 data. Only 'survey' data is available.
    

    Default: ‘survey’

  • level (str) – Data level; options: ‘l1’ Default: l1

  • suffix (str) – The tplot variable names will be given this suffix. Default: no suffix is added.

  • get_support_data (bool) – Data with an attribute “VAR_TYPE” with a value of “support_data” will be loaded into tplot. Default: only loads in data with a “VAR_TYPE” attribute of “data”.

  • varformat (str) – The file variable formats to load into tplot. Wildcard character “*” is accepted. Default: all variables are loaded in.

  • varnames (list of str) – List of variable names to load Default: all data variables are loaded

  • downloadonly (bool) – Set this flag to download the CDF files, but not load them into tplot variables Default: False

  • notplot (bool) – Return the data in hash tables instead of creating tplot variables Default: False

  • no_update (bool) – If set, only load data from your local cache Default: False

  • time_clip (bool) – Time clip the variables to exactly the range specified in the trange keyword Default: False

  • force_download (bool) – Download file even if local version is more recent than server version Default: False

Returns:

ela_fgs ela_fgs_fsp_res_dmxl ela_fgs_fsp_res_gei ela_fgs_fsp_res_ndw ela_att_gei_fsp_interp ela_fgs_fsp_res_obw

Return type:

List of tplot variables created.

Example

import pyspedas from pyspedas.tplot_tools import tplot fgm_vars = pyspedas.projects.elfin.fgm(probe=’a’, trange=[‘2022-08-19’, ‘2022-08-19’]) tplot([‘ela_fgs_fsp_res_ndw’, ‘ela_fgs_fsp_res_obw’, ‘ela_att_gei_fsp_interp’])

Example

import pyspedas
from pyspedas import tplot
fgm_vars = pyspedas.projects.elfin.fgm(probe='a', trange=['2022-08-19', '2022-08-19'])
tplot(['ela_fgs_fsp_res_ndw', 'ela_fgs_fsp_res_obw'])

Energetic Particle Detector (EPD)

pyspedas.projects.elfin.epd(trange=['2022-08-19', '2022-08-19'], probe='a', datatype='pef', level='l1', type_='nflux', get_support_data=False, varformat=None, varnames=[], downloadonly=False, notplot=False, no_update=False, time_clip=True, nspinsinsum=None, fullspin=False, PAspec_energies=None, PAspec_energybins=None, Espec_LCfatol=None, Espec_LCfptol=None, force_download=False)

This function loads data from the ELFIN Energetic Particle Detector (EPD) and process L1 and L2 data.

Parameters for Load Routine

trangelist of str

Time range of interest [starttime, endtime]. Format can be [‘YYYY-MM-DD’,’YYYY-MM-DD’] or [‘YYYY-MM-DD/hh:mm:ss’,’YYYY-MM-DD/hh:mm:ss’] Default: [‘2022-08-19’, ‘2022-08-19’]

probe: str, optional

Spacecraft identifier. Options are ‘a’ and ‘b’. Default: ‘a’

level: str, optional.

Data level. Options are ‘l1’ and ‘l2’ Default: ‘l1’

get_support_data: bool, optional

If True, data with an attribute “VAR_TYPE” with a value of “support_data” will be loaded into tplot. Default: only loads in data with a “VAR_TYPE” attribute of “data”.

varformat: str, optional

The file variable formats to load into tplot. Wildcard character “*” is accepted. Default: all variables are loaded in.

varnames: list of str, optional

List of variable names to load. Default: all data variables are loaded.

downloadonly: bool, optional

If True, only downloads the CDF files without loading them into tplot variables. Default: False.

notplot: bool, optional

If True, returns data in hash tables instead of creating tplot variables. Default: False.

no_update: bool

If True, loads data only from the local cache. Default: False.

time_clip: bool

If True, clips the variables to the exact range specified in the trange. Default: True.

force_download: bool

Download file even if local version is more recent than server version Default: False

Parameters for L1 data

datatype: str, optional.

Data type of L1 data. Options are ‘pef’ , ‘pif’, ‘pes’, ‘pis’ Default: ‘pef’

type: str, optional

Calibrated data type of L1 data. Options are ‘raw’, ‘cps’, ‘nflux’, ‘eflux’ Default: ‘nflux’

nspinsinsum: int, optional

Number of spins in sum which is needed by the L1 calibration function. Options are 16 or 32. Default: 16

Parameters for L2 data

fullspin: bool, optional.

If True, generate L2 full spin spectrogram. Default: L2 half spin spectrogram is generated.

PAspec_energybins: list of tuple of int, optional

Specified the energy bins used for generating L2 pitch angle spectrogram. If both ‘PAspec_energybins’ and ‘PAspec_energies’ are set, ‘energybins’ takes precedence. Default: [(0,2),(3,5), (6,8), (9,15)].

PAspec_energies: list of tuple of float, optional

Specifies the energy range for each bin in the L2 pitch angle spectrogram. Example: energies=[(50.,160.),(160.,345.),(345.,900.),(900.,7000.)] If both ‘energybins’ and ‘energies’ are set, ‘energybins’ takes precedence. Default: Energy and energybin table:

channel     energy_range    energy_midbin
0           50-80           63.2
1           80-120          97.9
2           120-160         138.5
3           160-210         183.3
4           210-270         238.1
5           270-345         305.2
6           345-430         385.1
7           430-630         520.4
8           630-900         752.9
9           900-1300        1081.6
10          1300-1800       1529.7
11          1800-2500       2121.3
12          2500-3350       2893.9
13          3350-4150       3728.6
14          4150-5800       4906.1
15          5800+           6500.0
Espec_LCfatol: float, optional

Tolerance angle for para and anti flux in generating L2 energy spectrogram. A positive value makes the loss cone/antiloss cone smaller by this amount. Default: 22.25 deg.

Espec_LCfptol: float, optional

Tolerance angle for perp flux in generating L2 energy spectrogram. A negative value means a wider angle for perp flux. Default: -11 deg.

returns:

List of tplot variables created.

rtype:

list of str

Examples

>>> import pyspedas
>>> from pyspedas import tplot
>>> elf_vars = pyspedas.projects.elfin.epd(probe='b', trange=['2021-01-01', '2021-01-02'], datatype='pif')
>>> tplot(['elb_pif_nflux', 'elb_pif_spinper'])
>>> import pyspedas
>>> from pyspedas import tplot
>>> elf_vars = pyspedas.projects.elfin.epd(probe='a', trange=['2022-08-19', '2022-08-19'], level='l2')
>>> tplot(['ela_pef_fs_Epat_nflux', 'ela_pef_hs_Epat_nflux'. 'ela_pef_pa', 'ela_pef_tspin'])

Example

import pyspedas
from pyspedas import tplot
elf_vars = pyspedas.projects.elfin.epd(probe='a', trange=['2019-08-19', '2022-08-19'], level='l2')
tplot(['ela_pef_fs_Epat_nflux', 'ela_pef_hs_Epat_nflux'. 'ela_pef_pa', ela_pef_tspin'])

Magnetic Field sensor XYZ data collected by IDPU (MRMI)

pyspedas.projects.elfin.mrmi(trange=['2022-08-19', '2022-08-19'], probe='a', datatype='mrmi', level='l1', suffix='', get_support_data=False, varformat=None, varnames=[], downloadonly=False, notplot=False, no_update=False, time_clip=False, force_download=False)

This function loads data from the ELFIN Magneto Resistive Magnetometer (MRMi)

Parameters:
  • trange (list of str) – time range of interest [starttime, endtime] with the format ‘YYYY-MM-DD’,’YYYY-MM-DD’] or to specify more or less than a day [‘YYYY-MM-DD/hh:mm:ss’,’YYYY-MM-DD/hh:mm:ss’] Default: [‘2022-08-19’, ‘2022-08-19’]]

  • probe (str) – Spacecraft identifier (‘a’ or ‘b’) Default: ‘a’

  • datatype (str) –

    Data type; Valid options:

    'mrmi' for L1 data
    

    Default: ‘mrmi’

  • level (str) – Data level; options: ‘l1’ efault: ‘l1’

  • suffix (str) – The tplot variable names will be given this suffix. Default: no suffix is added.

  • get_support_data (bool) – Data with an attribute “VAR_TYPE” with a value of “support_data” will be loaded into tplot. Default: only loads in data with a “VAR_TYPE” attribute of “data”

  • varformat (str) – The file variable formats to load into tplot. Wildcard character “*” is accepted. Default: all variables are loaded in

  • varnames (list of str) – List of variable names to load Default: all data variables are loaded

  • downloadonly (bool) – Set this flag to download the CDF files, but not load them into tplot variables Default: False

  • notplot (bool) – Return the data in hash tables instead of creating tplot variables Default: False

  • no_update (bool) – If set, only load data from your local cache Default: False

  • time_clip (bool) – Time clip the variables to exactly the range specified in the trange keyword Default: False

  • force_download (bool) – Download file even if local version is more recent than server version Default: False

Return type:

List of tplot variables created.

Example

import pyspedas from pyspedas.tplot_tools import tplot mrmi_vars = pyspedas.projects.elfin.mrmi(probe=’b’, trange=[‘2022-08-19’, ‘2022-08-19’] tplot(‘elb_mrmi’)

Example

import pyspedas
from pyspedas import tplot
mrmi_vars = pyspedas.projects.elfin.mrmi(probe='b', trange=['2022-08-19', '2022-08-19']
tplot('elb_mrmi')

Magnetic Field sensor XYZ data collected by Attitude Control Board (MRMA)

pyspedas.projects.elfin.mrma(trange=['2022-08-19', '2022-08-19'], probe='a', datatype='mrma', level='l1', suffix='', get_support_data=False, varformat=None, varnames=[], downloadonly=False, notplot=False, no_update=False, time_clip=False, force_download=False)

This function loads data from the ELFIN Magneto Resistive Magnetometer (MRMa)

Parameters:
  • trange (list of str) – time range of interest [starttime, endtime] with the format ‘YYYY-MM-DD’,’YYYY-MM-DD’] or to specify more or less than a day [‘YYYY-MM-DD/hh:mm:ss’,’YYYY-MM-DD/hh:mm:ss’] Default: [‘2022-08-19’, ‘2022-08-19’]

  • probe (str) – Spacecraft identifier (‘a’ or ‘b’) Default: ‘a’

  • datatype (str) –

    Data type; Valid options:

    'mrma' for L1 data
    

    Default: ‘mrma’

  • level (str) – Data level; options: ‘l1’ Default: l1

  • suffix (str) – The tplot variable names will be given this suffix. Default: no suffix is added

  • get_support_data (bool) – Data with an attribute “VAR_TYPE” with a value of “support_data” will be loaded into tplot. Default: only loads in data with a “VAR_TYPE” attribute of “data”.

  • varformat (str) – The file variable formats to load into tplot. Wildcard character “*” is accepted. Default: all variables are loaded in.

  • varnames (list of str) – List of variable names to load Default: if not specified, all data variables are loaded

  • downloadonly (bool) – Set this flag to download the CDF files, but not load them into tplot variables Default: False

  • notplot (bool) – Return the data in hash tables instead of creating tplot variables Default: False

  • no_update (bool) – If set, only load data from your local cache Default: False

  • time_clip (bool) – Time clip the variables to exactly the range specified in the trange keyword Default: False

  • force_download (bool) – Download file even if local version is more recent than server version Default: False

Returns:

List of tplot variables created.

Return type:

list of str

Example

>>> import pyspedas
>>> from pyspedas import tplot
>>> mrma_vars = pyspedas.projects.elfin.mrma(probe='a', trange=['2022-08-19', '2022-08-19'])
>>> tplot('ela_mrma')

Example

import pyspedas
from pyspedas import tplot
mrma_vars = pyspedas.projects.elfin.mrma(probe='a', trange=['2022-08-19', '2022-08-19'])
tplot('ela_mrma')

State data

pyspedas.projects.elfin.state(trange=['2022-08-19', '2022-08-19'], probe='a', datatype='defn', level='l1', suffix='', get_support_data=False, varformat=None, varnames=[], downloadonly=False, notplot=False, no_update=False, time_clip=True, force_download=False)

This function loads data from the ELFIN State data (state)

Parameters:
  • trange (list of str) – time range of interest [starttime, endtime] with the format ‘YYYY-MM-DD’,’YYYY-MM-DD’] or to specify more or less than a day [‘YYYY-MM-DD/hh:mm:ss’,’YYYY-MM-DD/hh:mm:ss’] Default: [‘2022-08-19’, ‘2022-08-19’]

  • probe (str) – Spacecraft identifier (‘a’ or ‘b’) Default: ‘a’

  • datatype (str) – Data type. Valid options:

    'defn'
    'pred'
    

    Default: ‘defn’

  • level (str) – Data level; options: ‘l1’ Default: ‘l1’

  • suffix (str) – The tplot variable names will be given this suffix. Default: no suffix is added

  • get_support_data (bool) – Data with an attribute “VAR_TYPE” with a value of “support_data” will be loaded into tplot. Default: only loads in data with a “VAR_TYPE” attribute of “data”.

  • varformat (str) – The file variable formats to load into tplot. Wildcard character “*” is accepted. Default: all variables are loaded in

  • varnames (list of str) – List of variable names to load Default: all data variables are loaded

  • downloadonly (bool) – Set this flag to download the CDF files, but not load them into tplot variables Default: False

  • notplot (bool) – Return the data in hash tables instead of creating tplot variables Default: False

  • no_update (bool) – If set, only load data from your local cache Default: False

  • time_clip (bool) – Time clip the variables to exactly the range specified in the trange keyword Default: False

  • force_download (bool) – Download file even if local version is more recent than server version Default: False

Returns:

List of tplot variables created:

ela_pos_gei
ela_vel_gei
ela_att_gei
ela_att_solution_date
ela_att_flag
ela_att_spinper
ela_spin_orbnorm_angle
ela_spin_sun_angle

Return type:

list of str

Example

>>> import pyspedas
>>> from pyspedas import tplot
>>> state_vars = pyspedas.projects.elfin.state(probe='a', trange=['2022-08-19', '2022-08-19'])
>>> tplot(['ela_pos_gei', 'ela_att_gei', 'ela_att_spinper', 'ela_spin_sun_angle' ])

Example

import pyspedas
from pyspedas import tplot
state_vars = pyspedas.projects.elfin.state(probe='a', trange=['2022-08-19', '2022-08-19'])
tplot(['ela_pos_gei', 'ela_att_gei', 'ela_att_spinper', 'ela_spin_sun_angle' ])