C+ C NAME: C ThomsonLOSStep C PURPOSE: C Determines the integrated intensity along a line of sight for electron C Thomson scattering for a 1/r^2 density by summing nStep line-of-sight C segments. C CALLING SEQUENCE: function ThomsonLOSStep(SLower,SUpper,nStep, ScSun,Elo,U, P) C INPUTS: (the input values are retained on return): C SLower real lower limit of integration (solar radii) C SUpper real upper limit of integration (solar radii) C If SUpper<0 the upper limit is effectively infinity: C SUpper is set to the parameter MATH__PINF (=1.e30) solar radii C nStep integer # integration steps (i.e. stepsize is SUpper/nStep) C ScSun real heliocentric distance of observer (solar radii) C Elo real elongation of s/c line of sight (l.o.s.) in degrees. C (Elo=0 is the direction to the Sun) C U real limb darkening constant C OUTPUTS: C ThomsonLOSStep C real Integrated Thomson scattering intensity received C per sterad in units of 10^-16 times the flux received C from the solar disk (at the observer location). C P real polarization C CALLS: C ElSunDistance, ThomsonBase C INCLUDE: include 'sun.h' include 'phys.h' include 'math.h' include 'thomson.h' C PROCEDURE: C See href=ThomsonLOS= C MODIFICATION HISTORY: C 1996, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- real SLower real SUpper integer nStep real ScSun real Elo real U real P parameter (denAU = 5.) S() = SLower+I*dX ! Distance along los (solar radii) Elo = max(Elo,MATH__TINY) S1 = min(SUpper,LOS__PINF) if (S1 .lt. 0.) S1 = LOS__PINF rIt = 0. rItr = 0. dX = (S1-SLower)/nStep ! Step size (solar radii) do I=1,nStep ElSun = ElSunDistance(ScSun,S(),Elo, SinChi) dI = ThomsonBase(ElSun,SinChi,U, P,dIt,dItr) Den = denAU/(ElSun*SUN__RAU)**2 ! # el/cm^3 for 1/r^2 density rIt = rIt +Den*dIt rItr = rItr+Den*dItr end do rI = rIt+rIt-rItr ! Total intensity P = rItr/rI ! Polarization ! Intensity/(Pi*I0) ThomsonLOSStep = ScSun*ScSun/(1-U/3)*0.5*PHYS__THOMSON*SUN__R*dX*rI return end