1. Introduction
The China Seismo Electromagnetic Satellite (CSES) mission is a constellation of Low-Earth-Orbit (LEO) satellites devoted to the study of the ionospheric environment and its interaction with the Earth atmosphere and lithosphere, as well as the magnetosphere and the interplanetary plasma. The CSES mission aims to enhance our knowledge of the plasma and of the electromagnetic field dynamics in the ionosphere. The main scientific objective of the CSES mission is the investigation of ionospheric signatures of seismic activity (either electromagnetic perturbations, e.g., [
1,
2,
3] or plasma perturbations [
4]), to advance our understanding of the lithosphere–atmosphere–ionosphere coupling (LAIC, [
5]). Complementary to its primary objective is the investigation of ionospheric variability induced by solar–terrestrial interactions and its coupling with the magnetosphere and the interplanetary plasma (e.g., the study of geomagnetic storms and substorms e.g., [
6,
7,
8], of auroral variability [
9], and of the climatology of plasma bubbles [
10,
11], to name a few), that is, the research area known as space weather.
The first spacecraft, CSES-01 [
12], was launched on February 2018 and since then has provided continuous measurements of nine scientific payloads. Among those, the High Precision Magnetometer (HPM, a fluxgate magnetometer, [
13]) and the Search Coil Magnetometer (SCM, [
14]) take measurements of the magnetic field (from DC up to 20 kHz), the Electric Field Detector (EFD, [
15]) measures the electric field by means of the double-probe technique (from DC up to 3.5 MHz), the Langmuir Probe (LAP, [
16]) measures electron plasma density and temperature (with a cadence of 3 s), and the Plasma Analyzer Package (PAP [
17]) measures the density of ions (H+, He+, O+), O+ temperature and drift velocities, and relative density fluctuations with a cadence of 1 s. For energetic particles, the High Energy Particle Package (HEPP, [
18]) measures the energy spectrum, flux, and pitch-angle distribution of energetic protons and electrons and soft X-ray emissions from the Sun. The last instrument onboard CSES-01 is the High Energy Particle Detector (HEPD-01) [
19], which measures the integrated rate (counts per second) and the flux of electrons (from 3 to 100 MeV) and protons (from 30 to 200 MeV) as a function of energy and pitch angle.
To date, observations employing the suite of instruments just described have led to several studies on space weather dynamics, for instance, characterization of the variability and properties of the field aligned currents at auroral latitudes (via EFD measurements, e.g., [
20,
21]), climatological studies of plasma depletions (using LAP and EFD observations [
11]), and assessments of geomagnetic storm effects (through HPM and HEPD measurements [
7]). With regards to its primary scientific objective, much effort has been invested in studying the ionospheric response to seismic activity employing multipayload in situ measurements from CSES-01, including detection of anomalous signals in the vicinity of earthquakes (EQs) concurrently [
22] and before their occurrence, e.g., [
23]. Such studies provide invaluable in situ information that complements investigations of coseismic and preseismic signals derived from remote sensing observations (measuring, e.g., the vertical Total Electron Content, vTEC, [
24,
25]), which have a lower-frequency resolution than that of CSES instruments.
The payloads just described measure different physical quantities (electromagnetic fields in different frequency bands, density, temperature and velocity of ionospheric-plasma ions and electrons, particles fluxes, etc.) using different timing, sampling frequency, and formats for the measured physical quantities. Moreover, some of those data require a postprocessing for correcting known issues or reformatting (as we will show, e.g., in
Section 3.1), so as to obtain a final product adequate for scientific investigation. For instance, the temporal misalignment observed between EFD and SCM [
26,
27] needs to be corrected before conducting any scientific investigation that exploits data from both instruments. Indeed, if not accounted for, such misalignment can severely affect the study of electromagnetic wave phenomena such as, e.g., whistler events generated by lightning (see, e.g., [
28]) or Pc1 waves at the polar cap associated with sub-auroral proton precipitation [
29]. Data preprocessing and correction is fundamental also for the search of concurrent and, eventually, preceding signals of earthquakes (see, e.g.,
Section 3.5).
Scientists usually deal with these problems by themselves, by writing personalized routines for the processing of the data that solve various issues encountered, often without having a comprehensive knowledge of the working of the instrument and/or the data-processing pipeline. Besides severely hindering colleagues’ ability to replicate their scientific results, these issues also put the scientist at risk of data misuse and significantly complicate the processes of cross-validation and scientific collaboration. These considerations make evident the need for a unified framework that provides an interface between the scientist and CSES data by retrieving, reading, and processing the data of interest (also applying data correction, if needed) and delivering them to the user in a clear, unified, and harmonized manner. Here, we present CSESpy, a new Python package that we developed with the aim of providing such a framework. CSESpy is designed to be highly flexible. Beyond being simply a modern interface to CSES data, CSESpy also provides higher-level data-analysis and -visualization tools, and methods to combine and exploit concurrent measurements from different payloads, so to allow multipayload studies and maximize the scientific outcome.
Indeed, CSESpy adds to a growing family of tools designed to support scientific research. An excellent example in the context of heliophysics is pySPEDAS [
30], a Python implementation of the Space Physics Environment Data Analysis System (SPEDAS) provided by NASA. Among other things, pySPEDAS can retrieve online scientific data from more than thirty space-based and ground-based missions, and perform coordinate transforms, interpolation, and unit conversions. For ionospheric studies, the VirES for Swarm platform provides an ecosystem of libraries and tools for the retrieval, visualization, and analysis of scientific data products from the Swarm mission [
31]. Another paramount example is SpacePy, a Python package that aims to ease data analysis, and modeling and visualization of scientific data relevant to space physics studies [
32].
The rest of this work is structured as follows. In
Section 2, we describe the L2 CSES data and describe the CSESpy package. In
Section 3, we give examples of application of CSESpy to the loading, correction, and visualization of CSES data, also with an application example with Swarm data.
Section 4 is devoted to discussion and summary.
3. Results
In this section, we highlight the capabilities of CSESpy and present a few examples of applications in realistic scenarios of a usual research workflow.
3.1. Algorithm Correction for Electric Field Waveforms
An invaluable feature of CSESpy is the postprocessing of EFD-01 data to address known errors that, to date, are found in the public EFD-01 L2 data. Such issues arise from the processing pipeline that produces L2 data from Level 0 (L0) ones. To our knowledge, this is the first time that such errors have been reported. EFD-01 waveforms are affected by the following issues:
Presence of systematic temporal gaps in the waveforms;
Discretization errors in the timing of the data;
Presence of systematic jumps in the waveforms between the data packets.
The presence of gaps was already reported in
Section 2.3. The last issue is the most critical because it greatly affects data analysis. A correction procedure has been devised and is currently implemented in CSESpy (the same correction procedure is also available as an independent script at
https://github.com/EmanuelePapini/EFDL2Limadou [
38], accessed on 2 October 2025) to resolve or mitigate the above issues, which we now describe. Such a procedure requires the issues to be addressed sequentially since they are dependent on each other.
3.1.1. Correction of Temporal Gaps
Temporal gaps of length of 2.048 s are always found in EFD-01 data and in each semi-orbit, both in waveforms and PSDs. All gaps are usually separated by 245.76 s: they appear because of diagnostic operations of EFD, which undergoes periodic calibration of the bias current [
15]. During calibration (which lasts for roughly two seconds), EFD-01 does not take measurements. As a result, data gaps appear with the length of five ELF data packets (each being 0.4096 s long) and two ULF data packets (each being 2.048 s long).
Figure 2 shows an example of such gaps. After each gap, waveforms in the ELF band always begin with a spike that lasts for approximately two seconds, an instrumental artifact of the calibration procedure. Fortunately, identifying the gaps is rather easy, since it simply requires finding the times at which the temporal differences in the time variable (i.e.,
VERSE_TIME) exceed the length of a data packet in the respective band. Once the gaps have been found, they are filled with any constant value (including NaNs), or via linear or any custom interpolation of the surrounding data. Concurrently, a boolean mask that highlights the position of the gaps is created and added to the
pandas.DataFrame. Moreover, an interpolation procedure is used to remove the spike (in the ELF data), while concurrently flagging the interval after the gap from which the spike has been removed, so as to mark them as not trustworthy data.
3.1.2. Correction of Timing Errors
The discretization error in the data timing arises from the format of the
VERSE_TIME variable used in the HDF5 files (see
Table 4). Indeed, such a variable is defined as an integer and denotes the time in milliseconds from midnight of 1 January 2009 (UTC time). This definition impacts the correct timing of ELF data packets (and also VLF and HF, which we do not discuss here). As already described in
Section 2.3, waveforms in HDF5 files are organized as matrices of shape [N, 2048] and [N, 256] for the ELF and the ULF bands, respectively. Each row corresponds to a data packet. The
VERSE_TIME variable (of shape N) contains the time of measurements of the first point of each packet. The sampling frequency in the ELF band is 5 kHz, corresponding to a sampling time of 0.2 milliseconds. Therefore, the time duration of an ELF packet is 409.6 milliseconds, which is not a multiple integer of one millisecond, thus producing a discretization error. To overcome this issue, we take as reference (for any L2 EFD-01 file) the first value of the
VERSE_TIME variable and then calculate the correct timing using the sampling time of EFD-01 in the desired band, finally converting the timing to a floating variable (or to, for example, an integer variable in microseconds). Since this correction requires that no temporal gaps are present in the data (see
Section 3.1.1), they must be removed before such correction is applied. This is done automatically (by the
CSES.load_CSES method) when loading the data.
3.1.3. Correction of Data Jumps
Figure 3, reporting a sample of both ULF and ELF data, clearly shows the presence of regular jumps in the electric field waveforms. These jumps are always found between all ULF packets (as can be seen in the left panel of
Figure 3, where jumps are located at the beginning of each packet) with an average amplitude of
, and between ELF packets only every two or three packets (see right panel), with an amplitude of roughly
. Moreover, jumps are not present in the amplitude of the electric field, nor are they present in Level 1 data, where waveforms are given in the spacecraft reference frame. The above facts, together with the observation that these jumps are exactly located between the last point of a data packet and the first one of the next, brought us to conclude that they are due to an error introduced in the rotation of the electric field vector from the spacecraft reference frame to the WGS84 frame [
39].
We hypothesized that, for ULF L2 data, the electric field waveforms are rotated packet by packet, i.e., using the same rotation matrix for a data packet and eventually updating it when processing the next packet. For what concerns ELF data, the rotation matrix is updated every two or three packets, depending on whether the rotation matrix provided by spacecraft telemetry has been updated (we recall that rotation quaternions in CSES-01 are provided with a cadence of 1 s, i.e., a time slightly longer than the length of two ELF data packets). Such a discretization error in the update of the rotation matrix creates a rotational drift in each packet and causes the observed jumps. Since it is a rotation error, the jump is present only in the vector components of the electric field, while it is absent in its amplitude.
The presence of systematic jumps is the most critical issue because it introduces a systematic error that can severely affect any scientific analysis. To compensate for rotational drift, we devised the following procedure, which is implemented in CSESpy. For each jump, we calculate the rotation matrix
needed to align the electric field vector of the last data point of the packet before the
jth jump with the electric field vector of the first data point of the next packet. The rotational drift is then removed by applying a spherical linear interpolation (SLERP) from the identity matrix (i.e., no rotation) to the matrix
over the whole packet, in the case of the ULF waveforms, or over the packets contained between two jumps in the case of the ELF waveforms. By denoting with
the time of the first data point of the first packet after the
jth
jump (or the first point of the data) and with
the time of the last point before the
jth jump (i.e., M = 256 for ULF data and 4096 or 6144 for ELF data), the electric field without rotational drift is then given by
where
is the vector electric field of the
ith data point between the
jth
and the
jth jump and where
is the rotation matrix at the time
as obtained from a SLERP interpolation from the identity matrix
(at
) to the rotation matrix
(at
). In
Figure 4, we report an example of the result of our correction of rotational drift.
Although such a procedure certainly removes the jumps, it does not ensure the correct rotation of the electric field, in the first instance because SLERP is a linear interpolation, which implicitly assumes a circular orbit for the spacecraft. More importantly, it is not ensured that the rotation matrix given by spacecraft telemetry (through attitude quaternions) corresponds to the time when the first data point of one packet was measured. This introduces potential systematic errors in the estimation of the rotational drift. To assess the amplitude of such errors, we calculated the distribution of the absolute value of the angles (
) between packets
(where
k denotes the
kth packet), the same distribution after the correction of rotational drift, and the distribution of the angle separation between two consecutive vector electric field measurements inside the packets (i.e., excluding the angles between packets). In
Figure 5, we report such distributions for the ELF data gathered in orbit 175331.
It is evident that not all angles between data packets contain jumps, since the distribution of rotational jumps is bimodal and contains a population of angles that follows the same distribution of the angle separation between any two consecutive data points. From the figure, we conclude that the maximum error introduced in the electric field rotation by the EFD-01 L0 to L2 data-processing pipeline is around 200 arcseconds (equal to ∼0.05°) (This is consistent with a rough estimate of the rotational drift of obtained by dividing the rotation of a full orbit (i.e., 360°) by the orbital period of CSES-01 ( s) and also taking into account that the update rate of the rotation quaternions is 1 s), which corresponds to a pointing error of 200 m at a distance of 200 km from the spacecraft (for the purpose of geophysical studies aiming at identifying sources of electromagnetic activity, e.g., earthquakes and lightning, such pointing error is negligible). The right panel of the same figure shows the distribution of the angles between the packets after the rotational drift has been removed from the data. This plot clearly shows a bimodal distribution with the distribution of the corrected jumps now peaking at around 0.04 arcseconds. Assuming that a perfect rotation would make the distribution of angles unimodal, we can assert that the residual error in the orientation of the electric field vector after our correction procedure ranges from about 10 to 70 arcseconds (i.e., a pointing error diminished to less than half), with 60 arcseconds being the standard deviation of the distribution of the angle separations, assuming that they follow a lognormal distribution.
As an example of a scientific analysis that is greatly impacted by rotational-drift jumps, in the top panel of
Figure 6, we report the PSD of the Short-Time Fourier Transform (STFT) [
40], as calculated from the waveform
in the ELF band by employing non-overlapping windows of 0.8192 s (4096 points) on the ELF data and using the Hann function. A pattern of vertical comb-like stripes is clearly visible, which is caused by the presence of the rotational jumps (the black vertical stripe at about 17:59:08 is due instead to the presence of a gap in the data that has been filled with linear interpolation). In the bottom panel of the same figure, we show the PSD calculated from
. The comb-like pattern has now disappeared, and it is even possible to appreciate the presence of energetic features at around 20 Hz (highlighted by a horizontal red-dashed line), compatible with the occurrence of Schumann resonances.
3.2. Example 1: Orbit-Type Labeling
A common step in the analysis of spacecraft measurements is data selection based on orbital position and/or time. Especially when dealing with large and complex datasets, such as that of CSES-01, this task can be cumbersome and time consuming. CSESpy makes it easy to conduct these tasks, thanks to the CSES_database class. This class also allows one to perform rather complex operations (also exploiting the features of pandas.DataFrames). In this context, we now show an application that can considerably boost the scientific analysis of CSES data: the labeling of orbit types.
In
Figure 7, we report all CSES-01 semi-orbits from January to April 2019. It is evident that semi-orbits do not uniformly cover the globe. Instead, they show a specific recurrence pattern; that is, CSES-01 always revisits roughly the same latitudes and longitudes (every 5 days).
The analysis of orbits revisiting the same geographical position is obviously important for Earth science studies; therefore, data selection based on the orbital pattern can be a useful feature. For instance, one could define orbit-type templates to provide the average measurement of a given ionospheric property (e.g., average electron density) to be compared to the ionospheric response to any specific phenomenon, in order to extract weak signals from the ionospheric background [
22,
41].
In the following, we define all the orbits covering the same geographical positions as belonging to the same “orbit type”. We can use CSESpy to label semi-orbits according to their type. The number of different orbit types is 152, with 76 ascending and 76 descending. We designed an algorithm for labeling ascending (descending) semi-orbit types with odd (even) integers increasing with longitude (for its Python implementation, see Listing A3 of
Appendix A.3). The procedure is as follows. Firstly, we divide the CSES orbit database into dayside and nightside semi-orbits. For each semi-orbit, we then take its latitudinal point closest to the equator and apply a clustering algorithm to the associated longitudes, so as to identify and label the average longitude at the equator of each orbit type. The final step consists of labeling all semi-orbits in the database, according to their equatorial longitude. In
Figure 8, we highlight the result of the labeling procedure: In
Table 7 we report a sample of the orbit database, together with the “OrbitType” labels.
The new information about the orbit type can now be exploited directly for data selection using the
CSES class. It is sufficient to instantiate a new
CSES object by specifying in input the new improved orbit database (shown in
Table 7) and then use the
CSES.select_data_to_load() method with the following keyword argument:
to select all available orbits with OrbitType = 89. Data available from all the orbits with same orbit type and for the desired payload can then be loaded by using the
CSES.load_CSES() method.
The example just shown highlights the flexibility of CSESpy and its customization capabilities.
3.3. Example 2: Multipayload Observation of May 2024 Geomagnetic Super Storm
A useful feature of CSESpy is the possibility to perform quicklook plots, showing concurrent multipayload measurements of CSES-01 along one or more semi-orbits. This feature comes in particularly handy for, e.g., data exploration.
On 10 May 2024, one of the most intense geomagnetic storms ever recorded impacted Earth’s environment [
42]. Storm activity persisted for more than two days, until 12 May 2024, characterized by intense geomagnetic activity. As a consequence, among other things, auroras were observed at lower latitudes than usual, new temporary electron and proton radiation belts at an L-shell with
formed which persisted for days, and a long lasting four-belts configuration appeared [
43,
44]. Let us assume we want to investigate the ionospheric dynamics during those days with CSES-01. CSESpy considerably eases the task, both in data selection and visualization operations. For instance, data selection can be easily achieved using selection based on time span. The desired data for payloads of interest can then be loaded and data visualized together in what we call a
quicklook plot. As an example, in
Figure 9 we show two plots reporting concurrent measurements of electric field waveforms (taken by EFD in the ELF band, panel a), electron density (from the 50 mm probe of the LAP instrument, panel b), the fluxes for proton and electrons with energies above 1 MeV (from the HEPP_L instrument, panel c), and PSDs in the VLF band of the magnetic and electric fields (taken by SCM and EFD, panel d and e, respectively). The plots on the left are measurements taken from one orbit of CSES-01 during the storm period, while those on the right are from another orbit of the same orbit type (see
Section 3.2) but belonging to a quiet period, which we use here for comparison.
From the plot, the geomagnetically induced variations observed by the various instruments at latitudes above (below) 50° (−40°) are evident: namely, the correlation of the increase in the electron and proton fluxes (panel c) and the presence of electromagnetic fluctuations in the VLF band (green areas between 2 kHz and 20 kHz in panel d and e of the left plots, characterized by a complex latitudinal and multifrequency pattern). It is interesting to note that at high latitudes in the Southern Hemisphere (where CSES-01 measured high proton and electron fluxes), the orbit of CSES-01 (shown in
Figure 10) nicely overlaps with the proton flux enhancements observed in the same period by PROBA-V/ETP (see Figure 5b of [
43]). In contrast, in the quiet period orbit, almost no electromagnetic activity is detected, only electrostatic activity but with a different pattern. Thanks to CSESpy, the whole procedure to produce such plots (including data retrieval and loading) was completed in less than 10 min. Moreover, such plots can be explored interactively by the user to focus on particular intervals of interest (e.g., at auroral latitudes). This task can be repeated for many other semi-orbits or temporal intervals, thus considerably speeding up the search of data of interest for deeper scientific investigation.
3.4. Example 3: Multipayload Observation of the Ground-Level Enhancement on October 2021
The solar energetic particle (SEP) event of 28 October 2021, triggered by an X1.0-class solar flare and a full-halo CME, led to a ground-level enhancement (GLE) detected on Earth at 16:00 UT [
45,
46]. Observations from the China Seismo Electromagnetic Satellite (CSES-01) and other spacecraft provided comprehensive insights into this event.
CSES-01’s particle detectors, including HEPP-L, HEPP-H, and HEPD-01, recorded increased proton fluxes (50–250 MeV), in agreement with ACE, SOHO/EPHIN, and SOHO/ERNE data, enabling a detailed spectral analysis (300 keV–250 MeV). Stochastic acceleration at the CME-driven shock was identified as a primary mechanism for particle acceleration. NOAA-19 and GOES confirmed enhancements in lower-energy protons (2.5–6.9 MeV).
Geomagnetic perturbations induced by the CME were recorded by CSES-01’s payloads [
46].
Figure 11 is realized using the CSESpy package, selecting only latitudes > 10°. While charged particle fluxes exhibited significant enhancements (panels c, d, and e), the corresponding electromagnetic field variations (panels a and b) remained unaffected for the whole time.
This event underscores the necessity of multipayload observations for understanding solar eruptions and their impact on space weather. The coordinated insights from CSES-01, CSES-02, and other satellites enhance our knowledge of SEP acceleration and transport processes, emphasizing the importance of collaborative space weather monitoring. Therefore, the CSESpy tool can be of great importance in improving multipayload observations.
3.5. Example 4: Frequency Analysis of Anomalies Induced by Earthquakes
Ionospheric coseismic disturbances in the electromagnetic fields were observed almost concurrently with the earthquake (EQ) that occurred in Haiti on 14 August 2021 at 12:29 UTC by both EFD and SCM payloads onboard CSES-01 during orbit 195931 ([
22], hereafter DR23). Indeed, in that orbit CSES-01 was flying close to the EQ epicenter (located at a latitude of 18.417°N and a longitude of 73.480°E), less then six hours prior to the occurrence of the EQ.
DR23 were the first to discover a coseismic signal by exploiting both electric and magnetic field measurements taken in the ELF band by EFD and SCM, respectively. Their analysis involved a multifrequency characterization of the electromagnetic background in the surroundings of the EQ epicenter in order to be able to distinguish possible anomalies caused by the EQ. Three types of background were defined (quiet, disturbed, and stormy) based on the levels of geomagnetic activity. This classification was later extended to distinguish between dayside and nightside orbits [
41]. Thanks to the time frequency characterization of the background, DR23 were then able to identify an anomalous signal in the electric field at around 250 Hz in orbit 195931 close to the EQ epicenter. In this section, we use CSESpy to reproduce their results, with some improvements thanks to the features implemented for the correction of the known issues of EFD L2 data (see
Section 3.1).
The multifrequency characterization of the electric field is based on the calculation of the relative energy
which denotes the energy content at a given frequency
and time
t of a signal
(i.e., a vector component of the electric field) relative to the total energy of the signal in a given interval
. Here,
denotes a band-filtered signal of
around the frequency
. In DR23, band filtering is achieved by means of Fast Iterative Filtering ([
47], FIF). Here, instead, we employ the STFT implemented in CSESpy, which allows for a straightforward calculation of
. Indeed, by performing an STFT of
that employs a non-overlapping window of length
, Equation (
2) reduces to (using Parseval’s theorem)
where the sum is performed over all the Fourier coefficients
obtained from the transform. Following DR23, the search for EQ-induced anomalies entails the following steps:
Identification of the background type corresponding the orbit close to the EQ.
Identification of all available orbits passing in the vicinity of the EQ that belong to the same type of background.
Calculation of for all the selected orbits in a geographic interval close to the EQ.
Calculation of of the EQ orbit.
The first two steps require the classification of the orbits in terms of geomagnetic activity, as done in DR23. This is achieved in CSESpy by customizing the
CSES_database object, similarly to what was done in
Section 3.2 (for further details, see
Appendix B) Orbit identification is then straightforward, as it only requires querying the
CSES_database for all orbits passing close the EQ epicenter. In DR23, a geographic square of
centered at the EQ epicenter was used for orbit selection. We modified that approach (building on what was done in
Section 3.2) and selected the orbits with the same OrbitType and same geomagnetic activity of the orbit of the EQ (i.e., orbit 195391) passing in a latitudinal interval with 6° length and centered at the latitude of the EQ epicenter.
For each selected orbit and latitudinal interval, we then calculated the STFT of the vector components of the electric field measurements taken in the ELF band, using a windows of length
s (i.e., 8192 data points). Before the STFT calculation, a convolutional high-pass filter (also implemented in CSESpy) was applied to the data, so as to remove the energy content at frequencies lower than ∼1.2 Hz. The relative energy was then calculated by means of Equation (
2). The result is a set
, with each
being defined on the same frequency grid and roughly on the same latitudinal grid. Following DR23, an interpolation on a grid of logarithmic spaced frequencies and linearly spaced latitudes is then performed to produce a homogeneous set. Finally, the background
is the average relative energy of the set (for a detailed account of the procedure, we refer the reader to
Appendix B). The relative energy of the EQ orbit is also contained in the set.
In
Figure 12, we report the average relative energy of the background (left) and the relative energy of orbit 195931 of the
component of the electric field (right). Several energetic features can be observed, particularly between 200 and 300 Hz between latitude
and
(corresponding to CSES-01 flying over Haiti’s mainland), roughly where DR23 reports the presence of a coseismic signal. In our case, the signal is enhanced with respect to DR23. This is due to two factors: the first is the rotational-drift correction to the electric field data which, by removing jumps between each packet, effectively removes artifacts present at roughly 1 Hz, which affects the calculation of the relative energy. The other is the application of the high-pass filters to the data, which removes energetic signals at low frequencies, thus effectively boosting the relative energy of high-frequency signals.
The use of the STFT in place of FIF decomposition does not change the results. In fact, we have repeated the analysis by employing FIF [
48] and obtained both qualitative and quantitative agreement.
4. Conclusions
In this work, we introduced CSESpy, a new Python package designed to provide access to Level 2 data available from different scientific payloads of the CSES mission. CSESpy goes beyond being only an interface to the data: it incorporates (among other things)
Procedures for the automatic postprocessing of the data and their translation into a user-friendly format (ready to use for scientific analysis);
Methods for interpolation of data between different scientific payloads. This also allows for the direct calculation of important derived plasma quantities, such as, e.g., the ion (electron) cyclotron and plasma frequency, and their gyroradius, all important quantities for the characterization of ionospheric wave phenomena;
Procedures for the calculation of model-related quantities (e.g., the geomagnetic field from the CHAOS-8 model) along the CSES orbit;
Tools for data selection and visualization (including multipayload plotting capabilities);
Procedures for correction of known artifacts and issues that are present in public L2 data from the CSES-01 database.
In particular, in
Section 3.1 we reported for the first time the presence of artificial systematic jumps in the EFD waveform data, introduced by errors in the rotation of the electric field from the spacecraft reference frame to the Earth-centered WGS84 frame. The correction procedure implemented in CSESpy strongly mitigates this problem, as shown, for instance, in
Figure 6 and in
Section 3.5. This is perhaps one of the most important features of CSESpy since such artifacts, if not properly removed, severely hinder the possibility to conduct any scientific analysis that relies on EFD waveform data.
Thanks to the use of pandas DataFrame as a data structure paradigm, CSESpy is highly flexible, and allows one to perform complex operations with just a few commands. Example applications have shown the ability to perform advanced data selection that can also be customized (see, i.e.,
Section 3.2), data exploration using multipayload plot features for the study of space weather events (see
Section 3.3 and
Section 3.4), and electromagnetic anomaly detection for earthquake studies (see
Section 3.5).
Future Development
Indeed, we have shown that CSESpy is an advanced tool suite which we are confident will become an essential tool for any user interested in exploiting CSES data. At the same time, CSESpy has great potential for improvement, thanks to the widespread use of the Python language. For instance, we foresee potential integration with other similar tools, such as the NASA pySPEDAS package [
30], the ESA VirES for the Swarm Python tool [
31], the spacepy package (designed for online data retrieval, analysis, and plotting for space science applications [
32]), or the geospacelab Python-based library (designed to collect, manage, and visualize geospace data from different sources [
49]), so as to allow interface with data from other space missions, and boost multispacecraft studies. Other improvements may include the integration of CSESpy with TITIpy, a Python package for the calculation and mapping of topside ionosphere RODI, ROTI, and ROTEI indices [
50].
At present, only corrections to EFD L2 data are implemented in CSESpy. Future developments may include the implementation of other corrections, such as, e.g., intercalibration procedures for the electron density measurements from the LAP [
51] and procedures for the automatic syncronization between payloads with known syncronization offsets [
27].
Finally, a fundamental development that would ease the use of CSESpy by the community is the design of a graphical (front end) interface that relieves the user from the burden of using Command Line Interface (CLI).