summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-10-01 11:21:23 +0200
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-10-01 11:21:23 +0200
commitdc395e494680ca4993a2dcff1f49ae7f7fd526ea (patch)
tree7846d8a47b9276eb40c81693944b4edf71615ed7
parenteb284ca73ee4b516407d1972c8cb92474365a78d (diff)
downloadmma-dc395e494680ca4993a2dcff1f49ae7f7fd526ea.tar.gz
mma-dc395e494680ca4993a2dcff1f49ae7f7fd526ea.tar.bz2
mma-dc395e494680ca4993a2dcff1f49ae7f7fd526ea.zip
Tiny tweaks.
-rw-r--r--schofield.wl6
1 files changed, 3 insertions, 3 deletions
diff --git a/schofield.wl b/schofield.wl
index 40253d4..b70b3ac 100644
--- a/schofield.wl
+++ b/schofield.wl
@@ -185,7 +185,7 @@ rules[g_] := Join[ΦRules, GlRules, GhRules, {ruleAL[g], ruleB[g], gC[0]->1}]
eq[n_, g_][m_, p_, q_] := Flatten[Join[{ruleθ0[g], ruleAH[g], g'[0] θc - 1}, eqLow[n, g][#] & /@ Range[0, m],eqMid[RF[n], g][#] & /@ Range[0, p], eqHigh[n, g] /@ Range[2, q, 2]]] //. rules[g] /. Around[x_, _] :> x
-eqAround[n_, g_][m_, p_, q_] := Flatten[Join[{ruleθ0[g], ruleAH[g]}, eqLow[n, g][#] & /@ Range[0, m],eqMid[RF[n], g][#] & /@ Range[0, p], eqHigh[n, g] /@ Range[2, q, 2]]] //. rules[g]
+eqAround[n_, g_][m_, p_, q_] := Flatten[Join[{ruleAH[g], ruleθ0[g]}, eqLow[n, g][#] & /@ Range[0, m],eqMid[RF[n], g][#] & /@ Range[0, p], eqHigh[n, g] /@ Range[2, q, 2]]] //. rules[g]
formResiduals[data_, functions_, δ_:10^(-15)] := If[Head[#1]===Around,
(#2-#1["Value"]) / Max[#1["Uncertainty"], δ],
@@ -204,7 +204,7 @@ newSol[eqs_, oldSol_, newVars_, δ_:0, γ_:0, opts___] := FindRoot[
{#1, #2 + γ * RandomVariate[NormalDistribution[]]} & @@@ (oldSol /. Rule -> List),
Thread[{newVars, δ * RandomVariate[NormalDistribution[], Length[newVars]]}]
],
- MaxIterations -> 500,
+ MaxIterations -> 1000,
opts
]
@@ -237,7 +237,7 @@ levenbergMarquardt[r_, β0_, λ0_ : 1, ν_ : 2, ε_ : 10^-15] :=
]
-levenbergMarquardtHelper[Δ_, rf_, Jf_, β0_, λ0_ : 1, ν_ : 1.5, ε_ : 10^-15, accOff_ : False] :=
+levenbergMarquardtHelper[Δ_, rf_, Jf_, β0_, λ0_ : 1, ν_ : 2, ε_ : 10^-15, accOff_ : False] :=
Module[
{
n = Length[β0],