C+ C NAME: C ThomsonLOS3DStep C PURPOSE: C Determines the integrated intensity along a line of sight for electron C Thomson scattering for a user-specified density by summing nStep C line-of-sight segments. C CALLING SEQUENCE: function ThomsonLOS3DStep(SLower,SUpper,nStep,ScLng,ScLat,ScSun,SLng,SLat,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 ScLng real heliocentric longitude of observer (deg) C ScLat real heliocentric latitude of observer (deg) C ScSun real heliocentric distance of observer (solar radii) C SLng real topocentric longitude line of sight relative to C Sun-observer direction C SLat real topocentric longitude line of sight relative to C Sun-observer direction C U real limb darkening constant C OUTPUTS: C F 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 ThomsonSetupLOS, ElSunDistance, ThomsonBase, ThomsonLOSDensity C INCLUDE: include 'sun.h' include 'phys.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 ScLng real ScLat real ScSun real SLng real SLat real U real P S() = SLower+I*dX ! Distance along los (solar radii) S1 = min(SUpper,LOS__PINF) if (S1 .lt. 0.) S1 = LOS__PINF Den = ThomsonSetupLOS(ScLng,ScLat,ScSun,SLng,SLat) rIt = 0. rItr = 0. dX = (S1-SLower)/nStep ! Step size (solar radii) do I=1,nStep ElSun = ElSunDistance(ScSun,S(),acosd(cosd(SLng)*cosd(SLat)),SinChi) dI = ThomsonBase(ElSun,SinChi,U, P,dIt,dItr) Den = ThomsonLOSDensity(S()) ! # 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) ThomsonLOS3DStep = ScSun*ScSun/(1-U/3)*0.5*PHYS__THOMSON*SUN__R*dX*rI return end