;+ ; NAME: ; ThomsonLOSFar ; PURPOSE: ; Determines the integrated intensity along a line of sight for electron ; Thomson scattering in a 1/r^2 density distribution in the limit of ; small angular size of the Sun (with density at 1 AU of 1 electron/cm^-3) ; CALLING SEQUENCE: ; F = ThomsonLOSFar(RSun, Elo, P, lower=lower, upper=upper, /degrees, /au, apm=apm, /s10) ; INPUTS: ; RSun array[n]; type: float ; distance of observer from Sun ; Elo array[m]; type: float ; elongation of line of sight (l.o.s.) ; (Elo=0 is the direction to the Sun) ; OPTIONAL INPUT PARAMETERS: ; lower=lower ; array; type: float; default: 0 ; lower lmit of integration along line of sight ; upper=upper ; array; type: float: default: !values.f_inifinity ; upper limit of integration along line of sight ; (negative value integrates up to infinity) ; ; /degrees if set all angles are in degrees (default:radians) ; /au if set all distance are in AU (default: solar radii) ; ; /s10 return brightness in S10 units ; apm=apm apparent magnitude of Sun at 1 AU ; (needed only if /S10 is set) ; OUTPUTS: ; Result array[n,m]; type: float ; Integrated Thomson scattering intensity; ; units depend on setting of /S10: ; /S10 NOT set: per sterad in units of 10^-16 times the flux received ; from the solar disk (at the observer location ; /S10 set: S10 units ; P array[n,m]; type: float ; polarization ; CALLS: ; SyncArgs, ToRadians, ToSolarRadii, ThomsonFarY, ThomsonS10 ; infinitevalue ; SEE ALSO: ; ThomsonLOSStep, ThomsonLOSRomb ; PROCEDURE: ; > Calculates an analytical expression for the integral along the ; entire line of sight in the limit of small angular size of the Sun. ; ; > The integrated intensity incident on the observer has cgs units of ; erg/s/cm^2/sterad. The flux from the Sun incident on the observer has ; cgs units of erg/s/cm^2, so the ratio will have units 1/sterad. ; ; > The electron density in the solar wind at 1 AU (cm^-3) is set to 1 cm^-3. ; ; > Coronal density n(s) = n0*(r0/r(s))^2 (r0=a AU) ; Intensity/electron I(s) = 0.5*Pi*Sigma*I0*Func(Omega,Chi) ; ; The integral has the form ; ; B = Integral[0,inf]{n(s)I(s)ds} ; = 0.5*Pi*Sigma*I0*Integral[0,inf]{n(s) Func(Omega,Chi) ds} ; ; > The result is expressed in units of the flux received from the solar ; disk by the observer: ; ; F = (Pi*Rs^2)*I0*(1-U/3) / RSun^2 (erg/s/cm^2) ; = Pi*I0*(1-U/3)* (Rs/RSun)^2 ; ; > 10^-13 = 10^-26*10^13 ; Factor 10^-26 is from the Thomson cross section, Sigma ; Factor 10^13 is from the integration step size ; MODIFICATION HISTORY: ; 1990, Paul Hick (UCSD) ;- PRO ThomsonFarY, Y, Elo, I, It, Itr ; Elo in radians @compile_opt.pro ; On error, return to caller I = 0.0 It = 0.0 Itr = 0.0 SyncArgs, Y, Elo, I, It, Itr Tiny = 1.0e-5 TinyElo = 6.0*!dtor ; 2.0*!dtor PInf = 9000.0 Elo = Elo > Tiny S = sin(Elo) C = cos(Elo) L = where(Y GE PInf) IF L[0] NE -1 THEN Y[L] = infinitevalue(Y) ; Elongations close to 0 or 180 degrees L = where(Y NE -C AND S LT sin(TinyElo)) IF L[0] NE -1 THEN BEGIN S2 = S[L]*S[L] Y0 = (Y[L] GT 0 AND Elo[L] LT !pi/2)*!pi/(S2*S[L]) P = 2.0*(Elo[L] LT !pi/2)-1.0 M = Y[L] EQ infinitevalue(Y) Y3 = M*0.0+(1B-M)/Y[L]^3 Y5 = M*0.0+(1B-M)/Y[L]^5 It [L] = (1.0/2.0)*Y0-1.0/3.0*(Y3+P)+1.0/5.0*(2*Y5-1.0/2.0*P)*S2 Itr[L] = (3.0/8.0)*Y0 -1.0/5.0*( Y5+ P)*S2 I [L] = (5.0/8.0)*Y0-2.0/3.0*(Y3+P)+ Y5 *S2 ENDIF L = where(Y EQ infinitevalue(Y) AND S GE sin(TinyElo)) IF L[0] NE -1 THEN BEGIN ; S = Infinity S2 = S[L]*S[L] E = (!Pi-Elo[L])/S[L] It [L] = (1.0/2.0)/S2*( C[L]+E) Itr[L] = (3.0/8.0)/S2*((1.0+2.0/3.0*S2)*C[L]+E) I [L] = (5.0/8.0)/S2*((1.0-2.0/5.0*S2)*C[L]+E) ENDIF L = where(Y NE -C AND Y NE infinitevalue(Y) AND S GE sin(TinyElo)) IF L[0] NE -1 THEN BEGIN ; S > 0 S2 = S[L]*S[L] Y2 = Y[L]*Y[L] YS = S2+Y2 E = (atan(Y[L],S[L])+!pi/2-Elo[L])/S[L] It [L] = (1.0/2.0)/S2*(Y[L] / YS + C[L] + E) Itr[L] = (3.0/8.0)/S2*(Y[L]*(Y2+5.0/3.0*S2)/(YS*YS) + (1.0+2.0/3.0*S2)*C[L] + E) I [L] = (5.0/8.0)/S2*(Y[L]*(Y2+3.0/5.0*S2)/(YS*YS) + (1.0-2.0/5.0*S2)*C[L] + E) ENDIF RETURN & END FUNCTION ThomsonLOSFar, RSun, Elo, P, lower=lower, upper=upper, degrees=degrees, au=au, apm=apm, s10=s10 @compile_opt.pro ; On error, return to caller InitVar, S10, /key IF S10 THEN $ IF IsType(apm,/undefined) THEN $ message, 'no apparent magnitude for the Sun specified' rpau = ToSolarRadii(au=au) ; Converts to solar radii rpd = ToRadians(degrees=degrees) InitVar, lower, 0.0 InitVar, upper, infinitevalue(0.0) lower >= 0 L = where(Upper LT 0) IF L[0] NE -1 THEN Upper[L] = infinitevalue(Upper) E = [Elo] R = [RSun] nrE = n_elements(E) nrR = n_elements(R) E *= rpd E = E#replicate(1,nrR) R = replicate(1,nrE)#R cosE = cos(E) ThomsonFarY, -cosE+lower/R, E, I0, I0t, I0tr ; At lower limit ThomsonFarY, -cosE+upper/R, E, I1, I1t, I1tr ; At upper limit P = (I1tr-I0tr)/(I1-I0) CASE S10 OF 0: B = 1.0d0 1: B = 1.0d-16*ThomsonS10(R*rpau,apm) ENDCASE n0 = 1.0 ; Density at 1 AU B *= 0.5d0*!physics.thomsoncrosssection*n0/(R*rpau*!sun.RAu)*!sun.au*1.0d3*(I1-I0) szlos = size(Elo ) szpos = size(RSun) destroyvar, tmp IF szlos[0] GT 0 THEN boost, tmp, szlos[1:szlos[0]] IF szpos[0] GT 0 THEN boost, tmp, szpos[1:szpos[0]] CASE IsType(tmp,/defined) OF 0: BEGIN B = B[0] P = P[0] END 1: BEGIN B = reform(B,tmp,/overwrite) P = reform(P,tmp,/overwrite) END ENDCASE RETURN, B & END