MPISphericalHarmonics

Documentation for MPISphericalHarmonics.

Base.:+Method
+(mfc1::MagneticFieldCoefficients, mfc2::MagneticFieldCoefficients; force::Bool=false)

force = true adds the coefficients even if the radius or center are not equal (set to values of the first coefficients).

source
Base.:-Method
-(mfc1::MagneticFieldCoefficients, mfc2::MagneticFieldCoefficients; force::Bool=false)

force = true subtracts the coefficients even if the radius or center are not equal (set to values of the first coefficients).

source
MPISphericalHarmonics.findFFPMethod
findFFP(coeffsMF::MagneticFieldCoefficients; 
        vol::Union{Symbol, String, Volume} = xyz, 
        start::Union{Vector{Vector{Float64}},Vector{Float64}} = [[0.0;0.0;0.0]], 
        returnasmatrix::Bool=true)

Description: Newton method to find the FFPs of the magnetic fields

Input:

  • coeffsMF - MagneticFieldCoefficients or Matrix{SphericalHarmonicCoefficients}

kwargs:

  • vol - provide the volume where the FFP search should be done
    options: (MPISphericalHarmonics.xyz, MPISphericalHarmonics.xy, MPISphericalHarmonics.xz, MPISphericalHarmonics.yz)
    default: xyz
  • start - start vector (important for 2D FFP search for the third coordinate)
    default: [0; 0; 0]
  • returnasmatrix - Boolean
    true -> return FFPs as Matrix with size (3,#Patches) (default)
    false -> return FFPs as Array of NLsolve.SolverResults with size #Patches

Output:

  • ffp - FFPs of the magnetic field
source
MPISphericalHarmonics.getGradientFunction
getGradient(mfc::MagneticFieldCoefficients, idx::AbstractUnitRange{Int64}=axes(mfc.coeffs,2))

Get the gradient of the field described by mfc[idx].

source
MPISphericalHarmonics.getJacobianFunction
getJacobian(mfc::MagneticFieldCoefficients, idx::AbstractUnitRange{Int64}=axes(mfc.coeffs,2))

Get the Jacobian matrix of the field described by mfc[idx].

source
MPISphericalHarmonics.getOffsetFunction
getOffset(mfc::MagneticFieldCoefficients, idx::AbstractUnitRange{Int64}=axes(mfc.coeffs,2))

Get the offset of the field described by mfc[idx].

source
MPISphericalHarmonics.magneticFieldMethod
magneticField(tDesign::SphericalTDesign, field::Union{AbstractArray{T,2},AbstractArray{T,3}};
	       L::Int=Int(tDesign.T/2),
	       calcSolid::Bool=true) where T <: Real

Description: Calculation of the spherical harmonic coefficients based on the measured t-design

Input:

  • tDesign - Measured t-design (type: SphericalTDesign)
  • field - Measured field (size = (J,N,C)) with J <= 3

kwargs:

  • L - Order up to which the coeffs be calculated (default: t/2)
  • calcSolid - Boolean (default: true)
    false -> spherical coefficients
    true -> solid coefficients

Output:

  • coeffs - spherical/solid coefficients, type: Array{SphericalHarmonicCoefficients}(3,C)
source