SPEDAS training session– Beginner course –M. Shoji1), T. Hori1) , C. W. Jun1), S. Kurita1), M. Teramoto2),
S. Matsuda3), K. Keika4), Y. Miyoshi1), N. Umemura1), T. Segawa1)
1)ERG Science Center, ISEE, Nagoya Univ.
2) Kyushu Institute of Technology,3)ISAS/JAXA, 4)Univ. of Tokyo
1

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Purpose of this course} To get familiar with the SPEDAS scheme.
} To get you ready to use SPEDAS to analyze ERG data.

2

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

What will you be doing in this training?
} Learn about the data model employed by SPEDAS.
} Load/manipulate/visualize ERG satellite and other ground

data.

3

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Keep in mind
} This is a "hands-on" training for SPEDAS, not the time for e-

mail check.

} Communicate with lecturers, tutors, neighboring skilled users.
} The training session today does not cover everything in thehandouts due to time limitation. It is recommended to practicethe uncovered parts later by yourself.

} We will proceed slowly with entry-level SPEDAS users,

particularly in the beginner course. You can go faster by
yourself.
4

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

What's SPEDAS?

5SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Space Physics Environment Data Analysis Software(SPEDAS)
SPEDAS frameworkDatarepository

CDF

CDF

CDF
Van Allen
Probes

CDF

ERG satellite
data
Each project develops
and releases APIs toautomaticallydownload and readeach project data

CDF

ERG-related groundobservation
network data
CDF
HDF?

CDF

ERG simulation /modeling data
ERG-SC develops dataarchives and APIs to read thedata from SPEDAS

6SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

What can you do with SPEDAS?
} time-series plots} filtering of data
} frequency analysis} mapping to the ground maps
} …

7

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Basics of SPEDAS:
tplot and tplot variable

8

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

A few basics of IDL before entering SPEDAS…
Insert a comma ( , ) between a command, its arguments, and keywords.

}

IDL> tplot , 1 , title='New plot'

A string is expressed as a text sandwiched by delimeters ( ' ) or ( " ).

}IDL> print, 'This is a text.'

An array is expressed as comma-separated elements that are bracketed.

}

IDL> arr1 = [ 2, 3, 4, 5 ]IDL> string_arr1 = [ 'text1', 'text2', 'text3' ]Typical errors beginners often encounter:}% Attempt to call undefined procedure: '????'.
à command/routine name (????) is misspelled.
% Syntax error.
à , ' ( ) [ ] is missing or mismatched in most cases.

Use Up arrow key to reuse previously typed commands. You can edit them with
Left/Right arrow, Backspace keys and execute!

}

9

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

How SPEDAS works?
One of the simplest procedures would be:
Run IDL
Initialize the SPEDAS environment on IDL
Set a date/time range for which data are loaded.
Load data(Manipulate the loaded data)
Plot the data

1.
2.
3.
4.
5.
6.

10

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

How SPEDAS works?
In SPEDAS command lines,
prompt> idl
IDL> erg_init
ERG> timespan, '2017-05-27', 07
ERG> erg_load_mgf(manipulate tplot variables)

ERG> tplot, ['erg_mgf_l2_mag_8sec_dsi', 'erg_mgf_l2_magt_8sec' ]11

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Set a date/time range
ERG> timespan, timestr, N, option
timestr : a string expressing a particular date/timein UTC in the format of 'yyyy-mm-dd/hh:mm:ss'
N : number of time length (Default: 1)
option : unit (/day, /hour, /min, /sec, Default: /day)

For 1 day from 2017-05-27/00:00:00 UTC
ERG> timespan, ‘2017-05-27'
For 90 min from 2017-05-29/03:25:30 UTC
ERG> timespan, '2017-05-29/03:25:30’, 90, /min
12

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

tplot variable as the primary data model} 'erg_mgf_l2_mag_8sec_dsi' in prev. page is called tplot

variable.
} "Tplot variables" bind an indexed name-string to a data
structure on IDL containing time-series data withmetadata.
SPEDAS session#1 'tplot var. name 1'#2 'tplot var. name 2'

