Next Article in Journal
Modulation of Typical Three-Dimensional Targets on the Echo Waveform Using Analytical Formula
Previous Article in Journal
Spatiotemporal Dynamics and Land Cover Drivers of Herbaceous Aboveground Biomass in the Yellow River Delta from 2001 to 2022
Previous Article in Special Issue
ICESat-2 Performance for Terrain and Canopy Height Retrieval in Complex Mountainous Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

CSESpy: A Unified Framework for Data Analysis of the Payloads on Board the CSES Satellite

by
Emanuele Papini
1,*,
Francesco Maria Follega
2,3,
Roberto Battiston
2,3 and
Mirko Piersanti
1,4,5
1
Istituto di Astrofisica e Planetologia Spaziali—INAF, Via del Fosso del Cavaliere, I-00133 Rome, Italy
2
Department of Physics, University of Trento, Via Sommarive 14, I-38123 Povo, Italy
3
INFN-TIFPA, Via Sommarive 14, I-38123 Povo, Italy
4
Department of Physical ad Chemical Sciences, University of L’Aquila, Via Vetoio, I-67100 L’Aquila, Italy
5
INFN—Sezione di Roma “Tor Vergata”, Via della Ricerca Scientifica, I-00133 Rome, Italy
*
Author to whom correspondence should be addressed.
Remote Sens. 2025, 17(20), 3417; https://doi.org/10.3390/rs17203417
Submission received: 28 July 2025 / Revised: 25 September 2025 / Accepted: 3 October 2025 / Published: 12 October 2025
(This article belongs to the Special Issue Remote Sensing in Geomatics (Second Edition))

Abstract

Highlights

What are the main findings?
  • A new Python package, CSESpy, which provides interfaces and tools for handling data from the ionospheric CSES mission, is introduced
  • CSESpy features advanced analysis and visualization capabilities for multi-instrument measurements within a unified framework.
What is the implication of the main finding?
  • CSESpy enhances researchers’ ability to study complex ionospheric phenomena by simplifying data handling and enabling multi-variable analysis of both space weather and seismic events.
  • CSESpy flexible architecture supports integration with external datasets and embedding in wider software ecosystems.

Abstract

The China Seismo Electromagnetic Satellite (CSES) mission provides in situ measurements of the electromagnetic field, plasma, and charged particles in the topside ionosphere. Each CSES spacecraft carries several different scientific payloads delivering a wealth of information about the ionospheric plasma dynamics and properties, as well as measurement about energetic particles precipitating in the ionosphere. In this work, we introduce CSESpy, a Python package designed to provide an interface to CSES data products, with the aim of easing the pathway for scientists to carry out analyses of CSES data. Beyond simply being an interface to the data, CSESpy aims to provide higher-level analysis and visualization tools, as well as methods for combining concurrent measurements from different instruments, so as to allow multipayload studies in a unified framework. Moreover, CSESpy is designed to be highly flexible as such, it can be extended to interface with datasets from other sources and can be embedded in wider software ecosystems. We highlight some applications, also demonstrating that CSESpy is a powerful visualization tool for investigating complex events involving variations across multiple physical observables.

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.

2. Materials and Methods

In this section, we describe the Level 2 public data of CSES-01. For a complete description of the data, the naming convention, and further details, we refer the reader to the CSES-01 data manual [33].

2.1. CSES Level 2 Public Data

