Add in error propagation from finite differencing lower energy cutoff in Lockwood formulas #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this is and why it's needed:
The derivative of the lower energy cutoff is used to estimate the reconnection rate. However, due to the sparsity of data the derivative itself can be quite noisy. This change aims to quantify the error present in this derivative and propagate that error into the Lockwood formulas.
This hasn't been tested yet, so please do not merge.
Formulation
For a function$f(x)$ , its the finite difference approximate of the derivative can be expanded as
where$h$ is the step size of the grid. This can be rearranged to find the error in the derivative. This error is given by
where$\mathcal{O}\left( h^{2}\right)$ are higher order terms in the Taylor expansion of $f(x+h)$ . By numerically calculating the second derivative using finite difference, we can estimate the magnitude of $\frac{h}{2} f''(x)$ .