ISEE_Wave: interactive plasma wave analysis tool

We have developed ISEE_Wave (Institute for Space-Earth Environmental Research, Nagoya University - Plasma Wave Analysis Tool), an interactive plasma wave analysis tool for electric and magnetic field waveforms observed by the plasma wave experiment aboard the Arase satellite. ISEE_Wave provides an integrated wave analysis environment on a graphical user interface, where users can visualize advanced wave properties, such as the electric and magnetic field wave power spectra, wave normal polar angle, polarization ellipse, planarity of polarization, and Poynting vector angle. Users can simply select a time interval for their analysis, and ISEE_Wave automatically downloads the waveform data, ambient magnetic field data, and spacecraft attitude data from the data archive repository of the ERG Science Center, and then performs necessary coordinate transformation and spectral matrix calculation. The singular value decomposition technique is used as the core technique for the wave property analysis of ISEE_Wave. On-demand analysis is possible by specifying the parameters of the wave property analysis as well as the plot styles using the graphical user interface of ISEE_Wave. The results can be saved as image files of plots and/or a tplot save file. ISEE_Wave aids in the identification of fine structures of observed plasma waves, wave mode identification, and wave propagation analysis. These properties can be used to understand plasma wave generation, propagation, and wave-particle interaction in the inner magnetosphere. ISEE_Wave can also be applied to general waveform data observed by other spacecraft by using the plug-in procedures to load the data.

. Wave polarization, which is an important plasma wave parameter, characterizes the wave mode according to the dispersion relation of plasma waves. The wave normal angle is also an important feature of plasma waves and it characterizes wave propagation. Colpitts et al. (2020) reported a simultaneous measurement of whistler-mode chorus waves along a field line obtained by Arase and Van Allen probes. They found that the wave normal angle of the waves is more oblique in the off-equatorial region than in the equatorial region and concluded that the result is consistent with the theory of plasma wave propagation and ray-tracing results. Similar multipoint measurements of very low frequency/extremely low frequency (VLF/ELF) plasma waves were reported by Martinez-Calderon et al. (2020).

