This page is a listing of the entire contents of this library for IDL. This listing is the long version. Viewing the much more compact listing may be handier.
Project : SOHO - CDS
Name :
BREAK_FILE
Purpose :
Break a filename into its component parts.
Explanation :
Given a file name, break the filename into the parts
of disk/logical, the directory, the filename, the
extension, and the file version (for VMS)
Use :
BREAK_FILE, FILE, DISK_LOG, DIR, FILNAM, EXT, FVERSION, NODE
Inputs :
file - The file name
Opt. Inputs :
None.
Outputs :
disk_log- The disk or logical (looks for a ":")
This is generally only valid on VMS machines
dir - The directory
filnam - The filename (excluding the ".")
ext - The filename extension (including the ".")
fversion- The file version (only VMS)
node - The Node name (only VMS)
Opt. Outputs:
None.
Keywords :
LAST_DOT- For filenames which have "." in the name, it takes
the LAST "." as the start of the extension. The
default is from the first ".".
Calls :
OS_FAMILY
Common :
None.
Restrictions:
VMS:
Assumes that : always precedes []
ULTRIX:
Right now it has trouble with the ultrix option of use
of "." or ".."
Side effects:
None.
Category :
Utilities, Operating_system.
Prev. Hist. :
Written 1988 by M.Morrison
Aug-91 (MDM) Changed to handle Unix filename convensions
28-Feb-92 (MDM) * Adjusted to handle arrays
11-Mar-92 (MDM) - Perform a STRTRIM(x,2) on input string before
doing the "break-up"
1-Dec-92 (MDM) - Moved code to do filename, extension and version
number for both VMS and Unix (previously it
did not do version number code for Unix)
29-Jan-93 (DMZ/MDM) - checked for node in file name
Written :
M. Morrison, August 1991.
Modified :
Version 1, William Thompson, GSFC, 23 April 1993.
Incorporated into CDS library.
Version 1.1, William Thompson, GSFC, 7 May 1993.
Added IDL for Windows compatibility.
Version 2, William Thompson, GSFC, 15 June 1995
Merged with Yohkoh version. Added change 11-Nov-93 by D. Zarro
to check for ".][" and "[000000" in VMS concealed directory
names
Version 3, William Thompson, GSFC, 29 August 1995
Modified to use OS_FAMILY
Version 4, Liyun Wang, NASA/GSFC, October 11, 1996
Fixed a bug that occurs in MS Windows
Version 5, SVH Haugan, UiO, 10 July 1997
Made "ifil" loop variable a LONG
Version 6, M.Morrison, LMSAL, 5-Nov-97
Added /LAST_DOT option
Version :
Version 5, 10 July 1997
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/break_file.pro)
NAME:
CONCAT_DIR
PURPOSE:
To concatenate directory and file names for current OS.
EXPLANATION:
The given file name is appended to the given directory name with the
format appropriate to the current operating system.
CALLING SEQUENCE:
result = concat_dir( directory, file)
INPUTS:
directory - the directory path (string)
file - the basic file name and extension (string)
can be an array of filenames.
OUTPUTS:
The function returns the concatenated string. If the file input
is a string array then the output will be a string array also.
EXAMPLES:
IDL> pixfile = concat_dir('$DIR_GIS_MODEL','pixels.dat')
IDL> file = ['f1.dat','f2.dat','f3.dat']
IDL> dir = '$DIR_NIS_CAL'
IDL> f = concat_dir(dir,file)
RESTRICTIONS:
Assumes Unix type format if os is not VMS or windows.
CATEGORY
Utilities, Strings
REVISION HISTORY:
Prev Hist. : Yohkoh routine by M. Morrison
Written : CDS version by C D Pike, RAL, 19/3/93
Version : Version 1 19/3/93
Documentation modified Nov-94 W. Landsman
Add V4.0 support for Windows W. Landsman Aug 95
Converted to IDL V5.0 W. Landsman September 1997
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/concat_dir.pro)
NAME:
DATATYPE()
PURPOSE:
Returns the data type of a variable.
EXPLANATION:
This routine returns the data type of a variable in a format specified
by the optional flag parameter.
CALLING SEQUENCE :
Result = DATATYPE( VAR [, FLAG ] )
INPUTS:
VAR = Variable to examine.
OPTIONAL INPUT PARAMETERS:
FLAG = Output format flag as explained below. The default is 0.
OUTPUT PARAMETRS:
The result of the function is the either a string or integer giving the
data type of VAR. Depending on the value of FLAG, the result will be
one of the values from the following table:
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
DCO DComplex 9 DCOMPLEX
PTR Pointer 10 POINTER
OBJ Object 11 OBJECT
OPTIONAL INPUT KEYWORD:
HELP = If set, then a short explanation is printed out.
RESTRICTIONS:
FLAG, if passed, must be an integer between 0 and 3.
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.
REVISION HISTORY:
R. Sterner, JHU/APL, 24 October 1985.
R. Sterner, 18 Mar, 1993 --- Added /DESCRIPTOR.
R. Sterner, 1995 Jul 24 --- Added DCOMPLEX for data type 9.
D. Zarro, 1997 Jul 19 --- Added PTR and OBJ for data type 10 and 11.
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/datatype.pro)
Purpose: checks input data for type, ndimension, etc
(uses IDL size function results)
Keyword Parameters:
type - if set, return idl data type (0,1,2..8) from size function
ndimen - if set, return number dimensions (size(0))
nimages - if set, return #images (1->2D, NI->3D, else 0)
xsize - if set, return X size (size(data))(1)
nx - synonym for xsize
ysize - if set, return Y size (size(data))(2)
ny - synonym for ysize
orr - if set, return value is OR of all boolean flags (def=AND)
string/struct/undefined - if set, return true if type matches
scalar, vector - if set, true if data of specified variety
Calling Examples:
if (data_chk(p1,/type) eq data_chk(p2,/type)) then...
case data_chk(data,/type) of...
if data_chk(data,/string,/scalar) then ...
if data_chk(data,/string,/struct,/undef,/orr)
case data_chk(maybe_cube,/nimages) of...
History:
27-Apr-1993 (SLF)
21-Mar-1994 (SLF) documentation header
10-oct-1996 (SLF) add SCALAR (synonym for the historical mispell SCALER)
2-oct-1997 (SLF) add NIMAGES
15-nov-1997 (SLF) add XSIZE and YSIZE keyword and function
Restrictions:
some keywords are mutually exclusive - for self-documenting code
and reduction of code duplicataion
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/data_chk.pro)
NAME:
FDECOMP
PURPOSE:
Routine to decompose a file name for any operating system
CALLING SEQUENCE:
FDECOMP, filename, disk, dir, name, qual, version, [OSFamily = ]
INPUT:
filename - string file name, scalar
OUTPUTS:
All the output parameters are scalar strings
disk - disk name, always '' on a Unix machine, scalar string
dir - directory name, scalar string
name - file name, scalar string
qual - qualifier, set equal to the characters beyond the last "."
version - version number, always '' on a non-VMS machine, scalar string
OPTIONAL INPUT KEYWORD:
OSFamily - one of the four scalar strings specifying the operating
system: 'vms','windows','MacOS' or 'unix'. If not supplied,
then !VERSION.OS_FAMILY is used to determine the OS.
EXAMPLES:
Consider the following file names
Unix: file = '/rsi/idl40/avg.pro'
VMS: file = '$1$dua5:[rsi.idl40]avg.pro;3
Mac: file = 'Macintosh HD:Programs:avg.pro'
Windows: file = 'd:\rsi\idl40\avg.pro'
then IDL> FDECOMP, file, disk, dir, name, qual, version
will return the following
Disk Dir Name Qual Version
Unix: '' '/rsi/idl40/' 'avg' 'pro' ''
VMS: '$1$dua5' '[RSI.IDL40]' 'avg' 'pro' '3'
Mac: 'Macintosh HD' ':Programs:' 'avg' 'pro' ''
Windows: 'd:' \rsi\idl40\ 'avg' 'pro' ''
NOTES:
(1) All tokens are removed between
1) name and qual (i.e period is removed)
2) qual and ver (i.e. VMS semicolon is removed)
(2) On VMS the filenames "MOTD" and "MOTD." are distinguished by the
fact that qual = '' for the former and qual = ' ' for the latter.
ROUTINES CALLED:
Function GETTOK()
HISTORY
version 1 D. Lindler Oct 1986
Include VMS DECNET machine name in disk W. Landsman HSTX Feb. 94
Converted to Mac IDL, I. Freedman HSTX March 1994
Converted to IDL V5.0 W. Landsman September 1997
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/fdecomp.pro)
NAME:
FILEPATH
PURPOSE:
Given the name of a file in the IDL distribution,
FILEPATH returns the fully-qualified path to use in
opening the file. Operating system dependencies
are taken into consideration. This routine is used by RSI to
make the User Library portable.
CATEGORY:
File Management.
CALLING SEQUENCE:
Result = FILEPATH('filename' [, SUBDIRECTORY = subdir])
INPUTS:
filename: The lowercase name of the file to be opened. No device
or directory information should be included.
KEYWORDS:
ROOT_DIR: The name of the directory from which the resulting path
should be based. If not present, the value of !DIR is used.
This keyword is ignored if TERMINAL or TMP are specified.
SUBDIRECTORY: The name of the subdirectory in which the file
should be found. If this keyword is omitted, the main
directory is used. This variable can be either a scalar
string or a string array with the name of each level of
subdirectory depth represented as an element of the array.
For example, to get a path to the file DETERM in the "userlib"
subdirectory to the IDL "lib" subdirectory, enter:
path = FILEPATH("determ", SUBDIRECTORY = ["lib", "userlib"])
TERMINAL: Return the filename of the user's terminal.
TMP: The file is a scratch file. Return a path to the
proper place for temporary files under the current operating
system.
OUTPUTS:
The fully-qualified file path is returned. If one of the subdirectory
keywords is not specified, the file is assumed to exist in the
main distribution directory.
COMMON BLOCKS:
None.
RESTRICTIONS:
Don't specify more than one of the keywords in a single call.
EXAMPLE:
To get a path to the file DETERM in the "userlib" subdirectory to the
IDL "lib" subdirectory, enter:
path = FILEPATH("determ", SUBDIRECTORY = ["lib", "userlib"])
The variable "path" contains a string that is the fully-qualified file
path for the file DETERM.
MODIFICATION HISTORY:
Adapted from FILE_PATH W. Landsman Feb. 1996
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/filepath.pro)
Name: file_exist
Purpose: returns true(1) if any files match pattern=file
false(0) if no files found
Input Parameters:
file - file, pathname or file filter to check
Optional Keyword Parameters
direct - set if want full check (slower) - use if might be an
empty directory you are looking for
History: written by slf, 11/30/91
4-Sep-92 (MDM) - Modified to handle an array of input files
23-sep-93 (slf) - make sure null file returns false
(findfile count=1! when null requested)
17-Mar-94 (SLF) - use file_stat(/exist) for non wild card cases
April Fools'94 (DMZ) -- added check for :: in file name
(file_stat doesn't work across DECNET)
31-May-94 (DMZ) -- added check for VMS directory name input
(file_stat doesn't seem to work on VMS
dir names like '[ys.atest.soft]')
16-Aug-94 (DMZ) -- added another VMS patch to handle
case when user enters a VMS subdirectory name
without a file name.
6-Aug-97 (Zarro/GSFC) -- added check for nonstring input
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/file_exist.pro)
Project : SOHO - SSW
Name : FILE_STAT()
Purpose : Vector version of FSTAT
Category : Utility, Operating_system
Explanation : Vector version of FSTAT
Syntax : Result = FILE_STAT( FILES )
Examples :
Inputs : FILES = List of files to check.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : EXIST = If set, then the returned values are whether the
files exist or not. This is the default behavior.
SIZE = If set, then the returned values are the sizes of the
files.
Calls : DATA_CHK
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : 11-Mar-1994 (SLF) Wanted faster file_exist function
History : Version 1, 11-Mar-1994, S. Freeland
Version 1.1 05-Jun-1998, J. Newmark changed loop to long
Contact : SFREELAND
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/file_stat.pro)
Project : SOHO - CDS
Name : FIND_FILE()
Purpose : Fixing builtin FINDFILE() problem
Explanation : The builtin FINDFILE() function has problems on some unixes
whenever *a lot* of files are matching the file
specification. This is due to the fact that filename expansion
is done by the shell *before* interpreting a command. Too many
files cause too long commands, which are not accepted. This
causes FINDFILE() to return an empty list of candidates.
FIND_FILE tries the builtin function first, and whenever the
returned list of files is empty, it tries to recheck through
spawning a "find" command.
Since FINDFILE doesn't discriminate between directories, links
and files, this function will not do this either.
Under unix, however, calls like FINDFILE("*") returns the
unfiltered output of the shell commmand "ls *", including
colon-terminated lines for each subdirectory matching the
specification and empty lines separating each subdirectory
listing. Such silly effects are not implemented in the "find"
version. Be warned, however, that these effects are present
when the builtin function does not "fail" due to a too long
file list.
It is possible (under unix) to use the "find" method as
default by setting the keyword /USEFIND (no effect under other
operating systems).
Use : files = find_file(file_specification)
Inputs : file_specification : A scalar string used to find
files. See FINDFILE()
Opt. Inputs : None.
Outputs : Returns a list of files or a blank string if none found.
Opt. Outputs:
Keywords : COUNT : Returns the number of files
USEFIND : Always use a spawned "find" command under unix.
No effect under other operating systems.
Calls : BREAD_FILE, FINDFILE, SPAWN
Common : None
Restrictions: As for FINDFILE
Side effects: None, hopefully
Category : Utilities, Operating_system
Prev. Hist. : Lots of problems with FINDFILE is hopefully history.
Written : S.V.H. Haugan, UiO, 12 April 1996
Modified : Version 2, SVHH, 10 June 1996
Moved the CD,curr_path command to avoid
returns without resetting path.
Version 3, SVHH, 26 June 1996
Took away the -type f argument to find, added
/USEFIND keyword.
Version : 3, 26 June 1996
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/find_file.pro)
Project : SOHO - CDS
Name : FIND_FILES
Purpose : Find multiple files in a multiple path
Explanation : FIND_FILES splits the supplied PATHS string by calling
FIND_ALL_DIR and then loops over all paths calling FIND_FILE()
with each path plus the file specification, returning the full
list of matching files. The supplied file specification may
contain standard wildcard characters.
Use : filelist = FIND_FILES(FILE_SPEC,PATHS)
Inputs : FILE_SPEC: File specification, e.g., "s*r00.fits". Should
*not* contain any path. Scalar string.
PATHS: Scalar string containing one or more default paths to
search for files matching the file specification. See
FIND_ALL_DIR for a more detailed description. The
current directory is NOT searched.
Opt. Inputs : None.
Outputs : Returns a string array with full path names of each file
matching the file specification. If no files are found
an empty string is returned.
Opt. Outputs: None.
Keywords : None.
Calls : CONCAT_DIR(), FIND_ALL_DIR(), FIND_FILE(), PARCHECK, TYP()
Common : None.
Restrictions: Mmmm?
Side effects: None known.
Category : Utilities, Operating_system
Prev. Hist. : Multi-path CDS_FITS_DATA created a need for it.
Written : SVH Haugan, UiO, 23 April 1996
Modified : Version 2, 6 August 1996
Using find_all_dir for +/dir expansion, and using
concat_dir in an attempt to be portable.
Version : 2, 6 August 1996
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/find_files.pro)
NAME: GETTOK PURPOSE: Retrieve the first part of the string up to a specified character EXPLANATION: GET TOKen - Retrieve first part of string until the character char is encountered. CALLING SEQUENCE: token = gettok( st, char ) INPUT: char - character separating tokens, scalar string INPUT-OUTPUT: st - (scalar) string to get token from (on output token is removed) OUTPUT: token - scalar string value is returned EXAMPLE: If ST is 'abc=999' then gettok(ST,'=') would return 'abc' and ST would be left as '999' HISTORY version 1 by D. Lindler APR,86 Remove leading blanks W. Landsman (from JKF) Aug. 1991 Converted to IDL V5.0 W. Landsman September 1997
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/gettok.pro)
Project : SOHO - CDS Name : IDL5TO4 Purpose : Convert IDL/v5 array[] syntax to IDL/v4 array() syntax. Category : Utility Explanation : In IDL version 5, square brackets were introduced as an alternate way of referencing an array, to avoid confusion between arrays and functions. In prior versions of IDL, the syntax FRED(3) could be interpreted as either the third element of the array FRED, or as a call to the function FRED. This syntax is still supported in IDL/v5, but the new syntax FRED[3] can be used to show that it is the third element of the array FRED which is desired, and not a function call. One of the problems that the new syntax resolves is that of routines where FRED(3) was intended to be used as an array subscripting, and was developed in an environment where there was no FRED function which could cause confusion. If this routine was then moved to an environment where there was a FRED function, then the routine would no longer work correctly. Using FRED[3] solves this problem. Unfortunately, the syntax FRED[3] is not supported in earlier versions of IDL. However, it may be that many routines would actually work in the earlier IDLs if the FRED[3] syntax was changed to FRED(3). The routine IDL5TO4 makes this conversion. The modified routine should then work in earlier versions of IDL, assuming that there are no other version-specific aspects to the code. Syntax : IDL5TO4, FILENAME [, OUTDIR ] Examples : IDL5TO4, '*.pro' ;Converts all procedure files ;in current directory IDL5TO4, '*.pro', 'idlv4' ;Converted files written to ;idlv4 subdirectory. Inputs : FILENAME = The name of the file(s) to process. May be an array of filenames, and may also contain wildcard characters. Opt. Inputs : OUTDIR = The name of a directory to write the converted files to. The directory must aleady exist--the routine will not try to create it. If not passed, then the files will be replaced with the converted version at their present location. Outputs : None. Opt. Outputs: None. Keywords : ECHO = If set, the a message line is printed for every file processed. MOD_ONLY = If set, then only those files which require changes will be processed. Use this when not passing the OUTDIR parameter, and you don't want the timestamp of unaffected files changed. PATH = If set, then contains a list of directories to process in turn. A plus sign before any directory will translate into the entire directory tree. For example, the following command will process all .pro files in the /cs/idl directory tree. IDL5TO4, '*.pro', PATH='+/cs/idl', /MOD_ONLY ERRMSG = If defined and passed, then any error messages will be returned to the user in this parameter rather than depending on the MESSAGE routine in IDL. If no errors are encountered, then a null string is returned. In order to use this feature, ERRMSG must be defined first, e.g. ERRMSG = '' IDL5TO4, ERRMSG=ERRMSG, ... IF ERRMSG NE '' THEN ... Calls : DATATYPE, FIND_ALL_DIR, FIND_FILES, FIND_FILE, FILE_EXIST, BREAK_FILE, CONCAT_DIR Common : None. Restrictions: Although most situations should be accounted for, there may still be situations which are not adequately addressed by this routine. One possible failure scenario is when a structure contains a tag name which exactly matches an IDL operator, e.g. "AND", "OR", "MOD", "EQ", etc. This routine may not work correctly in Windows or MacOS, if it needs to overwrite a file which already exists. However, it should work okay if the output files are directed to an empty subdirectory. Side effects: None. Prev. Hist. : Partially based on IDLV5_TO_V4 by Wayne Landsman History : Version 1, 22-Jul-1998, William Thompson, GSFC Version 2, 04-Aug-1998, WIlliam Thompson, GSFC Fixed bug involving keywords. Added keywords PATH, MOD_ONLY Contact : WTHOMPSON
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/idl5to4.pro)
NAME: IDLV4_TO_V5 PURPOSE: Modify an IDL V4.0 (or earlier) procedure such that variables are indexed using square brackets, as allowed (and suggested) within IDL V5.0 and later CALLING SEQUENCE: IDLV4_TO_V5, infiles, outdir INPUTS: infiles - scalar string specifying IDL procedure name(s), wild card values allowed outdir - scalar string giving directory to contain output file. EXAMPLES: Convert the procedure curvefit.pro in the current directory to a IDL V5 version in the (Unix) idlv5 directory IDL> idlv4_to_v5,'curvefit.pro','idlv5/' Convert all the procedures in the current directory to IDL V5 versions in the /share/idlv5 directory IDL> idlv4_to_v5, '*.pro', '/share/idlv5/' METHOD: ISFUNCTION() is used to determine all the routine names in the file, and then ROUTINE_INFO() is used to determine the names of all variables in the procedure. Each (non-commented) line is scanned for parentheses, and converted to square brackets if the token to the left of the left parenthesis matches a variable name. NOTES: (1) Only runs under IDL V5.0 (since it calls ROUTINE_INFO()) (2) May possibly get confused by parenthesis within strings. (3) May get confused by IDL statements that extend over multiple lines idlv4_to_v5 will supply a warning when it becomes confused by unmatched parenthesis. (4) Do not include this procedure 'idlv4_to_v5' in the directory that you are trying to convert (since it will compile the procedure while executing it, and do a retall.) (5) Conversions cannot be performed unless specified procedure(s) already compile properly (6) Will not work on IDL main programs (7) May get confused by gaps between array name and parenthesis PROCEDURES CALLED: FDECOMP, MATCH, REMOVE, ISFUNCTION() REVISION HISTORY: Written W. Landsman Hughes STX June 1997 Variable names can have numerals August 1997 Never change an intrinsic IDL function to square brackets, even if it is also a variable name.
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/idlv4_to_v5.pro)
NAME:
MAN
PURPOSE:
Provides online documentation for IDL topics. If the current
graphics device supports widgets, a graphical user interface
is used. Otherwise, a more basic version which is a cross
between Unix man pages and VMS online help is used.
This routine can emulate the V3.x online help system in V4.x and later.
CATEGORY:
Help, documentation .
CALLING SEQUENCE:
MAN [, REQUEST]
INPUTS:
REQUEST = A scalar string containing the procedure name or topic
for which help is desired. MAN first tries to interpret
the string as a topic, and if not found then searches the
!PATH for the procedure.
OUTPUTS:
The widget version uses a text widget to display the help
text. The basic version sends help text to the standard output.
EXAMPLES:
IDL> man,'rebin' ;Display help on intrinisic IDL REBIN function
IDL> man,'hrebin' ;Display help on Astronomy Library HREBIN procedure
IDL> man,'astron' ;Display all astronomy library procedures
NOTES:
To install the MAN procedure
1. Place the procedures in the /contrib/landsman directory in one's
!PATH.
2. Define the !HELP_PATH sytem prior to entering IDL, to point to a
directoryto contain the help files. This can be done either by
setting the environment variable IDL_HELP_PATH or by assigning
!HELP_PATH in a startup file,
3. Place any IDL help files (such ASTRON.HELP from the Astronomy
Library) in the !HELP_PATH directory. Also place the file
ROUTINES.HELP from IDL V3.6 into this directory. This information
in the ROUTINES.HELP file will be somewhat obsolete, but it is the
only way to get online help for intrinsic procedures.
RESTRICTIONS:
The help text for intrinsic is derived from the LaTeX files used to
produce the V3.6 reference manual. However, it is not possible to
produce exactly the same output as found in the manual due to
limitations of text oriented terminals. The text used is therefore
considerably abbreviated. Always check the manual if the online help is
insufficient.
MAN cannot locate procedures in a VMS text library
MODIFICATION HISTORY:
Adapted from MAN_PROC, W. Landsman February, 1996
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/man.pro)
NAME: MATCH PURPOSE: Routine to match values in two vectors. CALLING SEQUENCE: match, a, b, suba, subb, [ COUNT = ] INPUTS: a,b - two vectors to match elements OUTPUTS: suba - subscripts of elements in vector a with a match in vector b subb - subscripts of the positions of the elements in vector b with matchs in vector a. suba and subb are ordered such that a[suba] equals b[subb] OPTIONAL KEYWORD OUTPUT: COUNT - set to the number of matches, integer scalar SIDE EFFECTS: !ERR is set to the number of matches, can be used instead of COUNT RESTRICTIONS: a and b should not have duplicate values within them. You can use rem_dup function to remove duplicate values in a vector EXAMPLE: If a = [3,5,7,9,11] & b = [5,6,7,8,9,10] then IDL> match, a, b, suba, subb, COUNT = count will give suba = [1,2,3], subb = [0,2,4], COUNT = 3 and suba[a] = subb[b] = [5,7,9] HISTORY: D. Lindler Mar. 1986. Fixed "indgen" call for very large arrays W. Landsman Sep 1991 Added COUNT keyword W. Landsman Sep. 1992 Fixed case where single element array supplied W. Landsman Aug 95 Converted to IDL V5.0 W. Landsman September 1997
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/match.pro)
NAME:
MPBASIC
PURPOSE:
Provides on-line documentation for IDL topics. The style
is a cross between Unix man pages and VMS on-line help. The
help is organized in a two level hierarchy --- Level 1 is the
global subject, and Level 2 supplies help on subjects within
each global subject. If !D.WINDOW is not -1, (window system in use)
the mouse is used to prompt for subjects; otherwise, the normal tty
interface is used.
This routine is used when in Widget IDL and widgets are not available.
CATEGORY:
Help, documentation
CALLING SEQUENCE:
MPBASIC [, REQUEST]
INPUTS:
REQUEST = A scalar string containing the item for which help is desired.
This string can contain one or two (whitespace separated) words.
If only one word is included in REQUEST, it is taken as either the
global topic or the program name; if there are two words, the first
is taken as the global topic and the second as the program name.
Missing words are prompted for.
OUTPUTS:
Help text is sent to the standard output.
RESTRICTIONS:
The help text is derived from the LaTeX files used to produce
the reference manual. However, it is not possible to produce
exactly the same output as found in the manual, due to limitations
of text-oriented terminals. The text used is therefore considerably
abbreviated. Always check the manual if the online help is
insufficient.
Under VMS, MPBASIC now works (since July 1996) for procedures in text
libraries. However, it will work faster if the procedures are stored
as separate ASCII files in directories.
MODIFICATION HISTORY:
AB, 3, November, 1988
Added ambiguity resolution, ability to handle
multiple levels, and support for mouse. January, 1989
Modified and extended to accept a wider range of help requests,
K.Rhode, STX, June 1990 (Small bug fixed, 9 July 1990)
Search the current procedures W. Landsman January, 1991
Renamed to MPBASIC for Widget IDL.
Modified to match new .HELP file format for IDL 3.1.0 and later.
Joel D. Offenberg, HSTX, 7/1/93
Work for VMS text library W. Landsman July 1996
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/mpbasic.pro)
NAME: OS_FAMILY PURPOSE: Return the current operating system as in !VERSION.OS_FAMILY CALLING SEQUENCE result = OS_FAMILY() INPUTS: None OUTPUTS: result - scalar string containing one of the four values 'Windows','MacOS','vms' or 'unix' NOTES: OS_FAMILY is assumed to be 'unix' if !VERSION.OS is not 'windows', 'MacOS' or 'vms' To make procedures from IDL V4.0 and later compatibile with earlier versions of IDL, replace calls to !VERSION.OS_FAMILY with OS_FAMILY(). PROCEDURES CALLED function TAG_EXISTS() REVISION HISTORY: Written, W. Landsman
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/os_family.pro)
NAME:
REMOVE
PURPOSE:
Contract a vector or up to 7 vectors by removing specified elements
CALLING SEQUENCE:
REMOVE, index, v1,[ v2, v3, v4, v5, v6, v7]
INPUTS:
INDEX - scalar or vector giving the index number of elements to
be removed from vectors. Duplicate entries in index are
ignored. An error will occur if one attempts to remove
all the elements of a vector.
INPUT-OUTPUT:
v1 - Vector or array. Elements specifed by INDEX will be
removed from v1. Upon return v1 will contain
N fewer elements, where N is the number of values in
INDEX.
OPTIONAL INPUT-OUTPUTS:
v2,v3,...v7 - additional vectors containing
the same number of elements as v1. These will be
contracted in the same manner as v1.
EXAMPLES:
(1) If INDEX = [2,4,6,4] and V = [1,3,4,3,2,5,7,3] then after the call
IDL> remove,index,v
V will contain the values [1,3,3,5,3]
(2) Suppose one has a wavelength vector W, and three associated flux
vectors F1, F2, and F3. Remove all points where a quality vector,
EPS is negative
IDL> bad = where( EPS LT 0, Nbad)
IDL> if Nbad GT 0 then remove, bad, w, f1, f2, f3
METHOD:
If more than one element is to be removed, then HISTOGRAM is used
to generate a 'keep' subscripting vector. To minimize the length of
the subscripting vector, it is only computed between the minimum and
maximum values of the index. Therefore, the slowest case of REMOVE
is when both the first and last element are removed.
REVISION HISTORY:
Written W. Landsman ST Systems Co. April 28, 1988
Cleaned up code W. Landsman September, 1992
Major rewrite for improved speed W. Landsman April 2000
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/remove.pro)
NAME:
TAG_EXIST()
PURPOSE:
To test whether a tag name exists in a structure.
EXPLANATION:
Routine obtains a list of tagnames and tests whether the requested one
exists or not. The search is recursive so if any tag names in the
structure are themselves structures the search drops down to that level.
(However, see the keyword TOP_LEVEL).
CALLING SEQUENCE:
status = TAG_EXIST(str, tag, [ INDEX =, /TOP_LEVEL ] )
INPUT PARAMETERS:
str - structure variable to search
tag - tag name to search for, scalar string
OUTPUTS:
Function returns 1b if tag name exists or 0b if it does not.
OPTIONAL INPUT KEYWORD:
TOP_LEVEL = If set, then only the top level of the structure is
searched.
OPTIONAL OUTPUT KEYWORD:
INDEX = index of matching tag, scalar longward, -1 if tag name does
not exist
EXAMPLE:
Determine if the tag 'THICK' is in the !P system variable
IDL> print,tag_exist(!P,'THICK')
PROCEDURE CALLS:
DATATYPE()
MODIFICATION HISTORY: :
Written, C D Pike, RAL, 18-May-94
Passed out index of matching tag, D Zarro, ARC/GSFC, 27-Jan-95
William Thompson, GSFC, 6 March 1996 Added keyword TOP_LEVEL
Zarro, GSFC, 1 August 1996 Added call to help
(See /host/bluemoon/usr2/idllib/astron/contrib/landsman/allpro/tag_exist.pro)