This page was created by the IDL library routine
mk_html_help. For more information on
this routine, refer to the IDL Online Help Navigator
or type:
? mk_html_help
at the IDL command line prompt.
Last modified: Tue Aug 18 15:38:04 2015.
NAME: addpath PURPOSE: (one line) add a path to !path if it isn't already there DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: addpath, path INPUTS: path - the path to add OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: none COMMON BLOCKS: None SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2010 Feb 18 LAY 2011 Dec 21 LAY change to avoid call to PREF_SET
(See ../util/addpath.pro)
NAME: arradd PURPOSE: (one line) add an array onto another. DESCRIPTION: Append one array onto a source array. If the source is empty, return the appended array CATEGORY: Util CALLING SEQUENCE: new = arradd(source, append) INPUTS: SOURCE = Array to be appended to. APPEND = Array to append to SOURCE. OUTPUTS: NEW - New array with APPEND appended to SOURCE PROCEDURE: Could call boost_array, but instead we're keeping this simple until something more complex is needed. See code. MODIFICATION HISTORY: 2009 July 8 Leslie Young SwRI 2009 Sep 9 LAY added addrow keyword
(See ../util/arradd.pro)
NAME: array2struct PURPOSE: (one line) assign tag values in a structure from an array DESCRIPTION: assign tag valuess in a structure from an array CATEGORY: utility CALLING SEQUENCE: array2struct, array, tags, struct INPUTS: array - a list of values to be assigned into the structure tags - a list of strings correspondint to the tag names in the structure struct - the structure for which the tag values will be changed OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: struct - the structure for which the tag values will be changed COMMON BLOCKS: None SIDE EFFECTS: changes struct in place RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: Written 2006 Aug 2, Leslie Young
(See ../util/array2struct.pro)
NAME: arrgen PURPOSE: (one line) generate an array of evenly spaced numbers DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: arrgen, x0, x1, dx INPUTS: x0 = initial value x1 = final value dx = approximate difference between successive values OPTIONAL INPUT PARAMETERS: int = 1 if integer long = 1 if long float = 1 if float double = 1 if double KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: COMMON BLOCKS: None SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2005 Mar 16 Leslie Young SwRI Moved to layoung/util 2009 Oct 15 LAY adjust spacing to hit x1 exacctly
(See ../util/arrgen.pro)
NAME:
CR
PURPOSE:
Returns the ASCII CR (carriage return) character.
CATEGORY:
Put a category (or categories) here. For example:
Widgets.
CALLING SEQUENCE:
Result = TAB()
MODIFICATION HISTORY:
Written by: Leslie Young, Oct, 2010.
Based on tab, written by: Han Wen, June, 1994.
(See ../util/cr.pro)
NAME: current_routine PURPOSE: (one line) return name of current routine DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: routine_name = current_routine() INPUTS: none OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: KEYWORD OUTPUT PARAMETERS: none OUTPUTS: routine_name - name of current routine (string) COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: MODIFICATION HISTORY: 2010 12 01 Leslie Young, SwRI
(See ../util/current_routine.pro)
NAME: darrgen PURPOSE: (one line) generate an array of evenly spaced numbers DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: darrgen, x0, x1, dx INPUTS: x0 = initial value x1 = final value dx = spacing OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2005 Mar 16 Leslie Young SwRI Moved to layoung/util
(See ../util/darrgen.pro)
NAME: extract_last PURPOSE: (one line) Pull out a scalar or array from a scalar or 1 or 2-D array DESCRIPTION: Pull out a scalar or array from a scalar or 1 or 2-D array given an index into the last dimension of the input CATEGORY: Volatile Transport CALLING SEQUENCE: arr_k = extract_last(mat, k, dim) INPUTS: mat - scalar, [n_last], [n_other,n_last] OUTPUTS: If mat is a scalar, return k (scalar) If mat is an array, return mat[k] (scalar) If mat is 2-D, return mat[*,k] (1-D) MODIFICATION HISTORY: Written 2012 Jan 9, by Leslie Young, SwRI
(See ../util/extract_last.pro)
NAME: farrgen PURPOSE: (one line) generate an array of evenly spaced numbers DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: farrgen, x0, x1, dx INPUTS: x0 = initial OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: nx, length of 1st dimension ny, length of 2nd dimension n length of 3rd dimension (or 1 if d is 2d) COMMON BLOCKS: None SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2005 Mar 16 Leslie Young SwRI Moved to layoung/util
(See ../util/farrgen.pro)
given a image or stack of images and a bad pixel
mask, will fill in bad pixels by finding the NPIX nearest
good pixels, toss the highest and lowest ones of the bunch,
and then arithmatically average.
bad pixel list is processed in order array is stored in
memory, i.e. row by row, and is defined by:
0 = bad pixel
not 0 = good pixel
NPIX = # of adjacent pixels used for correction (default = 8)
/weight: weight adjacent pixels by inverse of their distances
in averaging process
checks to see if some pixels are equidistant; if so,
use all of them, even if the total # of pixels then exceeds NPIX
WARNINGS:
- will work for entire bad columns/rows, but
may not be the most sensible thing to use
- do not pass it the same array for input & output as this
might corrupt the correction algorithm
7/3/95 MCL
added /noise: replace bad pixels with random noise with
user defined sigma and dc level
9/24/95 MCL
badpix can now be a 2d or 3d array
4/18/96 MCL
(See ../util/fixpix.pro)
NAME:
hmstoh
PURPOSE: (one line)
Convert from hours, minutes, and seconds of time to decimal hours
DESCRIPTION:
CATEGORY:
Astronomy
CALLING SEQUENCE:
hmstorad, hour, min, sec,decimalhours
INPUTS:
hour : Hour. 0 <= hour < 24.
min : Minute. 0 <= min < 60.
sec : Second. 0.0 <= sec < 60.0.
If more than one of these are vectors, they must be the same length.
A mixture of scalar and vector input parameters is equivalent to all three
inputs being vectors: The scalar inputs are treated as replicated vectors.
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
decimalhours : Converted time in hours
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
2005 July 14 Leslie Young,
modified from hmstorad, M. Buie, Lowell Observatory
(See ../util/hmstoh.pro)
NAME:
htohms
PURPOSE: (one line)
Convert from decimal hours to hours, minutes, and seconds
DESCRIPTION:
CATEGORY:
Astronomy
CALLING SEQUENCE:
htohms, h, hh, mm, ss
INPUTS:
h : time expressed in decimal hours. May be a vector, in which case
the outputs will be vectors.
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
hh : Hours
mm : Minutes
ss : Seconds
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
The angle is reduced to its principal value then converted to hours.
The decimal number of hours is broken up into the three pieces. There are
no invalid input quantities.
Calls external function prival.pro.
MODIFICATION HISTORY:
2005 07 14 Leslie Young, SwRi
based on radtohms, M Bie, Lowell Observatory
(See ../util/htohms.pro)
NAME: indexcount PURPOSE: (one line) return the count in an index array, or 0 for -1 DESCRIPTION: return the count in an index array, or 0 for -1 CATEGORY: Utility CALLING SEQUENCE: count = indexcount(index) INPUTS: index = as returned by where, an array of longs, or -1 OUTPUTS: 0 if index = -1, n_elements(index) otherwise PROCEDURE MODIFICATION HISTORY: Written 2011 Aug 24, by Leslie Young, SwRI
(See ../util/indexcount.pro)
NAME: ismember PURPOSE: (one line) return 1 if an element is a member of an array DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: ismember, elem, list INPUTS: element - the element to be tests list - the list to be checked if member is an element of OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: byte: 0 if elemen is not a member, 1 if it is COMMON BLOCKS: None SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2006 July 23 Leslie Young SwRI 2009 Sept 4 LAY change initial assignment of res in the case of string elem
(See ../util/ismember.pro)
NAME: lasttok PURPOSE: return the last token in a string DESCRIPTION: CATEGORY: util CALLING SEQUENCE: token = lasttok(str, toksep) INPUTS: fn: the filename OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: OUTPUTS: exists (boolean): true if file exists KEYWORD OUTPUT PARAMETERS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: call findfile MODIFICATION HISTORY: 2002/05/30 - Initial version written, Leslie Young SwRI
(See ../util/lasttok.pro)
NAME: lexecute PURPOSE: (one line) execute a potentially long string DESCRIPTION: execute a string that is too long for the intrinsic execute CATEGORY: util CALLING SEQUENCE: lexecute, str, newsav, oldsav=oldsav,INPUTS: str - the (potentially long) string or array of strings to execute OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: oldsav - a save file, if lexecute needs to get passed inputs KEYWORD OUTPUT PARAMETERS: none OUTPUTS: newsav - a save file, if lexecute needs to pass outputs COMMON BLOCKS: None SIDE EFFECTS: writes the file / RESTRICTIONS: If you must use the following characters within strings, make sure the strlen of str is < 160: &,()[]+-*/^ The method of passing by reference doesn't seem to work. PROCEDURE: USAGE There are several ways to use this function If no variables have to be passed, then simply call lexecute,str If just a few variables have to be passed (eg str uses in1 and in2, assigns out1 and out2), then use keywords lexecute,str,in1=in1,in2=in2, out1=out1, out2=out2 If many variable have to be passed, or you don't know ahead of time what variables are used in str, then use save files oldsav=tmpfile('','sav') ; get a temporary sav filename save,/all,fil=oldsav ; save variables lexecute,str,newsav,lexecute_oldsav=oldsav ; run, saving calcs in newsav restore,newsav ; restore newsav file_delete,newsav ; cleanup MODIFICATION HISTORY: 2005 Dec 30 Leslie Young, SwRI 2006 Jan 2 LAY, restored value of !quiet before executing proc 2007 Mar 09 LAY. IDL_NOCACHE doesn't seem to be enough? added call to idl_cache,/clear
(See ../util/lexecute.pro)
NAME: locate PURPOSE: (one line) Search an ordered list by bisection DESCRIPTION: Given an array xx[0..n-1], and given a value x, returns a value j such that x is between xx[j] and xx[j+1]. xx must be monotonic, either increasing or decreasing. j=-1 or j=n-1 is returned to indicate that x is out of range. CATEGORY: RT CALLING SEQUENCE: j = locate(xx, x) INPUTS: xx - array, monotonic, either increasing or decreasing x - the value to be found in xx OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: j such that x is between xx[j] and xx[j+1]. COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: Modifies from locate, numerical recipes MODIFICATION HISTORY: Written 2004 May 8, Leslie Young SwRI based on locate, Numerical Recipes, Press et al.
(See ../util/locate.pro)
NAME:
lonparse
PURPOSE:
Convert Longitude string to radians.
DESCRIPTION:
CATEGORY:
Astronomy
CALLING SEQUENCE:
lon=lonparse(str)
INPUTS:
str - String (or array) to parse as a longitude
OPTIONAL INPUT PARAMETERS:
KEYWORD INPUT PARAMETERS:
OUTPUTS:
return value is scalar or vector value of Dec in radians
KEYWORD OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
Based on decparse
1997/06/04, Written by Marc W. Buie, Lowell Observatory
2000/11/9, MWB, removed Str_sep call.
(See ../util/lonparse.pro)
NAME: matchfirst PURPOSE: (one line) return the index of the first match of an element to an array DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: match = firstmatch(elem, array) INPUTS: element - the element to be match list - the list into which an index should be returned OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: long, same dimensions as elem. -1 if elem[i] is not in array array(match[i]) = elem[i], if match[i] ne -1 COMMON BLOCKS: None SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2009 Sept 4 Leslie Young SwRI
(See ../util/matchfirst.pro)
NAME:
MK_HTML_HELP
PURPOSE:
Given a list of IDL procedure files (.PRO) or directories that
contain such files, this procedure generates a file in the HTML
format that contains the documentation for those routines that
contain a DOC_LIBRARY style documentation template. The output
file is compatible with World Wide Web browsers.
CATEGORY:
Help, documentation.
CALLING SEQUENCE:
MK_HTML_HELP, Sources, Outfile
INPUTS:
Sources: A string or string array containing the name(s) of the
.pro files (or the names of directories containing such files)
for which help is desired. If a source file is an IDL procedure,
it must include the .PRO file extension. All other source files
are assumed to be directories.
Outfile: The name of the output file which will be generated.
KEYWORDS:
TITLE: If present, a string which supplies the name that
should appear as the Document Title for the help.
VERBOSE: Normally, MK_HTML_HELP does its work silently.
Setting this keyword to a non-zero value causes the procedure
to issue informational messages that indicate what it
is currently doing. !QUIET must be 0 for these messages
to appear.
STRICT: If this keyword is set to a non-zero value, MK_HTML_HELP
will adhere strictly to the HTML format by scanning the document
headers for characters that are reserved in HTML (<,>,&,").
These are then converted to the appropriate HTML syntax in the
output file. By default, this keyword is set to zero (to allow
for faster processing).
COMMON BLOCKS:
None.
SIDE EFFECTS:
A help file with the name given by the Outfile argument is
created.
RESTRICTIONS:
The following rules must be followed in formatting the .pro
files that are to be searched.
(a) The first line of the documentation block contains
only the characters ";+", starting in column 1.
(b) There must be a line which contains the string "NAME:",
which is immediately followed by a line containing the
name of the procedure or function being described in
that documentation block. If this NAME field is not
present, the name of the source file will be used.
(c) The last line of the documentation block contains
only the characters ";-", starting in column 1.
(d) Every other line in the documentation block contains
a ";" in column 1.
Note that a single .pro file can contain multiple procedures and/or
functions, each with their own documentation blocks. If it is desired
to have "invisible" routines in a file, i.e. routines which are only
for internal use and should not appear in the help file, simply leave
out the ";+" and ";-" lines in the documentation block for those
routines.
No reformatting of the documentation is done.
MODIFICATION HISTORY:
July 5, 1995, DD, RSI. Original version.
July 13, 1995, Mark Rivers, University of Chicago. Added support for
multiple source directories and multiple documentation
headers per .pro file.
July 17, 1995, DD, RSI. Added code to alphabetize the subjects;
At the end of each description block in the HTML file,
added a reference to the source .pro file.
July 18, 1995, DD, RSI. Added STRICT keyword to handle angle brackets.
July 19, 1995, DD, RSI. Updated STRICT to handle & and ".
Changed calling sequence to accept .pro filenames, .tlb
text library names, and/or directory names.
Added code to set default subject to name of file if NAME
field is not present in the doc header.
27 August 2003, AB, Remove VMS support. Fix bug with leaking
file units.
8 March 2005, DD, RSI. If none of the input .pro files contain
documentation headers, display an informative error
message, clean up, and exit. Also report the full path
to the output file after creation.
(See ../util/mk_html_helplay.pro)
NAME: nxnyn PURPOSE: (one line) Return dimentions of a cube DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: nxnyn, d, nx, ny, n INPUTS: d - a 3-d array of size [nx, ny, n] OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: nx, length of 1st dimension ny, length of 2nd dimension n length of 3rd dimension (or 1 if d is 2d) COMMON BLOCKS: None SIDE EFFECTS: RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2005 Mar 16 Leslie Young SwRI Moved to layoung/util
(See ../util/nxnyn.pro)
NAME:
print_traceback
PURPOSE: (one line)
print traceback info
DESCRIPTION:
CATEGORY:
Util
CALLING SEQUENCE:
print_traceback, string, /time, /routine=routine, /filemame,
/basename, /line, /cr, trace=trace
INPUTS:
str optional string
OPTIONAL INPUT PARAMETERS:
KEYWORD INPUT PARAMETERS:
datetime = 1 for a time stamp at the start
routine = 1 to print the routine name
filename = 1 to print the filename
basename = 1 to print the base filename
line = 1 to print the the linenumber
CR = 1 for a carriage return at the end
KEYWORD OUTPUT PARAMETERS:
none
OUTPUTS:
trace = the trace structure of whatever called print_traceback
COMMON BLOCKS:
None
SIDE EFFECTS:
prints [(See ../util/print_traceback.pro)
NAME: setps PURPOSE: (one line) Prepare to make a postscript plot DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: setps, fn, LANDSCAPE = landscape INPUTS: filename OPTIONAL INPUT PARAMETERS: landscape - set for landscape KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: none COMMON BLOCKS: None SIDE EFFECTS: sets the plotting to a PS file called filename RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2005 Oct 17 Leslie Young SwRI Moved to layoung/util
(See ../util/setps.pro)
NAME:
split_contig
PURPOSE: (one line)
identify runs of contiguous indices
DESCRIPTION:
given a list of indexes, find the number of runs of contiguous
indices, the starting index, and the length of the run
CATEGORY:
occultation
CALLING SEQUENCE:
g0 = split_contig(j, glen, ng)
INPUTS:
j - list of indices
OPTIONAL INPUT PARAMETERS:
none
KEYWORD INPUT PARAMETERS:
KEYWORD OUTPUT PARAMETERS:
none
OUTPUTS:
glen: length of each run
ng : number of contiguous runs of j
returns array indices into the first of each run.
This array has ng elements.
COMMON BLOCKS:
None
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
Written 2005 January, by Leslie Young, SwRI
(See ../util/split_contig.pro)
NAME:
strend
PURPOSE: (one line)
Return the last n characters in a string
DESCRIPTION:
CATEGORY:
Utility
CALLING SEQUENCE:
str2 = strend(str, n)
INPUTS:
str - the input string
n - number of characters to return
OUTPUTS:
str2 - last n characters of str, or str if strlen(str) >= n
MODIFICATION HISTORY:
2007 11 14 Leslie Young SwRI
(See ../util/strend.pro)
NAME: struct2array PURPOSE: (one line) assign tag values in a structure into an array DESCRIPTION: assign tag valuess in a structure into an array CATEGORY: utility CALLING SEQUENCE: struct2array, struct, tags, array INPUTS: struct - the structure from which the tag values will be retreived tags - a list of strings correspondint to the tag names in the structure array - a list of values to be assigned from the structure OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: array - a list of values to be assigned from the structure COMMON BLOCKS: None SIDE EFFECTS: changes array in place RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: Written 2006 Aug 2, Leslie Young
(See ../util/struct2array.pro)
NAME:
struct_addfield
PURPOSE: (one line)
add fields to an existing structure
DESCRIPTION:
add fields to an existing structure
CATEGORY:
util
CALLING SEQUENCE:
new = struct_addfield(old, tag, val, new_structname = new_structname)
INPUTS:
old - existing structure
tag - name of field
val - value for field
OPTIONAL INPUT PARAMETERS:
none
KEYWORD INPUT PARAMETERS:
new_structname - if the structure is to be named (not anonymous),
the name of the new structure
KEYWORD OUTPUT PARAMETERS:
none
OUTPUTS:
new - new structure with field added
COMMON BLOCKS:
None
SIDE EFFECTS:
none
RESTRICTIONS:
PROCEDURE:
Constructs a call to create_struct
Calls lexecute to execute the long string
USAGE
MODIFICATION HISTORY:
2005 Dec 31 Leslie Young
(See ../util/struct_addfield.pro)
NAME:
struct_delfield
PURPOSE: (one line)
delete fields from an existing structure
DESCRIPTION:
delete fields from an existing structure
CATEGORY:
util
CALLING SEQUENCE:
new = struct_delfield(old, tag, new_structname = new_structname)
INPUTS:
old - existing structure
tag - field to be deleted
OPTIONAL INPUT PARAMETERS:
none
KEYWORD INPUT PARAMETERS:
new_structname - if the structure is to be named (not anonymous),
the name
KEYWORD OUTPUT PARAMETERS:
none
OUTPUTS:
new - new structure with field added
COMMON BLOCKS:
None
SIDE EFFECTS:
none
RESTRICTIONS:
PROCEDURE:
Constructs a call to create_struct
Calls lexecute to execute the long string
USAGE
MODIFICATION HISTORY:
2005 Dec 31 Leslie Young
(See ../util/struct_delfield.pro)
NAME:
timeparse
PURPOSE:
Convert time string (hh:mm:ss.ss) to seconds
DESCRIPTION:
CATEGORY:
Astronomy
CALLING SEQUENCE:
sec=timeparse(str)
INPUTS:
str - String (or array) to parse as a time
OPTIONAL INPUT PARAMETERS:
KEYWORD INPUT PARAMETERS:
OUTPUTS:
return value is scalar or vector value of time in seconds
KEYWORD OUTPUT PARAMETERS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
2005/07/14, Written by Leslie Young, SwRI, based on
Marc Buie's haparse and raparse.
(See ../util/timeparse.pro)
NAME:
timestr
PURPOSE: (one line)
Convert time in hours to hours, minutes, and seconds (ASCII string).
DESCRIPTION:
CATEGORY:
Astronomy
CALLING SEQUENCE:
timestr, hours, places, str, carry
INPUTS:
hours : Time, in hours, to be converted to a string.
May a vector, in which case the outputs will be vectors.
places : Resolution of output string (integer).
= -8 Decimal hours HH.hhhhh
= -7 nearest hour. HH
= -6 nearest 30 minutes. HH:(00,30)
= -5 nearest 15 minutes. HH:(00,15,30,45)
= -4 nearest 10 minutes. HH:M0
= -3 nearest 5 minutes. HH:M(0,5)
= -2 nearest minute. HH:MM
= -1 nearest ten seconds. HH:MM:S0
= 0 nearest second. HH:MM:SS
= 1 nearest tenth of a second. HH:MM:SS.s
= 2 nearest hundredth of a second. HH:MM:SS.ss
= 3 nearest thousandth of a second. HH:MM:SS.sss
= 4 nearest thousandth of a second. HH:MM:SS.ssss
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
SEPCHAR - Separator character for the fields in the position.
Default=':'. Warning, if you do not use ':' then the
string may not be parsable by timeparse.
OUTPUTS:
str - Output string for the converted right ascension.
carry - Flag that indicates hour rolled over after rounding.
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Time reduced to the range [0,24) then converted to a string.
There are no imbedded blanks.
Calls external routine htohms.
MODIFICATION HISTORY:
2005 07 14 Leslie Young SwRI
Based on 2003/05/09 version of rastr,
by Marc Buie, Lowell Observatory
(See ../util/timestr.pro)
NAME:
truecolorconv
PURPOSE: (one line)
Convert between 'BBGGRR'XL and [blue,green,red] formulations for truecolor
DESCRIPTION:
Convert between 'BBGGRR'XL and [blue,green,red] formulations for truecolor
CATEGORY:
util
CALLING SEQUENCE:
a = truecolorconv(b)
INPUTS:
b - either a 2-D array of longs, where the least significant
byte is the red shade (0 for black, FF for reddest),
the next byte is green, and the next byte is blue, OR
a 3-D array of bytes, where b[0,*,*] is blue, b[1,*,*] is green
and b[2,*,*] is red
OPTIONAL INPUT PARAMETERS:
none
KEYWORD INPUT PARAMETERS:
none
KEYWORD OUTPUT PARAMETERS:
none
OUTPUTS:
alternate form (3-D bytes if input is 2-D long, or
2-D long if input is 3-D bytes)
COMMON BLOCKS:
None
SIDE EFFECTS:
RESTRICTIONS:
None
PROCEDURE:
MODIFICATION HISTORY:
Written 2006 Jan 13, by Leslie Young, SwRI
(See ../util/truecolorconv.pro)
NAME: uniqv PURPOSE: (one line) return the unique values (not indices) for an array DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: v = uniqv(array, nosort=nosort) INPUTS: array - the array KEYWORD INPUT PARAMETERS: nosort - true if the array is already in monotonic order OUTPUTS: the unique values of the array MODIFICATION HISTORY: 2008 Dec 27 Leslie Young SwRI
(See ../util/uniqv.pro)
NAME: unsetps PURPOSE: (one line) Prepare to stop making a postscript plot DESCRIPTION: CATEGORY: Util CALLING SEQUENCE: unsetps, fn INPUTS: none OPTIONAL INPUT PARAMETERS: filename - if set, look at file just made KEYWORD INPUT PARAMETERS: none KEYWORD OUTPUT PARAMETERS: none OUTPUTS: none COMMON BLOCKS: None SIDE EFFECTS: sets the plotting back to X or mac RESTRICTIONS: None PROCEDURE: MODIFICATION HISTORY: 2005 Oct 17 Leslie Young SwRI Moved to layoung/util
(See ../util/unsetps.pro)
NAME: wheremincontig PURPOSE: (one line) find minimum value within runs of contiguous indices DESCRIPTION: given a list of indexes and a list of values return indices g s.t. j[g] has the smallest distance for a run of contiguous j's (one per group of contiguous j's) CATEGORY: occultation CALLING SEQUENCE: gmin = whereimcontig(i, d, ng) INPUTS: j - list of indices d - list of values OPTIONAL INPUT PARAMETERS: none KEYWORD INPUT PARAMETERS: KEYWORD OUTPUT PARAMETERS: none OUTPUTS: ng : number of contiguous runs of j returns array indices into the minimum value of d within each contiguous run. This array has ng elements. COMMON BLOCKS: None SIDE EFFECTS: RESTRICTIONS: PROCEDURE: MODIFICATION HISTORY: Written 2005 January, by Leslie Young, SwRI
(See ../util/wheremincontig.pro)
NAME:
xplot3d
PURPOSE:
Provide an interactive version of IDL's plot_3dbox
command.
CATEGORY:
Widgets, Object Graphics. Plotting.
CALLING SEQUENCE:
xplot3d, x, y, z
REQUIRED INPUTS:
None. Fake data will be used if no data is supplied in call.
OPTIONAL INPUTS
x: A vector of X data values.
y: A vector of Y data values.
z: A vector of Z data values.
OPTIONAL KEYWORD PARAMETERS:
GROUP: Widget group_leader. When the group leader
is destroyed, this program will be destroyed.
MODAL: If set, block other IDL widgets from receiving events.
BLOCK: If set, block IDL command line.
TITLE: String. A title for the plot.
[XYZ]TITLE: String. Title for x, y or z axis.
NAME: A string. This is a name for the data curve being plotted.
The name is displayed on xplot3d's toolbar if/when
the curve is selected with the mouse. (To select
the curve with the mouse, xplot3d must
be in select mode. You can put xplot3d in select mode
by clicking on the rightmost button in xplot3d's
toolbar.)
[XYZ]RANGE: Two element array specifying axis range. [min, max]
OVERPLOT: Draw the curve in the most recently created view.
Title keywords, range keywords and the modal keyword are
ignored if we are overplotting.
LINESTYLE: Same as IDLgrPolyline::init keyword.
THICK: Same as IDLgrPolyline::init keyword.
COLOR: [r, g, b] triplet. Color of curve. Same as IDLgrPolyline.
SYMBOL: Same as IDLgrPolyline::init keyword.
TEST: If set, do not require input arguments. Plot an example
sinusoidal curve instead.
EXAMPLE 1:
IDL> x = indgen(20)
IDL> y = sin(x/3.)
IDL> z = x
IDL> xplot3d, x, y, z, thick=2, name='interesting curve'
EXAMPLE 2:
IDL> x = indgen(20)
IDL> y = sin(x/3.)
IDL> z = x
IDL> oOrb = obj_new('orb', color=[0, 0, 255])
IDL> oOrb->Scale, .75, .1, .5
IDL> oSymbol = obj_new('IDLgrSymbol', oOrb)
IDL> xplot3d, x, y, z, thick=2, symbol=oSymbol
KNOWN PROBLEMS:
Symbols (specified via the SYMBOL keyword) are not drawn in
a suitably muted color when projected (via the
"2D Projection..." menu functionality).
Heap variables may not be cleaned up properly if an error
occurs in procedure xplot3d.
(See ../util/xplot3dLAY.pro)