[Previous]
[Next]
NAME:
UBVConst
PURPOSE:
Defines apparent solar magnitudes and limb darkening
constants to be used for the Helios UBV system
CALLING SEQUENCE:
R = UBVConst(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_earthskymap
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:
UlyssesOrbit
PURPOSE:
Calculate position of Ulysses
CATEGORY:
smei/gen/idl/ephem
CALLING SEQUENCE:
FUNCTION UlyssesOrbit, T, degrees=degrees
INPUTS:
T array[n]; type: time structure
times at which s/c positions are needed
OPTIONAL INPUT PARAMETERS:
/degrees if set then angles are output in degrees (default: radians)
OUTPUTS:
Result array[3,*]; type: float
ecliptic longitude (deg/rad), latitude (deg/rad) and distance (AU)
the angular units depend on the setting of /degrees
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
KeplerOrbit, TimeGet, TimeSet, ToRadians
CALLED BY:
big_eph
PROCEDURE:
Earth-Jupiter segment (valid from 16 Oct 1990-30 Dec 1991)
a = 8.9915 AU (1345106000 km)
e = 0.889166
i = 1.990719 deg.
Omega = 12.85909 deg.
w = 7.72595 deg.
M = 0.0365574*(J - 2448177.0755) deg.
where J is the Julian date of interest
Final Out-of-ecliptic Orbit (valid from 19 Mar 1992-31 Dec 2001)
a = 3.3730032 AU (504594094 km)
e = 0.60306
i = 79.12801 deg.
Omega = -22.51862 deg.
w = -1.11377 deg.
M = 0.1591096*(J - 2449788.986) deg.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
unexpected_event
PURPOSE:
Used to process unexpected events in widgets (i.e. events which are
ignored by the event handler).
CATEGORY:
CALLING SEQUENCE:
unexpected_event, event [,/destroy]
INPUTS:
event array[1]; type: structure
the event structure passed to the event handler
OPTIONAL INPUT PARAMETERS:
/destroy if set, the event structure is destroyed (i.e. the scalar
value 0L is returned in the input argument 'event'
OUTPUTS:
event if /destroy is set then event=0L is returned;
if /destroy NOT set the input event structure is not modified
CALLSE;
InitVar
CALLS: ***
InitVar
CALLED BY:
qEphem, qImage, qImage_cw, qLoadCT, qShow, qTool, qView, qslider_cw, qsmei_sky, qvox, qvu
PROCEDURE:
The name of the structure is displayed, with a list of all structure fields
MODIFICATION HISTORY:
JULY-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
unhide_env
PURPOSE:
CATEGORY:
gen/idl/toolbox
CALLING SEQUENCE:
spec = unhide_env(env_spec [,/directory]
INPUTS:
hidden_spec scalar; type: string
file or directory specification
Usually starts with a $-sign
OPTIONAL INPUTS:
/directory if set and hidden_spec='', then the
current directory is used
OUTPUTS:
spec scalar; type: string
hidden_spec with the env var translated.
If something goes wrong (the env var
doesn't exist or points to a non-existent
directory, then spec = '' is returned
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
CheckDir, FILEPATH, GetFileSpec, InitVar, os_separator
CALLED BY:
qImage_Pick, qView_FileFilter, qView_PickFiles, qsmei_sky_Pick
PROCEDURE:
MODIFICATION HISTORY:
JUL-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
unitvectors
PURPOSE:
Find two orthogonal unit vectors perpendicular to vector r.
CATEGORY:
gen/idl/toolbox/math
CALLING SEQUENCE:
axes = unitvectors(r)
INPUTS:
r array[3]; type: float
OPTIONAL INPUT PARAMETERS:
/sphere, /cylin, /rect
indicates the coordinate system used: spherical, cylindrical
or rectangular; default: rectangular
/degrees if spherical or cylindrical coordinates are used, setting this
keyword indicates that the angles are in degrees; default: radians
/ascending See PROCEDURE.
OUTPUTS:
axes array[3,3]; type:float
x,y,z coordinates of three perpendicular unit vectors
axes[*,2] is a unit vector parallel to the input vectors r
OPTIONAL OUTPUT PARAMETERS:
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
CV_COORD, InitVar, SuperArray, T3D, WhatIs, vectorproduct
CALLED BY:
arrow3d, qvu_draw
RESTRICTIONS:
The input vector must have a non-zero length
PROCEDURE:
> The unit vectors are returned so that axes[*,0], axes[*,1], axes[*,2] form
a right-handed coordinate system with z-axis (axes[*,2]) along the input
vector r, the x-axis (axes[*,0]) in the original x-y plane (i.e. pointing to
either the ascending or descending node)
> If /ascending is NOT set then the y-axis (axes[*,1]) will always have a positive
z-component
> If /ascending is SET then the x-axis is always pointing to the ascending
node. The z-component of the y-axis will have the same sign as the z-component
of the input vector.
MODIFICATION HISTORY:
AUG-1999, Paul Hick (UCSD/CASS)
SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Treat special case where input vector is along z-axis separately.
[Previous]
[Next]
NAME:
usno_body
PURPOSE:
Get list of asteroids for which ephemerides are available
CATEGORY:
smei/gen/idl/ephem; USNO Asteroid Ephemeris
CALLING SEQUENCE:
FUNCTION usno_body, asteroid, $
file = file , $
silent = silent, $
number = number, $
index = index , $
count = count , $
total_count=total_count
OPTIONAL INPUT PARAMETERS:
asteroid scalar or array; type: integer or string
integer: list of asteroid numbers
string : list of asteroid names
only valid entries on this list are processed
If not specified then all asteroids are processed
OUTPUTS:
Result array[count]; type: string
list of asteroid names for which ephemeris files
are available; if none exist (count=0) then names=''
OPTIONAL OUTPUT PARAMETERS:
count=count scalar; type: integer
# requested asteroids for which ephemeris files are present
i.e. # elements in input 'asteroid' with invalid entries
removed.
file=file array[count]; type: string
file names of the ephemeris files; null-string if count=0
number=number array[count]; type: integer
asteroid numbers; -1 if count=0
index=index array[count]; type: integer
index numbers between 0, and total_count-1; -1 if count=0
total_count=total_count
scalar; type: integer
total # asteroids for which ephemeris files are present
/silent if set, informational messages are suppressed
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
FILEPATH, GetFileSpec, IsType, SetFileSpec, where_common, who_am_i
CALLED BY:
big_body, big_eph, big_orbit, smei_frm_where, usno_eph, usno_init
PROCEDURE:
> The following 15 asteroids are available from the USNO AE98 ephemeris:
'Ceres','Pallas','Juno','Vesta','Hebe','Iris','Flora','Metis','Hygiea',
'Eunomia','Psyche','Europa','Cybele','Davida','Interamnia'
The corresponding asteroid numbers are
1,2,3,4,6,7,8,9,10,15,16,52,65,511,704.
The returned list of asteroid names are take from this list.
> The asteroid files are searched for in the subdirectory 'usno' of the
directory where this procedure is located.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
usno_close
PURPOSE:
Closes asteroid ephemeris files and frees heap memory used by ephemeris
CATEGORY:
smei/gen/idl/ephem; USNO Asteroid Ephemeris
CALLING SEQUENCE:
usno_close
INPUTS:
(none)
OUTPUTS:
(none
CALLED BY:
big_eph, smei_frm_where, usno_test
SEE ALSO:
usno_init
CALLS:
INCLUDE:
@compile_opt.pro ; On error, return to caller
COMMON BLOCKS:
common USNO_INFO, USNO_PNTR
SIDE EFFECTS:
Opens an ephemeris file and defines a heap variable.
RESTRICTIONS:
usno_close must be called separately to close all open asteroid
files and free the memory used by the heap variables.
PROCEDURE:
> Common block USNO_INFO contains the pointer array USNO_PNTR.
> If a pointer in the array is a valid heap pointer, then the associated asteroid
has been initialized (file is open; heap variable exists).
After usno_close is finished all asteroid files should be close
and all heap memory released.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Modified from USNO AE98 C-software
[Previous]
[Next]
NAME:
usno_eph
PURPOSE:
Get position and velocity of asteroid from USNO AE98 ephemerides
CATEGORY:
smei/gen/idl/ephem; USNO Asteroid Ephemeris
CALLING SEQUENCE:
FUNCTION usno_eph, UT, body, center=center, $
location = location , $
speed = speed , $
to_sphere = to_sphere , $
degrees = degrees , $
precess = precess , $
to_ecliptic = to_ecliptic,$
get = get , $
silent = silent
INPUTS:
UT scalar; type: double
Julian date when ephemerides are needed
body scalar; type: string or integer; default: 'ceres'
asteroid name or asteroid number (see: usno_body)
OPTIONAL INPUT PARAMETERS:
center=center
scalar; type: integer; default: jpl_body(/sun)
by default, heliocentric coordinates are returned.
if center is set to a non-zero value between 1 and 9
then the coordinates are centered on the corresponding
planet (e.g. center=3 returns geocentric coordinates)
OUTPUTS:
Result array[6] or array[6,*]; type: double
array[0:2,*] = position in AU
array[3:5,*] = velocity in AU/day
If the asteroid ephemeris could not be determined
(because the ephemeris file could not be located or because
the Julian day JD is outside the range of the ephemeris)
then all six components are set to the double precision NaN
value !values.d_nan.
OPTIONAL OUTPUT PARAMETERS:
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
AngleRange, BadValue, CV_COORD, CvPrecess, CvSky, InitVar, IsTime, IsType, TimeGet
TimeSet, jpl_eph, usno_body, usno_init, usno_maket, usno_read
CALLED BY:
big_eph, smei_frm_where, usno_test
COMMON BLOCKS:
common USNO_INFO, USNO_PNTR
RESTRICTIONS:
If the center keyword is used then the jpl ephemeris is
initialized. Close the ephemeris using jpl_close.
PROCEDURE:
> If the asteroid keyword is not specified than usno_eph calls itself
recursively to loop over all available asteroids.
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Modified from USNO AE98 C-software
[Previous]
[Next]
NAME:
usno_init
PURPOSE:
Initialize and close USNO AE98 asteroid file
CATEGORY:
smei/gen/idl/ephem; USNO Asteroid Ephemeris
CALLING SEQUENCE:
ast = usno_init(asteroid)
INPUTS:
asteroid scalar; type: string or integer
asteroid name or asteroid number (see: usno_body)
OUTPUTS:
ast_index scalar; type: integer
index of asteroid in pointer array USNO_PNTR
ast=-1 if the initialized failed (probably because the
asteroid files couldn't be located (see usno_body).
CALLED BY:
usno_eph
SEE ALSO:
usno_body, usno_close
CALLS: ***
InitVar, IsType, usno_body, usno_read
INCLUDE:
@compile_opt.pro ; On error, return to caller
COMMON BLOCKS:
common USNO_INFO, USNO_PNTR
SIDE EFFECTS:
Opens an ephemeris file and defines a heap variable.
RESTRICTIONS:
usno_close must be called separately to close all open asteroid
files and free the memory used by the heap variables.
PROCEDURE:
> Common block USNO_INFO contains the pointer array USNO_PNTR.
> An asteroid is initialized by opening the asteroid file, reading the
header and first record of Chebyshev coefficients, and setting up
a structure in heap memory pointed to by one of the pointers
in USNO_PNTR.
> Fhe structure is set up as follows:
USNO_PNTR[ast] = ptr_new( {USNO_STRUCT, $
iU : iU, $ logical unit of asteroid file
name : ast_name, $ name of asteroid (see usno_body)
number : ast_number, $ number of asteroid (see usno_body)
jdi : jdi, $ start JD of ephemeris file
jdf : jdf, $ end JD of ephemeris file
jd : ptr_new(jd) , $ start JDs for each record in file
span : ptr_new(span) , $ periods covered by each record (days)
order : ptr_new(order), $ order of Chebyshev polynomial for each record
currec : long(0), $ current record
curjd : double(-1), $ start JD of current record
curspan : double(-1), $ period covered by current record
curorder: long(-1), $ order of Chebeshyv polynomial for current record
coef : dblarr(14,3)}) Chebyshev coefficients (only coef[0:order;*] is used)
> The pointer USNO_PNTR[ast] is first checked for validity. If it is a valid heap
pointer then the asteroid has been initialized already, and usno_init quietly returns.
USNO_PNTR is an array of heap pointers (one for each asteroid).
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Modified from USNO AE98 C-software
[Previous]
[Next]
NAME:
usno_maket
PURPOSE:
Calculates the Chebyshev polynomials for the USNO asteroid ephemeris
CATEGORY:
smei/gen/idl/ephem; USNO Asteroid Ephemeris; Chebyshev interpolation
CALLING SEQUENCE:
usno_maket, time, t, tdot
INPUTS:
time scalar; type: double
Chebyshev time (-1<=time<1)
OUTPUTS:
t scalar; type: double
Chebyshev polynomial at 'time'
tdot scalar; type: double
derivative of Chebyshev polynomial at 'time'
CALLED BY:
usno_eph
PROCEDURE:
Compute the values for the Chebyshev polynomial and their derivatives
to thirteenth order for a given time
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Converted from USNO AE C-software
[Previous]
[Next]
NAME:
usno_read
PURPOSE:
Reads a record from an ephemeris file
CATEGORY:
smei/gen/idl/ephem; USNO Asteroid Ephemeris
CALLING SEQUENCE:
usno_read, ast
INPUTS:
ast scalar; type: integer
indicates the position of the asteroid in the pointer
array USNO_PNTR
OUTPUTS:
Sets several members of the asteroid structure for asteroid 'ast':
OPTIONAL OUTPUT PARAMETERS:
CALLED BY:
usno_eph, usno_init
COMMON BLOCKS:
common USNO_INFO, USNO_PNTR
SIDE EFFECTS:
RESTRICTIONS:
The file pointer must be put at the proper position
before calling usno_read. This is done by usno_eph.
(*(USNO_PNTR[ast])).curjd start Julian day for record
(*(USNO_PNTR[ast])).curspan period covered by record (days)
(*(USNO_PNTR[ast])).curorder order of Chebyshev polynomial
(*(USNO_PNTR[ast])).coef Chebyshev coefficients
PROCEDURE:
Unformatted read
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
usno_test
PURPOSE:
Test program for USNO asteroid ephemerides
CATEGORY:
smei/gen/idl/ephem; USNO Asteroid Ephemeris; Test program
CALLING SEQUENCE:
usno_test, asteroid
INPUTS:
asteroid scalar; type: string
one of the following:
['Ceres','Pallas','Juno','Vesta','Hebe','Iris','Flora', $
'Metis','Hygiea','Eunomia','Psyche','Europa','Cybele','Davida','Interamn']
OUTPUTS:
(none)
CALLS: ***
FILEPATH, InitVar, REVERSE, usno_close, usno_eph, who_am_i
COMMON BLOCKS:
common USNO_INFO, USNO_PNTR
PROCEDURE:
Compares ephemeris calculation with test numbers for the asteroid used
(stored in subdirectory 'usno').
MODIFICATION HISTORY:
FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)