# Unveiling the Core Patterns of High-Latitude Electron Density Distribution at Swarm Altitude
## 3 Method: EMD and its Multivariate Extension
If necessary, it is then possible to compute the instantaneous frequencies and amplitudes of each obtained mode by applying the Hilbert transform to each of the modes. When adding this final step, the full process is called the Hilbert-Huang Transform [24]. In the presence of multivariate signals, the definition of local extrema becomes more complicated, making the step of local mean estimation non-obvious [25]. Therefore, in these cases it is not possible to apply directly EMD, and becomes necessary to employ its multivariate extension (MEMD). After the first proposals of EMD extension to complex/bivariate [26; 27] and trivariate data [28], [PERSON] and [PERSON] [25] proposed a way of extending the concept of local extrema to an \(N\)-dimensional space. The \(N\)-variate signal has to be subdivided into \(N\)-dimensional datasets, each of which is then projected along different directions in the \(N\)-dimensional space. Each projected signal has its own envelopes for each of the directions, and the local mean can be computed by averaging over the \(N\)-dimensional space. The local mean can be computed through two different methods, both involving the selection of a suitable set of direction vectors in the \(N\)-dimensional space. In the first method, uniform angular sampling of a unit sphere in an \(N\)-dimensional hyperspherical coordinate system is used to obtain a set of direction vectors that covers the whole (\(N-1\)) sphere. The second method is based on low-discrepancy point sets, in which discrepancy refers to a quantitative measure of the irregularity or non-uniformity of a distribution. This approach belongs to the class of quasi-Monte Carlo methods [29]. Through either methods, a uniform distribution of direction vectors is obtained that can provide more accurate estimation of the local mean in \(N\)-dimensional spaces. Multivariate empirical modes can be successively obtained following the already mentioned procedure of standard EMD by using multivariate spline interpolation and checking the obtained modes properties [30]. An important difference with EMD is that in MEMD the condition of equality between the numbers of extrema and zero crossings is not imposed, as the definition of extrema is not straightforward for multivariate signals [31]. In this work, we used a Python algorithm to apply the MEMD method, available at [[https://github.com/mariogrune/MEMD-Python-](https://github.com/mariogrune/MEMD-Python-)]([https://github.com/mariogrune/MEMD-Python-](https://github.com/mariogrune/MEMD-Python-)), accessed on 20 April 2023; it is an adaptation of the procedure described in [PERSON] and Mandic [25] and is produced in Matlab (freely available at: [[http://www.commsp.ee.ic.ac.uk/~mandic/research/emd.htm](http://www.commsp.ee.ic.ac.uk/~mandic/research/emd.htm)]([http://www.commsp.ee.ic.ac.uk/~mandic/research/emd.htm](http://www.commsp.ee.ic.ac.uk/~mandic/research/emd.htm))). We chose to use this Python version because of its applicability to input data characterized by any number of channels. In fact, as an input for this MEMD algorithm we utilized the two-dimensional matrix obtained by binning the electron density data into a grid of \(1^{\circ}\times 1^{\circ}\) in magnetic latitude and MLT, where \(1^{\circ}\) corresponds to 4 min in MLT. Each bin in the map reports the mean electron density value considering all the Swarm measurements that fall within it. Here, we are interested in the region above \(50^{\circ}\) in magnetic latitude; in order to avoid a bad description of the lower latitude border, however, we obtained a map above \(45^{\circ}\). On the other hand, to account for the cylindrical symmetry in MLT, where the values of the first column in MLT (MLT = 00:00) must be the same as those of the last column in MLT (MLT = 24:00), we extended the matrix by replicating the original matrix three times. In this way, the input matrix has a dimension of \(45^{\circ}\times 1080^{\circ}\).