13

Memory space of IDL
time-seriesTimedata 1
array

Data
array

metadata

time-seriesTimedata 2
array

Data
array

metadata

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Ex: How the MGF load procedure works
SPEDAS session

load as tplot vars.
erg_mgf_l2_8sec_20170501_v01.01.cdf




14

yo
ur

erg_mgf_l2_mag_8sec_dsi…

PC

Request to download

St
or
eC
DF
fil
eo
n

ERG> erg_load_mgf

The data become open automatically with 1
year latency from data acquisition.
àWorking group password is required for thedata within the 1 year.

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Data Products of Arasen

Overview of the ERG projectnnMiyoshi et al., EPS, 2018a

ERG Science Center
n

n
n
n

Miyoshi et al., EPS, 2018b

Orbitpredict/definitive, L2/L3
AttitudeL2
MGFpre/L2nn

PWEpre/L2/L3
n
n
n
n
n

n
n

n

Kasahara et al., EPS, 2018

LEPi(pre/L2/L3/L4)nAsamura et al., EPS, 2018
LEPe(pre/L2/L3/L4)
n15

Yokota et al., EPS, 2017

MEPe(pre/L2/L3/L4)nnMitani et al., EPS, 2018

MEPi(pre/L2/L3/L4)nnKasahara et al., EPS, 2018
Kumamoto et al., EPS, 2018
Ozaki et al., EPS, 2018
Matsuda et al., EPS, 2018
Kasaba et al., EPS, 2017

XEPL2/L3/L4
HEP (HEP-H/HEP-L, pre/ L2/L3/L4)nnMatsuoka et al., EPS, 2018

Kazama et al., EPS, 2017

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Listing tplot data & viewing the content
ERG> tplot_names
ERG> print_tinfo, 'erg_mgf_l2_mag_8sec_dsi'

The actual data structure bound to tplot variable'erg_mgf_l2_mag_8sec_dsi' is shown.

All tplot variables arelisted with uniqueindex numbers
16

X: time array containing time labels in decimal UNIX time
Y: data array, in this case, a 2-D array of time x 3-components

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Listing tplot data & viewing the content
ERG> tplot_names, 'erg_mgf_l2_mag_8sec_dsi', /verbose
ERG> tplot_names, 1, /v

Metadata (information on
the data) are dumped.

RULES_OF_USE carries "rulesof the road" in using the
data.
17

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Rules of the Road

• All data users should follow theRules of the road.
• Users are encouraged to reportany suspicious data to the PI.
(erg_xxx_info @isee.nagoyau.ac.jp)
18

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Plotting a tplot data by tplot
Tplot with tplot variable names (string)
ERG> tplot, 'erg_mgf_l2_mag_8sec_dsi'
ERG> tplot, [ 'erg_mgf_l2_mag_8sec_dsi' , 'erg_mgf_l2_mag_8sec_gse' ]Tplot with the index number of a tplot variable
ERG> tplot, 1
With an array of variable indices to combine multiple variable in a single plot window
ERG> tplot, [2,1]Some wildcards can be used
ERG> tplot, 'erg_mag_l2_mag_8sec_*'

Tplot accepts variables as arguments invarious formats.

19

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Decorate the plot panel for each tplot variableoptions, varname, option1='…', option2='…', …
varname: tplot variable name (wildcards accepted)
option?: name of tplot variable attribute
ERG> options, 'erg_mgf_l2_mag_8sec_gse', ytitle= 'Arase mag' , ysubtitle='[nT]'
ERG> options, 'erg_mgf_l2_mag_8sec_*', labels=['Bx-comp', 'By-comp', 'Bz-comp' ]ERG> tplot, 'erg_mgf_l2_mag_8sec_gse'