Introduction
Plasma waves in the magnetosphere play an important role in the acceleration and dissipation of charged particles. Cross-energy coupling in the terrestrial inner magnetosphere is mainly supported by the existence of several types of plasma waves. For example, energetic electron acceleration and precipitation loss are driven by whistler-mode chorus waves in the inner magnetosphere Ozaki et al. 2019;Foster The aforementioned wave parameters are also important for evaluating theoretical properties of wave-particle interactions, such as the pitch-angle diffusion coefficient due to whistler-mode chorus waves (Horne et al. 2005).
Recently, three-dimensional VLF/ELF magnetic field measurement has been carried out by most of spacecraft. Two-dimensional (spin plane) or three-dimensional (spin plane and spin axis) electric field measurement is also performed by spinning spacecraft, such as the Van Allen probes (Mauk et al. 2013), Magnetospheric Multiscale (MMS) spacecraft (Burch et al. 2016), Time History of Events and Macroscale Interactions during Substorms (THEMIS) spacecraft (Angelopoulos 2008), and Exploration of energization and Radiation in Geospace (ERG/ Arase) satellite ). The wave normal angles and polarization of plasma waves can be derived from these multi-component measurements, although the method is more complicated than the power spectrum calculation (obtained by determining the absolute value of the Fourier transformed complex spectrum). Thus, the evaluation of such wave properties can be a barrier for non-experts in plasma wave analysis.
Propagation analysis of STAFF-SA (spatio-temporal analysis of field fluctuations, spectrum analyzer) data with coherency tests (PRASSADCO) is a character user interface (CUI) tool for analyzing plasma wave data of multi-component measurements (http:// aurora. troja. mff. cuni. cz/ ~santo lik/ PRASS ADCO/). This tool provides an environment of wave propagation property analysis from spectral matrices observed by wave instruments such as Cluster/STAFF (Cornilleau-Wehrlin et al. 1997), Cassini/Radio and Plasma Wave Science (RPWS) (Gurnett et al. 2004), Polar/Plasma Wave Investigation (PWI) (Gurnett et al. 1995), and Van Allen probes/Electric and Magnetic Field Instrument Suite and Integrated Science (EMFISIS) . PRASSADCO enables users to obtain results of wave property analysis as publication-quality figures, and has been used in a number of papers (e.g., Santolík et al. (2001);Nĕmec et al. (2005); Cornilleau-Wehrlin et al. (2003)). The Interface for a sPECtral Matrix ANalysis (iPECMAN, https:// ipecm an. ufa. cas. cz) was also developed as a web-based analysis tool based on PRAS-SADCO to analyze spectral matrix data observed by the STAFF-SA instrument aboard Cluster.
In this paper, we present an interactive plasma wave property analysis tool called ISEE_Wave (Institute for Space-Earth Environmental Research, Nagoya University -Plasma Wave Analysis Tool), which has recently been available for researchers being interested in plasma wave analysis. ISEE_Wave is a graphical user interface (GUI) tool implemented as a plug-in for Space Physics Environment Data Analysis System (SPEDAS; see Angelopoulos et al. (2019)). Unlike the previous tools using premade spectral matrix data, ISEE_Wave directly processes waveform data and thereby allows the user to construct spectral matrix data on-the-fly with a Fourier window, window width, and overlap length of the user's own. Because all functions implemented in ISEE_Wave can be used through the GUI, users can easily obtain publication-quality plots without using complicated commands. ISEE_Wave is written in interactive data language (IDL) and accordingly can be used on any platform and operating system where IDL is available. We present examples of wave property analysis using waveform data obtained by Arase. ISEE_Wave can be applied to waveform data observed by other spacecraft, such as the Van Allen probes, THEMIS spacecraft, MMS spacecraft by replacing the data load routines.

Method
ISEE_Wave provides an end-to-end analysis environment for plasma wave data. All functions of ISEE_Wave are provided in an integrated GUI program in IDL/SPEDAS. Without knowledge of IDL/SPEDAS commands, users can analyze waveform data obtained through the waveform capture/onboard frequency analyzer (WFC/OFA) , which is a sub-component of plasma wave experiment (PWE) ) aboard Arase. Figure 1 illustrates an overview of how ISEE_Wave processes plasma wave and related ancillary data on a user's computer. ISEE_Wave is a plug-in tool for IDL/SPEDAS and works in combination with the ERG plug-in provided by the ERG Science Center (Miyoshi et al. 2018c). ISEE_ Wave uses six types of Level-2 data products of Arase provided by the ERG Science Center: spacecraft orbit data , PWE/OFA-SPEC data (Kasahara et al. 2018b), PWE/WFC ancillary data, PWE/WFC waveform data in the Spinning satellite Geometry Axis (SGA) coordinates (Kasahara et al. 2020a, b), spacecraft attitude data, and spin-averaged ambient magnetic field data in the Despun Sun sector Inertia (DSI) coordinates obtained by the magnetic field experiment (MGF) (Matsuoka et al. 2018a, b). The first three products are used to visualize an overview of the plasma wave power spectra and the history of waveform observations, while the last three products are used to calculate the detailed wave properties. Because we use waveform data in the SGA coordinate system, we transform them to the DSI coordinate system using spacecraft attitude data. To obtain the wave normal angle, wave polarization, and Poynting vector angle with respect to the ambient geomagnetic field lines, we further transform the data to the geomagnetic field (MAG) coordinate system using DC magnetic field data measured by MGF. All of those data are automatically downloaded from the ERG Science Center.
The PWE aboard Arase measures three magnetic field components and two electric field components in the inner magnetosphere ). The OFA measures electric and magnetic field wave power spectra and 2 × 2 electric and 3 × 3 magnetic field spectral matrices for the frequency range of several tens of Hz to 20 kHz . Their spectra are continuously measured and we can thus monitor plasma wave activity and wave properties (e.g., polarization, wave normal angle, and Poynting vector angle) using data obtained by OFA. However, OFA data are not suitable for analyzing the wave properties of short duration events, such as discrete chorus elements, because the measurement cadence is much longer, 1 and 8 s for wave power spectra and spectral matrices, respectively. In contrast, WFC measures waveforms of two electric and three magnetic field components with a sampling frequency of 65.536 kHz. As reported by Matsuda et al. (2018), three modes are available in WFC: the chorus burst mode, the electromagnetic ion cyclotron (EMIC) burst mode, and the software-type wave-particle interaction analyzer (SWPIA) mode. The chorus burst mode measures two electric and three magnetic field waveforms with a sampling frequency of 65.536 kHz. The chorus burst mode intermittently observes continuous waveforms of a duration of 8-200 s, and the length of the continuous waveforms can be changed through an onboard command. During the rest period, the observed waveforms are compressed by the subband coding algorithm using the quadrature mirror filter (QMF) tree filter bank. This mode is designed for the measurement of whistler-mode plasma waves (whistler-mode chorus, plasmaspheric hiss, and electron cyclotron harmonic waves), while the EMIC burst mode is designed for measurement of EMIC and magnetosonic waves. The EMIC burst mode measures downsampled (1024 samples/s) waveforms using an onboard cascaded decimation filter. The SWPIA mode is a special mode to obtain continuous 65.536 kHz sampling waveforms without onboard data compression. The quality of data obtained by the SWPIA mode is essentially the same as that of data obtained by the chorus burst mode. Note that these three modes are exclusively operated.
ISEE_Wave is designed for analyzing the data of these three modes. In Sections "Functions of ISEE Wave" and "Scientific applications", we present an analysis of 65.536 kHz sampling waveforms obtained by the chorus burst mode, as the waveform data observed by the EMIC burst mode are not currently publicly available. We can analyze the wave power spectra, polarization, and wave normal angle with a high time and frequency resolutions by calculating magnetic spectral matrices from the observed waveforms. Note that if we use only magnetic field spectral matrices, the calculated wave normal angle has an ambiguity in the sign of polarity because the correlation between electric and magnetic fields is not calculated. We can unambiguously determine the direction of the wave propagation vector (k-vector) by calculating the Poynting vector where N denotes the number of spectral matrices averaged over time. B (n) x , B (n) y and B (n) z denote the three orthogonal components of the n-th magnetic field Fourier spectra in the MAG coordinate system for the obtained waveform by PWE/WFC.
A can be decomposed by SVD as follows: where U, W, and V T denote a 6 × 3 matrix, a 3 × 3 of three nonnegative singular values, and a 3 × 3 matrix with orthonormal rows, respectively. As reported by Santolík et al. (2003), the wave normal polar angle θ k , polarization ellipse L p and planarity of polarization F can be calculated as follows: where w 1 , w 2 , and w 3 denote the ascending series of singular values W, and v 1 , v 2 , and v 3 denote the corresponding order of the elements of matrix V T . |L p | = 0 and 1 indicate linear polarization and circular polarization, respectively. The sense of polarization can be determined from the sign of a 01 , i.e., the positive and negative signs indicate that the wave is right-hand and left-hand polarized, respectively (Santolík et al. 2002). The planarity of polarization F indicates the validity of the single planewave assumption. As demonstrated by Santolík et al. (2003), the SVD technique provides reasonable results when the single plane wave approximation is applicable.
In that case, F is near unity; otherwise, F approaches zero. It should be noted that θ k has an ambiguity in the sign of polarity because the correlation between electric a 00 a 01 a 02 a 10 a 11 a 12 a 20 a 21 a 22 a 30 a 31 a 32 a 40 a 41 a 42 a 50 a 51 a 52 and magnetic field is not calculated. To determine the polarity of k-vector, we calculate the Poynting vector angle using electric and magnetic field complex spectra. The Poynting vector angle θ P can be derived as θ P = arccos (S 3 / S 1 2 + S 2 2 + S 3 2 ) . θ P = 0 • and 180 • indicate parallel and anti-parallel propagation along the field line, respectively. S 1 , S 2 , and S 3 denote the three components parallel to the Poynting vector S as follows: where Ê x , Ê y , and Ê z denote the three orthogonal components of the electric field Fourier spectra in the MAG coordinate system (Santolík et al. 2010). Because PWE/ WFC measures only two components of the electric field in the spin plane of Arase, we estimate the spin axis component Ê z under the assumption that E · B = 0 . Here, E and B are the vectors of complex amplitudes of electric and magnetic fields.
We employ the LA_SVD procedure to perform SVD, which is implemented in the Linear Algebra PACKage (LAPACK) in IDL. Detailed descriptions of the LA_SVD procedure can be found on the website of L3 Harris Geospatial (https:// www. l3har risge ospat ial. com/ docs/ la_ svd. html). If the singular value decomposition does not converge, ISEE_Wave automatically stops wave property calculations to prevent the user from obtaining a misleading result.
The data load routines are implemented separately from the core routines of the ISEE_Wave. Therefore, users can easily replace them with additional IDL procedure files (.pro) for waveform data from other satellites/instruments as well as ULF/ELF waveform data from EFD/MGF instruments aboard Arase. We will put a button on GUI to switch data load routines in a future update.

Functions of ISEE_Wave
When ISEE_Wave is launched, two panels appear. The OFA panel displays electric and magnetic field spectra observed by the PWE/OFA instrument aboard Arase (Fig. 2). OFA continuously measures electric and magnetic field auto-spectra below 20 kHz in the nominal mode. The time resolution of wave power spectra observed by OFA is 1 s in the nominal mode; therefore, the observed spectra are useful for obtaining the entire VLF/ELF plasma wave activity . Furthermore, the history of waveform measurement by PWE/WFC is displayed in the OFA panel. Asterisks in the 65k and WP panels in Fig. 2 present the timings when the chorus burst mode and SWPIA mode, respectively, were invoked onboard. Users can visualize the OFA spectra and waveform measurement history for user-specified time interval, which can be chosen using the top two text boxes and five buttons on the OFA panel.
The WFC panel provides GUI functions for advanced waveform analysis and displays the analysis results. When users press the Get Time Interval from OFA button (Fig. 3a), they can select a time-interval for waveform analysis by mouse gestures in the OFA panel. When the Start Calculation button is pressed, ISEE_Wave starts waveform analysis for data in a specified time period. After completing the waveform analysis, the results are displayed on the left side of the WFC panel. From top to bottom, the electric field power spectra, magnetic field power spectra, wave normal angle, polarization, planarity, and Poynting vector angle are displayed. Details of the GUI functions of the WFC panel are provided in Sections "Parameters of spectral matrix calculation" to "Output".

Parameters of spectral matrix calculation
The type of fast Fourier transform (FFT) window (Hanning or Hamming window), size of the FFT window, overlap length, and number of spectral matrices for averaging ( N average ) can be specified at the top of the WFC panel (Fig. 3b). Users should specify the appropriate analysis parameters according to the wave frequency range of the target and the purpose of analysis. Fig. 4 presents the definitions and the relationship between these parameters. If Stride and Window length are equal, the waveforms are separated by the length of Window length and transformed to Fourier spectra by the STFT without overlap (Fig. 4a). When N average = 3 , three consecutive spectral matrices are averaged to compute the ensemble-averaged spectral matrices. If Stride is set to half of the Window length, then the STFT is performed for time windows that overlap for half of them (Fig. 4b).
The time resolution of the result is twice the result without overlapping. Note that the spectral matrices calculated by overlapping STFT are highly correlated with neighboring spectral matrices; the dynamic range of the planarity therefore appears to be pseudo-enhanced. The spectral matrix based on the original definition should be obtained from the STFT without overlapping. , where δf denotes the frequency resolution of the calculated Fourier spectra. The overlap length and N average are the same, (i.e., 1024 points overlapping and three averages). As illustrated in the figure, the frequency resolution is improved in Fig. 5b, and the fine structures of whistler-mode chorus waves can be viewed more clearly. Fig. 6 presents the results for different N average values, i.e., 3 and 10, presented in Figs. 6a and b, respectively. The FFT window size and the overlap length are the same, i.e., 4096 points and 1024 points, respectively. By averaging the spectral matrices, scatter of the resultant parameters is suppressed, and the results are smoothed. As displayed in the Planarity panel, the dynamic range of the results is improved. In other words, the signalto-noise ratio of the spectral matrices is improved by the averaging. Therefore, the significance of the wave normal angle and polarization analysis results are improved by increasing N average . However, it is important to note that increasing N average reduces the time resolution.

Support lines
ISEE_wave can overlay support lines on plot panels to compare the wave frequency and electron cyclotron frequency. ISEE_Wave calculates local electron and ion cyclotron frequencies from DC magnetic field measurement data obtained by MGF aboard Arase (Matsuoka et al. 2018b). Users can enable or disable the drawing of each support line by editing the Support lines table displayed in Fig. 3c. Moreover, the line styles and colors can be changed in the same way. The selected support lines are overlayed on the wave property analysis results. The local electron cyclotron frequency ( f c ), two related frequencies ( 0.5f c and 0.1f c ), and three ion cyclotron frequencies ( fc H , fc He and fc O ) are defined by default, where fc H , fc He and fc O denote the local proton cyclotron frequency, local helium ion cyclotron frequency, and local oxygen ion cyclotron frequency, respectively. Users can define new support lines and delete the existing support line definitions by clicking the Add New Line and Delete Selected Lines buttons, respectively.

Orbital information
Users can add text labels for the magnetic local time (MLT), magnetic latitude (MLAT), altitude, and McIlwain-L value of Arase. By placing a check mark in each box presented in Fig. 3d, the corresponding orbital information is added below the plot. This orbital information is obtained from the Level-2 orbit data provided by the ERG Science Center ). It should be noted that the MLT, MLAT and McIlwain-L value provided from the Level-2 orbit data are calculated using the thirteenth generation of International Geomagnetic Reference Field (IGRF-13) model (Alken et al. 2021).

Y-and Z-axes settings
The Y-and Z-axes labels and their ranges can be changed by editing fields and checkboxes presented in Fig. 3e. By unchecking the Mask checkboxes, the original plots will be displayed instead of the masked results (for more details, see Section "Mask"). By unchecking the Plot checkboxes, the corresponding plots will not be displayed.

Mask
The wave analysis results can be masked by setting one or more thresholds for wave properties values. Users can set threshold values in the Mask tab of the WFC panel (Fig. 3f ). Fig. 7 presents the results for three different thresholds of the magnetic field wave spectral intensity. As illustrated in Fig. 7a (data less than 10 −3 pT 2 /Hz are masked), 7b (data less than 10 −1 pT 2 /Hz are masked), and 7c (data less than 10 0 pT 2 /Hz are masked), users can mask the noise floor of the instrument and weak wave events. This function is useful for extracting target wave events from the original wave spectra.

Output
The wave analysis results can be saved as image files, such as encapsuled post script (EPS) files and/or portable network graphics (PNG) files, and a tplot save file (Fig. 3g). By saving the results as a tplot save file, users can restore the digital values of the results using the tplot_restore procedure implemented in IDL/SPEDAS and thereby reuse the restored results for further analysis. This function is also useful for sharing results with other users. calculated with the IGRF-13 model was 5.9. These orbital parameters are displayed at the bottom of Fig. 8a (see, Sect. "Orbital information"). The magenta dashed lines represent half of the local electron cyclotron frequencies ( 0.5f c ) calculated from the DC magnetic field measurement by MGF aboard Arase. These support lines were plotted by the function of ISEE_Wave (see, Sect. "Support lines"). As illustrated in the figure, discrete rising tone elements are clearly observed in this period. There is a gap around 0.5f c , suggesting that these are the typical lower-band and upper-band whistler-mode chorus waves in the terrestrial inner magnetosphere.

