fgasdia / LongwaveModePropagator.jl

Model the propagation of VLF radio waves in the Earth-ionosphere waveguide.
https://fgasdia.github.io/LongwaveModePropagator.jl/dev
MIT License
15 stars 5 forks source link

Interpolating spline for susceptibility #31

Closed fgasdia closed 3 years ago

fgasdia commented 3 years ago

This PR closes #28 by adding the ability to build a cubic interpolating spline for susceptibility for mode finding only (in dRdz). It decreases the runtime of findmodes by 20%. Wavefield computations and derivatives with respect to θ continue to use susceptibility directly.

The interpolating version of susceptibility can be activated by specifying the params argument with LMPParams(approxsusceptibility=true). Additionally, the altitude step size used in the creation of the interpolating spline can be specified as LMPParams(susceptibilitysplinestep=10.0). By default the initial step is 10 meters.

By default, approxsusceptibility=false so that this PR does not introduce breaking behavior. However, if anyone is specifying fields of LMPParams directly without keyword arguments (not recommended), this is a breaking change because we've introduced new fields to the LMPParams struct.