ytitle,ysubtitlelabels20

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Separate a tplot variable with vector data
ERG> split_vec, 'erg_mgf_l2_mag_8sec_gse'
STORE_DATA(260): Creating tplot variable: 19 erg_mgf_l2_mag_8sec_gse_x
STORE_DATA(260): Creating tplot variable: 20 erg_mgf_l2_mag_8sec_gse_y
STORE_DATA(260): Creating tplot variable: 21 erg_mgf_l2_mag_8sec_gse_z
ERG> tplot, 'erg_mgf_l2_mag_8sec_gse_?'split_vec takes a tplot variablewith vector or array data to create
new tplot variables containing eachcomponent of the vector/array data.

21

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Change the time range of a plot
Select a time period by mouse-clicks on the plot window
ERG> tlimit
Specify a time period explicitly

ERG> tlimit, '2017-05-29/03:30' , '2017-05-29/08:30'
Back to the last plot period
ERG> tlimit, /last

Restore the original plot periodthat was set by timespan
ERG> tlimit, /full

22

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Change the vertical scale of a plot
ylim, varname, ymin, ymax, logflag
varname : variable name(s)ymin/ymax : lower/upper limit along vertical axis
set both to 0 (zero) for plotting with auto-scale
logflag : set 0 (zero) for plotting on a linear scale, or 1 for a log scale

ERG> ylim, ‘erg_mgf_l2_mag_8sec_gse_x‘, 180,250,
ERG> tplot

0

Zoomed in a more limited
range in the vertical scale.

Tips:
Putting 0 for both ymin and ymax sets they range to auto-scale.
ERG> ylim, 'thg_mag_atha_x', 0, 0

23

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Dump to png, postscript, and Ascii files
To a png file or postscript file

ERG> cwd;Display the current directory
CWD(25): Directory changed to: /yyyy/xxxx
ERG> tplot, 'erg_mgf_l2_mag_8sec_gse_?'
ERG> makepng, 'erg_mgf_plot';à erg_mgf_plot.png/yyyy/xxxx/erg_mgf_plot.png

ERG> popen, 'erg_mgf_plot'
ERG> tplot;Redo the last plot
ERG> pclose ; à erg_mgf_plot.ps

Dump the data content of a tplot variable to a Ascii file
ERG> tplot_ascii, 'erg_mgf_l2_mag_8sec_gse';--> erg_mgf_l2_mag_8sec_gse.txt

24

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

SPEDAS manual viewed by web browsers}

Open/YOUR_SPEDAS_DIR/idl/_spd_doc.html

with your web browser to view the
automatically generated
documents for SPEDAS routines.

25

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Basics of SPEDAS:
Various filtering routines for tplot data

26

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

boxcar-average data– avg_data –avg_data, 'varname', timebin
varname: tplot variable names or index numbers
timebin : a time window in sec with which the boxcar-averaging is applied to the data
ERG> del_data, '*'Remove all tplot variables and
ERG> timespan, '2017-05-29-03:30',70,/minreload the data
ERG> erg_load_mgf
ERG> split_vec, 'erg_mgf_l2_mag_8sec_gse'
ERG> avg_data, 'erg_mgf_l2_mag_8sec_gse_x' , 600.
ERG> tplot, ['erg_mgf_l2_mag_8sec_gse_x', 'erg_mgf_l2_mag_8sec_gse_x_avg' ]The data boxcaraveraged with a time binof 600 second
As a result, the number of data points is
reduced to every 600 s.

27

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Smoothing data – tsmooth_in_time –tsmooth_in_time, 'varname', timebin
varname : tplot variable name(s)timebin : time window in second for running average

ERG> tsmooth_in_time, 'erg_mgf_l2_mag_8sec_gse_x', 600.
ERG> tplot_names… … … …
19 erg_mgf_l2_mag_8sec_gse_x… … … …
23 erg_mgf_l2_mag_8sec_gse_x_smoothed
ERG> tplot, [ 19 , 23 ]The data is running-averaged with a time
window of 600 second. We can use this asa rough low-pass filter.
Note that the number of data points isconserved.
28

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

High-pass filter in time – thigh_pass_filter –thigh_pass_filter, 'varname', timebin
varname : tplot variable name(s)timebin : time window in second for running average

ERG> thigh_pass_filter, 'erg_mgf_l2_mag_8sec_gse', 600.
ERG> tplot_names… … … …
2 erg_mgf_l2_mag_8sec_gse… … … …
24 erg_mgf_l2_mag_8sec_gse_hpfilt

ERG> tplot, [ 2 , 24 ]Time variations with periods shorter than
600 sec are shown.
Actually this command just subtracts the
low-pass-filtered values derived withtsmooth_in_time from the original
data, not uses any digital filtering process
such as FFT.
29

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Basics of SPEDAS:
Frequency analysis of tplot data

30

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Dynamics spectra – tdpwrspc–
tdpwrspc, 'varname'varname : tplot variable name(s)ERG> tdpwrspc, 'erg_mgf_l2_mag_8sec_gse_hpfilt'
ERG> tplot_names… … … …
25 erg_mgf_l2_mag_8sec_gse_hpfilt_x… … … …
28 erg_mgf_l2_mag_8sec_gse_hpfilt_ _x_dpwrspc
ERG> tplot, [ 25, 28 ]FFT with the hanning window isapplied to derive dynamic
frequency spectra of the data.

31

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Wavelet analysis – wav_data –wav_data, 'varname'varname : tplot variable name(s)wav_data accepts data with less than 32768
samples. The number of data points is reduced asdone with avg_data in this case.

ERG> wav_data, 'erg_mgf_l2_mag_8sec_gse_hpfilt_x'
STORE_DATA(260): Creating tplot variable: 31 erg_mgf_l2_mag_8sec_gse_hpfilt_x_wv_pow
ERG> zlim, 32, 1, 1000, 1
ERG> tplot, 'erg_mgf_l2_mag_8sec_gse_hpfilt_x*'

Wavelet analysis is applied to derive
dynamic spectra of the data.
zlim is similar to "ylim" command,but set the lower/upper limit of thecolor scale for a spectrum-type plot.

32

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Other information sources for SPEDAS}SPEDAS wiki}

http://spedas.org/wiki/index.php?title=Main_Page}}

Change log of the source repository for the bleeding edge of SPEDAS}}

http://spedas.org/changelog/

Crib sheets for TPLOT in Your_SPEDAS_dir/idl/general/examples/
}
}
}
}
}
}

}

User's guide, Plug-in developer's guide, tips and tricks, The list of available crib sheets, …

crib_tplot.pro -- basic tplot intro
crib_tplot_annotation.pro -- How to control annotations in tplot (labels, text, etc...)crib_tplot_export_print.pro -- How to export tplot data and tplot plots
crib_tplot_layout.pro -- How to control tplot plot layouts
crib_tplot_range.pro -- How to control the range and scaling of tplot plots
crib_tplot_ticks.pro -- How to control tplot plot ticks. (location, size, etc...)SPEDAS-J wiki (for Japanese SPEDAS user)}

33

https://github.com/spedas-j/member_contrib/wiki

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Other information sources for Arase} ERG-SC web page (incl. ERG plug-in and data download pages.)}

https://ergsc.isee.nagoya-u.ac.jp} ERG-SC wiki}

34

https://ergsc.isee.nagoya-u.ac.jp/mw/index.php/Main_Page

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Sample cases of ERG data analysis

35

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Data analysis:
3-day plot of XEP data and geomag. indices
ERG> timespan, '2017-06-16', 3, /dayLoad HEP data

ERG> erg_load_hep, datatype='omniflux'
Load other index data

ERG> omni_hro_load, /res5min
ERG> tplot,[ 'OMNI_HRO_5min_SYM_H' , 'OMNI_HRO_5min_AL_INDEX' ,'erg_hep_l2_FEDO_*' ]36

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Onboard instrument data:

Coordinate transformation of MGF data
Coordinate transformation (SGA, SGI, DSI, J2000)
From J2000 to the geophysical coordinates -------> using “cotrans”