Scientific applications
The Wave normal angle panel in Fig. 8a indicates that the wave normal angles of these whistler-mode chorus elements were oblique (20-30 • ) to the geomagnetic field line, while the Polarization panel indicates that the waves were almost purely right-hand polarized. The Planarity panel indicates that the planarity of these waves was Fig. 4 The definitions and the relationship between the parameters of the short-time Fourier transform (window length, stride, and N average ) for (a) stride = window length and (b) stride = window length ×0.5 approximately 0.9; therefore, the approximation of the single plane wave approximation was satisfied for this event. The last panel Poynting vector angle indicates that the Poynting vector angles of these waves were almost 0 • , suggesting northward propagation. For the last four panels in Fig. 8a, we applied masking under the condition of a magnetic field intensity of less than 10 −1 pT 2 /Hz . This masking was also performed using the function of ISEE_ Wave (see, Sect. "Mask").
The source region of a typical whistler-mode chorus wave is thought to be at the geomagnetic equator (Nagano et al. 1996;LeDocq et al. 1998;Taubenschuss et al. 2016). Therefore, both northward and southward propagating waves should typically be observed around a b   Fig. 8b, we applied masking under the condition of a magnetic field intensity of less than 10 −2 pT 2 /Hz. As illustrated in Fig. 8b, clear lightning whistler waves were observed in this period. From the last four panels in Fig. 8b, we observed the following wave properties: • the waves were propagating with large wave angle (approximately 45 • ), • the polarization of the waves was almost purely righthanded, • the planarity of the waves was over 0.9; the single plane wave assumption well held for this event, • the Poynting vector angles were almost 180 • ; therefore, the waves were propagating from high latitude region to the equator.
Lightning whistler waves are whistler-mode (right-hand polarized) waves excited by lightning discharges between the top and middle atmosphere, and propagate along geomagnetic field lines. The wave properties obtained by ISEE_Wave were consistent with the typical properties of lightning whistlers observed in the terrestrial plasmasphere. a b c Fig. 7 Examples of results for three different masking thresholds of magnetic field spectral intensity. a Masked where the magnetic field spectral intensity was less than 10 −3 pT 2 /Hz , b masked where magnetic field spectral intensity was less than 10 −1 pT 2 /Hz and c masked where magnetic field spectral intensity was less than 10 0 pT 2 /Hz The computation time for analyzing 5 s waveform data of the event shown in Fig. 8a and 3 s waveform data of the event shown in Fig. 8b were approximately 15 s and 17 s, respectively, using IDL 8.6.1 installed on a computer (Intel Core i9-10920X processor, 64 GB memory, and 64-bit Microsoft Windows 10 operating system). Time for data downloading from the data archive repository is not included in this computation time. It should be noted that we used a 2048 points Hanning window with 512 points overlapping for analyzing the event shown in Fig. 8b, while we used a 2048 points Hanning window with 1024 points overlapping for analyzing the event shown in Fig. 8a. Therefore, it takes longer time for analyzing the event shown in Fig. 8b although the duration of specified time interval is shorter than the event shown in Fig. 8a.

Summary
In this study, we have developed an interactive plasma wave analysis tool (ISEE_Wave) for visualizing advanced wave properties, such as electric and magnetic field wave power spectra, wave normal angles, polarization ellipses, planarity and Poynting vector angles. ISEE_Wave has been implemented as a part of the ERG plug-in for the IDL/ SPEDAS tool, and users can visualize these wave properties using GUIs in the IDL without using complicated commands. The internal processing of wave analysis is based on the SVD technique developed by Santolík et al. (2003). Derivation of spectral matrices and the transformation to MAG coordinates are implemented in ISEE_Wave. Several parameters for the STFT are extensively adjustable through the GUI of ISEE_Wave to allow users to perform appropriate frequency analysis on the target wave phenomena. Several examples were provided to demonstrate that we successfully visualized the wave properties of whistlermode chorus waves and those of lightning whistler waves observed by PWE/WFC with high time and frequency resolutions. ISEE_Wave also provides functions for overlaying support lines and manipulating various plot properties. The resultant plots can also be partially masked using a function of ISEE_Wave to clarify wave properties that the user focuses on. Users can export the wave property analysis result to image files and a tplot save file. The exported tplot save file allows users to restore the results in a commandline session of IDL/SPEDAS, which can then be used as an input for further analysis. ISEE_Wave can also be applied to waveform data obtained by other satellites, such as Van