Currently, the CSES mission only has one spacecraft in operation, CSES-01. A second twin spacecraft, CSES-02, was launched on 14 June 2025 and is currently in the commissioning phase. CSES-01 flies in a sun-synchronous orbit at an altitude of ∼500 km, i.e., inside the F2-layer of the ionosphere, with an orbital period of ∼94 min. Its inclination is 97°, with a 02:00 a.m. ascending-node local time and a revisit period of 5 days. Due to operational constraints, scientific instruments are turned off at polar latitudes when the spacecraft is located above/below a geographic latitude of roughly ±65° (in some orbits; the limit extends up to ∼70°). Each orbit is effectively divided into one descending (labeled “0”) and one ascending (labeled as “1”) semi-orbit for the day side and the night side, respectively (in the following, we refer to the orbit number as the semi-orbit number; for example, orbit number 028981 denotes semi-orbit 2898, night side). This distinction is kept in the Level 2 (L2) scientific data of the CSES mission (available at www.leos.ac.cn and https://limadou.ssdc.asi.it/ upon registration, accessed on 2 October 2025). Data are organized into files, each one containing the data from a specific semi-orbit, instrument (EFD, SCM, etc.), and data product type, e.g., waveforms (with the term “waveform”, we refer to the timeseries of the vector components of the electric and the magnetic fields) and power spectral densities (PSDs) in the ULF band for EFD, energy particle flux and spectrum for HEPD. The HDF5 [34] file format is employed. For file naming conventions, as well as for a detailed description of the data organization, see [33]. In Table 1, we report the main payloads of CSES routinely used for scientific investigation and currently implemented in CSESpy (see Section 2.2).
A convention common to all CSES data product files is employed in naming both the files and the variables stored therein. An alphanumeric naming convention is used for the scientific data which uniquely identifies them, but at the same time hides their physical meaning.

2.2. The CSESpy Python Package: Design and Workflow

We now introduce the CSESpy Python package. A prototype of CSESpy was initially created as part of the data pipeline used to identify latitudinal intervals characterized by high levels of electromagnetic activity at auroral latitudes in the orbit of CSES-01 [21]. More specifically, it was a package developed internally for automatically retrieving (from the file system), loading, and processing all L2 data from the EFD and HPM payloads, including correcting for known errors and artifacts eventually present in the data and performing rotations of electric and magnetic fields in the desired reference frame, e.g., the North-East-Center (NEC) frame. CSESpy was later extended to include handling of SCM, LAP, and PAP instruments. Since the end of 2023, the CSESpy capabilities have been further extended to include L2 data from the HEPP and HEPD payloads. We remark that, thanks to the common convention used in the production of L2 data, CSESpy can also be used for the handling of the CSES-02 satellite, launched on 14 June 2025.
CSESpy is organized so that the end user can load, manipulate, and visualize the desired data simply by typing a few commands. All operations are carried through the CSES class, which is the main interface between the data and the user. The main features of CSESpy include
  • Automatic and flexible organization of database filesystem;
  • Loading of a database containing information about CSES orbits;
  • Data search and selection based on payload name, time span, orbit number, or filename string: if a database of the orbits is also available, a search based on longitude and latitude range can also be performed;
  • Loading of multiple semi-orbits and payloads;
  • Concurrent multipayload plotting.
In Figure 1, we sketch a flowchart that highlights a typical CSESpy workflow. Through the CSES.load_CSES method, data are loaded as pandas.Dataframe objects (as items of the CSES.data dictionary). This choice offers several advantages in the organization of the data and allows (among others) a straightforward interpolation and synchronization between data from different payloads. To better support data retrieval and selection, the CSES_database class is also available. It can be instantiated directly by the CSES class (as the CSES.orbitdb attribute) and contains a database of the CSES-01 orbits, together with methods for orbit selection and plotting. Currently, the database must be provided by the user in the form of an HDF5 file.
CSESpy goes beyond being a tool for data loading and visualization. It also aims at incorporating procedures for the automatic postprocessing of L2 public data and to provide the user with additional features, such as
  • Correction for known artifacts/issues in L2 data;
  • Automatic interpolation/resampling in time between different data products;
  • Possibility to save processed/analyzed data to dedicated HDF5 files;
  • Calculation of Altitude Adjusted Corrected Geomagnetic (aacgm) and Quasi-Dipole (QD) coordinates [35,36];
  • Calculation of geomagnetic field from the CHAOS-8 model (available at https://www.spacecenter.dk/files/magnetic-models/CHAOS-8/, accessed on 20 December 2024) [37];
  • Calculation of spectrograms from waveforms (via the short-time Fourier transform).
The purpose of postprocessing operations is two-fold. On the one hand, it allows one to expose CSES-01 data from all payloads to the user, directly translating them to a format that is immediately understandable and usable for science. On the other hand, postprocessing takes care to correct for known issues that may be present in the data (see Section 3.1).

2.3. Loading EFD and SCM Data

We now explain how L2 public data from CSES payloads are loaded in CSESpy. In particular, we will focus on EFD-01 and SCM-01, since data from other payloads (LAP, HPM, PAP) require only little care to be translated into data structures ready for scientific analysis.
According to the CSES-01 data manual [33], L2 public data are stored in HDF5 files, each containing measurements of one data product from one semi-orbit. Files are named according to the convention reported in Table 2.
Each measured observable (e.g., electric field waveforms, electron density, particle fluxes, etc.) is stored in a dataset that is uniquely identified via an alphanumeric naming convention. In Table 3, we highlight the organization of some datasets of the EFD, the SCM, and the LAP instruments.
For EFD and SCM, waveforms (and PSDs as well. we note that, unlike as reported in [33], in the case of EFD data the square root of the PSD is stored instead of the PSD) are organized in two-dimensional arrays, whose rows identify data packets (the length of the packets depends on the data product, e.g., 2048 for EFD-ELF waveforms). For each data product, position and time at which the measurement was taken is also provided (see Table 4). In particular, the temporal information is provided by the VERSE_TIME variable, which gives the time of measurements relative to midnight of 1 January 2009 UTC expressed in milliseconds.
For the LAP, the PAP, and the HPM payloads, position and time variables have the same shape of the scientific data provided. For EFD and SCM, instead, only the position and time of the first point of each data packet is provided. Data gaps are often present in the data, which are not reported. However, such information is implicitly stored in VERSE_TIME.
It is evident, from the above considerations, that preprocessing is needed before performing any kind of analysis. For data products in which the shape of the scientific measurements is the same as that of auxiliary variables, data are directly loaded and transformed into a pandas.DataFrame, eventually filling gaps that may be present in the data. An example of a DataFrame containing LAP data is shown in Table 5. For EFD and SCM waveforms, data are loaded by flattening the shape of the dataset (e.g., from (N, 2048) to (N·2048) for EFD-ELF waveforms) and then reconstructing the position and timing of each datapoint, by using linear interpolation and the knowledge of the sampling frequency of the data product that is being processed. In Table 6, we report a sample of the DataFrame structure of the EFD-ELF waveforms.

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 0.4 mV / m , and between ELF packets only every two or three packets (see right panel), with an amplitude of roughly 0.2 mV / m . 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 R j 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 R j 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 t 0 = 0 the time of the first data point of the first packet after the jth 1 jump (or the first point of the data) and with t M 1 = ( M 1 ) / M 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
E j , derot ( t i ) = SLERP ( t i ; I , R j , 0 , 1 ) · E j ( t i ) ,
where E j ( t i ) is the vector electric field of the ith data point between the jth 1 and the jth jump and where SLERP ( t i ; I , R j , 0 , 1 ) is the rotation matrix at the time t i as obtained from a SLERP interpolation from the identity matrix I (at t = 0 ) to the rotation matrix R j (at t = 1 ). 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
α = arccos E k , N 1 · E k + 1 , 0 | E k , N 1 | | E k + 1 , 0 |
(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 0.07 ° obtained by dividing the rotation of a full orbit (i.e., 360°) by the orbital period of CSES-01 ( 5400 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 E x ( t ) 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 E x , derot . 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:
orbit _ database _ ranges = ( ( OrbitType ,   np . equal , 89 ) , )
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 L = 2 3.5 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
ϵ rel ( ν , t ) = t Δ t / 2 t + Δ t / 2 | f ν ( t ) | 2 d t / t Δ t / 2 t + Δ t / 2 | f ( t ) | 2 d t ,
which denotes the energy content at a given frequency ν and time t of a signal f ( t ) (i.e., a vector component of the electric field) relative to the total energy of the signal in a given interval Δ t . Here, f ν ( t ) denotes a band-filtered signal of f ( t ) 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 ϵ rel . Indeed, by performing an STFT of f ( t ) that employs a non-overlapping window of length Δ t , Equation (2) reduces to (using Parseval’s theorem)
ϵ rel ( ν , t ) = | f ^ ν ( t ) | 2 / ν | f ^ ν ( t ) | 2 ,
where the sum is performed over all the Fourier coefficients f ^ ν ( t ) 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 ϵ rel for all the selected orbits in a geographic interval close to the EQ.
  • Calculation of ϵ rel 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 6 ° × 6 ° 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 Δ t = 1.6384 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 { ϵ rel ( ν , lat ) } , with each ϵ rel 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 ϵ ¯ rel ( ν , lat ) 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 E z component of the electric field (right). Several energetic features can be observed, particularly between 200 and 300 Hz between latitude 18 ° and 20 ° (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).

Author Contributions

Conceptualization, E.P.; methodology, E.P., F.M.F. and R.B.; software, E.P. and F.M.F.; validation, E.P., M.P. and F.M.F.; formal analysis, E.P. and F.M.F.; data curation, E.P., F.M.F. and M.P.; writing—original draft preparation, E.P.; writing—review and editing, E.P., F.M.F., R.B. and M.P.; visualization, E.P. and F.M.F.; supervision, R.B. and M.P. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Italian Space Agency in the framework of the “Accordo Attuativo 2020-32.HH.0 Limadou Scienza+” (CUP F19C20000110005), the ASI-INFN Agreement No. 2014-037-R.0, addendum 2014-037-R-1-2017, and “The role of turbulence in the magnetospheric-ionospheric coupling: Implications for space weather.” Project (INAF Fundamental Research Call 2023; CUP C83C23000770005).

Data Availability Statement

The original data taken by CSES-01 are available at http://www.leos.ac.cn/ (last accessed on 21 March 2025) and at https://limadou.ssdc.asi.it/ (last accessed on 20 March 2025).

Acknowledgments

The authors acknowledge D. Recchiuti and G. D’Angelo for useful discussion on the analysis of coseismic signals of the Haiti earthquake. This work makes use of data from the CSES mission supported by the China National Space Administration (CNSA) and the China National Institute for Natural Hazards (NINH). For this work we used CSESpy (version 1.0.0, commit: fc7f1ad, soon available at https://github.com/EmanuelePapini/csespy/releases/tag/v1.0.0, accessed on 2 October 2025) under python 3.12.

Conflicts of Interest

The authors declare no conflicts of interest.

List of Acronyms

ACEAdvanced Composition Explorer
ASIAgenzia Spaziale Italiana
AACGMAltitude Adjusted Corrected GeoMagnetic
CHAOSCHAMP, Ørsted and SAC-C model of Earth’s magnetic field.
CLICommand Line Interface
CMECoronal Mass Ejection
CNSAChina National Space Administration
CSESChina Seismo Electromagnetic Satellite
DCDirect Current (used in frequency range it means 0 Hz)
ELFExtremely Low Frequency
EFDElectric Field Detector
EPHINElectron Proton Helium INstrument
EQEarthQuake
ERNEEnergetic and Relativistic Nuclei and Electron
ESAEuropean Space Agency
FGMFlux Gate Magnetometer
FIFFast Iterative Filtering
GLEGround-Level Enhancement
GNSSGlobal Navigation Satellite System
GOESGeostationary Operational Environmental Satellites
GROGNSS Radio Occultation Receiver
HDF5Hierarchical Data Format version 5
HEPDHigh Energy Particle Detector
HEPPHigh Energy Particle Package
HPMHigh Precision Magnetometer
HFHigh Frequency
INAFIstituto Nazionale di AstroFisica
INFNIstituto Nazionale di Fisica Nucleare
L0Level 0
L2Level 2
LAIClithosphere-atmosphere-ionosphere coupling
LAPLAngmuir Probe
LEOLow-Earth-Orbit
NASANational Aeronautics and Space Administration
NINHNational Institute for Natural Hazards
NOAANational Oceanic and Atmospheric Administration
PAPPlasma Analyzer Package
PDFProbability Density Function
PROBA-V/EPTProject for On-Board Autonomy—Vegetation/Energetic Particle Telescope
PSDPower Spectral Density
QDQuasi-Dipole
RODIRate Of change of Density Index
ROTEIRate Of change of electron TEmperature Index
ROTIRate Of change of Total electron content Index
SCMSearch Coil Magnetometer
SEPSolar Energetic Particle
SLERPSpherical Linear intERPolation
SoHOSolar and Heliospheric Observatory
SPEDASSpace Physics Environment Data Analysis System
STFTShort Time Fourier Transform
TBBTri-Band Beacon
ULFUltra Low Frequency
UTCCoordinated Universal Time
VLFVery Low Frequency
WGS84World Geodetic System 1984

Appendix A. CSESpy Example Scripts

Appendix A.1. EFD-01 Data Loading and Postprocessing with CSESpy

Postprocessing and correction of EFD-01 L2 data has been implemented in CSESpy to allow seamless data-analysis workflow. Each operation on CSES data employing CSESpy begins by instantiating the class CSES, i.e., with the following commands:
import csespy
datapath= '/CSES01Data/'
css = csespy.CSES(path=datapath)
where datapath denotes the location of CSES data. Data selection and loading of, i.e., a desired orbit (in this case orbit 028981) is achieved with the following commands:
css.select_data_to_load(orbitn='028981')
css.load_CSES(instrument = 'EFD', frequency = 'ELF', fill_missing = 'linear')
where, by means of the last command, CSESpy loads the EFD-ELF waveform data from orbit 028981. Data gaps are filled using linear interpolation and the discretization error in the timing of the data is automatically corrected at loading time. The jumps induced by rotational drift are corrected with a dedicated method
css.derotate_fields(instrument = 'EFD', frequency = 'ELF')
that takes care of finding the jumps and removing them by applying Equation (1) to the waveform data. Although originally implemented to work for EFD data only, the method has been written in a generalized manner, so as to allow in the future the application of the derotation procedure to other data products, if necessary.

Appendix A.2. Multipayload Plotting

Here, we detail the script used to find the desired orbit and to produce the plots reported in Figure 9.
Firstly, we import CSESpy and search the desired orbit
import csespy
from  datetime import datetime
 
#Path to CSES-01 database and to orbit database
datapath = '/CSES01Data/'
odbfile = '/home/papini/CSES01_orbitdb.h5'
#select time interval with highest Kp index (known from the web)
t0 = datetime(2024,5,10,18)
t0 = datetime(2024,5,12,28)
 
#initialize the CSES object and look for desired orbits
css = csespy.CSES(path=datapath,orbit_database_buf = odb)
 
css.orbitdb.search_orbit_timespan((t0,t1))
A list of orbits is returned. We choose one of them. We selected orbit 348201, and load data from some payloads
orbitn='348201' #the other orbit is '337561'
css.select_data_to_load(orbitn='348201')
css.load_CSES(instrument='SCM',frequency='VLF',get_PSD=True)
css.load_CSES(instrument='LAP',frequency='50mm',fill_missing='nan')
css.load_CSES(instrument='EFD',frequency='ELF')
css.load_CSES(instrument='EFD',frequency='VLF',get_PSD=True)
css.load_CSES(instrument='HEP',frequency='P_L',\
   energy_selection_list=[['>1','<=100'],['>1','<=100']])
#Plot data
figax=css.plot_payloads(['EFD_ELF','LAP_50mm',\
['HEPP_L',['Flux_Electrons','Flux_Protons']]],\
spectrograms=[['SCM_VLF','EFD_VLF'],[['By'],['Ex']]],\
psdkwargs={'plot_colorbar':True},xaxis='lat')
 
dat = str(css.aux['EFD_VLF_P'][orbitn]['UTC'])[:10]
figax[1][0].set_title('Quicklook ' + dat + ' orbit: '+orbitn)
figax[1][2].set_ylabel(r'Flux > 1 MeV [$\mathrm{cm^{-2}/s/srad}$]')
#this step is not necessary.
#Is done to have same limits on both plots.
figax[1][2].set_ylim([1.8e-2,3.2e3])
#Saving the figure
figax[0]. savefig('quicklook_'+orbitn+'.png',format='png',dpi=300)
The other orbit (orbit 337561) is chosen by producing a list of all the orbits with same orbit type (see Section 3.2 and Appendix A.3). Once this is done, it is sufficient to change the value of orbitn and repeat the above commands.

Appendix A.3. Orbit-Type Labeling

Here, we report the various scripts used to produce the plots shown in Section 3.2, as well as the script for labeling orbits according to their type. In Listings A1 and A2, we report the scripts for making the plots shown in Figure 7.
Listing A1. Python script for making top panel of Figure 7.
import csespy
#path to the CSES orbit database
odbfile = '/home/papini/CSES01_orbitdb.h5'
 
#date span (Jan to Apr 2019)
t0 = datetime(2019,1,1)
t1 = datetime(2019,4,30)
 
#initialize CSES_database object
odb = csespy.CSES_database(dbbuf = odbfile)
 
#restrict to desired date span
odb.search_orbit_timespan((t0,t1))
 
#plot orbits
fig,ax,mm=odb.plot_orbit(profile='default_lines',\
   annotate_orbitn=False,color='night-day',ion=True)
 
#label axes
fig.text(0.5,0.01,'Geographic Longitude',horizontalalignment='center')
fig.text(0.03,0.5,'Geographic Latitude',verticalalignment='center',\
    rotation='vertical')
Listing A2. Script to make bottom panel of Figure 7.
import csespy
#path to the CSES orbit database
odbfile = '/home/papini/CSES01_orbitdb.h5'
 
#date span (Jan to Apr 2019)
t0 = datetime(2019,1,1)
t1 = datetime(2019,4,30)
 
#initialize CSES_database object
odb = csespy.CSES_database(orbit_database_buf = odbfile)
 
#restrict to desired date span
odb.search_orbit_timespan((t0,t1))
 
#Select plotting profile
prof=csespy.ORBIT_PLOT_TEMPLATES['default_lines'].copy()
 
#select which parallel and meridian to overplot
prof['latrange'] = [[55,75,5]]
prof['lonrange'] = [[0,40,5]]
 
#make the plot
fig,ax,mm=odb.plot_orbit(profile=prof,\
   annotate_orbitn=False,color='night-day',ion=True)
#zoom to the desired location
ax[0].set_ylim([55,75])
ax[0].set_xlim([0,40])
 
#label axes
fig.text(0.5,0.01,'Geographic Longitude',horizontalalignment='center')
fig.text(0.03,0.5,'Geographic Latitude',verticalalignment='center',\
   rotation='vertical')
 
import csespy
import pandas as pd
#path to the CSES orbit database
odbfile = '/home/papini/CSES01_orbitdb.h5'
 
#date span (Jan to Apr 2019)
t0 = datetime(2019,1,1)
t1 = datetime(2019,4,30)
 
#initialize CSES_database object
odb = csespy.CSES_database(orbit_database_buf = odbfile)
 
#there are 76 ascending, and 76 descending orbit types.
ntype= 76
 
#restrict to the equator
odb.search_orbit_lat([-1,1],use_selected_db = True)
 
#divide into dayside and nightside orbits
dbnight = odb.search_orbit_side('night', return_db = True,use_selected_db = True)
dbday = odb.search_orbit_side('day', return_db = True,use_selected_db = True)
 
#select, for each orbit, the closest point to the equator.
dbnight = dbnight.loc[\
   dbnight.groupby('orbitn')['lat'].apply(lambda x: x.abs().idxmin())]
dbday = dbday.loc[\
   dbday.groupby('orbitn')['lat'].apply(lambda x: x.abs().idxmin())]
 
#label orbits according to longitude, using KMeans clustering algorithm
from sklearn.cluster import KMeans
kmeans = KMeans(n_clusters=ntype, random_state=47, n_init=10)
 
#clustering data
dbnight['OrbitType'] = kmeans.fit_predict(dbnight[['lon']])
dbday['OrbitType'] = kmeans.fit_predict(dbday[['lon']])
 
#find latitudinal point closest to the equator for each orbit type
dbnight = dbnight.loc[\
      dbnight.groupby('OrbitType')['lat'].apply(lambda x: x.abs().idxmin())]
dbday = dbday.loc[\
      dbday.groupby('OrbitType')['lat'].apply(lambda x: x.abs().idxmin())]
 
#resorting OrbitType labeling starting from longitude -180
dbday.sort_values('lon',inplace=True)
dbnight.sort_values('lon',inplace=True)
#now relabeling OrbitTypes,
#labeling with even numbers day orbits and with odd numbers night orbits
dbday['OrbitType'] = np.arange(ntype)*2
dbnight['OrbitType'] = np.arange(ntype)*2 + 1
 
#now we define two dataframes containing
#the equatorial longitude and orbit_type pairs
daytype = pd.DataFrame(\
   {'lon':dbday['lon'].values,'OrbitType':dbday['OrbitType'].values})
nighttype = pd.DataFrame(\
   {'lon':dbnight['lon'].values,'OrbitType':dbnight['OrbitType'].values})
Listing A3. Python script for orbit-type labeling (see Section 3.2).
#last step consists in labeling all orbits in the original database
#NOTE: we use the whole database by setting “use_selected_db = False”
odb.search_orbit_lat([-1,1],use_selected_db = False)
 
#splitting in day and night orbits
dbnight = odb.search_orbit_side('night', return_db = True,use_selected_db = True)
dbday = odb.search_orbit_side('day', return_db = True,use_selected_db = True)
 
#select, for each orbit, the closest point to the equator.
dbnight = dbnight.loc[\
   dbnight.groupby('orbitn')['lat'].apply(lambda x: x.abs().idxmin())]
dbday = dbday.loc[\
   dbday.groupby('orbitn')['lat'].apply(lambda x: x.abs().idxmin())]
 
# Find the closest longitude for each row in df
dbnight['OrbitType'] = dbnight['lon'].apply(\
   lambda lon: nighttype.loc[(nighttype['lon'] - lon).abs().idxmin(), 'OrbitType'])
dbday['OrbitType'] = dbday['lon'].apply(\
   lambda lon: daytype.loc[(daytype['lon'] - lon).abs().idxmin(), 'OrbitType'])
 
#dblabeled now contains all orbits labeled
dblabeled = pd.concat([dbnight, dbday], ignore_index=True)
 
#we translate the information on the orbit and orbit type into a dictionary
mapping_dict = dict(zip(dblabeled.orbitn.values, dblabeled.OrbitType.values))
 
#We label the whole the orbit database by assigning
#the label -1 to orbits in case of error.
#The DataFrame containing the database of the orbits is in “odb.db”.
odb.db['OrbitType'] = odb.db['orbitn'].map(mapping_dict).fillna(-1).astype(int)
Listing A4. Python script for making the plot shown in Figure 8. The script has to be executed in the same Python shell after Listing A3.
... #continue from previous script
 
day_or_night='night' #set to: 'day' to plot dayside orbits
 
#select orbits of interest
odb.search_orbit_timespan((t0,t1))
odb.search_orbit_side(day_or_night,use_selected_db = True)
 
#Select plotting profile
prof=csespy.ORBIT_PLOT_TEMPLATES['default_lines'].copy()
 
#select which parallel and meridian to overplot
prof['latrange'] = [[55,75,5]]
prof['lonrange'] = [[0,40,5]]
 
#make the plot
figs=odb.plot_orbit(profile=prof,\
   annotate_orbitn=False,color='night-day',ion=True)
figs[1][0].set_ylim([55,75])
figs[1][0].set_xlim([0,40])
 
#label axes
figs[0].text(0.5,0.01,'Geographic Longitude',horizontalalignment='center')
figs[0].text(0.03,0.5,'Geographic Latitude',\
   verticalalignment='center',rotation='vertical')
 
#extract OrbitType labels
orbit_type =  list(set(odb.sel_db.OrbitType))
 
#annotate labels into the plot at orbit location
ilon = 0 if day_or_night=='day' else -1
for itype in orbit_type:
   dff = odb.sel_db[odb.sel_db.OrbitType == itype]
   figs[1][0].annotate(itype,[dff['lon'][ilon], 66],fontsize=14)

Appendix B. Earthquake Background Calculation

Appendix B.1. Orbit Classification on Geomagnetic Activity

The calculation of the electric background requires the classification of the orbits according to geomagnetic activity. Following Bertello et al. [52] and Recchiuti et al. [22], orbits are classified as being geomagnetically quiet ( | SYM H ¯ |   10 nT ), disturbed ( 40 nT SYM H ¯ < 10 nT ), or stormy (otherwise), according to the average value of the SYM-H index (calculated in this case on a time interval of 24 h and centered at the desired orbit, see [22] and references therein). We used pySPEDAS [30] to retrieve the SYM-H index from OMNI data and then added the information to our CSES_database.

Appendix B.2. Orbit Selection and Calculation of the Haiti EQ Background

The orbits relevant for the calculation of the Haiti EQ background can be easily retrieved from our customized orbit database using either the CSES.select_data_to_load() or the CSES_database.search_orbit() method with the following arguments
orbit _ database _ ranges = ( ( OrbitType ,   np . equal , 47 ) , ( I _ QDS , np . equal , 0 ) )
and
latspan = [ 15 . 41 , 21 . 41 ] ,
where I _ QDS denotes the level of geomagnetic activity (zero corresponding to quiet conditions, that is, the conditions of the EQ orbit 193951), OrbitType denotes the orbit type of the EQ orbit (i.e., 47), and latspan the latitudinal interval around the EQ epicenter.
Once the list of the orbits has been obtained, for each orbit the background can be calculated by running a procedure that is highlighted in Listing A5.
Listing A5. Python snippet background calculation (see Section 3.5). In the snippet, get_erel is a function that calculates the relative energy from the spectrogram implementing Equation (3).
#loop through the orbits
...
#loop through orbits
for iorbit in orbits:
  #create css object and select orbitn to load
  ...
 
  css.load_CSES(instrument='EFD',frequency='ELF',fill_missing='linear',\
    subset=[('lat',np.less,21.41,True),('lat',np.greater,15.41,True)])
  css.derotate_fields(instrument='EFD',frequency='ELF',overwrite=True)
  css.get_spectrogram('EFD_ELF',['Ex','Ey','Ez'], packetsize = 8192,method = 'stft')
  erel = get_erel(css.data.EFD_ELF_P)
  ...
  #store result, e.g., in a list
#end loop
#interpolation of erel to a latitude-frequency grid and calculation of <erel>
...
#end

References

  1. Němec, F.; Santolík, O.; Parrot, M. Decrease of intensity of ELF/VLF waves observed in the upper ionosphere close to earthquakes: A statistical study. J. Geophys. Res. Space Phys. 2009, 114, A04303. [Google Scholar] [CrossRef]
  2. Zhang, X.; Zeren, Z.; Parrot, M.; Battiston, R.; Qian, J.; Shen, X. ULF/ELF ionospheric electric field and plasma perturbations related to Chile earthquakes. Adv. Space Res. 2011, 47, 991–1000. [Google Scholar] [CrossRef]
  3. Schirninger, C.; Eichelberger, H.U.; Magnes, W.; Boudjada, M.Y.; Schwingenschuh, K.; Pollinger, A.; Besser, B.P.; Biagi, P.F.; Solovieva, M.; Wang, J.; et al. Satellite Measured Ionospheric Magnetic Field Variations over Natural Hazards Sites. Remote Sens. 2021, 13, 2360. [Google Scholar] [CrossRef]
  4. Parrot, M. Statistical analysis of automatically detected ion density variations recorded by DEMETER and their relation to seismic activity. Ann. Geophys. 2012, 55, 149–155. [Google Scholar] [CrossRef]
  5. Pulinets, S.; Ouzounov, D. Lithosphere-Atmosphere-Ionosphere Coupling (LAIC) model—An unified concept for earthquake precursors validation. J. Asian Earth Sci. 2011, 41, 371–382. [Google Scholar] [CrossRef]
  6. D’Angelo, G.; Piersanti, M.; Alfonsi, L.; Spogli, L.; Clausen, L.B.N.; Coco, I.; Li, G.; Baiqi, N. The response of high latitude ionosphere to the 2015 St. Patrick’s day storm from in situ and ground based observations. Adv. Space Res. 2018, 62, 638–650. [Google Scholar] [CrossRef]
  7. Piersanti, M.; Del Moro, D.; Parmentier, A.; Martucci, M.; Palma, F.; Sotgiu, A.; Plainaki, C.; D’Angelo, G.; Berrilli, F.; Recchiuti, D.; et al. On the Magnetosphere-Ionosphere Coupling During the May 2021 Geomagnetic Storm. Space Weather 2022, 20, e2021SW003016. [Google Scholar] [CrossRef]
  8. Astafyeva, E.; Yasyukevich, Y.V.; Maletckii, B.; Oinats, A.; Vesnin, A.; Yasyukevich, A.S.; Syrovatskii, S.; Guendouz, N. Ionospheric Disturbances and Irregularities During the 25–26 August 2018 Geomagnetic Storm. J. Geophys. Res. Space Phys. 2022, 127, e29843. [Google Scholar] [CrossRef]
  9. Juusola, L.; Kauristie, K.; Amm, O.; Ritter, P. Statistical dependence of auroral ionospheric currents on solar wind and geomagnetic parameters from 5 years of CHAMP satellite data. Ann. Geophys. 2009, 27, 1005–1017. [Google Scholar] [CrossRef]
  10. Ott, E. Theory of Rayleigh-Taylor bubbles in the equatorial ionosphere. J. Geophys. Res. Space Phys. 1978, 83, 2066–2070. [Google Scholar]
  11. D’Angelo, G.; Papini, E.; Pignalberi, A.; Recchiuti, D.; Diego, P. Detecting Post-Midnight Plasma Depletions Through Plasma Density and Electric Field Measurements in the Low-Latitude Ionosphere. Remote Sens. 2025, 17, 1529. [Google Scholar] [CrossRef]
  12. Shen, X.; Zhang, X.; Yuan, S.; Wang, L.; Cao, J.; Huang, J.; Zhu, X.; Piergiorgio, P.; Dai, J. The state-of-the-art of the China Seismo Electromagnetic Satellite mission. Sci. China E Technol. Sci. 2018, 61, 634–642. [Google Scholar] [CrossRef]
  13. Cheng, B.; Zhou, B.; Magnes, W.; Lammegger, R.; Pollinger, A. High precision magnetometer for geomagnetic exploration onboard of the China Seismo Electromagnetic Satellite. Sci. China E Technol. Sci. 2018, 61, 659–668. [Google Scholar] [CrossRef]
  14. Cao, J.; Zeng, L.; Zhan, F.; Wang, Z.; Wang, Y.; Chen, Y.; Meng, Q.; Ji, Z.; Wang, P.; Liu, Z.; et al. The electromagnetic wave experiment for CSES mission: Search coil magnetometer. Sci. China E Technol. Sci. 2018, 61, 653–658. [Google Scholar] [CrossRef]
  15. Huang, J.; Lei, J.; Li, S.; Zeren, Z.; Li, C.; Zhu, X.; Yu, W. The Electric Field Detector (EFD) onboard the ZH-1 satellite and first observational results. Earth Planet. Phys. 2018, 2, 469–478. [Google Scholar] [CrossRef]
  16. Yan, R.; Guan, Y.; Shen, X.; Huang, J.; Zhang, X.; Liu, C.; Liu, D. The Langmuir Probe Onboard CSES: Data inversion analysis method and first results. Earth Planet. Phys. 2018, 2, 479–488. [Google Scholar] [CrossRef]
  17. Liu, C.; Guan, Y.; Zheng, X.; Zhang, A.; Piero, D.; Sun, Y. The technology of space plasma in situ measurement on the China Seismo-Electromagnetic Satellite. Sci. China E Technol. Sci. 2019, 62, 829–838. [Google Scholar] [CrossRef]
  18. Li, X.Q.; Xu, Y.B.; An, Z.H.; Liang, X.H.; Wang, P.; Zhao, X.Y.; Wang, H.Y.; Lu, H.; Ma, Y.Q.; Shen, X.H.; et al. The high-energy particle package onboard CSES. Radiat. Detect. Technol. Methods 2019, 3, 22. [Google Scholar] [CrossRef]
  19. Picozza, P.; Battiston, R.; Ambrosi, G.; Bartocci, S.; Basara, L.; Burger, W.J.; Campana, D.; Carfora, L.; Casolino, M.; Castellini, G.; et al. Scientific Goals and In-orbit Performance of the High-energy Particle Detector on Board the CSES. Astrophys. J. Suppl. Ser. 2019, 243, 16. [Google Scholar] [CrossRef]
  20. Consolini, G.; Quattrociocchi, V.; D’Angelo, G.; Alberti, T.; Piersanti, M.; Marcucci, M.F.; De Michelis, P. Electric Field Multifractal Features in the High-Latitude Ionosphere: CSES-01 Observations. Atmosphere 2021, 12, 646. [Google Scholar] [CrossRef]
  21. Papini, E.; Piersanti, M.; D’Angelo, G.; Cicone, A.; Bertello, I.; Parmentier, A.; Diego, P.; Ubertini, P.; Consolini, G.; Zhima, Z. Detecting the Auroral Oval through CSES-01 Electric Field Measurements in the Ionosphere. Remote Sens. 2023, 15, 1568. [Google Scholar] [CrossRef]
  22. Recchiuti, D.; D’Angelo, G.; Papini, E.; Diego, P.; Cicone, A.; Parmentier, A.; Ubertini, P.; Battiston, R.; Piersanti, M. Detection of electromagnetic anomalies over seismic regions during two strong (MW > 5) earthquakes. Front. Earth Sci. 2023, 11, 1152343. [Google Scholar] [CrossRef]
  23. Yan, R.; Huang, J.; Lin, J.; Wang, Q.; Zhang, Z.; Yang, Y.; Chu, W.; Liu, D.; Xu, S.; Lu, H.; et al. Retrospective Study on Seismic Ionospheric Anomalies Based on Five-Year Observations from CSES. Remote Sens. 2024, 16, 4426. [Google Scholar] [CrossRef]
  24. Xie, T.; Chen, B.; Wu, L.; Dai, W.; Kuang, C.; Miao, Z. Detecting Seismo-Ionospheric Anomalies Possibly Associated with the 2019 Ridgecrest (California) Earthquakes by GNSS, CSES, and Swarm Observations. J. Geophys. Res. Space Phys. 2021, 126, e28761. [Google Scholar] [CrossRef]
  25. D’Angelo, G.; Piersanti, M.; Battiston, R.; Bertello, I.; Carbone, V.; Cicone, A.; Diego, P.; Papini, E.; Parmentier, A.; Picozza, P.; et al. Haiti Earthquake (Mw 7.2): Magnetospheric-Ionospheric-Lithospheric Coupling during and after the Main Shock on 14 August 2021. Remote Sens. 2022, 14, 5340. [Google Scholar] [CrossRef]
  26. Zhima, Z.; Zhou, B.; Zhao, S.; Wang, Q.; Huang, J.; Zeng, L.; Lei, J.; Chen, Y.; Li, C.; Yang, D.; et al. Cross-calibration on the electromagnetic field detection payloads of the China Seismo Electromagnetic Satellite. Sci. China E Technol. Sci. 2022, 65, 1415–1426. [Google Scholar] [CrossRef]
  27. Yang, D.; Zhima, Z.; Wang, Q.; Huang, J.; Wang, X.; Zhang, Z.; Zhao, S.; Guo, F.; Cheng, W.; Lu, H.; et al. Stability validation on the VLF waveform data of the China-Seismo-Electromagnetic Satellite. Sci. China E Technol. Sci. 2022, 65, 3069–3078. [Google Scholar] [CrossRef]
  28. Recchiuti, D.; Battiston, R.; D’Angelo, G.; Papini, E.; Neubüser, C.; Burger, W.J.; Piersanti, M. Automatic Detection of Whistler Waves in the Top-Side Ionosphere: The WhISPER Technique. Atmosphere 2025, 16, 522. [Google Scholar] [CrossRef]
  29. D’Angelo, G.; Francia, P.; De Lauretis, M.; Parmentier, A.; Raita, T.; Piersanti, M. A Case Study of Pc1 Waves Observed at the Polar Cap Associated with Proton Precipitation at Subauroral Latitudes. Atmosphere 2024, 15, 219. [Google Scholar] [CrossRef]
  30. Grimes, E.W.; Hatzigeorgiu, N.; Lewis, J.W.; Russell, C.; McTiernan, J.M.; Drozdov, A.; Angelopoulos, V. pySPEDAS: Python-Based Space Physics Environment Data Analysis Software. Astrophysics Source Code Library, Record ascl:2405.005. 2024. Available online: https://ui.adsabs.harvard.edu/abs/2024ascl.soft05005G/abstract (accessed on 2 October 2025).
  31. Smith, A.R.A.; Pačes, M.; Swarm DISC. Python tools for ESA’s Swarm mission: VirES for Swarm and surrounding ecosystem. Front. Astron. Space Sci. 2022, 9, 308. [Google Scholar] [CrossRef]
  32. Niehof, J.T.; Morley, S.K.; Welling, D.T.; Larsen, B.A. The SpacePy space science package at 12 years. Front. Astron. Space Sci. 2022, 9, 1023612. [Google Scholar] [CrossRef]
  33. National Institute of Natural Hazards, Ministry of Emergency Management of China. China Seismo Electromagnetic Satellite (ZH-1(01)) The L2/2A Data Product Description. Available online: https://www.leos.ac.cn#/dataService/auxiliaryDownloadList (accessed on 11 December 2022).
  34. The HDF Group. Hierarchical Data Format, Version 5. Available online: https://github.com/HDFGroup/hdf5 (accessed on 2 October 2025).
  35. Emmert, J.T.; Richmond, A.D.; Drob, D.P. A computationally compact representation of Magnetic-Apex and Quasi-Dipole coordinates with smooth base vectors. J. Geophys. Res. Space Phys. 2010, 115, A08322. [Google Scholar] [CrossRef]
  36. Shepherd, S.G. Altitude-adjusted corrected geomagnetic coordinates: Definition and functional approximations. J. Geophys. Res. Space Phys. 2014, 119, 7501–7521. [Google Scholar] [CrossRef]
  37. Olsen, N.; Lühr, H.; Sabaka, T.J.; Mandea, M.; Rother, M.; Tøffner-Clausen, L.; Choi, S. CHAOS-a model of the Earth’s magnetic field derived from CHAMP, Ørsted, and SAC-C magnetic satellite data. Geophys. J. Int. 2006, 166, 67–75. [Google Scholar] [CrossRef]
  38. Papini, E. EFDL2Limadou: Release 1.0.0. Available online: https://zenodo.org/records/17285333 (accessed on 2 October 2025). [CrossRef]
  39. Defense Technical Information Center. Department of Defense World Geodetic System 1984: Its Definition and Relationships with Local Geodetic Systems, 2nd ed.; Technical Report ADA280358; U.S. Department of Defense: Washington, DC, USA, 1991.
  40. Allen, J. Short term spectral analysis, synthesis, and modification by discrete Fourier transform. IEEE Trans. Acoust. Speech Signal Process. 1977, 25, 235–238. [Google Scholar] [CrossRef]
  41. Recchiuti, D. Electromagnetic Characterization of the Ionosphere in the Framework of the Magnetosphere-Ionosphere-Lithosphere Coupling. Ph.D. Thesis, University of Trento, Trento, Italy, 2024. [Google Scholar] [CrossRef]
  42. Piersanti, M.; Oliveira, D.M.; D’Angelo, G.; Diego, P.; Napoletano, G.; Zesta, E. On the Geoelectric Field Response to the SSC of the May 2024 Super Storm Over Europe. Space Weather 2025, 23, 2024SW004191. [Google Scholar] [CrossRef]
  43. Pierrard, V.; Winant, A.; Botek, E.; Péters de Bonhome, M. The Mother’s Day Solar Storm of 11 May 2024 and Its Effect on Earth’s Radiation Belts. Universe 2024, 10, 391. [Google Scholar] [CrossRef]
  44. Li, X.; Xiang, Z.; Mei, Y.; O’Brien, D.; Brennan, D.; Zhao, H.; Baker, D.N.; Temerin, M.A. A New Electron and Proton Radiation Belt Identified by CIRBE/REPTile-2 Measurements After the Magnetic Super Storm of 10 May 2024. J. Geophys. Res. Space Phys. 2025, 130, 2024JA033504. [Google Scholar] [CrossRef]
  45. Martucci, M.; Laurenza, M.; Benella, S.; Berrilli, F.; Del Moro, D.; Giovannelli, L.; Parmentier, A.; Piersanti, M.; Albrecht, G.; Bartocci, S.; et al. The First Ground-Level Enhancement of Solar Cycle 25 as Seen by the High-Energy Particle Detector (HEPD-01) on Board the CSES-01 Satellite. Space Weather 2022, 21, e2022SW003191. [Google Scholar] [CrossRef]
  46. Wang, L.; Zhang, Z.; Shen, X.; Li, X.; Liang, X.; Zhima, Z.; Chu, W.; Guo, F.; Zhou, N.; Chen, H.; et al. Effects of Solar Proton Events Associated with X-Ray Flares on Near-Earth Electron and Proton Fluxes Based on ZH-1 Satellite Observations. Front. Earth Sci. 2022, 10, 895561. [Google Scholar] [CrossRef]
  47. Cicone, A.; Zhou, H. Numerical analysis for iterative filtering with new efficient implementations based on FFT. Numer. Math. 2021, 147, 1–28. [Google Scholar] [CrossRef]
  48. Papini, E.; Cicone, A. EmanuelePapini/fifpy: IterativeFiltering 1.0.2. Available online: https://zenodo.org/records/14175321 (accessed on 2 October 2025). [CrossRef]
  49. Cai, L. GeospaceLAB. 2025. Available online: https://zenodo.org/records/14645911 (accessed on 2 October 2025). [CrossRef]
  50. Pignalberi, A. TITIPy: A Python tool for the calculation and mapping of topside ionosphere turbulence indices. Comput. Geosci. 2021, 148, 104675. [Google Scholar] [CrossRef]
  51. Pignalberi, A.; Pezzopane, M.; Coco, I.; Piersanti, M.; Giannattasio, F.; De Michelis, P.; Tozzi, R.; Consolini, G. Inter-Calibration and Statistical Validation of Topside Ionosphere Electron Density Observations Made by CSES-01 Mission. Remote Sens. 2022, 14, 4679. [Google Scholar] [CrossRef]
  52. Bertello, I.; Piersanti, M.; Candidi, M.; Diego, P.; Ubertini, P. Electromagnetic field observations by the DEMETER satellite in connection with the 2009 L’Aquila earthquake. Ann. Geophys. 2018, 36, 1483–1493. [Google Scholar] [CrossRef]
Figure 1. Flowchart of the typical workflow of CSESpy, with corresponding classes (light-blue insets), methods (light-orange insets), and data structures (red insets). Databases of the orbital information and of the scientific data are represented by cylinders. Red arrows denote data loading on memory from storage. Double/bidirectional arrows denote mutual interactions (e.g., queries), while single/unidirectional arrows denote the direction of the workflow.
Figure 1. Flowchart of the typical workflow of CSESpy, with corresponding classes (light-blue insets), methods (light-orange insets), and data structures (red insets). Databases of the orbital information and of the scientific data are represented by cylinders. Red arrows denote data loading on memory from storage. Double/bidirectional arrows denote mutual interactions (e.g., queries), while single/unidirectional arrows denote the direction of the workflow.
Remotesensing 17 03417 g001
Figure 2. Waveform of the x-component of electric field measurement taken by EFD-01 in the ULF and ELF band at the dayside (a) and the nightside (b). Black rectangles in the upper panels delineate the regions that are magnified in the corresponding lower panels (c,d), so as to highlight two data gaps.
Figure 2. Waveform of the x-component of electric field measurement taken by EFD-01 in the ULF and ELF band at the dayside (a) and the nightside (b). Black rectangles in the upper panels delineate the regions that are magnified in the corresponding lower panels (c,d), so as to highlight two data gaps.
Remotesensing 17 03417 g002
Figure 3. Sample of 10 s of the x-component of the electric field measurement taken by EFD-01 in the ULF (left) and ELF (right) band. Vertical dotted lines in the left and right panel denote the location of the first points of ULF and the ELF data packets, respectively. Data jumps are present between every ULF packet ((left) panel) and every two or three ELF packets ((right) panel).
Figure 3. Sample of 10 s of the x-component of the electric field measurement taken by EFD-01 in the ULF (left) and ELF (right) band. Vertical dotted lines in the left and right panel denote the location of the first points of ULF and the ELF data packets, respectively. Data jumps are present between every ULF packet ((left) panel) and every two or three ELF packets ((right) panel).
Remotesensing 17 03417 g003
Figure 4. Waveform of the x-component of the electric field measurements as shown in the left panel of Figure 3 in the ULF (left) and ELF (right) bands from the original uncorrected L2 data (blue curve) and after the rotational drift has been removed (orange curve).
Figure 4. Waveform of the x-component of the electric field measurements as shown in the left panel of Figure 3 in the ULF (left) and ELF (right) bands from the original uncorrected L2 data (blue curve) and after the rotational drift has been removed (orange curve).
Remotesensing 17 03417 g004
Figure 5. Distribution of absolute angles α (black) before (left) and after (right) the correction procedure has been applied to ELF L2 data. The distribution of angle separation between two consecutive electric field measurements (red) is also shown.
Figure 5. Distribution of absolute angles α (black) before (left) and after (right) the correction procedure has been applied to ELF L2 data. The distribution of angle separation between two consecutive electric field measurements (red) is also shown.
Remotesensing 17 03417 g005
Figure 6. Power Spectral Density (PSD) of a sample of the x-component of the electric field measurements taken in the ELF band for (top) data uncorrected for the rotational drift, and (bottom) the same data after correction has been applied. The STFT was calculated using a non-overlapping window of 0.8192 s, corresponding to 4096 data points. Left panels show a zoom of the PSD to enhance the visibility of the second-order Schumann resonance near 20.8 Hz (marked by a horizontal white-dashed line).
Figure 6. Power Spectral Density (PSD) of a sample of the x-component of the electric field measurements taken in the ELF band for (top) data uncorrected for the rotational drift, and (bottom) the same data after correction has been applied. The STFT was calculated using a non-overlapping window of 0.8192 s, corresponding to 4096 data points. Left panels show a zoom of the PSD to enhance the visibility of the second-order Schumann resonance near 20.8 Hz (marked by a horizontal white-dashed line).
Remotesensing 17 03417 g006
Figure 7. CSES-01 ascending (nightside, red) and descending (dayside, blue) semi-orbits from January to April 2019. The bottom panel shows a zoom over Scandinavia to highlight the pattern of (almost) overlapping semi-orbits.
Figure 7. CSES-01 ascending (nightside, red) and descending (dayside, blue) semi-orbits from January to April 2019. The bottom panel shows a zoom over Scandinavia to highlight the pattern of (almost) overlapping semi-orbits.
Remotesensing 17 03417 g007
Figure 8. Same as bottom panel of Figure 7 but with ascending (nightside, red, (bottom) panel) and descending (dayside, blue, (top) panel) semi-orbits labeled according to their orbit type. The longitudinal position of the starting point of each orbit type can be easily appreciated.
Figure 8. Same as bottom panel of Figure 7 but with ascending (nightside, red, (bottom) panel) and descending (dayside, blue, (top) panel) semi-orbits labeled according to their orbit type. The longitudinal position of the starting point of each orbit type can be easily appreciated.
Remotesensing 17 03417 g008
Figure 9. Quicklook plot of orbit 348201 ((left), Kp index > 6 ) and orbit 337561 ((right), Kp index < 3 ) showing multipayload observations of (a) the electric field (EFD-ELF), of (b) the electron density (LAP-50 mm), of (c) electron and proton fluxes, and of PSDs of the x-component of (d) the magnetic field (SCM-VLF) and of (e) the electric field (EFD-VLF). Both orbits belong to the same orbit type (see Section 3.2).
Figure 9. Quicklook plot of orbit 348201 ((left), Kp index > 6 ) and orbit 337561 ((right), Kp index < 3 ) showing multipayload observations of (a) the electric field (EFD-ELF), of (b) the electron density (LAP-50 mm), of (c) electron and proton fluxes, and of PSDs of the x-component of (d) the magnetic field (SCM-VLF) and of (e) the electric field (EFD-VLF). Both orbits belong to the same orbit type (see Section 3.2).
Remotesensing 17 03417 g009
Figure 10. Plot of orbit type 81 (see Section 3.2), to which both orbit 337561 and 348201 belong (see Figure 9).
Figure 10. Plot of orbit type 81 (see Section 3.2), to which both orbit 337561 and 348201 belong (see Figure 9).
Remotesensing 17 03417 g010
Figure 11. Multipayload observations of the Ground-Level Enhancement (GLE) event on 28–29 October 2021, as recorded by the China Seismo Electromagnetic Satellite (CSES-01). The panels display timeseries data from various instruments: the electric field amplitude from EFD measurements in the ULF band (panel (a)), the amplitude of magnetic field fluctuations from SCM measurements in the ULF band (panel (b)), HEPP-L proton fluxes (>2 MeV, panel (c)), HEPP-H proton fluxes (>30 MeV, panel (d)), and HEPP-X X-ray rate measurements (panel (e)). For the HEPP payloads, data selection was applied for latitudes above 10 degrees. These observations highlight the simultaneous enhancements in charged particle fluxes, while electromagnetic field variations are negligible in association with the solar energetic particle (SEP) event.
Figure 11. Multipayload observations of the Ground-Level Enhancement (GLE) event on 28–29 October 2021, as recorded by the China Seismo Electromagnetic Satellite (CSES-01). The panels display timeseries data from various instruments: the electric field amplitude from EFD measurements in the ULF band (panel (a)), the amplitude of magnetic field fluctuations from SCM measurements in the ULF band (panel (b)), HEPP-L proton fluxes (>2 MeV, panel (c)), HEPP-H proton fluxes (>30 MeV, panel (d)), and HEPP-X X-ray rate measurements (panel (e)). For the HEPP payloads, data selection was applied for latitudes above 10 degrees. These observations highlight the simultaneous enhancements in charged particle fluxes, while electromagnetic field variations are negligible in association with the solar energetic particle (SEP) event.
Remotesensing 17 03417 g011
Figure 12. Coloured contour of the relative energy ϵ rel ( lat , ν ) of the z component of the electric field as obtained from an STFT spectral analysis for the Quiet background of Orbit Type 47 ((left), geographically close to the epicenter of Haiti’s earthquake) and for orbit 195931 ((right), also belonging to Orbit Type 47). Orbit 195931 took place on 14 August 2021, shortly before the earthquake. The vertical dotted line marks the frequency of the anomalous signal, the horizontal dashed lines indicate the latitudinal range of CSES-01 passage over Haiti’s mainland.
Figure 12. Coloured contour of the relative energy ϵ rel ( lat , ν ) of the z component of the electric field as obtained from an STFT spectral analysis for the Quiet background of Orbit Type 47 ((left), geographically close to the epicenter of Haiti’s earthquake) and for orbit 195931 ((right), also belonging to Orbit Type 47). Orbit 195931 took place on 14 August 2021, shortly before the earthquake. The vertical dotted line marks the frequency of the anomalous signal, the horizontal dashed lines indicate the latitudinal range of CSES-01 passage over Haiti’s mainland.
Remotesensing 17 03417 g012
Table 1. Scientific payloads of CSES-01 implemented in CSESpy, together with the physical quantities they provide and the cadence/sampling frequency of the instruments. For the LAP, only the 50 mm probe is used for scientific measurements. ULF, ELF, VLF, and HF denote the Ultra Low Frequency (ULF), the Extreme Low Frequency (ELF), the Very Large Frequency, and the High Frequency bands respectively.
Table 1. Scientific payloads of CSES-01 implemented in CSESpy, together with the physical quantities they provide and the cadence/sampling frequency of the instruments. For the LAP, only the 50 mm probe is used for scientific measurements. ULF, ELF, VLF, and HF denote the Ultra Low Frequency (ULF), the Extreme Low Frequency (ELF), the Very Large Frequency, and the High Frequency bands respectively.
InstrumentData ProductPhysical Observables
EFDULF, ELF, VLFelectric field waveforms (from DC to 5 kHz)
ULF, ELF, VLF, HFelectric field PSDs (from DC to 3.5 MHz)
SCMULF, ELF, VLFmagnetic field waveforms and PSD (from 10 Hz to 20 kHz)
HPMFGM-1 Hzmagnetic field waveforms (from DC to 1 Hz)
LAP50 mmelectron density and temperature (3 s)
PAPH+, He+, O+ densities; O+ temperature and drift velocity (1 s)
HEPPL, H, XElectron and proton fluxes (1 s)
HEPD-01Particle fluxes
Table 2. File-naming convention of CSES-01 L2 data.
Table 2. File-naming convention of CSES-01 L2 data.
File naming template:
CSES_01_INS_X_L02_AX_orbitn_YYYYMMDD_hhmmss_YYYYMMDD_hhmmss_XXX.h5
                                <start_date>        <end_date>
INSInstrument code (EFD, LAP, HPM, SCM, PAP, HEP, GRO, TBB)
XInstrument number (identifies the data product)
AXObservation item code (e.g., A1 for EFD, A2 for SCM)
orbitnOrbit number (see Section 2)
YYYYMMDDStart/end date of measurements
hhmmssStart/end time of measurements
XXXReceiving ground station code
Table 3. Examples of CSES-01 dataset organization for EFD, SCM, LAP, HEP, and HEPD data products (see [33] for a complete list). From left to right: dataset name used in the HDF5 file, related physical quantity, corresponding instrument and band (if applicable), its shape, and its physical units. Datasets enclosed between horizonal lines belong to the same data product. In the shape, N is different for each data product and identifies the number of data packets contained in a file.
Table 3. Examples of CSES-01 dataset organization for EFD, SCM, LAP, HEP, and HEPD data products (see [33] for a complete list). From left to right: dataset name used in the HDF5 file, related physical quantity, corresponding instrument and band (if applicable), its shape, and its physical units. Datasets enclosed between horizonal lines belong to the same data product. In the shape, N is different for each data product and identifies the number of data packets contained in a file.
NameDefinitionInstrument—BandShapeUnits
A111_W E x waveformEFD—ULF(N, 256)V/m
A112_W E y waveformEFD—ULF(N, 256)V/m
A113_W E z waveformEFD—ULF(N, 256)V/m
...
A121_W E x waveformEFD—ELF(N, 2048)V/m
A122_W E y waveformEFD—ELF(N, 2048)V/m
A123_W E z waveformEFD—ELF(N, 2048)V/m
A121_P E x PSD EFD—ELF(N, 1024)V/m/ Hz
A122_P E y PSD EFD—ELF(N, 1024)V/m/ Hz
A123_P E z PSD EFD—ELF(N, 1024)V/m/ Hz
...
A231 B x waveformSCM—ULF(N, 4096)nT
A232 B y waveformSCM—ULF(N, 4096)nT
A233 B z waveformSCM—ULF(N, 4096)nT
...
A311electron density n e LAP(N, 1) m 3
A321electron temperature T e LAP(N, 1)K
...
A411Electron SpectrumHEPP_L(N, 256, 9) counts cm 2 · s · str · MeV
A412Proton SpectrumHEPP_L(N, 256, 9) counts cm 2 · s · str · MeV
Count_electronElectron CountsHEPP_L(N, 9)count/s
Count_protonProton CountsHEPP_L(N, 9)count/s
...
A411Electron SpectrumHEPP_H(N, 256, 36) counts cm 2 · s · str · MeV
A412Proton SpectrumHEPP_H(N, 256, 36) counts cm 2 · s · str · MeV
Count_electronsElectron CountsHEPP_H(N, 1)count/s
Count_protonsProton CountsHEPP_H(N, 1)count/s
...
A413X-ray SpectrumHEPP_X(N, 1024) counts s · str · MeV
A433Photon CountsHEPP_X(N, 1)count/s
...
Count_particlesCount ParticlesHEPD(N, 1)count/s
...
Table 4. Selection of the auxiliary variables providing spacecraft position and time of the measurements for a given data product.
Table 4. Selection of the auxiliary variables providing spacecraft position and time of the measurements for a given data product.
NameDefinitionShapeTypeUnits
VERSE_TIMETime Relative to 1 Jan 2009, 00:00 UTC(N, 1)integerms
GEO_LATGeographic Latitude(N, 1)floatDegree °
GEO_LONGeographic Longitude(N, 1)floatDegree °
...
Table 5. Sample of the DataFrame structure of LAP data that is loaded in CSESpy. In this case, the A311 and A321 variable names (see Table 3) have been translated to n e and T e respectively.
Table 5. Sample of the DataFrame structure of LAP data that is loaded in CSESpy. In this case, the A311 and A321 variable names (see Table 3) have been translated to n e and T e respectively.
Time n e T e gaps_maskAltLatLonOrbitn
2022-01-15 14:25:59.7721.92 × 10 10 2699.5False522.36−69.47−164.24219391
2022-01-15 14:26:02.7721.92 × 10 10 2848.8False522.33−69.30−164.45219391
2022-01-15 14:26:05.7727.08 × 10 9 1772.9False522.29−69.12−164.66219391
2022-01-15 14:26:08.7729.27 × 10 9 2758.6False522.27−68.94−164.86219391
...
Table 6. Sample of the DataFrame structure of EFD data that is loaded in CSESpy. In this case, the A111_W, A112_W, and A113_W variable names (see Table 3) have been translated to E x , E y , and E z , respectively, and data gaps have been filled with NaNs and labeled in gaps_mask.
Table 6. Sample of the DataFrame structure of EFD data that is loaded in CSESpy. In this case, the A111_W, A112_W, and A113_W variable names (see Table 3) have been translated to E x , E y , and E z , respectively, and data gaps have been filled with NaNs and labeled in gaps_mask.
Time E x E y E z gaps_mask...
...
2022-01-15 14:49:01.958−0.388676−0.1289420.039865False...
2022-01-15 14:49:01.966−0.388633−0.1289250.039871False...
2022-01-15 14:49:01.974NaNNaNNaNTrue...
2022-01-15 14:49:01.982NaNNaNNaNTrue...
...
2022-01-15 14:49:06.062NaNNaNNaNTrue...
2022-01-15 14:49:06.070−0.382796−0.1250080.039105False...
2022-01-15 14:49:06.078−0.382800−0.1250070.039120False...
2022-01-15 14:49:06.086−0.382801−0.1250080.039148False...
...
Table 7. Sample of the DataFrame of the CSES orbits, labeled according to “OrbitType” (see Listing A3 and text).
Table 7. Sample of the DataFrame of the CSES orbits, labeled according to “OrbitType” (see Listing A3 and text).
TimeLatLonAltOrbitnOrbitType
2018-07-31 23:34:14.620−69.60321857.577400525.37500002732189
2018-07-31 23:34:20.764−69.24279857.153309525.20507802732189
2018-07-31 23:34:26.908−68.88147056.742210525.03418002732189
..................
2023-09-11 23:55:24.06769.18499821.656000510.70346131125195
2023-09-11 23:55:30.06769.53690321.230600510.76803631125195
2023-09-11 23:55:36.06769.88790120.791800510.83441231125195
..................
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Papini, E.; Follega, F.M.; Battiston, R.; Piersanti, M. CSESpy: A Unified Framework for Data Analysis of the Payloads on Board the CSES Satellite. Remote Sens. 2025, 17, 3417. https://doi.org/10.3390/rs17203417

AMA Style

Papini E, Follega FM, Battiston R, Piersanti M. CSESpy: A Unified Framework for Data Analysis of the Payloads on Board the CSES Satellite. Remote Sensing. 2025; 17(20):3417. https://doi.org/10.3390/rs17203417

Chicago/Turabian Style

Papini, Emanuele, Francesco Maria Follega, Roberto Battiston, and Mirko Piersanti. 2025. "CSESpy: A Unified Framework for Data Analysis of the Payloads on Board the CSES Satellite" Remote Sensing 17, no. 20: 3417. https://doi.org/10.3390/rs17203417

APA Style

Papini, E., Follega, F. M., Battiston, R., & Piersanti, M. (2025). CSESpy: A Unified Framework for Data Analysis of the Payloads on Board the CSES Satellite. Remote Sensing, 17(20), 3417. https://doi.org/10.3390/rs17203417

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop