NAME: DATATYPE PURPOSE: Datatype of variable as a string (3 char or spelled out). CALLING SEQUENCE: typ = datatype(var, [flag]) INPUTS: var = variable to examine. in flag = output format flag (def=0). in OUTPUTS: typ = datatype string or number. out flag = 0 flag = 1 flag = 2 flag = 3 UND Undefined 0 UND BYT Byte 1 BYT INT Integer 2 INT LON Long 3 LON FLO Float 4 FLT DOU Double 5 DBL COM Complex 6 COMPLEX STR String 7 STR STC Structure 8 STC MODIFICATION HISTORY: Written by R. Sterner, 24 Oct, 1985. RES 29 June, 1988 --- added spelled out TYPE. R. Sterner, 13 Dec 1990 --- Added strings and structures. R. Sterner, 19 Jun, 1991 --- Added format 3. Johns Hopkins University Applied Physics Laboratory. Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/datatype.pro)
NAME: GETWRD PURPOSE: Return the n'th word from a text string. CALLING SEQUENCE: wrd = getwrd( txt, n, [m] ) INPUTS: txt = text string to extract from. in n = word number to get (first = 0 = def). in m = optional last word number to get. in KEYWORD PARAMETERS: Keywords: LOCATION = l. Return word n string location. DELIMITER = d. Set word delimiter (def = space). /LAST means n is offset from last word. So n=0 gives last word, n=-1 gives next to last, ... If n=-2 and m=0 then last 3 words are returned. /NOTRIM suppresses whitespace trimming on ends. OUTPUTS: wrd = returned word or words. out COMMON BLOCKS: getwrd_com NOTES: Note: If a NULL string is given (txt="") then the last string given is used. This saves finding the words again. If m > n wrd will be a string of words from word n to word m. If no m is given wrd will be a single word. n<0 returns text starting at word abs(n) to string end If n is out of range then a null string is returned. See also nwrds. MODIFICATION HISTORY: Ray Sterner, 6 Jan, 1985. R. Sterner, Fall 1989 --- converted to SUN. R. Sterner, Jan 1990 --- added delimiter. R. Sterner, 18 Mar, 1990 --- added /LAST. R. Sterner, 31 Jan, 1991 --- added /NOTRIM. R. Sterner, 20 May, 1991 --- Added common and NULL string. Johns Hopkins University Applied Physics Laboratory. Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/getwrd.pro)
NAME: HELIO PURPOSE: Compute (low-precision) Heliocentric coordinates for the planets. Adapted from the book Celestial Basic CALLING SEQUENCE: HELIO, JD, HMS, LIST, HRAD, HLONG, HLAT INPUTS: JD = Julian day to compute for, long scalar HMS = hours, minutes, seconds array: H, M, S. Universal time. LIST = List of planets array. May be a single number. 1 = merc, 2 = venus, ... 9 = pluto. OUTPUTS: HRAD = array of Heliocentric radii (A.U). HLONG = array of Heliocentric (ecliptic) longitudes (degrees). HLAT = array of Heliocentric latitudes (degrees). These values are scalars if LIST is a scalar. EXAMPLE: To find the heliocentric positions of Jupiter and Saturn on 1-Jan-1989 JDCNV,1989,1,1,0,JD ;Convert to Julian Date HELIO,JD,[0,0,0],[5,6],hrad,hlong,hlat ;Get radius, long, and lat COMMON BLOCKS: HELIOCOM --- stores parameters. ROUTINES USED: DATATYPE, ISARRAY, MODIFICATION HISTORY: R. Sterner. 20 Aug, 1986. Code cleaned up a bit W. Landsman December 1992
(See /usr/local/idl/lib/zastron/jhuapl/helio.pro)
NAME: ISARRAY PURPOSE: Tests if the argument is an array. CALLING SEQUENCE: flag = isarray( a ) INPUTS: a = variable to test. in OUTPUTS: flag = test result: 0 if not array, else non-zero. out MODIFICATION HISTORY: R. Sterner 20 Mar, 1986. Checked for undefined variables. RES 25 Aug, 1989. Johns Hopkins Applied Physics Lab. Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/isarray.pro)
NAME: POLREC PURPOSE: Convert 2-d polar coordinates to rectangular coordinates. CATEGORY: CALLING SEQUENCE: polrec, r, a, x, y INPUTS: r, a = vector in polar form: radius, angle (radians). in KEYWORD PARAMETERS: Keywords: /DEGREES means angle is in degrees, else radians. OUTPUTS: x, y = vector in rectangular form. out COMMON BLOCKS: NOTES: MODIFICATION HISTORY: R. Sterner. 18 Aug, 1986. Johns Hopkins University Applied Physics Laboratory. RES 13 Feb, 1991 --- added /degrees. Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/polrec.pro)
NAME: RECPOL PURPOSE: Convert 2-d rectangular coordinates to polar coordinates. CATEGORY: CALLING SEQUENCE: recpol, x, y, r, a INPUTS: x, y = vector in rectangular form. in KEYWORD PARAMETERS: Keywords: /DEGREES means angle is in degrees, else radians. OUTPUTS: r, a = vector in polar form: radius, angle. out COMMON BLOCKS: NOTES: MODIFICATION HISTORY: R. Sterner. 18 Aug, 1986. Johns Hopkins University Applied Physics Laboratory. RES 13 Feb, 1991 --- added /degrees. R. Sterner, 30 Dec, 1991 --- simplified. R. Sterner, 25 May, 1993 --- Fixed atan (0,0) problem. Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/recpol.pro)
NAME: REDSHIFT PURPOSE: Converts between redshift, Recession velocity, and Distance CALLING SEQUENCE: redshift, [h, HELP = ] INPUTS: h = optional Hubble constant (def = 50 km/s/Mpc). in OUTPUTS: Results are displayed at the terminal screen NOTES: Note: H may be changed at any time by typing h=new_value. Also displays angular size equivalence and photometric information. MODIFICATION HISTORY: R. Sterner. 17 July, 1987. Johns Hopkins University Applied Physics Laboratory. RES 7 Jan, 1988 --- added H0. Copyright (C) 1987, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/redshift.pro)
NAME: REPCHR PURPOSE: Replace all occurences of one character with another in a text string. (Use the procedure REPSTR to replace more than one character.) CALLING SEQUENCE: new = repchr( old, c1, [c2] ) INPUTS: OLD = text string to edit, scalar or vector C1 = character to replace. OPTIONAL INPUTS: C2 = character to insert (def = ' ' = space). OUTPUTS: NEW = edited string. EXAMPLE: If old = 'THIS_IS_THE_TEXT' and c1 = '_' then IDL> print, repchr( old,c1 ) would display 'THIS IS THE TEXT' MODIFICATION HISTORY: R. Sterner. 28 Oct, 1986. Removed call to ARRAY function, W. Landsman December, 1991
(See /usr/local/idl/lib/zastron/jhuapl/repchr.pro)
NAME: SPHDIST PURPOSE: Angular distance between points on a sphere. CATEGORY: CALLING SEQUENCE: d = sphdist(long1, lat1, long2, lat2) INPUTS: long1 = longitude of point 1. in lat1 = latitude of point 1. in long2 = longitude of point 2. in lat2 = latitude of point 2. in KEYWORD PARAMETERS: Keywords: /DEGREES means angles are in degrees, else radians. OUTPUTS: d = angular distance between points. out COMMON BLOCKS: NOTES: Notes: points 1 and 2 may be arrays. MODIFICATION HISTORY: R. Sterner, 5 Feb, 1991 R. Sterner, 26 Feb, 1991 --- Renamed from sphere_dist.pro Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/sphdist.pro)
NAME: YDN2MD PURPOSE: Convert from year and day number of year to month and day of month. CALLING SEQUENCE: ydn2md, yr, dy, m, d INPUTS: yr = year (like 1988). in dy = day number in year (like 310). in OUTPUTS: m = month number (like 11 = Nov). out d = day of month (like 5). out NOTES: Note: On error returns m = d = -1. MODIFICATION HISTORY: R. Sterner 20 June, 1985 (for budget workspace). Johns Hopkins University Applied Physics Laboratory. RES 18 Sep, 1989 --- converted to SUN Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/ydn2md.pro)
NAME: YMD2DN PURPOSE: Convert from year, month, day to day number of year. CALLING SEQUENCE: dy = ymd2dn(yr,m,d) INPUTS: yr = year (like 1988). in m = month number (like 11 = Nov). in d = day of month (like 5). in OUTPUTS: dy = day number in year (like 310). out MODIFICATION HISTORY: Written by R. Sterner, 20 June, 1985. Johns Hopkins University Applied Physics Laboratory. RES 18 Sep, 1989 --- converted to SUN Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory This software may be used, copied, or redistributed as long as it is not sold and this copyright notice is reproduced on each copy made. This routine is provided as is without any express or implied warranties whatsoever. Other limitations apply as described in the file disclaimer.txt.
(See /usr/local/idl/lib/zastron/jhuapl/ymd2dn.pro)