MultiSpacecraftAnalysis
Installation
using Pkg
Pkg.add("MultiSpacecraftAnalysis")Reciprocal vectors
Paschmann and Daly [1], Chapter 4, Paschmann and Daly [2], Chapter 14,
MultiSpacecraftAnalysis.reciprocal_vector — Function
reciprocal_vector(r_βα, r_βγ, r_βλ)Compute the reciprocal vector $𝒌_α$ for a vertex of a tetrahedron given the relative position vectors.
\[𝒌_α = \frac{𝐫_{βγ} × 𝐫_{βλ}}{𝐫_{βα} ⋅ (𝐫_{βγ} × 𝐫_{βλ})}\]
where $𝐫_{αβ} = r_β - r_α$ are relative position vectors.
References
- Multi-spacecraft analysis methods revisited : 4.3 Properties of reciprocal vectors
reciprocal_vector(rα, rβ, rγ, rλ)Compute the reciprocal vector $𝒌_α$ for a vertex of a tetrahedron given the position vectors of all vertices.
The vertices (α, β, γ, λ) must form a cyclic permutation of (1, 2, 3, 4).
reciprocal_vector(rα, r0s)Generalised reciprocal vector for N != 4
\[𝐪_α = 𝐑^{-1} 𝐫_α\]
See also: reciprocal_vector, position_tensor
MultiSpacecraftAnalysis.reciprocal_vectors — Function
Compute the set of reciprocal vectors {$𝒌_α$}, which is also called the reciprocal base of the tetrahedron.
See also: reciprocal_vector
MultiSpacecraftAnalysis.position_tensor — Function
\[𝐑 = ∑_α (𝐫_α-𝐫_b) (𝐫_α-𝐫_b)' = ∑_α 𝐫_α 𝐫_α'-𝐫_b 𝐫_b'\]
with $𝐫_b = ∑_α 𝐫_α / N$ and N is the number of positions.
References
- Paschmann and Daly [1] Paschmann & Daly, 2008. Section 4.7
MultiSpacecraftAnalysis.tetrahedron_quality — Function
Calculate tetrahedron quality factors
Estimation of spatial gradients
MultiSpacecraftAnalysis.lingradest — Function
lingradest(B1, args...)Vectorized method for simplified usage. Returns a StructArray containing the results.
Set flatten = true to flatten the output arrays, making the output shape similar to the input array shape.
lingradest(
Bx1, Bx2, Bx3, Bx4,
By1, By2, By3, By4,
Bz1, Bz2, Bz3, Bz4,
R1, R2, R3, R4
)SPEDAS-argument-compatible version of lingradest.
Since $\tilde{g}$ and $\tilde{\boldsymbol{V}}$ are linear functions, the calculation of spatial derivatives, such as the gradient of some scalar function or the divergence or curl of a vector function, can be done quite easily. The results are:
\[\begin{aligned} \nabla g \simeq \nabla \tilde{g} & =\sum_{\alpha=0}^3 \boldsymbol{k}_\alpha g_\alpha \\ \hat{\boldsymbol{e}} \cdot \nabla g \simeq \hat{\boldsymbol{e}} \cdot \nabla \tilde{g} & =\sum_{\alpha=0}^3\left(\hat{\boldsymbol{e}} \cdot \boldsymbol{k}_\alpha\right) g_\alpha \\ \nabla \cdot \boldsymbol{V} \simeq \nabla \cdot \tilde{\boldsymbol{V}} & =\sum_{\alpha=0}^3 \boldsymbol{k}_\alpha \cdot \boldsymbol{V}_\alpha \\ \nabla \times \boldsymbol{V} \simeq \nabla \times \tilde{\boldsymbol{V}} & =\sum_{\alpha=0}^3 \boldsymbol{k}_\alpha \times \boldsymbol{V}_\alpha \end{aligned}\]
Multi-spacecraft timing
MultiSpacecraftAnalysis.ConstantVelocityApproach — Function
CVA(positions, times)Constant Velocity Approach (CVA) for determining boundary normal and velocity. Solve timing equation: $D * m = Δts$
Parameters:
- positions: Positions of 4 spacecraft (4×3 array)
- times: Times of boundary crossing for each spacecraft
ConstantVelocityApproach(positions, times, durations)Given durations of the boundary crossings, calculate the thickness of the boundary
API
MultiSpacecraftAnalysis.ConstantThicknessApproachMultiSpacecraftAnalysis.ConstantVelocityApproachMultiSpacecraftAnalysis.ConstantVelocityApproachMultiSpacecraftAnalysis.ConstantVelocityApproachMultiSpacecraftAnalysis.DiscontinuityAnalyzerMultiSpacecraftAnalysis._lingradestMultiSpacecraftAnalysis.ensure_nxmMultiSpacecraftAnalysis.lingradestMultiSpacecraftAnalysis.lingradestMultiSpacecraftAnalysis.lingradestMultiSpacecraftAnalysis.m2nVMultiSpacecraftAnalysis.position_tensorMultiSpacecraftAnalysis.position_tensorMultiSpacecraftAnalysis.reciprocal_vectorMultiSpacecraftAnalysis.reciprocal_vectorMultiSpacecraftAnalysis.reciprocal_vectorMultiSpacecraftAnalysis.reciprocal_vectorMultiSpacecraftAnalysis.reciprocal_vectorsMultiSpacecraftAnalysis.reciprocal_vectorsMultiSpacecraftAnalysis.tetrahedron_qualityMultiSpacecraftAnalysis.tetrahedron_qualityMultiSpacecraftAnalysis.volumetric_tensorMultiSpacecraftAnalysis.volumetric_tensor
MultiSpacecraftAnalysis.ConstantThicknessApproach — Method
Constant Thickness Approach (CTA) for determining boundary normal and velocity. Based on the method described in Haaland et al., Annales Geophysicae, 2004.
MultiSpacecraftAnalysis.ConstantVelocityApproach — Method
ConstantVelocityApproach(positions, times, durations)Given durations of the boundary crossings, calculate the thickness of the boundary
MultiSpacecraftAnalysis.ConstantVelocityApproach — Method
CVA(positions, times)Constant Velocity Approach (CVA) for determining boundary normal and velocity. Solve timing equation: $D * m = Δts$
Parameters:
- positions: Positions of 4 spacecraft (4×3 array)
- times: Times of boundary crossing for each spacecraft
MultiSpacecraftAnalysis.DiscontinuityAnalyzer — Function
Discontinuity Analyzer (DA) for analyzing properties of discontinuities using multi-spacecraft measurements.
MultiSpacecraftAnalysis._lingradest — Method
lingradest(B1, B2, B3, B4, R1, R2, R3, R4)Compute spatial derivatives such as grad, div, curl and curvature using reciprocal vector technique (linear interpolation).
Arguments
B1, B2, B3, B4: 3-element vectors giving magnetic field measurements at each probeR1, R2, R3, R4: 3-element vectors giving the probe positions
Returns
A named tuple containing: • Rbary: Barycenter position • Bbc: Magnetic field at the barycenter • Bmag: Magnetic field magnitude at the barycenter • LGBx, LGBy, LGBz: Linear gradient estimators for each component • LD: Linear divergence estimator • LCB: Linear curl estimator • curvature: Field-line curvature vector: 𝐛 · ∇𝐛 • R_c: Field-line curvature radius
References
Based on the method of Chanteur (ISSI, 1998, Ch. 11).
MultiSpacecraftAnalysis.ensure_nxm — Method
Transform matrix-like A to n×m shape
MultiSpacecraftAnalysis.lingradest — Method
lingradest(
Bx1, Bx2, Bx3, Bx4,
By1, By2, By3, By4,
Bz1, Bz2, Bz3, Bz4,
R1, R2, R3, R4
)SPEDAS-argument-compatible version of lingradest.
MultiSpacecraftAnalysis.lingradest — Method
lingradest(B1, args...)Vectorized method for simplified usage. Returns a StructArray containing the results.
Set flatten = true to flatten the output arrays, making the output shape similar to the input array shape.
MultiSpacecraftAnalysis.m2nV — Method
Convert slowness vector $𝐦 = 𝐧/V$ to normal vector and velocity
MultiSpacecraftAnalysis.position_tensor — Function
\[𝐑 = ∑_α (𝐫_α-𝐫_b) (𝐫_α-𝐫_b)' = ∑_α 𝐫_α 𝐫_α'-𝐫_b 𝐫_b'\]
with $𝐫_b = ∑_α 𝐫_α / N$ and N is the number of positions.
References
- Paschmann and Daly [1] Paschmann & Daly, 2008. Section 4.7
MultiSpacecraftAnalysis.reciprocal_vector — Method
reciprocal_vector(rα, rβ, rγ, rλ)Compute the reciprocal vector $𝒌_α$ for a vertex of a tetrahedron given the position vectors of all vertices.
The vertices (α, β, γ, λ) must form a cyclic permutation of (1, 2, 3, 4).
MultiSpacecraftAnalysis.reciprocal_vector — Method
reciprocal_vector(r_βα, r_βγ, r_βλ)Compute the reciprocal vector $𝒌_α$ for a vertex of a tetrahedron given the relative position vectors.
\[𝒌_α = \frac{𝐫_{βγ} × 𝐫_{βλ}}{𝐫_{βα} ⋅ (𝐫_{βγ} × 𝐫_{βλ})}\]
where $𝐫_{αβ} = r_β - r_α$ are relative position vectors.
References
- Multi-spacecraft analysis methods revisited : 4.3 Properties of reciprocal vectors
MultiSpacecraftAnalysis.reciprocal_vector — Method
reciprocal_vector(rα, r0s)Generalised reciprocal vector for N != 4
\[𝐪_α = 𝐑^{-1} 𝐫_α\]
See also: reciprocal_vector, position_tensor
MultiSpacecraftAnalysis.reciprocal_vectors — Method
Compute the set of reciprocal vectors {$𝒌_α$}, which is also called the reciprocal base of the tetrahedron.
See also: reciprocal_vector
MultiSpacecraftAnalysis.tetrahedron_quality — Method
Calculate tetrahedron quality factors
- [1]
- G. Paschmann and P. W. Daly. Multi-Spacecraft Analysis Methods Revisited (ESA Communications, 2008).
- [2]
- G. Paschmann and P. W. Daly. Analysis Methods for Multi-Spacecraft Data (ESA Publications Division, 2000).