ERG> timespan, '2017-03-28' & erg_load_orb & erg_load_mgf
ERG> erg_cotrans, 'erg_mgf_l2_mag_8sec_dsi', 'mgf_j2000',in_coord='dsi', out_coord='j2000'
Coordinate transformation (SM<-->J2000)

ERG> spd_cotrans, 'mgf_j2000', 'mgf_gsm', in_coord='j2000', out_coord='gsm'
ERG> tplot, ['mgf_gsm', 'erg_orb_l2_pos_blocal']

37

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Data analysis:
Frequency analysis of MGF data
Please prepare a tplot variable "mgf_sm" containing the magnetic field vectors in SM
coordinates for March 28 (hint: See the prev. page!)
ERG> timespan, '2017-03-28', 1, /dayDynamic spectra by FFT with the Hanning window
ERG> tdpwrspc, 'mgf_sm'
ERG> wav_data, 'mgf_sm_z' Dynamic spectra by a wavelet analysis
ERG> tplot,'mgf_sm_z*'

Use tlimit to zoom in aperiod between perigee
points!

38

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Onboard instrument data:
Level-2 particle omni-flux data;; Set the time spantimespan, '2017-04-19';; Load data
erg_load_xep, datatype='omniflux'
erg_load_hep, datatype='omniflux'
erg_load_mepe, datatype='omniflux'
erg_load_lepe, datatype='omniflux'
erg_load_mepi_nml, datatype='omniflux'
erg_load_lepi_nml, datatype='omniflux'
tplot_names
tplot,[ 'erg_xep_l2_FEDO_SSD', $'erg_hep_l2_FEDO_H','erg_hep_l2_FEDO_L', $'erg_mepe_l2_omniflux_FEDO', $'erg_lepe_l2_omniflux_FEDO', $'erg_mepi_l2_omniflux_FPDO', $'erg_lepi_l2_omniflux_FPDO']

39

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Change the time range of a plot: tlimit
Select a time period by mouse-clicks on the plot window
ERG> tlimit
Specify a time period explicitly

ERG> tlimit, '2017-04-19/00:00' , '2017-04-19/08:00'
Back to the last plot period
ERG> tlimit, /last

Restore the original plot periodthat was set by timespan
ERG> tlimit, /full

40

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Onboard instrument data:
Add MGF data with /add keyword
Load MGF data and add it to the pre-existing particle plot

ERG> erg_load_mgf
ERG> tplot, 'erg_mgf_l2_mag_8sec_sm' , /add

41

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Orbit data:
Set time range and load ERG orbit data
Setup the time range (‘YYYY-MM-DD/hh:mm:ss’)

ERG> timespan,'2017-03-28/00:00:00',3,/day
Load orbit data

ERG> erg_load_orb
ERG> tplot_names("erg_orb_l2" means ERG Level-2 orbit data)

42(*) Using the IGRF model
pos_gse/gsm/sm

s/c position [Re] in GSE, GSM, SM coordinates

pos_rmlatmlt

Radial distance [Re], magnetic latitude [deg], local time [hr] of s/c
position

pos_eqs/c position mapped to the magnetic equator

pos_iono_north/south

Geographic latitude and longitude [deg] of s/c footprints at 100 km
altitude in the northern/southern hemisphere

pos_blocal / blocal_mag

model B-field vector (blocal) and B-field strength (blocal_mag) [nT]at s/c position

pos_beq / beq_mag

model B-field vector (beq) and B-field strength (beq_mag) [nT] at
s/c position mapped to the magnetic equator

pos_Lm

McIlwain's L-parameter of s/c position for pitch angles of 90, 60,
and 30 deg

vel_gse/gsm/sm

s/c orbital velocity [km/s] in GSE, GSM, and SM

man_prep/man_on/eclipse_flagflag for maneuver preparation (man_prep), maneuver on/off (man_on), and solar eclipse (eclipse)

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Orbit data:
Definitive orbit as a time series plot: tplot, tplotxy
Plot orbit time series data

ERG> tplot, 'erg_orb_l2_pos_gsm'
Plot orbit data in the X-Y plane.

ERG> tplotxy, 'erg_orb_l2_pos_gsm'

43

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Separate a tplot variable with vector data: split_vec
ERG> split_vec, 'erg_orb_l2_pos_rmlatmlt'
STORE_DATA(264): Creating tplot variable: ...
STORE_DATA(264): Creating tplot variable: ...
STORE_DATA(264): Creating tplot variable: ...
ERG> tplot, 'erg_orb_l2_pos_rmlatmlt_?'

split_vec takes a tplot variablewith vector or array data to create
new tplot variables containing eachcomponent of the vector/array data.

44

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Orbit data:
Insert orbit values below a time-series plot
ERG> set_erg_var_label
ERG> tplot;just type "tplot" to replot the previous panels

Using subroutine to add labels(Lm,MLT,MLAT) with time

ERG> split_vec, 'erg_orb_l2_pos_rmlatmlt'
ERG> options, 'erg_orb_l2_pos_rmlatmlt_x', ytitle='R'
ERG> options, 'erg_orb_l2_pos_rmlatmlt_y', ytitle='MLAT'
ERG> options, 'erg_orb_l2_pos_rmlatmlt_z', ytitle='MLT'
ERG> tplot_options, var_label=['erg_orb_l2_pos_rmlatmlt_z','erg_orb_l2_pos_rmlatmlt_y', 'erg_orb_l2_pos_rmlatmlt_x']
ERG> tplot(Lm, MLAT, MLT)

45

An example to add
new labels(R,MLAT,MLT)(R, MLT, MLAT)SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Appendix 1:
Access the data structure in a tplot variable andcreate a new tplot variable (get_data, store_data)

46

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Access the data structure in a tplot variable– get_data –ERG> get_data, 'thg_mag_atha', data=data, dlimits=dlimits, lim=lim
data: the data structure is stored
dlimits: most of metadata are stored
lim: some plot properties are stored
ERG> help, data.x , data.y"get_data" extracts the data
structure of a tplot variable and saves
in a structure "data" of IDL session in
the above case, so that users can accessthem by referring to as "data.x" or"data.y", for example.
47

The information on the original CDF data
file (CDF) and metadata, and various plot
properties are extracted into a structure"dlimits".

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Create a new tplot variable– store_data –ERG> store_data, 'varname' , data = { x:timearr, y:datarr }varname: name of a newly created tplot variabletimearr: 1-D array containing time values in SPEDAS time of time-series datadatarr: 1-D or 2-D array containing the data values of time-series data. The size of 1st dimension should
be identical to that of timearr.

}}}

SPEDAS time is the UNIX time in double-precision floating-point values. UNIX time is theelapsed second since 00:00 UTC on January 1, 1970.
Usually we use time_double() function to calculate a SPEDAS time value from a time
string such as '2017-06-16/12:30:00'.
SPEDAS time values can easily be converted to time strings with time_string() function.

Please refer to the SPEDAS wiki at
http://spedas.org/wiki/index.php?title=Time_handlingfor more details of the time handling in SPEDAS.

48

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Appendix 2:
Various options for SPEDAS use

49

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019

Options for SPEDAS use}

Using SPEDAS source code
}
}
}
}

}

Using SPEDAS save file
}
}
}
}

}

binary files working with the IDL virtual machine (IDL-VM) environment
IDL-VM can be downloaded for free from Exelis/Harris Geospatial.
No command-line tools: only GUI is available.
only plug-ins implemented to the save file are available for use. Some latest
plug-ins may not be included yet.

Using SPEDAS executable files}}

All SPEDAS IDL source code including both the command-line tools and graphicaluser interface (GUI) tools.
To use it, you need to have IDL installed with a proper license.
The latest plug-ins can be used by installing by yourself.
Users can develop, edit, and run their own scripts.

A package bundling IDL-VM and the SPEDAS save file, basically equivalent to theabove.

We use the source code version in this training session.
50

SPEDAS training session, ERG WS @Univ. of Tokyo

Sep. 19, 2019