[Previous]
[Next]
NAME:
t3d_oblique
PURPOSE:
Implements 3D transformation matrix for oblique projections
CATEGORY:
gen/idl/math
CALLING SEQUENCE:
t3d_oblique, Array, /reset, oblique=oblique
INPUTS:
Array array[4,4]; type: any
Matrix used as the starting transformation.
If omitted !P.T is used; not used if /reset is set.
OPTIONAL INPUTS:
/reset if set start out with the identity matrix
matrix=matrix
if set to a named variable, the result is returned in this
parameter and !P.T is not modified.
oblique=oblique
A two-element vector of oblique projection parameters.
Points are projected onto the XY plane at Z=0 as follows:
x' = x + z(d COS(a)), and y' = y + z(d SIN(a)).
where oblique[0] = d, and oblique[1] = a.
OUTPUTS:
!P.T unless the keyword MATRIX is supplied, in which case the result
is returned in MATRIX and !P.T is not affected.
CALLED BY:
setup3d
SIDE EFFECTS:
!P.T is changed if the keyword MATRIX is not set.
PROCEDURE:
Modidifies the oblique projection in IDL t3d.pro by settinr
r[2,2] = 1.0 instead of 0.0
This preserves the z-component in an oblique projection.
MODIFICATION HISTORY:
JUN-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
thomson_common
PURPOSE:
Contains common block definition used by
Thomson scattering functions
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
@thomson_common.pro
INCLUDED BY:
ThomsonLOSDensity, ThomsonSetupLOS
PROCEDURE:
MODIFICATION HISTORY:
JULY-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
Thomson_doc
PURPOSE:
Documentation only. Collects all links to the Thomson scattering
package and a link to a pdf with additional information.
CATEGORY:
Documentation
SEE ALSO:
ThomsonBase, ThomsonBrightness, ThomsonElectron, ThomsonElectronFar
ThomsonLOSDensity, ThomsonLOSFar, ThomsonLOSRomb, ThomsonLOSStep
ThomsonMidpoint, ThomsonMidpointFar, ThomsonMidpointFnc, ThomsonPDistance
ThomsonPDistanceFar, ThomsonRadialFilter, ThomsonS10, ThomsonSetupLOS
ThomsonSetupRomb, ThomsonSolarFlux, ThomsonSoup, ThomsonTang, ThomsonTangMRad
thomson_common
PROCEDURE:
See http://supercat.ucsd.edu/reports/thomson.pdf
MODIFICATION HISTORY:
JUL-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ThomsonBase
PURPOSE:
(Used internally only)
Determines the intensity scattered from single coronal electron by Thomson scattering
CALLING SEQUENCE:
FUNCTION ThomsonBase, ElSun, SinChi, U, P, It, Itr
INPUTS:
ElSun array distance Sun-observer (in solar radii)
SinChi array sine of angle Sun-Electron-Observer
U array limb darkening coefficient
OUTPUTS:
Result array scattered intensity
P array polarization; P=Itr/ThomsonBase (-1<=P<=1)
Itr array tangential minus radial intensity; same units as ThomsonBase.
It array radial intensity; same units as ThomsonBase
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
ThomsonSoup
CALLED BY:
ThomsonElectron, ThomsonLOSStep, ThomsonTang, ThomsonTangMRad
PROCEDURE:
> Based on Chapter 6, Section B of Billings' "A guide to the solar corona" (p. 150)
Sigma = Thomson cross section=7.96x10^-26 cm^2/sterad
Omega = angular size of Sun from electron
Chi = angle Sun-Electron-Observer
I0 = intensity at disk center
RSun = solar radius = 7x10^10 cm
Billings specifies the scattered intensity in the form
I=0.5*Pi*Sigma*I0*Func(Omega,Chi) (erg/s/sterad)
This subroutine only deals with Func(Omega,Chi):
From Eq. 18: It = (1-u)*CC+u*DD
From Eq. 19: Itr = sin^2(Chi)*[(1-u)AA+u*DD]
> The last two arguments (It, Itr) are returned for use by function ThomsonIntegral.
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonBrightness
PURPOSE:
Calculates weights for integrating Thomson scattering signal
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
FUNCTION ThomsonBrightness, rr_earth, R, F, f3darg, $
ut_earth = ut_earth , $
pa_earth = pa_earth , $
elo_earth = elo_earth , $
elo_sun = elo_sun , $
degrees = degrees
INPUTS:
rr_earth array[3] NOT USED; for 'plain' sky map
array[3,N] NOT USED; for 'transit' sky map
NOT USED; heliographic coordinates of Earth for lines of sight
R array[3,N,L,M] (N,L may be 1 or absent)
locations of all segments for all lines of sight
in spherical coordinates (usually heliographic)
This can be a grid of NxL lines of sight with M
segments along each line of sight
R[0,*,*,*] : longitude
R[1,*,*,*] : latitude
R[2,*,*,*] : heliocentric distance (AU)
F array[N,L,M] normalized densities n*(r/r0)^2 at los segments (electrons/cm^-3)
f3darg array[4] f3darg[0] Line of sight step size (AU)
f3darg[1] Limb darkening constant
f3darg[2] Apparent magnitude Sun at 1 AU
f3darg[3] 0=Intensity; 1: Tangential; 2: Tang-Rad
OPTIONAL INPUT PARAMETERS:
/degrees if set all input angles should be in degrees (default: radians)
ut_earth array[1] not used
pa_earth array[N,L,M] not used
elo_earth array[N,L,M] angle Sun-Earth-LOS segment (i.e. conventional elongation angle)
elo_sun array[N,L,M] angle Earth-Sun-LOS segment
OUTPUTS:
R array[N,L,M] weight factors W(s) at location s along line of sight in S10
Intensity B = Sum( W(s) ) = Sum( I(s)n(s)ds )
INCLUDE:
@compile_opt.pro ; On error, return to caller
EXTERNAL BY:
RemoteView_Display2D, vu_coronagraph, vu_earthskymap, vu_lineofsight
CALLS: ***
SubArray, ThomsonElectron, ToRadians
PROCEDURE:
ThomsonElectron returns 10^-26 S10. Multiply by the step size along the line
of sight in cm (f3darg[0]*!sun.au*10^13) and multiply with the remaining
10^-13. The value returned is a brightness in S10 for each line of sight segment.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS)
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Removed restriction on dimensions of R,F,elo_earth,elo_sun.
F, elo_earth, elo_sun should all have the same structure, while
R should have an additional leading dimension of size 3.
[Previous]
[Next]
NAME:
ThomsonElectron
PURPOSE:
Determines the Thomson scattering intensity from single coronal electron.
If /S10 is set then return brightness of one electron per square degree
of sky in S10 units
CALLING SEQUENCE:
FUNCTION ThomsonElectron, SinChi, P, rsun=RSun, au=au, udark=udark, apm=APM, s10=S10, tangonly=tangonly, tangmrad=tangmrad
INPUTS:
SinChi array; type: float
sine of angle Sun-Electron-Observer
OPTIONAL INPUT PARAMETERS:
rsun=RSun array; type: float; default: 1 AU
distance Sun-Electron
udark=idark array; type: float; default: 0
limb darkening coefficient
/au if set all distances are in AU (default: solar radii)
/s10 if set then return brightness is in S10
apm=APM apparent magnitude of Sun (only needed if /S10 is set)
/tangonly return tangential intensity, It
/tangmrad return tangential - radial intensity, Itr
OUTPUTS:
Result array; type: float
scattered intensity; units depend on setting of /S10
/S10 NOT set: 10^-26 times the flux from the solar disk incident
on the electron (effectively the units are 10^-26 cm^2/sterad)
/S10 set; 10^-26 S10 units
P array: type: float
polarization (-1<=P<=1)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, IsType, ThomsonBase, ThomsonS10, ThomsonSolarFlux, ToSolarRadii
CALLED BY:
ThomsonBrightness
PROCEDURE:
Based on Chapter 6, Section B of Billings' "A guide to the solar corona" (p. 150)
Sigma = Thomson cross section=7.96x10^-26 cm^2/sterad
Omega = angular size of Sun from electron
Chi = angle Sun-Electron-Observer
I0 = intensity at disk center
Rs = solar radius = 7x10^10 cm
Billings specifies the scattered intensity in the form
I=0.5*Pi*Sigma*I0*Func(Omega,Chi) (erg/s/sterad)
The average intensity coming from the solar disk is
i=(Pi*Rs^2)*I0*(1-U/3) (erg/s/sterad)
The flux incident on the electron at distance Rsun is
F=i/RSun^2=Pi*I0*(1-U/3)*(Rs/RSun)^2 (erg/s/cm^2)
If /S10 NOT set then the ratio
I/F = 0.5*Sigma*Func(Omega,Chi)/( (Rs/RSun)^2*(1-U/3) )
is returned here, except for a factor 10^-26 (from Sigma).
> The flux received from the solar disk by an observer at distance RObs
(rather than the electron) is i/RObs^2 = F*(RSun/RObs)^2 (erg/s/cm^2).
The scattered flux from the electron incident on the observer is
I/S^2 (erg/s/cm^2). The ratio (I/F)*(RObs/(RSun*S))^2 gives
the flux received from the electron in units of the flux received by
the observer from the solar disk.
> The conversion to S10 is done by multiplying with the conversion
factor returned by ThomsonS10
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonElectronFar
PURPOSE:
Determines the intensity scattered from single coronal electron
by Thomson scattering in the limit of large electron-Sun distance
(limit Omega->0; ElSun->Infinity)
Get Thomson scattering brightness of one electron per square degree
of sky in S10 units in limit of large electron-Sun distance
CALLING SEQUENCE:
FUNCTION ThomsonElectronFar, SinChi, P, rsun=RSun, au=au, apm=APM, s10=S10
INPUTS:
SinChi array; type: float
sine of angle Sun-Electron-Observer
OPTIONAL INPUT PARAMETERS:
APM array; type: float
apparent magnitude of the Sun
rsun=RSun array; type: float
distance Sun-Electron (in solar radii)
OUTPUTS:
Result array; type: float
scattered intensity; units depend on /S10 setting
S10 NOT set: 10^-26 times the flux from the solar disk incident on the electron
S10 set : 10^-26 S10
P array polarization (-1<=P<=1)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, ThomsonS10, ToSolarRadii
PROCEDURE:
> Based on Chapter 6, Section B of Billings' "A guide to the solar
corona" (p. 150)
Sigma = Thomson cross section=7.96x10^-26 cm^2/sterad
Omega = angular size of Sun from electron
Chi = angle Sun-Electron-Observer
I0 = intensity at disk center
RSun = solar radius = 7x10^10 cm
Billings specifies the scattered intensity in the form
I=0.5*Pi*Sigma*I0*Func(Omega,Chi) (erg/s/sterad)
The average intensity coming from the solar disk is
i=(Pi*RSun^2)*I0*(1-U/3) (erg/s/sterad)
The flux incident on the electron is F=i/ElSun^2 (erg/s/cm^2)
The ratio
I/F = 0.5*Sigma*Func(Omega,Chi)/( (RSun/ElSun)^2*(1-U/3) )
is returned here, except for a factor 10^-26 (from Sigma).
> The flux received from the solar disk by the observer (rather than the
electron) is i/ScSun^2 = F*(ElSun/ScSun)^2 (erg/s/cm^2).
The scattered flux from the electron incident on the observer is
I/ScEl^2 (erg/s/cm^2). The ratio (I/F)*(ScSun/(ElSun*ScEl))^2 gives
the flux received from the electron in units of the flux received by
the observer from the solar disk.
> An S10 unit is `the brightness of one 10th magnitude star per square
degree of sky'. Replace the star by an electron at the same location
in the sky, and at distance ScEl away from the observer. The electron
is radiating by Thomson scattering of sunlight.
> STEP 1: Calculate the intensity (erg/s/sterad) -emitted- by the electron
in units of the flux -incident- at 1 AU from the solar
disk (erg/s/cm^2) (compare ThomsonElectron; the only difference
is that ElSun is replaced by r0=1 AU in the unit determination)
> STEP 2: Convert to units of the flux -incident- at 1 AU from a 10th
magnitude star: multiply by 10^((10-M)/2.5). (Apparent
magnitude, M=-2.5*log(Flux)).
!!! M is an apparent magnitude as observed at 1 AU. This is why
1 AU was used in step 2, rather than the observer-Sun
distance ScSun.
> 10^-48 = 10^-26*10^-26*10^4:
10^-26 from Sigma; 10^-26 from 1/ScEl^2; 10^4 from 10^(10/2.5)
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonLOSDensity
PURPOSE:
CATEGORY:
sat/idl/toolbox/thomson
CALLING SEQUENCE:
FUNCTION ThomsonLOSDensity, S
INPUTS:
S array[k]; type: float
topocentric distance electron-observer (in solar radii)
OUTPUTS:
F array; type: float
density at electron location (in electrons/cm^-3)
INCLUDE:
@compile_opt.pro ; On error, return to caller
@thomson_common.pro ; Dummy comment
CALLS: ***
CvPointOnLos, EulerRotate, IsType, REVERSE, SuperArray, boost, destroyvar
CALLED BY:
ThomsonLOSStep, ThomsonTang, ThomsonTangMRad
PROCEDURE:
> The observer locations and directions of the lines of sight are
first setup in a common block by ThomsonSetupLOS.
> The distance along the lines of sight 'S', in combination with
the common block variables are used to get the heliocentric coordinates
of all line-of-sight locations.
> The function 'density' is a user-defined function, which returns the
density for a given heliocentric location.
The function is called using the IDL call_function routine.
> If no density function is specified than a 1/r^2 density with a
1 electrons/cm^3 density at 1 AU is used.
MODIFICATION HISTORY:
JAN-1998, Paul Hick (UCSD)
JUN-2001, Paul Hick (UCSD/CASS)
Added /grid keyword
JUL-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Removed /grid keyword again
Added some code to allow calculation to work for observers
out of the ecliptic (with i.e. with ecliptic latitude
not zero).
[Previous]
[Next]
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: ***
InfiniteValue, InitVar, IsType, SyncArgs, THOMSONFARY, ThomsonS10, ToRadians
ToSolarRadii, boost, destroyvar
SEE ALSO:
ThomsonLOSRomb, ThomsonLOSStep
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)
[Previous]
[Next]
NAME:
ThomsonLOSRomb
PURPOSE:
Calculates integrated line-of-sight intensity for
Thomson scattering using Romberg integration.
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
FUNCTION ThomsonLOSRomb, pos, los, P, $
lower = lower , $
upper = upper , $
density = density , $
degrees = degrees , $
au = au , $
udark = udark , $
apm = apm , $
s10 = S10
INPUTS:
pos array[3,n]; type: float
heliocentric location of observer:
(ecliptic) longitude and latitude; and heliocentric distance
(a scalar 'pos' is interpreted as [0,0,pos])
los array[2,m]; type: float
topocentric (ecliptic) longitude and latitude of line of sight
relative to Sun-observer direction
(a scalar 'los' is interpreted as [los,0])
OPTIONAL INPUT PARAMETERS:
/s10 if set intensities are returned in S10 units
In this case the apparent magnitude APM MUST BE SPECIFIED
udark=udark scalar; type: float; default: 0
limb darkening constant
apm=apm scalar; type: float
apparent magnitude of Sun
density=density
scalar; type: string; default: undefined
name of function used to calculate the electron density.
Keyword is passed to ThomsonSetupLOS.
lower=lower
scalar; type: float; default: 0
Lower limit of los integration (solar radii)
If Lower <=0 then Lower = 0 is used.
upper=upper
scalar; type: float; default: 9000 solar radii
Upper limit of los integration (solar radii)
If Lower <=0 then Upper = 9000.0 solar radii (~40 AU) is used.
/degrees if set all angles are in degrees (default: radians)
/au if set all distances are in AU (default: solar radii)
OUTPUTS:
Result scalar[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[n,m] scalar; type: float
polarization
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InfiniteValue, InitVar, IsType, SyncArgs, SyncDims, ThomsonS10, ThomsonSetupLOS
ThomsonSetupRomb, ThomsonSolarFlux, ToRadians, ToSolarRadii, boost, destroyvar
sphere_distance
EXTERNAL:
ThomsonTang, ThomsonTangMRad
CALLED BY:
ThomsonMidpoint, ThomsonMidpointFnc
SEE ALSO:
ThomsonLOSStep
PROCEDURE:
> The lower and upper limits can actually be 1-dim arrays, but that is
probably not useful.
> If no 'density' function is specified then a 1/r^2 density is used with
density of 1 at 1 AU.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ThomsonLOSStep
PURPOSE:
Calculates integrated line-of-sight intensity for Thomson scattering.
Integration is implemented as a sum over steps of equal size.
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
FUNCTION ThomsonLOSStep, Pos_, Dir_, P, $
lower = Lower , $
upper = Upper , $
nstep = nstep , $
density = density , $
degrees = degrees , $
au = au , $
apm = APM , $
udark = udark , $
s10 = S10
INPUTS:
Pos_ array[3,n]; type: float
heliocentric location of observer:
(ecliptic) longitude and latitude; and heliocentric
distance
(the 2nd dim can be absent, or can represent multiple
dimensions)
Dir_ array[2,m]; type: float
topocentric (ecliptic) longitude and latitude of line of sight
relative to Sun-observer direction
(the 2nd dim can be absent, or can represent multiple
dimensions)
OPTIONAL INPUT PARAMETERS:
/s10 if set intensities are returned in S10 units
In this case the apparent magnitude APM MUST BE SPECIFIED
udark=udark scalar; type: float; default: 0
limb darkening constant
apm=APM scalar; type: float
apparent magnitude of Sun
density=density
scalar; type: string; default: undefined
name of function used to calculate the electron density.
Keyword is passed to ThomsonSetupLOS.
lower=Lower
scalar; type: float; default: 0
Lower limit of los integration (solar radii)
If Lower <=0 then Lower = 0 is used.
upper=Upper
scalar; type: float; default: 9000 solar radii
Upper limit of los integration (solar radii)
If Lower <=0 then Upper = 9000.0 solar radii (~40 AU) is used.
nstep=nstep
scalar; type: integer; default: 100
number of elements in which to divide the range [Lower, Upper]
/degrees if set all angles are in degrees (default: radians)
/au if set all distances are in AU (default: solar radii)
OUTPUTS:
Result array[n,m]; type: double
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
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
Distance2Sun, InitVar, IsType, SuperArray, ThomsonBase, ThomsonLOSDensity
ThomsonS10, ThomsonSetupLOS, ThomsonSolarFlux, ToRadians, ToSolarRadii, boost
destroyvar, gridgen, sphere_distance
SEE ALSO:
ThomsonLOSFar, ThomsonLOSRomb
PROCEDURE:
Densities are calculated by ThomsonLOSDensity.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS)
AUG-2008, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Observer location can now also be an array.
In addition the observer does not have to be in the ecliptic
anymore.
[Previous]
[Next]
NAME:
ThomsonMidpoint
PURPOSE:
Calculate position along line of sight where the integrated intensity
is half of the intensity integrated along the entire line of sight
CALLING SEQUENCE:
FUNCTION ThomsonMidpoint, ScSun,Elo, udark=udark, degrees=degrees, au=au
INPUTS:
ScSun scalar distance of spacecraft from Sun
Elo scalar elongation of s/c line of sight (l.o.s.) in degrees.
Elo=0 is the direction to the Sun
OPTIONAL INPUT PARAMETERS:
udark=udark scalar; type: float; default: 0
limb darkening constant
/degrees if set all angles are in degrees (default is radians)
/au if set all distances are in AU (default: solar radii)
OUTPUTS:
ThomsonMidPoint
scalar point on l.o.s. where intensity is half the total
integrated intensity
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, ThomsonLOSRomb, ToRadians, ToSolarRadii, nrZBrent, nrZbrac
EXTERNAL:
ThomsonMidpointFnc
PROCEDURE:
First nrZbrac is used to bracket the zero of function ThomsonMidpointFnc.
Then nrZBrent is used to locate the zero.
MODIFICATION HISTORY:
JAN-1997, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonMidpointFar
PURPOSE:
Calculate position along line of sight where the integrated
intensity is half of the intensity integrated along the
entire line of sight (treating the Sun as a point source
CALLING SEQUENCE:
S = ThomsonMidpoint(ScSun,Elo,U,/degrees)
INPUTS:
ScSun array distance of spacecraft from Sun in AU
Elo array elongation of s/c line of sight (l.o.s.) in degrees.
Elo=0 is the direction to the Sun
OUTPUTS:
ThomsonMidPointFar
array point on l.o.s. where intensity is half the total
integrated intensity
CALLS: ***
BadValue, SyncArgs, THOMSONMIDFAR, ToRadians, nrZBrent, nrZbrac
EXTERNAL:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
JAN-1997, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonMidpointFnc
PURPOSE:
Internal use by ThomsonMidpoint.
CALLING SEQUENCE:
FUNCTION ThomsonMidpointFnc, S, arg ; Internal use only
INPUTS:
S scalar; type: float
distance along line of sight in solar radii
arg array(4}; type: float
[R,E,udark,halfint]
R = heliocentric distance observer in solar radii
E = elongation in radians
udark = limb darkening constant
halfint = half the intensity from 0 to infinity
OUTPUTS:
R scalar; type: float
integrated intensity upto distance S - halfint
INCLUDE:
@compile_opt.pro ; On error, return to caller
EXTERNAL BY:
ThomsonMidpoint
CALLS: ***
ThomsonLOSRomb
PROCEDURE:
Returns the difference between line-of-sight integrated intensity
up to specified distance S and half the integrated intensity over the
entire line of sight. I.e. the distance S which makes this function zero is
what ThomsonMidpoint is looking for.
No density function is passed to ThomsonLOSRomb, so a 1/r^2 density is assumed.
MODIFICATION HISTORY:
JAN-1997, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonPDistance
PURPOSE:
Find the distance to the plane of the sky where a single electron
would have a given polarization.
CALLING SEQUENCE:
FUNCTION ThomsonPDistance, ElSun, U, P
INPUTS:
ElSun array distance Sun-Electron (in solar radii)
U array limb darkening coefficient
P array polarization (-1<=P<=1)
OUTPUTS:
ThomsonPDistance
array distance to the plane of the sky (solar radii) (>=0)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
BadValue, SyncArgs, ThomsonSoup
PROCEDURE:
> The distance to the plane of the sky is given as a positive number.
There are two locations on either side of the plane of the sky
which match the polarization.
> An electron can only produce a positive polarization. If a negative
polarization is specified, then D=-1. is returned
> An electron can only produce a polarization below a certain maximum
(less than one). If a polarization above the maximum value is specified
the D=-1. is returned.
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonPDistanceFar
PURPOSE:
Find the distance to the plane of the sky where a single electron
would have a given polarization in the limit of large electron-Sun
distance
CALLING SEQUENCE:
FUNCTION ThomsonPDistanceFar, ElSun, P
INPUTS:
ElSun array distance Sun-Electron (in solar radii)
P array polarization (-1<=P<=1)
OUTPUTS:
ThomsonPDistance
array distance to the plane of the sky (in solar radii) (>=0)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
BadValue, SyncArgs
PROCEDURE:
> The distance to the plane of the sky is given as a positive number.
There are two locations on either side of the plane of the sky
which match the polarization.
> An electron can only produce a positive polarization. If a negative
polarization is specified, then D=-1. is returned
> An electron can only produce a polarization below a certain maximum
(less than one). If a polarization above the maximum value is specified
the D=-1. is returned.
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonRadialFilter
PURPOSE:
CATEGORY:
sat/idl/toolbox/thomson
CALLING SEQUENCE:
FUNCTION ThomsonRadialFilter, elo_sun, degrees=degrees, elo_one=elo_one
INPUTS:
elo_sun array; type: float
elongations (angle between line of sight and
direction to Sun).
OPTIONAL INPUT PARAMETERS:
elo_one=elo_one
scalar; type: float: default: 90 degrees
elongation at which radial filter has value of unity.
i.e. the filter scales to equivalent brightness at
this elongation
/degrees if set, then elo_sun should be in degrees
OUTPUTS:
F array of same type as 'elo_sun'; type: float
radial filter; dividing by F should remove the steep dropoff
in the Thomson scattering brightness.
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
IsType, ToRadians
CALLED BY:
RemoteView_Display2D, vu_coronagraph, vu_earthskymap, vu_elotime, vu_lineofsight
PROCEDURE:
Currently the radial filter is the dropoff with elongation in a 1/r^2
density in the limit of small angular size of the Sun.
MODIFICATION HISTORY:
FEB-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ThomsonS10
PURPOSE:
(Internal use only) Convert to S10 units
CALLING SEQUENCE:
FUNCTION ThomsonS10, DSun, APM
INPUTS:
DSun array; type: float
distance to Sun (in solar radii)
APM array; type: float
apparent magnitude Sun at 1 AU
OUTPUTS:
R array; type: float
Conversion factor to S10 units. If F is a flux in units of the
flux incident from the solar disk at heliocentric distance DSun
then R*F is the same flux in S10 units.
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
ThomsonElectron, ThomsonElectronFar, ThomsonLOSFar, ThomsonLOSRomb
ThomsonLOSStep
PROCEDURE:
An S10 unit is `the brightness of one 10th magnitude star per square
degree of sky'. Replace the star by an electron at the same location
in the sky, and at distance S away from the observer. The electron
is radiating by Thomson scattering of sunlight.
The conversion is done in two steps:
> STEP 1: Convert to units of the flux -incident- at r0 = 1 AU from the
solar disk: multiply by (r0/DSun)^2
(M is an apparent magnitude as observed at 1 AU. This is why
1 AU is used, rather than the observer-Sun distance RObs).
> STEP 2: Convert to units of the flux -incident- at 1 AU from a 10th
magnitude star: multiply by 10^((10-M)/2.5). (Apparent
magnitude, M=-2.5*log(Flux)).
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonSetupLOS
PURPOSE:
Sets up common block used by ThomsonLOSDensity to
calculate electron density at specified locations
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
PRO ThomsonSetupLOS, PosIn, DirIn, density=densityIn
INPUTS:
Pos array[3,n]; type: float
heliocentric location(s) of observer:
(longitude and latitude in radians;
and heliocentric distance in solar radii)
Dir array[2,m]; type: float
topocentric longitude and latitude of
lines of sight relative to Sun-observer
direction (in radians)
OPTIONAL INPUT PARAMETERS:
density=density
scalar; type: string; default: undefined
name of function to be called to calculate
the electron density. This function takes
a single argument:
R array[3,n]; type: float
heliocentric locations where density is
to be evaluated, usually
ecliptic longitude and latitude (radians)
and heliocentric distance (solar radii)
OUTPUTS:
(stored in common block)
INCLUDE:
@compile_opt.pro ; On error, return to caller
@thomson_common.pro ; Dummy comment
CALLS: ***
IsType, boost, destroyvar
CALLED BY:
ThomsonLOSRomb, ThomsonLOSStep
SEE ALSO:
ThomsonLOSDensity
PROCEDURE:
The input is stored in common block thomson_common.
ThomsonLOSDensity uses these together with an input
argument S (1-dim array[k]) specifying distances
along the line of sight, and calculates densities
at locations Loc[k,m,n] (k locations on m lines
of sight at n locations.
MODIFICATION HISTORY:
JAN-1998, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonSetupRomb
PURPOSE:
Controls Romberg integration in ThomsonLOSRomb
Internal use only
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
PRO ThomsonSetupRomb, RSun_, Elo_, U_
INPUTS:
RSun scalar: type: float
Observer-Sun distance (solar radii)
Elo scalar; type: float
Elongation (radians)
U scalar; type: float
Limb darkening constant
OUTPUTS:
(stored in common block)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
ThomsonLOSRomb
COMMON BLOCKS:
common ThomsonIntegrand, RSun, Elo, U
PROCEDURE:
ThomsonSetupIntegrand sets up the common block accessed by
ThomsonTang and ThomsonTangMRad (these two functions
are used as arguments to the IDL QRomb and QRomo functions.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ThomsonSolarFlux
PURPOSE:
Calculates the flux from the solar disk incident on
an observer at given distance from Sun
CATEGORY:
Thomson scattering
CALLING SEQUENCE:
FUNCTION ThomsonSolarFlux, R, U
INPUTS:
R array; type: float; default: 1 AU
distance from Sun (in solar radii)
U array; type: float; default: zero
limb darkening constant
OUTPUTS:
Flux array; type: float
flux from the solar disk in units of pi*I0
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar
CALLED BY:
ThomsonElectron, ThomsonLOSRomb, ThomsonLOSStep
PROCEDURE:
The flux from the solar disk expressed in the intensity at
the center of the disk, I0, is pi*I0*(1-u/3)*(Rsun/R)^2.
MODIFICATION HISTORY:
AUG-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ThomsonSoup
PURPOSE:
(Used internally only).
Calculates constant needed for calculating Thomson scattering intensities
CALLING SEQUENCE:
PRO ThomsonSoup, ElSun, U, It, Itr, aa=AA,bb=BB,cc=CC,dd=DD
INPUTS:
ElSun array[*] Electron-Sun distance in solar radii (=1./sine(Omega))
U array[*],scalar limb darkening constant
OUTPUTS:
rIt,rItr real constants
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
ThomsonBase, ThomsonPDistance
RESTRICTIONS:
Distance ElSun must be greater than one solar radii
(if its smaller then ElSun=1 is used)
PROCEDURE:
> See Billings, Guide to the solar corona (Chapter 6, p. 150) Academic Press (1966)
> The constants are functions of the angular size, Omega, of the Sun as seen from the
electron, and the limb darkening constant U. Sin(Omega)=RSun[cm]/dElectronSun[cm].
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ThomsonTang
PURPOSE:
Controls Romberg integration in ThomsonLOSRomb
Internal use only
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
FUNCTION ThomsonTang, S
INPUTS:
S
OUTPUTS:
INCLUDE:
@compile_opt.pro ; On error, return to caller
EXTERNAL BY:
ThomsonLOSRomb
COMMON BLOCKS:
common ThomsonIntegrand, RSun, Elo, U
CALLS: ***
Distance2Sun, ThomsonBase, ThomsonLOSDensity
PROCEDURE:
ThomsonSetupRomb sets up the common block accessed by ThomsonTang
and ThomsonTangMRad (these two functions are used as arguments to the
IDL QRomb and QRomo functions).
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ThomsonTangMRad
PURPOSE:
Controls Romberg integration in ThomsonLOSRomb
Internal use only
CATEGORY:
Physics: Thomson scattering
CALLING SEQUENCE:
FUNCTION ThomsonTangMRad, S
INPUTS:
S
OUTPUTS:
INCLUDE:
@compile_opt.pro ; On error, return to caller
EXTERNAL BY:
ThomsonLOSRomb
COMMON BLOCKS:
common ThomsonIntegrand, RSun, Elo, U
CALLS: ***
Distance2Sun, ThomsonBase, ThomsonLOSDensity
PROCEDURE:
ThomsonSetupRomb sets up the common block accessed by
ThomsonTang and ThomsonTangMRad (these two functions are
used as arguments to the IDL QRomb and QRomo functions).
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ThomsonUBVConst
PURPOSE:
Defines apparent solar magnitudes and limb darkening
constants to be used for the Helios UBV system
CALLING SEQUENCE:
FUNCTION ThomsonUBVConst, C
INPUTS:
C scalar; type: integer
1,2,3 for U,B,V light, resp.
OUTPUTS:
R array[2]; type: float
R[0]: limb darkening constant
R[1]: apparent magnitude of the Sun
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
RemoteView_Display2D, vu_coronagraph, vu_earthskymap, vu_elotime, vu_lineofsight
RESTRICTIONS:
1<=C<=3; if C out of range then C=1 is used
PROCEDURE:
> UHOS(LT) is the limb darkening coefficient for Helios photometer
light from the U/B/V filter (C=1,2,3). From a graph in
RAUMFAHRTFORSCHUNG by LEINERT et al. LAMBDA=3650,4300,5250 A for U,B,V
light. From Allen (1985), p. 171, U=0.80,0.77,0.62 by linear
interpolation.
> LUM is the luminosity of the solar disk in E14 S10 units:
LUM = LSUN/LS10 = 10**((10-MSUN)/2.5), with MSUN (from Allen)
-25.96,-26.09,-26.73 for U,B and V light respectively.
MODIFICATION HISTORY:
JUL-1996, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
ToDegrees
PURPOSE:
Get conversion factor needed to convert angles to degrees,
depending on setting of keyword Degrees
CATEGORY:
Number strangling
CALLING SEQUENCE:
degrees_per_mystery_unit = ToRadians(degrees=Degrees)
OPTIONAL INPUT PARAMETERS:
/degrees indicates whether input angles are in
radians (not set) or degrees (set)
OUTPUTS:
degrees_per_mystery_unit
= !radeg if Degrees not set
= 1.0 if Degrees set
Result is returned in double precision
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
AngleUnits, ColorEloTimeBox, ColorPolarBox, ColorSkybox, CvSky_Equatorial
CvSky_GSM, CvSky_Geographic, CvSky_Heliographic, CvSky_IHG, CvSky_Precess
HOSOrbit, MessengerOrbit, PlotCoronagraph, PlotEarthSkymap, PlotEloTimeMap
PlotPolarSkymap, PlotSphereCut, PlotSynopticMap, StereoAOrbit, StereoBOrbit
TimeGST, UlyssesOrbit, cvsmei, cvsmei_init, eclipsed_area, getnagoyasources
getootyasources, getsmeisources, jpl_test, mpc_comets, mpc_minor_planets
ra_fictitious_sun, smei_camera, smei_ccd2sky, smei_frm_where, smei_sky
smei_sky2ccd, smei_sky_cleanedge_fov, smei_sky_hdr2range, smei_sky_read
smei_sky_track, smei_star_fit, smei_star_standard, smei_star_stdmaps
smei_zld_dumbbell, smei_zld_weekly, smei_zldsky, sphere_smooth, vu_coronagraph
vu_elotime, vu_extract, vu_get, vu_linecut, vu_planarcut, vu_point_source, vu_set
vu_stereoview
SEE ALSO:
ToRadians
PROCEDURE:
Many procedures which process angles allow the keyword /Degrees
to indicate that the input and/or output angles are in degrees,
rather than the default radians. This function returns the
conversion factor required to convert to radians. Usually
this function is used at the beginning of the procedure to convert
all angles from the input units to radians, and at the end to convert
back from radians to the input units.
MODIFICATION HISTORY:
SEP-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ToRadians
PURPOSE:
Get conversion factor needed to convert angles to radians,
depending on setting of keyword Degrees
CATEGORY:
Number strangling
CALLING SEQUENCE:
radians_per_mystery_unit = ToRadians(degrees=Degrees)
OPTIONAL INPUT PARAMETERS:
/degrees indicates whether input angles are in
radians (not set) or degrees (set)
OUTPUTS:
radians_per_mystery_unit
= 1.0 if Degrees not set
= 1.0/!radeg if Degrees set
Results is double precision
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
AngleRange, Carrington, CarringtonLng, CarringtonNear, CarringtonNr
ColorEloTimeBox, ColorPolarBox, ColorSkybox, CvPointOnLos, CvRotation, CvSky_GSM
CvT3d, Distance2Sun, EarthSky3DLoc, EarthTransit3DLoc, EulerRotate, FishEye
GeographicInfo, HammerAitoff, IPS_velocity, InterpolateHeliosphere, KeplerOrbit
NewcombSun, PA_Pole, PlotCoronagraph, PlotEarthSkymap, PlotEloTimeMap
PlotPolarSkymap, PlotSphereCut, PlotSynopticMap, RemoteView_BodySize
RemoteView_CMEDensity, RemoteView_FovTilt, RemoteView_Init_Matrix
RemoteView_Init_View, RemoteView_StereoStates, RemoteView_ZEclipticPlane
RotationMeasure, ScEarth, TMO_skymotion, ThomsonBrightness, ThomsonLOSFar
ThomsonLOSRomb, ThomsonLOSStep, ThomsonMidpoint, ThomsonMidpointFar
ThomsonRadialFilter, cvsmei, eclipsed_area, flat_centerofmass, jpl_mag, jpl_phase
jpl_sizeofsun, plot3darc, refine_pointing, smei_cam2angle, smei_camera
smei_ccd2sky, smei_frm_where, smei_sky, smei_sky2cam, smei_sky2ccd
smei_sky_cleanedge_fov, smei_sky_read, smei_sky_track, smei_star_corepsf
smei_star_fit, smei_star_stdmaps, smei_zld_dumbbell, smei_zld_model, smei_zldsky
sphere_distance, sphere_great_arc, sphere_smooth, vu_coronagraph, vu_elotime
vu_remoteview, vu_solardisk, vu_spherecut, vu_synopticmap, wedge_bounding_box
SEE ALSO:
ToDegrees
PROCEDURE:
Many procedures which process angles allow the keyword /Degrees
to indicate that the input and/or output angles are in degrees,
rather than the default radians. This function returns the
conversion factor required to convert to radians. Usually
this function is used at the beginning of the procedure to convert
all angles from the input units to radians, and at the end to convert
back from radians to the input units.
MODIFICATION HISTORY:
JAN-1998, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
ToSolarRadii
PURPOSE:
Returns factor needed to convert distance to solar radii
CATEGORY:
Thomson scattering
CALLING SEQUENCE:
FUNCTION ToSolarRadii, au=au
OPTIONAL INPUT PARAMETERS:
au=au if not set then rpau=1 is returned
if set then the number of au per solar radii is returned
OUTPUTS:
Result multiplicative factor to convert to solar radii
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar
CALLED BY:
ThomsonElectron, ThomsonElectronFar, ThomsonLOSFar, ThomsonLOSRomb
ThomsonLOSStep, ThomsonMidpoint
PROCEDURE:
Many of the Thomson scattering procedures have a keyword /au to indicate
that in- and output distances are in AU rather than the default units of
solar radii. This function provides the conversion factor needed to
convert to solar radii irrespective of the setting of keyword /au.
MODIFICATION HISTORY:
FEB-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu