[Previous]
[Next]
NAME:
NewcombSun
PURPOSE:
Calculates the true ecliptic coordinates (longitude, latitude and
distance) of the Sun according to Newcomb's theory of solar motion.
See O. Montenbruck, Practical Ephemeris Calculations, par. 4.1.2, p. 66.
CATEGORY:
smei/gen/idl/ephem
CALLING SEQUENCE:
FUNCTION NewcombSun, UT, $
Precision = Precision , $
Longitude = Longitude , $
Latitude = Latitude , $
Distance = Distance , $
diskradius = DiskRadius , $
parallax = Parallax , $
degrees = Degrees , $
heliocentric=Heliocentric
INPUTS:
UT array; type: standard time structure
times (UT)
OPTIONAL INPUTS:
/Precision if set, perturbations by several planets are
taken into account
/Longitude if set, return ecl. longitude
/Latitude if set, return ecl. latitude
/Distance if set, return Sun-Earth distance
(in neither of the tree keywords LONGITUDE,LATITUDE,
and DISTANCE is set, all three quantities are returned)
/Degrees if set, return angles in degrees (default: radians)
/Heliocentric if set, the longitude and latitude of Earth are returned
(180 degrees is added to the longitude, the latitude
is multiplied by -1, the distance is the same)
OUTPUTS:
Result array; type: double
cliptic coordinates of the Sun
ecliptic longitude and latitude (degrees or radians)
and Sun-Earth distance in AU
If only one coordinate (longitude, latitude or distance) is
requested then the structure of the output array the same as for T.
If more than one coordinate is requested the output array has an
additional leading dimension with 2 or 3 elements. The leading dimension
contains longitude, latitude and distance, in that order.
OPTIONAL OUTPUTS:
Diskradius radius of Sun in arcsec
Parallax horizontal parallax in arcsec
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, SyncDims, TimeGet, ToRadians
CALLED BY:
jpl_test
SEE ALSO:
jpl_eph, jpl_test
RESTRICTIONS:
The calculation of Diskradius and Parallax needs the Sun-Earth
distance. Hence the keyword /Distance must be set or all three
keywords /Distance, /Longitude and /Latitude should be omitted.
PROCEDURE:
DLP long period perturbation of solar mean longitude and mean
anomaly
G mean anomaly of the Sun
LO = DLO+SLO/3600 = mean longitude of Sun
DL difference between true and mean solar longitude according to
two body problem
The precision calculation includes perturbations by planets, oscillatory
terms with amplitudes less than 8".
The alternative way to calculate the geocentric location of the
Sun or the heliocentric location of the Earth is to use jpl_eph
(or equivalently, big_eph). In most of our IDL code NewcombSun
calls, have been replaced by big_eph calls.
The following two calls should give essentially the same result:
p = NewcombSun(tt,/precision,/degrees)
p = big_eph(tt,body='sun',center='earth',/degrees,/to_sphere,/to_ecliptic,/precess)
A check with the Astronomical Almanac shows:
(All times are at midnight on the day given)
Normal Precision Almanac
1971 Jan 1 Lng 279.9114 279.91575 279 54' 57.0" (279.91583)
Lat 0. 0.38" 0.42"
Dist 0.9832947 0.9833006 0.9832998
1974 Jan 1 Lng 280.1882 280.1874 280 11' 14.94" (280.1875)
Lat 0.
Dist
1979 Jan 1 Lng 279.9702 279.9708 279 58' 14.90" (279.9708)
Lat 0.
Dist
1989 Jan 1 Lng 280.5535 280.5525 280 33' 10.44" (280.5529)
Lat 0.
Dist
MODIFICATION HISTORY:
1989, Paul Hick (MPAE,UCSD)
10/24/91, Tom Davidson : accuracy test
AUG-1993, Paul Hick, extension of SunEclLong
FEB-1998, Paul Hick (UCSD/CASS, pphick@ucsd.edu)
modified to accept multi-dimensional input arrays
added keyword /heliocentric
replaced keyword /radians by keyword /degrees
[Previous]
[Next]
NAME:
next_contiguous_group
CALLING SEQUENCE:
FUNCTION next_contiguous_group, indx, count=count
INCLUDE:
@compile_opt.pro
CALLS: ***
InitVar, destroyvar, init_contiguous_group
CALLED BY:
init_contiguous_group, smei_hdr_plot
COMMON:
common next_contiguous_group_common, n, m, p, nmin
[Previous]
[Next]
NAME:
nso_fe_plot
PURPOSE:
Plot synoptic maps for Fe XIV and Fe X data
CALLING SEQUENCE:
nso_fe_plot
OPTIONAL INPUTS:
All input keywords for nso_fe_read are permitted.
OPTIONAL OUTPUTS:
CALLS: ***
Carrington, InitVar, PlotSynopticMap, TimeOp, TimeSet, nso_fe_read
PROCEDURE:
> Green and red maps are calibrated using the constant calibration
for post-1989 observations.
> Temperatures are calculated by taking ratios of the green and red
arrays, i.e. this assumes that the first scan of green and red map
are taken at the same time.
MODIFICATION HISTORY:
SEP-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
nso_fe_read
PURPOSE:
Read red (Fe X), green (Fe XIV) or yellow (Ca XV) synoptic map from file
CATEGORY:
NSO
CALLING SEQUENCE:
map = nso_fe_read( /green_line, /calibrate, source=source)
INPUTS:
OPTIONAL INPUT PARAMETERS:
source=source scalar; type: string; default: $SSW_SMEI_DAT/map/sacpeak
location of Sac Peak maps
The type of data read is set using one of the following keywords:
/temperature get temperature map
/green_line get green line map (same as line = 'g')
/red_line get red line map (same as line = 'r')
/yellow_line get yellow line map (same as line = 'y')
line=line scalar; type: string
'g','r' or 'y'.
If none of these are set then line='g' is assumed.
Keyword /temperature results in two recursive calls to nso_fe_read to read a
green and a red map, and calculate the temperature map from the ratio.
The 'line' setting is also used to limit the files presented in the IDL
pickfile dialog.
rotation=rotation
scalar; type: integer; default: none
limb scalar; type: string
limb indicator, 'ww', 'we', 'ew' or 'ee'
/bestlimb if set this override the input 'limb' setting and forces
reading of the 'best limb' map.
height=height integer; type: scalar; default: 115 ('g' and 'r') or 113 ('y')
scan height in solar radii, times 100 (i.e. 115, 125, 135 or 145)
If 'rotation' and 'limb' (or /bestlimb) are set than the IDL pickfile dialog
is NOT called and a file name is constructed (also using 'line' and 'height').
/calibrate if set the green and red data are scaled using the post-1989 calibration:
Map = 3.49*0.693*Map Green
Map = 2.88*0.543*Map Red
The yellow line is never calibrated
silent=silent controls messages to screen
OUTPUTS:
map array[32,61]; type: float
line intensities for 32 daily scans (coverng a little more than
one Carrington rotation).
error scalar; type: string
error string returned by flt_read
error = '' after successfull read
line scalar; type: string
'g', 'r' or 'y'
rotation scalar; type: integer
Carrington rotation number
limb scalar; type: string
limb indicator, 'ww', 'we', 'ew' or 'ee'
height scalar; type: integer
scan height in solar radii, times 100 (i.e. 115, 125, 135 or 145)
utstart array[1]; type: time structure
start time for map (=time of first scan)
CALLS: ***
FILEPATH, GetFileSpec, InitVar, IsType, SetFileSpec, flt_read, flt_string
nso_fe_start, nso_fe_temperature
CALLED BY:
nso_fe_plot
PROCEDURE:
The default location for the Sac Peak files is directory $SSW_SMEI_DAT/map/sacpeak
MODIFICATION HISTORY:
JUL-2001, Paul Hick (UCSD/CASS)
SEP-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Rewrite
[Previous]
[Next]
NAME:
nso_fe_start
PURPOSE:
Retrieves the exact start time for an NSO Fe XIV, Fe X or Ca XV synoptic map
CATEGORY:
gen/idl/toolbox/nso_fe
CALLING SEQUENCE:
status = nso_fe_start(rotation, limb_select, line=line, $
utstart=utstart, limb=limb, height=height)
INPUTS:
rotation scalar; type: integer
Carrington rotation number
limb_select scalar; type: string
one of 'ww','ee','ew','we'
If not set then the best limb is used (as identified by the
plus sign in the sacpeak.* files).
OPTIONAL INPUT PARAMETERS:
line=line scalar; type: string; default: 'g'
one of 'g', 'r', 'y'
coronal line id: green (Fe XIV), red (Fe X) or yellow (Ca XV)
height=height integer; type: scalar; default: 115 ('g' and 'r') or 113 ('y')
scan height in solar radii, times 100 (i.e. 115, 125, 135 or 145)
/silent controls messages
OUTPUTS:
status 0: no start time found (utstart and limb do not exist)
1: start time found
output variables utstart and limb will only exist if status=1.
OPTIONAL OUTPUT PARAMETERS:
error=error scalar; type: string
error string if status=0; null string if status=1
utstart=utstart
array[1]; type: time structure
start time of synoptic map
limb=limb scalar; type: string
one of 'ww','we','ee','ew'
Same as limb_select if it was set, or else the 'best limb'
CALLS: ***
ArrayLocation, FILEPATH, InitVar, TimeSet, destroyvar, flt_read, who_am_i
CALLED BY:
nso_fe_read
RESTRICTIONS:
The startimes are stored in three files sacpeak.xiv, sacpeak.x and sacpeak.ca
stored in the same directory ast this routine.
PROCEDURE:
MODIFICATION HISTORY:
JUL-2001, Paul Hick (UCSD/CASS)
NOV-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Complete rewrite.
[Previous]
[Next]
NAME:
nso_fe_temperature
PURPOSE:
Temperature estimate from ratio of red and green intensity
CATEGORY:
NSO
CALLING SEQUENCE:
T = nso_fe_temperature, green, red
INPUTS:
green array; type: float
green (Fe XIV) intensity
red array; type: float
red (Fe X) intensity
OUTPUTS:
T array; type: float
temperatures (in MK??)
CALLS: ***
BadValue
CALLED BY:
nso_fe_read
PROCEDURE:
Where both intensity are <= zero no temperature is
calculated (returned as !values.f_nan)
The temperature is calculated from
T = 0.138645-0.0717*alog10(red/green)
Where only the green intensity is available the temperature
is set to the maximum temperature Where only the red intensity
is available the temperature is set to the minimum temperature
MODIFICATION HISTORY:
JUL-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)