MinimumVarianceAnalysis

A Julia package for minimum or maximum variance analysis (MVA).

API Reference

MinimumVarianceAnalysis.B_x3_errorMethod

Calculate the composite statistical error estimate for ⟨B·x₃⟩: |Δ⟨B·x₃⟩| = √(λ₃/(M-1) + (Δφ₃₂⟨B⟩·x₂)² + (Δφ₃₁⟨B⟩·x₁)²)

Parameters:

  • λ₁, λ₂, λ₃: eigenvalues in descending order
  • M: number of samples
  • B: mean magnetic field vector
  • x₁, x₂, x₃: eigenvectors
source
MinimumVarianceAnalysis.check_mva_eigenMethod
check_mva_eigen(F; r=5, verbose=false)

Check the quality of the MVA result.

If λ₁ ≥ λ₂ ≥ λ₃ are 3 eigenvalues of the constructed matrix M, then a good indicator of nice fitting LMN coordinate system should have $abs(λ₂ / λ₃) > r$.

source
MinimumVarianceAnalysis.mvaFunction
mva(V, B=V; dim=nothing, kwargs...)

Transform a timeseries V into the LMN coordinate system based on the minimum variance analysis of reference field B along the dim dimension (time).

See also: mva_eigen, transform

source
MinimumVarianceAnalysis.mva_eigenMethod
mva_eigen(B::AbstractMatrix; dim = nothing, sort=(;), check=false) -> F::Eigen

Perform minimum variance analysis for B (which varies along the dim dimension).

Return Eigen factorization object F which contains the eigenvalues in F.values and the eigenvectors in the columns of the matrix F.vectors.

Set check=true to check the reliability of the result.

The kth eigenvector can be obtained from the slice F.vectors[:, k].

source
MinimumVarianceAnalysis.transformMethod
transform(A, mat::AbstractMatrix; dim=nothing, query=nothing)

Transform A into a new coordinate system using transformation matrix mat along the dim dimension (time).

source
MinimumVarianceAnalysis.ΔφijMethod
Δφij(λᵢ, λⱼ, λ₃, M)

Calculate the phase error between components i and j according to: |Δφᵢⱼ| = |Δφⱼᵢ| = √(λ₃/(M-1) * (λᵢ + λⱼ - λ₃)/(λᵢ - λⱼ)²)

Parameters:

  • λᵢ: eigenvalue i
  • λⱼ: eigenvalue j
  • λ₃: smallest eigenvalue (λ₃)
  • M: number of samples
source