Get["~/doc/research/first_order_singularities/mma/schofield.wl"]

SetAttributes[untilSuccess,HoldAll];
untilSuccess[e_]:=Quiet[Check[e,untilSuccess[e]]]

randomEval[eq_]:=eq/.Around[x_,y_]:>RandomVariate[NormalDistribution[x,y]]

Matching all

Matching all (Subscript[θ, c]) fixed

Match ends

nAs=2;

s0=#1->Re[#2]&@@@untilSuccess[newSol[randomEval[eqAround[nAs,h[0]][1,-1,2]],{θc->1+RandomReal[],θ0->0.2},{AH,A[1],A[2]},.1]]

Timing[dFdξLowList[nAs,h[0]][6]/(Range[0,6]!)//.rules[h[0]]/.s0]

ListLogPlot[{
Abs[Gls],
Chop[Abs[dFdξLowList[nAs,h[0]][6]]//.rules[h[0]]/.s0]
}]

ListLogPlot[{
Abs[Ghs],
Chop[Abs@dFdξHighList[nAs,h[0]][6]//.rules[h[0]]/.s0]
}]

42492.10772459181`

m0=annealFit[res[2,h[0],d][2]//.rules[h[0]],d,s0,(10^(-5)),(10^(-13)),100,1,2]

m1=annealFit[res[2,h[1],δ][3]//.rules[h[1]],δ,Append[m0[[2]],gC[1]->0]]

4.1024051372699795`

m2=annealFit[res[2,h[3],δ][4]//.rules[h[3]],δ,Join[m1[[2]],{gC[2]->0,gC[3]->0}]]

m3=annealFit[res[2,h[3],δ][5]//.rules[h[3]],δ,Join[m2[[2]],{}]]

m4=annealFit[res[2,h[4],δ][6]//.rules[h[4]],δ,Join[m3[[2]],{gC[4]->0}]]

m5=annealFit[res[2,h[5],δ][7]//.rules[h[5]],δ,Join[m4[[2]],{gC[5]->0}]]

m6=annealFit[res[2,h[6],δ][8]//.rules[h[6]],δ,Join[m5[[2]],{gC[6]->0}]]

ListPlot[
If[Head[#]===Around,#/#["Uncertainty"],Around[#/(10^(-13)),1]]&/@(Abs[Ghs[[;;7+1]]-dFdξHighList[nAs,h[5]][7]]//.rules[h[5]]/.m4[[2]])
]

ListPlot[
If[Head[#]===Around,#/#["Uncertainty"],Around[#/(10^(-13)),1]]&/@(Abs[Gls[[;;4+1]]-dFdξLowList[nAs,h[3]][4]]//.rules[h[3]]/.m2[[2]])
]

((res[2,h[5],δ][7])^2)//.rules[h[5]]/.m5[[2]]/.δ->(10^(-13))

m61=levenburgMarquardt[res[2,h[9],(10^(-9))][8]//.rules[h[9]],Join[m6[[2]],{}]]

ntest=3;n1=2;
ourΦ1=dFdηList[n1,h[0]][ntest][1]/Range[0,ntest]!//.rules[h[0]]/.m0[[2]];
ourΦ2=dFdηList[n1,h[1]][ntest][1]/Range[0,ntest]!//.rules[h[1]]/.m1[[2]];
ourΦ3=dFdηList[n1,h[3]][ntest][1]/Range[0,ntest]!//.rules[h[3]]/.m2[[2]];
ourΦ4=dFdηList[n1,h[3]][ntest][1]/Range[0,ntest]!//.rules[h[3]]/.m3[[2]];
ourΦ5=dFdηList[n1,h[4]][ntest][1]/Range[0,ntest]!//.rules[h[4]]/.m4[[2]];
ourΦ6=dFdηList[n1,h[5]][ntest][1]/Range[0,ntest]!//.rules[h[5]]/.m5[[2]];
ourΦ7=dFdηList[n1,h[6]][ntest][1]/Range[0,ntest]!//.rules[h[6]]/.m6[[2]];
test=((Φs[[;;ntest+1]]-#)(*/Φs[[;;ntest+1]]*))&/@{ourΦ1,ourΦ2,ourΦ3,ourΦ4,ourΦ5,ourΦ6,ourΦ7};

ListLogPlot[Abs@Re@Transpose[test],Joined->True]