Commit 87144c93 authored by ulrich_y's avatar ulrich_y
Browse files

fixes in vegas.mm's CombinePlots

parent 3c0a5e68
......@@ -307,9 +307,12 @@ MergePlots[list_, chi_:False] := Quiet[Module[{out, chilist},
CombinePlots[A_, B_, OptionsPattern[]] := Block[{opE, x1, x2, newx, newy, newe, maskA, maskB},
opE[e1_, y1_, e2_, y2_] := Sqrt[D[OptionValue[op][x1, x2], x1]^2 e1^2 + D[OptionValue[op][x1, x2], x2]^2 e2^2] /. {x1 -> y1, x2 -> y2};
newx = Intersection[A[[;; , 1]], B[[;; , 1]]];
maskA = First@First[Position[A[[;; , 1]], #]] & /@ newx;
maskB = First@First[Position[A[[;; , 1]], #]] & /@ newx;
newx = Intersection[
Rationalize[A[[;; , 1]], 10^-10],
Rationalize[B[[;; , 1]], 10^-10]
];
maskA = First@First[Position[Rationalize[A[[;; , 1]],10^-10], #]] & /@ newx;
maskB = First@First[Position[Rationalize[B[[;; , 1]],10^-10], #]] & /@ newx;
newy = MapThread[OptionValue[op], {A[[maskA, 2]], B[[maskB, 2]]}];
newe = MapThread[opE, {
A[[maskA, 3]], A[[maskA, 2]], B[[maskB, 3]], B[[maskB, 2]]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment