A = Abs[Sqrt[(x+Rp)^2+(y+Sign[x*y]*Rm)^2]-(x+Rp)]

B = Abs[Sqrt[(x+Rp)^2+(y+Sign[x*y]*Rm)^2]+(x+Rp)]

ThI = (x*Sign[x*y]Rm+y*Rp) + 2*Sign[y]*ArcTan[Sqrt[A/B]]

Rp = (1/Sqrt[2])*Sqrt[Sqrt[(x^2-y^2+1)^2+4*x^2*y^2]+(x^2-y^2+1)]

Rm = (1/Sqrt[2])*Sqrt[Sqrt[(x^2-y^2+1)^2+4*x^2*y^2]-(x^2-y^2+1)]

Plot[ThI/.{x->1},{y,-1.5,1.5}]

Plot[ThI/.{x->0},{y,-1.5,1.5}]

(*  I'll define a function f = ThI - Pi/2 and then look for its zeros. *)

f = ThI - Pi/2;

f/.{y->1,x->0}

Plot[f/.{y->1},{x,-10,10}]

FindRoot[f/.{y->1},{x,0}]

N[f/.{x->0,y->1}]

N[ThI/.{x->0,y->1}]

FindRoot[f/.{y->0.9},{x,0}]

N[f/.{y->0.9,x->-0.18092943197740946`}]

FindRoot[f/.{y->0.8},{x,-.18}]

N[f/.{y->0.8,x->0.3813355324356029`}]

(* Note that the equation satisfied by the Stokes lines is f = 0.  So we find the values of x for various values of y for which f = 0.  *)

Table[{Part[FindRoot[f/.{y->1-i/100},{x,-0.2-i/10}],1,2],N[1-i/100]},{i,1,10}]

St1 = Table[{Part[FindRoot[f/.{y->1-i/1000},{x,-1-i/100}],1,2],N[1-i/1000]},{i,0,999}];

p1 = ListPlot[St1,Joined->True,PlotRange->{{-10,1},{-2,2}}]

(* Note I can't get it accurate if I use i = 997.  It may be that there is roundoff or something. *)

St2 = Table[{Part[FindRoot[f/.{y->1-i/1000},{x,1+i/100}],1,2],N[1-i/1000]},{i,0,996}];

p2 = ListPlot[St2,Joined->True,PlotRange->{{0,10},{-2,2}}]

p3 = Show[p1,p2,PlotRange->{{-10,10},{-2,2}}]

St3 = Table[{0,N[1+i/10]},{i,0,10}]

p4 = ListPlot[St3,Joined->True]

Show[p1,p2,p4,PlotRange->{{-10,10},{-2,2}},Axes->{False},Frame->True]

(* Now for the real part, we just want a line from 0 to 1 and we want it to be a dashed line. *)

Srth = Table[{0,N[1-i/10]},{i,0,10}]

p5 = ListPlot[Srth,Joined->True,PlotStyle->Dashed]

p6 = Show[p1,p2,p4,p5,PlotRange->{{-10,10},{-2,2}},Axes->{False},Frame->True]

(* Now we want to do the lower half plane plot and then put them together. *)

(*  I'll define a function g = ThI + Pi/2 and then look for its zeros. *)

g = ThI + Pi/2;

g/.{y->0}

Plot[g/.{y->-1},{x,-10,10}]

FindRoot[g/.{y->-1},{x,0}]

(* Note that the equation satisfied by the Stokes lines is g = 0.  So we find the values of x for various values of y for which g = 0.  *)

St4 = Table[{Part[FindRoot[g/.{y->-1+i/1000},{x,-0.2-i/100}],1,2],N[-1+i/1000]},{i,0,998}];

p7 = ListPlot[St4,Joined->True]

St5 = Table[{Part[FindRoot[g/.{y->-1+i/1000},{x,i/100}],1,2],N[-1+i/1000]},{i,1,950}];

p8 = ListPlot[St5,Joined->True,PlotRange->{{0,10},{-2,0}}]

St6 = Table[{0,N[-1-i/10]},{i,0,10}]

p9 = ListPlot[St6,Joined->True]

Srth1 = Table[{0,N[-1+i/10]},{i,0,10}]

p10 = ListPlot[Srth1,Joined->True,PlotStyle->Dashed]

p11 = Show[p6,p7,p8,p9,p10,PlotRange->{{-10,10},{-1.5,1.5}},Axes->{False},Frame->True]

(* Now export the tables. *)

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_1.dat",Grid[St1]]

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_2.dat",Grid[St2]]

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_3.dat",Grid[St3]]

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_4.dat",Grid[Srth]]

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_5.dat",Grid[St4]]

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_6.dat",Grid[St5]]

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_7.dat",Grid[St6]]

Export["C:\\Users\\anderson\\Research\\de Sitter States\\Dillon\\Stokes_Efield_8.dat",Grid[Srth1]]