C+ C NAME: C MkLOSWeights C PURPOSE: C To make weights for each source C CATEGORY: C Tomography C CALLING SEQUENCE: subroutine MkLOSWeights(IM,dS,NS,NL,XE,RR,WW,PWR) C INPUTS: C IM integer Mode of operation C 1 = Velocity weights - 327 MHz C 2 = G-level weights - 81.5 MHz C 3 = UCSD velocity - 72.8 MHz C 4 = Thomson scat U weights C 5 = Thomson scat B weights C 6 = Thomson scat V weights C dS real resolution along LOS (in units of RR) C NS integer # segments of length dS along LOS C NL integer # IPS data points C XE(NL) real IPS line of sight elongations (deg) C RR(NL) real Observer-Sun distance (AU) C PWR real See PROCEDURE C OUTPUTS: C WW(NS,NL) real Weights at each pos. along the L.O.S per source C CALLS: C AIPS_WTF, THOM_WTF C SEE ALSO: C LosWeights C PROCEDURE: C > Note that dS is defined in units of the observer-Sun distance; NOT in AU C > If the radial power index PWR is not 2, then an additional weight factor is C included. The extra term comes from the radial dependence of the density fluctations C in the los integral. delta(n)^2 ~ r^[-2*(2-PWR)] C MODIFICATION HISTORY: C NOV, 1995 B. Jackson (STEL,UCSD) C- real XE(NL), ! Source elongations & RR(NL), ! Distance from the Sun (AU) & WW(NS,NL) ! N wts. at each pos. along the L.O.S per src. S(J) = (J-.5)*dS ! Distance along los in units of RR !$omp parallel private(I,J,PW,E,R,dR) if (IM .le. 3) then ! IPS scintillation weights !$omp do schedule(static) do I=1,NL ! Loop over all lines of sight R = RR(I) do J=1,NS ! First line of sight WW(J,I) = AIPS_WTF(IM,S(J)*R) end do end do !$omp end do nowait PW = 2.*(2.-PWR) !------- ! Add additional weight factor if PWR ne 2 if (PW .ne. 0.) then !$omp do schedule(static) do I=1,NL ! Loop over lines of sight do J=1,NS R = sqrt(RR(I)*RR(I)+S(J)*S(J)-2.*RR(I)*S(J)*cosd(XE(I))) WW(J,I) = WW(J,I)/R**PW end do end do !$omp end do nowait end if else ! Thomson scattering weights: Helios U/B/V filter !$omp do schedule(static) do I=1,NL E = abs(XE(I)) ! Elongation (deg) R = RR(I) dR = dS*R do J=1,NS WW(J,I) = THOM_WTF(R,S(J)*R,E,IM-3)*dR end do end do !$omp end do nowait end if !$omp end parallel return end