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: Fri Feb 2 17:45:02 2001.
NAME:
ASCII
PURPOSE:
Print ASCII characters based on its numerical decimal value.
EXPLANATION:
CALLING SEQUENCE:
ASCII [,/ext]
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
EXT -- Prints only extended ASCII characters.
CALLS:
None.
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
MODIFICATION HISTORY:
Written September 12, 1994, by Liyun Wang, GSFC/ARC
VERSION: Version 1, September 12, 1994
PROJECT:
SOHO - CDS
NAME:
CDD
PURPOSE:
Change directory and set IDL prompt to show current path name
EXPLANATION:
CDD stands for CD with directory name displayed. It is intended to
replace CD. It offers several advantages that CD lacks: It makes the
the IDL prompt to reflect the current directory path; it does not bomb
if cd fails.
It's better that you add the following lines in your IDL_STARTUP
file so that CDD takes into effect as soon as you get into IDL:
cd, current=dir
cdd, dir
Another IDL routine that can be used with CDD is CDUP (cd to an
upper level of dir).
CALLING SEQUENCE:
CDD [, dir_name]
INPUTS:
None required. If no directory name is given, user's home directory is
assumed.
OPTIONAL INPUTS:
DIR_NAME -- A string, name of the destination directory
OUTPUTS:
None. IDL prompt can be changed though.
OPTIONAL OUTPUTS:
CURRENT -- The current directory before CDD takes action.
KEYWORD PARAMETERS:
LAST -- Prompt the last part of a directory path if set. It
has no effect if user's home directory is path of the
directory path.
CALLS:
DATATYPE, CHK_DIR
COMMON BLOCKS:
CDD -- Internal common block used by CDD
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
Utility, miscellaneous
PREVIOUS HISTORY:
Written October 6, 1994, by Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
Liyun Wang, GSFC/ARC, October 9, 1994
Added directory validity checking feature.
Version 2, Liyun Wang, GSFC/ARC, November 12, 1994
Added CURRENT keyword
Version 3, Liyun Wang, GSFC/ARC, December 16, 1994
Made work on VMS machine
Version 4, Liyun Wang, GSFC/ARC, January 11, 1995
Added the LAST keyword
Version 5, Liyun Wang, GSFC/ARC, January 13, 1995
Made prompt for home dir be [~] under VMS
VERSION:
Version 5, January 13, 1995
Project : SOHO - CDS
Name : CDS_SLINE()
Purpose : Select from basic CDS Kelly or BB spectral line list
Explanation : Restores the basic parameters (wavelength and line ID) from
the SAVE file created by cds_sline_data and filters the list
according to user requirements.
eg IDL> list = cds_sline(345,350,elem=['ca','ne'],ion=['v','vi'])
will select all lines in the range 345-350 A originating
from Ca V, Ca VI, Ne V or Ne VI
Use : list = cds_sline([wave_start, wave_end, elem=elem, ion=ion,$
/hard, /see, /cds, /kelly])
Inputs : None
Opt. Inputs : wave_start - start wavelength for search, default = 153 A
wave_end - end wavelength for search, default = 789 A
Outputs : Function returns details of chosen lines in (3,n) array.
Also get listing to screen and optional hard copy.
Opt. Outputs: listing to printer
Keywords : ELEM - the element of interest (2 character std abbreviation)
can be an array.
ION - ionization stage (up to 4 character Roman style)
can be an array.
HARD - if set the listing will be sent to the printer
SEE - if set, listing is output to screen
CDS - use line list from Blue Book
KELLY - use abbreviated Kelly line list (default)
Calls : None
Common : None
Restrictions: None
Side effects: None
Category : Util, spectrum
Prev. Hist. : None
Written : C D Pike, RAL, 9-Nov-94
Modified : Added output variable. CDP, 24-Nov-94
Changed to a function. CDP, 7-Mar-95
Added CDS BB line list option. CDP, 15-Mar-95
Version : Version 4, 15-Mar-95
Project : SOHO - CDS
Name : CDS_SLINE_DATA
Purpose : Create save file from Kelly or CDS spectral line list.
Explanation : The CDS version of the Kelly line list or the Blue Book CDS
line list is read and the wavelengths and lines
identifications are SAVEd for pickup by cds_sline.
Use : IDL> cds_sline_data [, /kelly, /cds]
Inputs : None
Opt. Inputs : None
Outputs : File is created in CDS_INFO
Opt. Outputs: None
Keywords : kelly - uses Kelly line list (default)
cds - uses CDS Blue Book line list
Calls : None
Common : None
Restrictions: Must have write access to CDS_INFO directory.
Side effects: None
Category : Util, spectrum
Prev. Hist. : None
Written : C D Pike, RAL, 9-Nov-94
Modified : To include BB line list. CDP, 15-Mar-95
Add /xdr key for VMS compatibility. CDP, 3-Apr-95
Version : Version 3, 3-Apr-95
PROJECT:
SOHO - CDS
NAME:
CDUP
PURPOSE:
Change directory path to an upper level
EXPLANATION:
CALLING SEQUENCE:
CDUP
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
SIMPLE -- If set, the IDL prompt is not changed.
CALLS:
CDD
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written October 6, 1994, by Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
VERSION:
Version 1, October 6, 1994
PROJECT:
SOHO - CDS
NAME:
CLS
PURPOSE:
Clear screen (in Xterm's VT102 mode)
EXPLANATION:
CALLING SEQUENCE:
CLS
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
BOTTOM -- Keep cursor at the bottom line if set.
CALLS:
None.
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
Utility, miscellaneous
PREVIOUS HISTORY:
Written December 29, 1994, Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
VERSION:
Version 1, December 29, 1994
Project : SOHO - CDS
Name : CREATE_TM
Purpose : Creates a dummy telemetry file.
Explanation : Creates a dummy CDS science stream telemetry file by dumping
packets of 306 bytes at periodic intervals. Writes the packet
index number in the first 2 bytes and the counter bytes (9/10)
and if /eng is set also puts '0a'x in byte 19, otherwise just
zeros.
Use : IDL> create_tm
Inputs : None
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : ENG - if present an ID of '0a'x is placed in byte 18 to
simulate engineering type A packets.
Calls : None
Common : None
Restrictions: Needs write access to the current directory
Side effects:
Category : Util, telemetry.
Prev. Hist. : None
Written : C D Pike, RAL, 6-Jan-95
Modified : Add ENG keyword. CDP, 9-Jan-95
Version : Version 2, 9-Jan-95
Project : SOHO - CDS 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. Use : Result = DATATYPE( VAR [, FLAG ] ) Inputs : VAR = Variable to examine. Opt. Inputs : FLAG = Output format flag as explained below. The default is 0. Outputs : 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 Opt. Outputs: None. Keywords : HELP = If set, then a short explanation is printed out. Calls : None. Common : None. Restrictions: FLAG, if passed, must be an integer between 0 and 3. Side effects: None. Category : Utilities, Arrays. Prev. Hist. : 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. Written : R. Sterner, JHU/APL, 24 October 1985. Modified : Version 1, William Thompson, GSFC, 23 April 1993. Incorporated into CDS library. Version : Version 1, 23 April 1993.
PROJECT:
SOHO - CDS
NAME:
DD
PURPOSE:
Display directory stack used by PD and PPD
EXPLANATION:
CALLING SEQUENCE:
DD
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
None.
CALLS:
CDD
COMMON BLOCKS:
DIR_STACK: Contains the directory stack.
CDD: Common block used by CDD.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written January 10, 1995, Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
Version 2, Liyun Wang, GSFC/ARC, February 3, 1995
Renamed from SD to DD
VERSION:
Version 2, February 3, 1995
Project : SOHO - CDS
Name : FIND_COMMON()
Purpose : Find which elements are common to the input vectors.
Explanation : Returns the indices of the elements in second vector which
are also present in the first vector.
Use : IDL> c = find_common(first, second)
Inputs : first - vector to be searched
second - search vector
Opt. Inputs : None
Outputs : Function returns indices of elements in second vector which
are common to first and second vectors
Opt. Outputs: None
Keywords : None
Calls : FIND_DUP()
Common : None
Restrictions: None
Side effects: None
Category : Util
Prev. Hist. : None
Written : C D Pike, RAL, 9-Nov-94
Modified :
Version : Version 1, 9-Nov-94
Project : SOHO - CDS
Name : FIND_DATA_RUNS()
Purpose : Detect runs of data in an array and return their boundaries.
Explanation : This function finds valid data windows in a data array.
Valid windows are those containing data not having a value
equal to the 'invalid' flag and having at least 'min_data_win'
valid data points in them. Groups with less than this number
of data points are ignored. A break in the data window is
also considered to have occurred if the time interval between
successive valid data points is greater than 'max_time_int'
units.
Use : IDL> limits = find_data_runs(x, y, min_data_win, $
max_time_int [,maxrun=maxrun])
Inputs : x - input data array 'time' values
y - input data array data values
invalid - value of datum to be ignored
min_wind_size - chosen data runs must contain at least this
many data points otherwise they are ignored.
max_time_step - maximum 'time' step which is considered
legitimate within a window. If two
consecutive data points in the x array are
separated in value by more than this then a
new data window is started.
Opt. Inputs : None
Outputs : Function returns start and stop indices (in input arrays) of
runs of valid data as a 2-d array. eg:
dw = find_data_runs(x,y.......)
then dw(0,0) will be the start index of the first run
dx(0,1) the stop index of the first run
dx(1,0) the start index of the second run etc etc
Example:
y = [0,0,1,1,1,0,0,0,1,1,0,1,1]
dw = find_data_runs(indgen(13),y,0,0,1)
print, dw will give
2 8 11
4 9 12
An array [-1,-1] is returned if no valid data runs are found.
Opt. Outputs: None
Keywords : maxrun - max number of data points in a run. A new run
is started when this limit is reached.
Calls : None
Restrictions: x and y array inputsmust be of the same size.
Side effects: None
Category : Util, misc
Prev. Hist. : None
Written : C D Pike, RAL, 16-Nov-93
Modified : Add maxrun keyword. CDP, 1-Nov-94
Version : Version 2, 1-Nov-94
Project : SOHO - CDS
Name : FIND_DUP()
Purpose : Function to identify duplicate values in a vector.
Explanation : The function returns a vector pointing to duplicated values
in the input array such that
print,a(find_dup(a))
will print a list of duplicate values. But beware that the
function returns a value -1 if no duplicates are found.
Use : result = find_dup(vector)
Inputs : vector - vector of values from which duplicates are to be found
Opt. Inputs : None
Outputs : A vector of subscripts in 'vector' is returned. Each subscript
points to a duplicated value. If no duplicates are found, a
value -1 is returned.
Opt. Outputs: None
Keywords : None
Calls : None
Restrictions: None
Side effects: None
Category : Util, misc
Prev. Hist. : Based on REM_DUP by D. Lindler Mar. 87
Written : CDS version by C D Pike, RAL, 12-Nov-93
Modified : Use BSORT to maintain order. CDP, 9-Nov-94
Version : Version 2, 9-Nov-94
Project : SOHO - CDS
Name : GT_RT_FILE()
Purpose : Create expected current CDS telemetry file name.
Explanation : For realtime operation of STM it needs to know what the
current telemetry file name is. This routine calculates
that and STM can then check it exists (ie there is a realtime
session in progress).
Use : expected = gt_rt_file()
Inputs : None
Opt. Inputs : None
Outputs : Function returns a string.
Opt. Outputs: None
Keywords : None
Calls : None
Common : None
Restrictions: None
Side effects: None
Category : Telemetry
Prev. Hist. : None
Written : C D Pike, RAL, 5-Jan-95
Modified :
Version : Version 1, 5-Jan-95
Project : SOHO - CDS
Name : LAST_ITEM
Purpose : Returns the last element of the input variable.
Explanation : Returns the last element of whatever the input variable is.
Use : IDL> print,last_item(indgen(10))
---> 9
Find the latest archive telemetry file:
IDL> print,last_item(findfile(concat_dir('$CDS_TM_DATA','tm*')))
Inputs : item - variable/array/structure to extract from
Opt. Inputs : None
Outputs : Function returns last value.
Opt. Outputs: None
Keywords : None
Calls : None
Common : None
Restrictions: None
Side effects: None
Category : Util, numerical
Prev. Hist. : None
Written : C D Pike, RAL, 9-Dec-94
Modified :
Version : Version 1, 9-Dec-94
PROJECT:
SOHO - CDS
NAME:
MK_GIF
PURPOSE:
Convert FITS files to GIF image files
EXPLANATION:
Reads one or more FITS files, byte scales them, and then
writes them to GIF files. If a title is to be plotted, it
will be plotted in upper center position.
CALLING SEQUENCE:
MK_GIF, FILE_STC
INPUTS:
FILE_STC - A structure with three tags:
FILENAME -- Name of the FITS file
TITLE -- Title to be attached in the GIF image
COLOR -- Color table to be loaded; defaults to 0
FLIP -- Flag indicating if the image should be flipped
before conversion.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
RED, GREEN, BLUE - optional color vectors to override COLOR
FRAC - fraction by which to increase image
size in Y-direction to fit title [def = 10%]
ROTATE - value for rotate (see ROTATE function)
FLIP - flip image to to bottom
REVERSE - flip image left to right
SIG - select significant range of image
CALLS:
WRITE_GIF, CONCAT_DIR, BREAK_FILE, FXREAD
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written December 7, 1994, Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
Version 1, Liyun Wang, GSFC/ARC, December 7, 1994
Modified from FITS2GIF by Dominic Zarro (ARC)
Version 2, Liyun Wang, GSFC/ARC, February 1, 1995
Added one tag (FLIP) to the input file structure.
VERSION:
Version 2, February 1, 1995
NAME:
PD
PURPOSE:
Push a directory onto the top of a directory stack
CALLING SEQUENCE:
PD [, dir] [,rotate=rot_num]
EXAMPLE:
Suppose the current directory stack is:
~ ~/doc ~/idl /usr/local/bin
Result of "pd": ~/doc ~ ~/idl /usr/local/bin
Result of "pd,r=2": ~/idl ~ ~/doc /usr/local/bin
Result of "pd,r=3": /usr/local/bin ~ ~/doc ~/idl
Result of "pd,'~/cds': ~/cds ~ ~/doc ~/idl /usr/local/bin
OPTIONAL INPUTS:
DIR - The directory to be pushed. If DIR is not present, or is
an undefined variable, PD will swap the first tow directory
on the top of the stack, or rotate the directory stack if
keyword ROTATE is set.
ROT_NUM - Number of the directory to be rotated to the top of
stack.
CALLS:
CDD
OTHER RELATED ROUTINES:
CDD, PPD, SD, and CDUP
SIDE EFFECTS:
None.
COMMON BLOCKS:
DIR_STACK: Contains the stack.
CDD: Common block used by CDD.
MODIFICATION HISTORY:
Version 1, Liyun Wang, GSFC/ARC, November 12, 1994
Modified from PUSHD for use with CDD.
Version 2, Liyun Wang, GSFC/ARC, January 11, 1995
Added the ROTATE keyword
Version 3, Liyun Wang, GSFC/ARC, January 18, 1995
Fixed problem of changing directories from one disk to the
other on VMS system
VERSION:
Version 3, January 18, 1995
NAME:
PPD
PURPOSE:
Pop up a directory name from the directory stack and CD to that dir.
CALLING SEQUENCE:
PPD
SIDE EFFECTS:
The top entry of the directory stack is removed.
RESTRICTIONS:
Popping up a directory from an empty stack causes a warning
message to be printed. The current directory is not changed
in this case.
COMMON BLOCKS:
STACK_DIR: Contains the stack.
CDD: Common block used by CDD.
MODIFICATION HISTORY:
17, July, 1989, Written by AB, RSI.
Version 2, Liyun Wang, GSFC/ARC, November 12, 1994
Modified from POPD for use with CDD and PD.
VERSION:
Version 2, November 12, 1994
Project : SOHO - CDS
Name : REM_DUP()
Purpose : Function to remove duplicate values from a vector.
Explanation : None
Use : result = rem_dup( vector, [ flag ] )
Eg. Remove duplicate values in vector a.
a = a( rem_dup(a) )
Remove duplicates in vector WAVE. When duplicate values
are found, select the one with the largest intensity, INTE.
sub = rem_dup( wave, inte)
wave = wave( sub )
inte = inte( sub )
Inputs : vector - vector of values from which duplicates are to be found
Opt. Inputs : flag - if supplied then when duplicates occur,
the one with the largest value of flag is selected.
If not supplied the the first occurence of the value
in 'vector' is selected. Should be a vector with
the same number of elements as in 'vector'.
Outputs : A vector of subscripts in 'vector' is returned. Each subscript
points to a selected value such that vec(rem_dup(vec,flag))
has no duplicates.
Opt. Outputs: None
Keywords : None
Calls : None
Restrictions: None
Side effects: The returned subscripts will sort the values in 'vector' in
ascending order with duplicates removed.
Category : Util, misc
Prev. Hist. : D. Lindler Mar. 87
Written : CDS version by C D Pike, RAL, 22-Oct-93
Modified : Use BSORT instead of SORT to maintain order. CDP 7-Nov-94
Version : Version 2, 7-Nov-94
PROJECT:
SOHO - CDS
NAME:
SD
PURPOSE:
Show directory stack used by PD and PPD
EXPLANATION:
CALLING SEQUENCE:
SD
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
None.
CALLS:
CDD
COMMON BLOCKS:
DIR_STACK: Contains the directory stack.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written January 10, 1995, Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
VERSION:
Version 1, January 10, 1995
Project : SOHO - CDS
Name : TLM_SUMMARY
Purpose : To summarize a telemetry file.
Explanation : Reads a telemetry files, packet by packet and records
the details of every packet whose ID matches that requested.
Use : IDL> tlm_summary, filename, id_spec [,packs=packs,packe=packe]
Inputs : filename - the telemetry file name
id_spec - integer array giving ID wanted eg [1,2] to pick
GIS/NIS raster header packets
(watch decimal/hex switch!)
Opt. Inputs : None
Outputs : Outputs information to screen and file 'filename'_summ in
current directory.
Opt. Outputs: None
Keywords : packs - the packet at which to start logging
packe - the packet at which to stop logging
Calls : None
Common : None
Restrictions: None
Side effects: None
Category : Telemetry
Prev. Hist. : None
Written : C D Pike, RAL, 23-May-1994
Modified : Make it write summary file in current directory and change
extension added to be _summ. CDP, 15-Jun-94
Version : Version 2, 15-Jun-94
Project : SOHO - CDS
Name : VCHECK()
Purpose : Check if variable exists and return optional default if not.
Explanation : Two parameters can be supplied. If the first is defined, its
value is returned. If the first is not defined the function
returns the value of the second (if it is defined) or zero if
it is not. If the first parameter is not defined and the
second is not supplied, a zero value is returned.
Use : IDL> a = vcheck(x,x_default)
Inputs : x - variable to be checked
Opt. Inputs : x_default - the value to assign to function value if first
parameter does not exist.
Outputs : Function returns value as explained above.
Opt. Outputs: None
Keywords : None
Calls : None
Common : None
Restrictions: None
Side effects: None
Category : Utilities
Prev. Hist. : From anonymous Yohkoh idea.
Written : C D Pike, RAL, 20-Apr-94
Modified :
Version : Version 1, 20-Apr-94
Project : SOHO - CDS Name : ZPARCHECK Purpose : Routine to check user parameters to a procedure Explanation : Routine to check user parameters to a procedure Use : zparcheck, progname, parameter, parnum, types, dimens, [ message ] EXAMPLE: IDL> zparcheck, 'HREBIN', hdr, 2, 7, 1, 'FITS Image Header' This example checks whether the parameter 'hdr' is of type string (=7) and is a vector (1 dimension). If either of these tests fail, a message will be printed "Parameter 2 (FITS Image Header) is undefined" "Valid dimensions are 1" "Valid types are string" Inputs : progname - scalar string name of calling procedure parameter - parameter passed to the routine parnum - integer parameter number types - integer scalar or vector of valid types 1 - byte 2 - integer 3 - int*4 4 - real*4 5 - real*8 6 - complex 7 - string 8 - structure dimens - integer scalar or vector giving number of allowed dimensions. Opt. Inputs : message - string message describing the parameter to be printed if an error is found Outputs : None. Opt. Outputs: None. Keywords : None. Calls : None. Common : None. Restrictions: None. Side effects: If an error in the parameter is a message is printed a RETALL issued Category : Utilities, Miscellaneous Prev. Hist. : version 1 D. Lindler Dec. 86 documentation updated. M. Greason, May 1990. Written : D. Lindler, GSFC/HRS, December 1986 Modified : Version 1, William Thompson, GSFC, 29 March 1994 Incorporated into CDS library Version : Version 1, 29 March 1994