Public APIs

SpaceAnalysis.generate_signalMethod
generate_signal(varBG; fsignal=1.0, dv=1e3, fsample=5.0, tstart=0.0, tend=10.0,
   signal=:alfven, dir="xyz", model=:vlasiator)

Generate a fluctuation signal as an upstream input file to plasma models. Currently only support input perturbation in velocity dv.

Optional Arguments

  • fsignal=1.0: fluctuation signal frequency in [Hz].
  • fsample=5.0: sampling frequency in [Hz].
  • tstart=0.0: starting time in [s].
  • tend=10.0: end time in [s].
  • dv=1e3: velocity perturbation magnitude in [m/s].
  • dn=1: mass density perturbation magnitude in [amu/cc].
  • signal=:alfven: [:alfven, :fast, :slow, :density].
  • dir="xyz": direction(s) for the applied Alfvénic perturbations in Cartesian coordinates,

which can be any combination of "x", "y" and "z".

  • model=:vlasiator: model specific settings. In Vlasiator, the background magnetic field

includes both a dipole and a constant. Therefore in the solarwind input files magnetic field values should not contain the constant field.

source
SpaceAnalysis.mvaMethod
mva(Bx, By, Bz; verbose=false)

Perform minimum variance analysis to vector components defined in orthogonal coordinates Bx, By and Bz. If λ₁ ≥ λ₂ ≥ λ₃ are 3 eigenvalues of the constructed matrix M, then a good indicator of nice fitting LMN coordinate system should have λ₂/λ₃ > 5. Set verbose=true to turn on the check.

source
SpaceAnalysis.smaFunction
sma(x, n=(5,5))

Simple moving average of x with n[1] leading and n[2] trailing points. Default boundary is "replicate", meaning that the border pixels extend beyond the boundaries.

source
SpaceAnalysis.smaFunction
sma(x, n=5)

Simple moving box average of the vector data x with box length 'n'. One-sided average on the left and right edge with replicate border.

source
SpaceAnalysis.spectrumMethod
spectrum(x, Fs)

Return the frequency and amplitude for the single-sided spectrum of vector x given sample frequency of Fs.

source