Arase_data_examples

2022/03/10 19(52A simple crib sheet for loading and plotting
Arase satellite data
This notebook shows how to load and plot Arase satellite data with pySPEDAS
and pyTplot.
Please refer to the following website for the details of the data.
https://ergsc.isee.nagoya-u.ac.jp/data_info/erg.shtml.en

Get started
It is assumed that you already have pySPEDAS and the latest version of ERGSC plug-in installed on your python environment. The following commands
import some necessary modules for loading and plotting the data.
In [1…

import pyspedas
import pytplot
from pytplot.MPLPlotter.tplot import tplot# a Matplotlib-bas

You can import the ERG-SC plug-in from either the pyspedas module or the
ergpyspedas module. The latter is kind of the bleeding-edge distribution: it
always delivers the latest version of sub-modules some of which may still be in
an experimental phase. The former, the main distribution of pySPEDAS,
contains a stable version of the ERG-SC plug-in.
In this notebook, we use the bleeding-edge version of the ERG-SC plug-in. For
example, the data-load module for the MGF data can be imported with thefollowing command:
In [2…

from ergpyspedas.erg import mgf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

1 / 33 ページ

Arase_data_examples

2022/03/10 19(52Basic commands of pyTplot and pySPEDASWith MGF data, let us introduce some basic commands of pyTplot andpySPEDAS, which are used commonly for loading and visualizing data. Also see
the official document of the pyTplot module at:https://pytplot.readthedocs.io/en/latest/index.html

Load data and plot them with "tplot"
In [3…

from ergpyspedas.erg import mgf
vars = mgf( trange=[ '2017-03-27', '2017-03-28' ] )tplot( 'erg_mgf_l2_mag_8sec_sm' )# load MGF L

10-Mar-22 15:10:24: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/mgf/l2/8sec/2017/
03/
10-Mar-22 15:10:25: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/mgf/l2/8sec/2017/03/erg_mgf_l2_8sec_20170327_v03.04.cdf
10-Mar-22 15:10:25: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:250: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
if ydata[ydata == var_atts["FILLVAL"]].size != 0:
10-Mar-22 15:10:26: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:256: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
ydata[ydata == var_atts["FILLVAL"]] = 0

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

2 / 33 ページ

Arase_data_examples

2022/03/10 19(52**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) M
agnetic Field Experiment (MGF) Level 2 spin-averaged magnetic
field data
Information about ERG MGF
PI: Ayako Matsuoka
Affiliation: Data Analysis Center for Geomagnetism and Space
Magnetism, Graduate School of Science, Kyoto University, Kita
shirakawa-Oiwake Cho, Sakyo-ku Kyoto 606-8502, Japan
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of MGF L2: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Mgf
Contact: erg_mgf_info at isee.nagoya-u.ac.jp**************************************************************************

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

3 / 33 ページ

Arase_data_examples

2022/03/10 19(52Plot multiple tplot variables verticaly in a row on a window
In [4…

tplot( [ 'erg_mgf_l2_mag_8sec_sm', 'erg_mgf_l2_mag_8sec_gsm'

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

4 / 33 ページ

Arase_data_examples

2022/03/10 19(52Limit the time range of a plot: timespan()In [6…

pytplot.timespan( '2017-03-27 09:00:00', 6, keyword='hours' )tplot( [ 'erg_mgf_l2_mag_8sec_sm', 'erg_mgf_l2_mag_8sec_gsm'

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

5 / 33 ページ

Arase_data_examples

2022/03/10 19(52Change the vertical scale of a plot: ylim
In [7…

pytplot.ylim( 'erg_mgf_l2_mag_8sec_sm', -300., 300. )tplot( [ 'erg_mgf_l2_mag_8sec_sm' ] )file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

6 / 33 ページ

Arase_data_examples

2022/03/10 19(52Change the title of the vertical axis: options()
In [8…

pytplot.options( 'erg_mgf_l2_mag_8sec_sm', 'ytitle', 'MGF Lv.2 8
tplot( [ 'erg_mgf_l2_mag_8sec_sm' ] )file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

7 / 33 ページ

Arase_data_examples

2022/03/10 19(52Change the contour scale for a spectrum-type plot: zlim()
In [9…

from ergpyspedas.erg import pwe_ofa
pwe_ofa( trange=[ '2017-03-27 09:00:00', '2017-03-27 15:00:00'
pytplot.zlim( 'erg_pwe_ofa_l2_spec_E_spectra_132', 1e-7, 1e-2
tplot( 'erg_pwe_ofa_l2_spec_E_spectra_132' )10-Mar-22 15:21:58: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/pwe/ofa/l2/spec/2
017/03/10-Mar-22 15:21:58: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/pwe/ofa/l2/spec/2017/03/erg_pwe_ofa_l2_spec_20170327_v02_01.cdf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

8 / 33 ページ

Arase_data_examples

2022/03/10 19(5210-Mar-22 15:21:59: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:250: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
if ydata[ydata == var_atts["FILLVAL"]].size != 0:**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) P
lasma Wave Experiment (PWE) Onboard Frequency Analyzer (OFA)
Level 2 spectrum data
Information about ERG PWE OFA
PI: Yoshiya Kasahara
Affiliation: Kanazawa University
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of PWE/OFA: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Pwe/Ofa
Contact: erg_pwe_info at isee.nagoya-u.ac.jp**************************************************************************

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

9 / 33 ページ

Arase_data_examples

2022/03/10 19(52Show the list of loaded tplot variables: tplot_names()
In [1…

vars = pytplot.tplot_names()

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

10 / 33 ページ

Arase_data_examples

2022/03/10 19(520 : erg_mgf_l2_epoch_8sec
1 : erg_mgf_l2_mag_8sec_dsi
2 : erg_mgf_l2_mag_8sec_gse
3 : erg_mgf_l2_mag_8sec_gsm
4 : erg_mgf_l2_mag_8sec_sm
5 : erg_mgf_l2_magt_8sec
6 : erg_mgf_l2_rmsd_8sec_dsi
7 : erg_mgf_l2_rmsd_8sec_gse
8 : erg_mgf_l2_rmsd_8sec_gsm
9 : erg_mgf_l2_rmsd_8sec_sm
10 : erg_mgf_l2_rmsd_8sec
11 : erg_mgf_l2_n_rmsd_8sec
12 : erg_mgf_l2_dyn_rng_8sec
13 : erg_mgf_l2_quality_8sec
14 : erg_mgf_l2_quality_8sec_gc
15 : erg_mgf_l2_igrf_8sec_dsi
16 : erg_mgf_l2_igrf_8sec_gse
17 : erg_mgf_l2_igrf_8sec_gsm
18 : erg_mgf_l2_igrf_8sec_sm
19 : erg_pwe_ofa_l2_spec_epoch_e132
20 : erg_pwe_ofa_l2_spec_E_spectra_132
21 : erg_pwe_ofa_l2_spec_quality_flag_e132
22 : erg_pwe_ofa_l2_spec_epoch_b132
23 : erg_pwe_ofa_l2_spec_B_spectra_132
24 : erg_pwe_ofa_l2_spec_quality_flag_b132

Remove tplot variables that have been loaded
In [1…

pytplot.del_data( 'erg_*' )vars = pytplot.tplot_names()

Load Arase satellite data

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

11 / 33 ページ

Arase_data_examples

In [1…

2022/03/10 19(52from ergpyspedas.erg import pwe_hfa, pwe_ofa, pwe_efd, mgf, xep
pwe_hfa( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'
pwe_ofa( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'
pwe_efd( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'
mgf( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'] )xep( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'], datat
hep( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'], datat
mepe( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'],lepe( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'],
mepi_nml( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'
lepi( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'],
10-Mar-22 16:13:47: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/pwe/hfa/l2/spec/l
ow/2017/04/
10-Mar-22 16:13:47: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/pwe/hfa/l2/spec/low/2017/04/erg_pwe_hfa_l2_spec_low_20170405_v01_02.cdf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

12 / 33 ページ

Arase_data_examples

2022/03/10 19(52Conflicting size for at least one dimension
Could not create coordinate v1_dim for variable erg_pwe_hfa_l2_low_spectra_eu_ev
Could not create coordinate v2_dim for variable erg_pwe_hfa_l2_low_spectra_eu_ev
Conflicting size for at least one dimension
Could not create coordinate v1_dim for variable erg_pwe_hfa_l2_low_spectra_eu_bg
Could not create coordinate v2_dim for variable erg_pwe_hfa_l2_low_spectra_eu_bg
Conflicting size for at least one dimension
Could not create coordinate v1_dim for variable erg_pwe_hfa_l2_low_spectra_ev_bg
Could not create coordinate v2_dim for variable erg_pwe_hfa_l2_low_spectra_ev_bg**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) P
lasma Wave Experiment (PWE) Electric Field Data (HFA) Level 2
spectrum data
Information about ERG PWE HFA
PI: Yoshiya Kasahara
Affiliation: Kanazawa University
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of PWE/HFA: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Pwe/Hfa
Contact: erg_pwe_info at isee.nagoya-u.ac.jp**************************************************************************

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

13 / 33 ページ

Arase_data_examples

2022/03/10 19(5210-Mar-22 16:13:50: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/pwe/ofa/l2/spec/2
017/04/10-Mar-22 16:13:50: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/pwe/ofa/l2/spec/2017/04/erg_pwe_ofa_l2_spec_20170405_v02_01.cdf
10-Mar-22 16:13:52: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/pwe/efd/l2/spec/2
017/04/10-Mar-22 16:13:52: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/pwe/efd/l2/spec/2017/04/erg_pwe_efd_l2_spec_20170405_v02_02.cdf**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) P
lasma Wave Experiment (PWE) Onboard Frequency Analyzer (OFA)
Level 2 spectrum data
Information about ERG PWE OFA
PI: Yoshiya Kasahara
Affiliation: Kanazawa University
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of PWE/OFA: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Pwe/Ofa
Contact: erg_pwe_info at isee.nagoya-u.ac.jp**************************************************************************
10-Mar-22 16:13:53: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/mgf/l2/8sec/2017/04/
10-Mar-22 16:13:53: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/mgf/l2/8sec/2017/04/erg_mgf_l2_8sec_20170405_v03.04.cdf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

14 / 33 ページ

Arase_data_examples

2022/03/10 19(52**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) P
lasma Wave Experiment (PWE) Electric Field Data (EFD) Level 2
spectrum data
Information about ERG PWE EFD
PI: Yoshiya Kasahara
Affiliation: Kanazawa University
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of PWE/EFD: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Pwe/Efd
Contact: erg_pwe_info at isee.nagoya-u.ac.jp**************************************************************************
10-Mar-22 16:13:55: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/xep/l2/omniflux/2
017/04/10-Mar-22 16:13:55: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/xep/l2/omniflux/2017/04/erg_xep_l2_omniflux_20170405_v01_00.cdf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

15 / 33 ページ

Arase_data_examples

2022/03/10 19(52**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) M
agnetic Field Experiment (MGF) Level 2 spin-averaged magnetic
field data
Information about ERG MGF
PI: Ayako Matsuoka
Affiliation: Data Analysis Center for Geomagnetism and Space
Magnetism, Graduate School of Science, Kyoto University, Kita
shirakawa-Oiwake Cho, Sakyo-ku Kyoto 606-8502, Japan
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of MGF L2: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Mgf
Contact: erg_mgf_info at isee.nagoya-u.ac.jp**************************************************************************
10-Mar-22 16:13:55: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:250: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
if ydata[ydata == var_atts["FILLVAL"]].size != 0:
10-Mar-22 16:13:55: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/hep/l2/omniflux/2
017/04/10-Mar-22 16:13:55: Downloading https://ergsc.isee.nagoya-u.ac.jp/data/ergsc/satellite/erg/hep/l2/omniflux/2017/04/erg_hep_l2_omniflux_20170405_v03_01.cdf to /Users/horit/mnt/drobo202
0/work/data//ergsc/satellite/erg/hep/l2/omniflux/2017/04/erg_
hep_l2_omniflux_20170405_v03_01.cdf
10-Mar-22 16:13:55: Download complete: /Users/horit/mnt/drobo
2020/work/data//ergsc/satellite/erg/hep/l2/omniflux/2017/04/e
rg_hep_l2_omniflux_20170405_v03_01.cdf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

16 / 33 ページ

Arase_data_examples

2022/03/10 19(52**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) E
xtremely High-Energy Electron Experiment (XEP) Level 2 extrem
ely high energy electron data
Information about ERG XEP
PI: Nana Higashio
Affiliation: Space Environment Group, Aerospace Research andDevelopment Directorate, Tsukuba Space Center, Japan Aerospac
e Exploration Agency, 2-1-1 Sengen, Tsukuba, Ibaraki 305-8505, Japan
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of XEP: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/Er
gSat/Xep
Contact: erg_xep_info at isee.nagoya-u.ac.jp**************************************************************************
10-Mar-22 16:13:56: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/mepe/l2/omniflux/
2017/04/
10-Mar-22 16:13:56: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/mepe/l2/omniflux/2017/04/er
g_mepe_l2_omniflux_20170405_v01_02.cdf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

17 / 33 ページ

Arase_data_examples

2022/03/10 19(52**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) H
igh-energy electron experiments (HEP) Level-2 omni flux data
PI: Takefumi Mitani
Affiliation: ISAS, JAXA
- The rules of the road (RoR) common to the ERG project:https://ergsc.isee.nagoya-u.ac.jp/data_info/rules_of_t
he_road.shtml.en- RoR for HEP data: https://ergsc.isee.nagoya-u.ac.jp/mw/inde
x.php/ErgSat/Hep
Contact: erg_hep_info at isee.nagoya-u.ac.jp**************************************************************************
10-Mar-22 16:13:56: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/lepe/l2/omniflux/
2017/04/
10-Mar-22 16:13:56: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/lepe/l2/omniflux/2017/04/er
g_lepe_l2_omniflux_20170405_v03_01.cdf**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) M
edium Energy Particle experiments - electron analyzer (MEP-e)electron omni flux data
PI: Satoshi Kasahara
Affiliation: The University of Tokyo- The rules of the road (RoR) common to the ERG project:https://ergsc.isee.nagoya-u.ac.jp/data_info/rules_of_the_road.shtml.en- RoR for MEP-e data: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Mepe
Contact: erg_mep_info at isee.nagoya-u.ac.jp**************************************************************************

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

18 / 33 ページ

Arase_data_examples

2022/03/10 19(5210-Mar-22 16:13:56: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/mepi/l2/omniflux/
2017/04/
10-Mar-22 16:13:56: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/mepi/l2/omniflux/2017/04/er
g_mepi_l2_omniflux_20170405_v02_01.cdf**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) L
ow-Energy Particle experiments - electron analyzer (LEP-e) Le
vel 2 omni electron flux data
Information about ERG LEPe
PI: Shiang-Yu Wang
Affiliation: Academia Sinica, Taiwan
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of LEPe L2: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Lepe
Contact: erg_lepe_info at isee.nagoya-u.ac.jp**************************************************************************
10-Mar-22 16:13:58: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/lepi/l2/omniflux/
2017/04/
10-Mar-22 16:13:58: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/lepi/l2/omniflux/2017/04/er
g_lepi_l2_omniflux_20170405_v03_00.cdf

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

19 / 33 ページ

Arase_data_examples

2022/03/10 19(52**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) M
edium Energy Particle experiments - ion mass analyzer (MEP-i)
3D ion omni flux data
PI: Shoichiro Yokota
Affiliation: Osaka University- The rules of the road (RoR) common to the ERG project:https://ergsc.isee.nagoya-u.ac.jp/data_info/rules_of_the_road.shtml.en- RoR for MEP-i data: https://ergsc.isee.nagoya-u.ac.jp/mw/in
dex.php/ErgSat/Mepi
Contact: erg_mep_info at isee.nagoya-u.ac.jp****************************************************************************************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) L
ow Energy Particle Ion (LEPi) Experiment 3D ion flux data
Information about ERG LEPi
PI: Kazushi Asamura
Affiliation: ISAS, Jaxa
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of LEPi L2: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Lepi
RoR of ERG/LEPi: https://ergsc.isee.nagoya-u.ac.jp/mw/index.p
hp/ErgSat/Lepi#Rules_of_the_Road
Contact: erg_lepi_info at isee.nagoya-u.ac.jp**************************************************************************

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

20 / 33 ページ

Arase_data_examples

2022/03/10 19(52Out[1… ['erg_lepi_l2_omniflux_Epoch','erg_lepi_l2_omniflux_FPDO','erg_lepi_l2_omniflux_FHEDO','erg_lepi_l2_omniflux_FODO','erg_lepi_l2_omniflux_FPDO_raw','erg_lepi_l2_omniflux_FHEDO_raw','erg_lepi_l2_omniflux_FODO_raw']
In [2…

vars = pytplot.tplot_names()
0 : erg_pwe_hfa_l2_low_Epoch
1 : erg_pwe_hfa_l2_low_spectra_eu
2 : erg_pwe_hfa_l2_low_spectra_ev
3 : erg_pwe_hfa_l2_low_spectra_bgamma
4 : erg_pwe_hfa_l2_low_spectra_esum
5 : erg_pwe_hfa_l2_low_spectra_er
6 : erg_pwe_hfa_l2_low_spectra_el
7 : erg_pwe_hfa_l2_low_spectra_e_mix
8 : erg_pwe_hfa_l2_low_spectra_e_ar
9 : erg_pwe_hfa_l2_low_spectra_eu_ev
10 : erg_pwe_hfa_l2_low_spectra_eu_bg
11 : erg_pwe_hfa_l2_low_spectra_ev_bg
12 : erg_pwe_hfa_l2_low_quality_flag
13 : erg_pwe_ofa_l2_spec_epoch_e132
14 : erg_pwe_ofa_l2_spec_E_spectra_132
15 : erg_pwe_ofa_l2_spec_quality_flag_e132
16 : erg_pwe_ofa_l2_spec_epoch_b132
17 : erg_pwe_ofa_l2_spec_B_spectra_132
18 : erg_pwe_ofa_l2_spec_quality_flag_b132
19 : erg_pwe_efd_l2_spec_spectra
20 : erg_pwe_efd_l2_spec_quality_flag
21 : erg_mgf_l2_epoch_8sec
22 : erg_mgf_l2_mag_8sec_dsi
23 : erg_mgf_l2_mag_8sec_gse
24 : erg_mgf_l2_mag_8sec_gsm
25 : erg_mgf_l2_mag_8sec_sm
26 : erg_mgf_l2_magt_8sec
27 : erg_mgf_l2_rmsd_8sec_dsi
28 : erg_mgf_l2_rmsd_8sec_gse
29 : erg_mgf_l2_rmsd_8sec_gsm
30 : erg_mgf_l2_rmsd_8sec_sm
31 : erg_mgf_l2_rmsd_8sec
32 : erg_mgf_l2_n_rmsd_8sec
33 : erg_mgf_l2_dyn_rng_8sec
34 : erg_mgf_l2_quality_8sec

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

21 / 33 ページ

Arase_data_examples

2022/03/10 19(5235 : erg_mgf_l2_quality_8sec_gc
36 : erg_mgf_l2_igrf_8sec_dsi
37 : erg_mgf_l2_igrf_8sec_gse
38 : erg_mgf_l2_igrf_8sec_gsm
39 : erg_mgf_l2_igrf_8sec_sm
40 : erg_xep_l2_FEDO_SSD
41 : erg_hep_l2_FEDO_L
42 : erg_hep_l2_FEDO_H
43 : erg_mepe_l2_omniflux_epoch
44 : erg_mepe_l2_omniflux_FEDO
45 : erg_lepe_l2_omniflux_FEDO
46 : erg_mepi_l2_omniflux_epoch
47 : erg_mepi_l2_omniflux_epoch_tof
48 : erg_mepi_l2_omniflux_FIDO_Energy
49 : erg_mepi_l2_omniflux_FPDO
50 : erg_mepi_l2_omniflux_FHE2DO
51 : erg_mepi_l2_omniflux_FHEDO
52 : erg_mepi_l2_omniflux_FOPPDO
53 : erg_mepi_l2_omniflux_FODO
54 : erg_mepi_l2_omniflux_FO2PDO
55 : erg_mepi_l2_omniflux_FPDO_tof
56 : erg_mepi_l2_omniflux_FHE2DO_tof
57 : erg_mepi_l2_omniflux_FHEDO_tof
58 : erg_mepi_l2_omniflux_FOPPDO_tof
59 : erg_mepi_l2_omniflux_FODO_tof
60 : erg_mepi_l2_omniflux_FO2PDO_tof
61 : erg_lepi_l2_omniflux_Epoch
62 : erg_lepi_l2_omniflux_FPDO_raw
63 : erg_lepi_l2_omniflux_FHEDO_raw
64 : erg_lepi_l2_omniflux_FODO_raw
65 : erg_lepi_l2_omniflux_FPDO
66 : erg_lepi_l2_omniflux_FHEDO
67 : erg_lepi_l2_omniflux_FODO
In [2…

pytplot.timespan( '2017-04-05 00:00:00', 24, keyword='hours'
tplot( [ 'erg_pwe_hfa_l2_low_spectra_e_mix', 'erg_pwe_ofa_l2_spec

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

22 / 33 ページ

Arase_data_examples

2022/03/10 19(52

Add some extra Xaxes to the bottom of the plot
In [2…

orb( trange=['2017-04-05 00:00:00', '2017-04-06 00:00:00'])
labels = pytplot.split_vec( 'erg_orb_l2_pos_rmlatmlt' )pytplot.options( 'erg_orb_l2_pos_rmlatmlt_x', 'ytitle', 'R [Re]'pytplot.options( 'erg_orb_l2_pos_rmlatmlt_y', 'ytitle', 'MLat [depytplot.options( 'erg_orb_l2_pos_rmlatmlt_z', 'ytitle', 'MLT [h]'tplot( [ 'erg_pwe_hfa_l2_low_spectra_e_mix', 'erg_pwe_ofa_l2_spec
10-Mar-22 18:38:47: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/orb/def/2017/
10-Mar-22 18:38:47: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/orb/def/2017/erg_orb_l2_201

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

23 / 33 ページ

Arase_data_examples

2022/03/10 19(5270405_v03.cdf
10-Mar-22 18:38:48: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:250: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
if ydata[ydata == var_atts["FILLVAL"]].size != 0:
10-Mar-22 18:38:49: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:256: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
ydata[ydata == var_atts["FILLVAL"]] = 0**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) L
evel-2 orbit data
Information about ERG orbit

RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
Contact: erg-sc-core at isee.nagoya-u.ac.jp**************************************************************************
10-Mar-22 18:38:53: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/MPLPlot
ter/tplot.py:230: UserWarning: Attempted to set non-positive
bottom ylim on a log-scaled axis.
Invalid limit will be ignored.
this_axis.set_ylim(yrange)

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

24 / 33 ページ

Arase_data_examples

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

2022/03/10 19(5225 / 33 ページ

Arase_data_examples

2022/03/10 19(52

Use the part_products library to obtain particle
spectraAn experimental version of the part_products library has just been implemented
to the ERG-SC plug-in. So far only the bleeding-edge distribution of the plug-in
contains the part_products. In near future, after fully tested, the ERG
part_products will be merged to the main distribution of pySPEDAS.
As of Mar., 2022, the following modules are released experimentally:
erg_xep_part_products()
erg_hep_part_products()
erg_mep_part_products() for MEP-e and MEP-i Normal mode data
erg_lep_part_products() for LEP-e and LEP-i Normal mode data
They can be used with common arguments and options, similar to those of the(original) IDL version. Several spectrum plots using part_products aredemonstrated below to show how to use the library for Arase's particle data.

Generate a tplot variable containing energy-time spectra
In [3…

# Load MEP-e Lv.2 3-D flux data
pytplot.timespan( '2017-04-05 21:45:00', 2.25, keyword='hours'mepe( trange=[ '2017-04-05 21:45:00', '2017-04-05 23:59:59'],

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

26 / 33 ページ

Arase_data_examples

2022/03/10 19(5210-Mar-22 19:08:19: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/mepe/l2/3dflux/20
17/04/
10-Mar-22 19:08:19: Downloading https://ergsc.isee.nagoya-u.ac.jp/data/ergsc/satellite/erg/mepe/l2/3dflux/2017/04/erg_mepe_l2_3dflux_20170405_v01_01.cdf to /Users/horit/mnt/drobo2020/
work/data//ergsc/satellite/erg/mepe/l2/3dflux/2017/04/erg_mep
e_l2_3dflux_20170405_v01_01.cdf
10-Mar-22 19:08:30: Download complete: /Users/horit/mnt/drobo
2020/work/data//ergsc/satellite/erg/mepe/l2/3dflux/2017/04/er
g_mepe_l2_3dflux_20170405_v01_01.cdf
10-Mar-22 19:08:39: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:250: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
if ydata[ydata == var_atts["FILLVAL"]].size != 0:**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) M
edium-Energy Particle experiments - electron analyzer (MEP-e)
Level 2 3D electron flux data
PI: Satoshi Kasahara
Affiliation: The University of Tokyo- The rules of the road (RoR) common to the ERG project:https://ergsc.isee.nagoya-u.ac.jp/data_info/rules_of_the_road.shtml.en- RoR for MEP-e data: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Mepe
Contact: erg_mep_info at isee.nagoya-u.ac.jp**************************************************************************
Out[3… ['erg_mepe_l2_3dflux_FEDU','erg_mepe_l2_3dflux_FEDU_n','erg_mepe_l2_3dflux_FEEDU','erg_mepe_l2_3dflux_count_raw','erg_mepe_l2_3dflux_spin_phase']

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

27 / 33 ページ

Arase_data_examples

In [3…

2022/03/10 19(52# Calculate energy-time spectra of the omni-dir. electron flux ba
from ergpyspedas.erg import erg_mep_part_products
vars = erg_mep_part_products( 'erg_mepe_l2_3dflux_FEDU', outputs
tplot( 'erg_mepe_l2_3dflux_FEDU_energy' )file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

28 / 33 ページ

Arase_data_examples

In [4…

2022/03/10 19(52# Calculate pitch-angle-time spectra of electron flux based on ME

vars = mgf( trange=[ '2017-04-05 21:45:00', '2017-04-05 23:59:59'
vars = orb( trange=[ '2017-04-05 21:45:00', '2017-04-05 23:59:59'
mag_vn = 'erg_mgf_l2_mag_8sec_dsi'
pos_vn = 'erg_orb_l2_pos_gse'
vars = erg_mep_part_products( 'erg_mepe_l2_3dflux_FEDU', outputs
tplot( 'erg_mepe_l2_3dflux_FEDU_pa' )10-Mar-22 19:34:42: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/mgf/l2/8sec/2017/04/
10-Mar-22 19:34:42: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/mgf/l2/8sec/2017/04/erg_mgf_l2_8sec_20170405_v03.04.cdf
10-Mar-22 19:34:44: Downloading remote index: https://ergsc.i
see.nagoya-u.ac.jp/data/ergsc/satellite/erg/orb/def/2017/**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) M
agnetic Field Experiment (MGF) Level 2 spin-averaged magnetic
field data
Information about ERG MGF
PI: Ayako Matsuoka
Affiliation: Data Analysis Center for Geomagnetism and Space
Magnetism, Graduate School of Science, Kyoto University, Kita
shirakawa-Oiwake Cho, Sakyo-ku Kyoto 606-8502, Japan
RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
RoR of MGF L2: https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/ErgSat/Mgf
Contact: erg_mgf_info at isee.nagoya-u.ac.jp**************************************************************************

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

29 / 33 ページ

Arase_data_examples

2022/03/10 19(5210-Mar-22 19:34:44: File is current: /Users/horit/mnt/drobo20
20/work/data//ergsc/satellite/erg/orb/def/2017/erg_orb_l2_201
70405_v03.cdf
10-Mar-22 19:34:44: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:250: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
if ydata[ydata == var_atts["FILLVAL"]].size != 0:
10-Mar-22 19:34:46: /Users/horit/.pyenv/versions/3.9.6/envs/3
9_pydarn_pyspedas/lib/python3.9/site-packages/pytplot/importe
rs/cdf_to_tplot.py:256: FutureWarning: elementwise comparison
failed; returning scalar instead, but in the future will perf
orm elementwise comparison
ydata[ydata == var_atts["FILLVAL"]] = 0**************************************************************************
Exploration of Energization and Radiation in Geospace (ERG) L
evel-2 orbit data
Information about ERG orbit

RoR of ERG project common: https://ergsc.isee.nagoya-u.ac.jp/
data_info/rules_of_the_road.shtml.en
Contact: erg-sc-core at isee.nagoya-u.ac.jp**************************************************************************
erg_mgf_l2_mag_8sec_dsi_shifted copied to erg_mgf_l2_mag_8sec_dsi_shifted_pgs_temp
tinterpol (linear) was applied to: erg_mgf_l2_mag_8sec_dsi_shifted_pgs_temp
erg_orb_l2_pos_gse copied to erg_orb_l2_pos_gse_pgs_temp
tinterpol (linear) was applied to: erg_orb_l2_pos_gse_pgs_tempfile:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

30 / 33 ページ

Arase_data_examples

2022/03/10 19(5210-Mar-22 19:34:51: erg_mepe_l2_3dflux_FEDU is 77% done.
10-Mar-22 19:34:53: /Users/horit/work/python/work/devel/pyspe
das_plugin/ergpyspedas/erg/satellite/erg/particle/erg_pgs_lim
it_range.py:42: RuntimeWarning: invalid value encountered infmod
phi_max = np.fmod(data_in['phi'] + 0., 360.)

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

31 / 33 ページ

Arase_data_examples

In [4…

2022/03/10 19(52# Calculate energy-time spectra of electron flux for limited pitc## Here we calculate energy-time spectra for PA = 0-10 deg and PA
vars = erg_mep_part_products( 'erg_mepe_l2_3dflux_FEDU', outputs
vars = erg_mep_part_products( 'erg_mepe_l2_3dflux_FEDU', outputs## Decorate the obtained spectrum variables
pytplot.options( 'erg_mepe_l2_3dflux_FEDU_energy_mag_pa80-100'
pytplot.options( 'erg_mepe_l2_3dflux_FEDU_energy_mag_pa0-10',

tplot( ['erg_mepe_l2_3dflux_FEDU_energy_mag_pa80-100', 'erg_mepe_
10-Mar-22 19:50:07: /Users/horit/work/python/work/devel/pyspe
das_plugin/ergpyspedas/erg/satellite/erg/particle/erg_pgs_mak
e_e_spec.py:30: RuntimeWarning: invalid value encountered intrue_divide
ave = data_array.sum(axis=1) / data['bins'].sum(axis=1)
erg_mgf_l2_mag_8sec_dsi_shifted copied to erg_mgf_l2_mag_8sec_dsi_shifted_pgs_temp
tinterpol (linear) was applied to: erg_mgf_l2_mag_8sec_dsi_shifted_pgs_temp
erg_orb_l2_pos_gse copied to erg_orb_l2_pos_gse_pgs_temp
tinterpol (linear) was applied to: erg_orb_l2_pos_gse_pgs_temp10-Mar-22 19:50:12: /Users/horit/work/python/work/devel/pyspe
das_plugin/ergpyspedas/erg/satellite/erg/particle/erg_pgs_lim
it_range.py:42: RuntimeWarning: invalid value encountered infmod
phi_max = np.fmod(data_in['phi'] + 0., 360.)
10-Mar-22 19:50:12: /Users/horit/work/python/work/devel/pyspe
das_plugin/ergpyspedas/erg/satellite/erg/particle/erg_pgs_mak
e_e_spec.py:30: RuntimeWarning: invalid value encountered intrue_divide
ave = data_array.sum(axis=1) / data['bins'].sum(axis=1)
erg_mgf_l2_mag_8sec_dsi_shifted copied to erg_mgf_l2_mag_8sec_dsi_shifted_pgs_temp
tinterpol (linear) was applied to: erg_mgf_l2_mag_8sec_dsi_shifted_pgs_temp
erg_orb_l2_pos_gse copied to erg_orb_l2_pos_gse_pgs_temp
tinterpol (linear) was applied to: erg_orb_l2_pos_gse_pgs_tempfile:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

32 / 33 ページ

Arase_data_examples

2022/03/10 19(5210-Mar-22 19:50:17: /Users/horit/work/python/work/devel/pyspe
das_plugin/ergpyspedas/erg/satellite/erg/particle/erg_pgs_lim
it_range.py:42: RuntimeWarning: invalid value encountered infmod
phi_max = np.fmod(data_in['phi'] + 0., 360.)

In [ …

file:///Users/horit/work/python/work/devel/pyspedas_plugin/Arase_data_examples-2.html

33 / 33 ページ