[Previous]
[Next]
NAME: c_expected
PURPOSE: Expectation value of the C-statistic
The result of the program is the mean C-statistic
for an infinite ensemble of Poisson-distributed
count rates with mean values given by fmod.
EXPLANATION:
The C-statistic is the same as chi-squared for large
count rates, but differs significantly when the
counts are < 10 per bin. The expected value is 1.0
for large counts/bin, a bit greater than one for
counts/bin in the 0.5-10 range, and progressively
less than 1 when the counts/bin << 1.
METHOD: The expectation <C(f)> = SUM { P_n(f) C(n,f) },
where the range of n is 0 to infinity, and P_n is
the Poisson distribution function (f^n / n!) exp(-f),
and the C-statistic is C(n,f)= 2*(f-n*alog(n)-n*alog(f)).
This sum is computed using:
<C> = Polynomial * exponential - log term for 0 < fmod < 39
<C> = 1.000 39 < fmod < infinity
INPUTS: fmod (model count rate) can be a scalar or vector
OUTPUTS: Expectation value of the C-statistic (vector)
CALLED BY:
c_statistic
EXAMPLE:
fmod = randomu(seed,20)>.001
expec=c_expected(fmod)
print,'Expectation of C-statistic=',expec
CALLS: ***
POLY
RESTRICTIONS: fmod must be positive, never zero
The approximation is good to better than 0.1% everywhere.
VERSION HISTORY:
VERS. 1 EJS July 6, 2000
NOTES: Tested analytic form of coefficient array, but explicit form is
twice as fast.
mm=70
a=dblarr(mm) & fact_=a & fact_[2]=1. & a[2]=alog(2.)
for j=3,mm-1 do begin
fact_[j]=fact_[j-1]*(j-1.) ; fact_=[0,0,1,2,6,24,120,720,...]
a[j]=alog(j)/fact_[j]
endfor
[Previous]
[Next]
PURPOSE:
To provide a goodness-of-fit statistic valid for very low countrates
e.g., counts/bin < 10 (Webster Cash, AP.J., 1979)
INPUTS:
f_obs = array of integer counts
f_mod = same size array of positive model counts (possibly
non-integer)
OPTIONAL INPUTS:
If f_mod is not positive everywhere, one can set a minimum
allowed value using the f_mod_min keyword.
IF CHISQ is set, the chi-squared statistic for Poisson
distributed f_obs will be returned.
If EXPECTATION is set to an existing variable, the expected
C-statistic will be returned in it.
NOTES:
If f_mod and f_obs form the best possible match, cash_statistic
will have a local minimum (which may be <1 or > 1). This is
not true for chi-squared when counts/bin < 10.
If counts/bin >> 10, cash_statistic = Chisquared
CALLS: ***
c_expected
HISTORY:
EJS April 19, 2000
W. Cash Ap.J., 1979
EJS May 1, 2000 -- FLOATED f_mod to prevent f_obs/f_mod
becoming zero if f_obs and f_mod both INTEGER.
EJS Jun 6, 2000 -- Added option to get expectation of C-statistic
Kim, Mar 4, 2005 -- Extracted c_expected file into a separate file
[Previous]
[Next]
Project : HESSI
Name : CACHE__DATA
Purpose : create a cache object, whose contents persist
in memory even after object is destroyed.
Yes, it uses common blocks, but their names are
dynamically created so there is never a conflict.
Category : Ancillary GBO Synoptic Objects
Syntax : IDL> c=obj_new('data_cache')
Properties : NAME = cache name
CALLS: ***
DATA_CACHE::CLEANUP, DATA_CACHE::HAS_DATA, DATA_CACHE::INIT
DATA_CACHE::RESTORE, DATA_CACHE::SAVE, DATA_CACHE::SET, DATA_CACHE::SHOW
DATA_CACHE::VALID_NAME, DATA_CACHE__DEFINE, DPRINT, EXIST, IS_STRING, TRIM
is_number [1], is_number [2], str_replace [1], str_replace [2]
History : Written 8 Apr 2000, D. Zarro, SM&A/GSFC
Modified 5 Nov 2006, Zarro (ADNET/GSFC)
- removed EXECUTE
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : CACHE_DATA
Purpose : cache data in pointer for fast retrieval
Category : Utility, searching, I/O
Syntax : IDL> cache_data,name,params,data,/get
Inputs : DATA = data to cache [any type]
PARAMS = parameters describing data [string]
NAME = unique name of cache in common [string]
Outputs : DATA = retrieved data (if /GET)
Keywords : GET = retrieve cached data from name
EMPTY = empty cache
FREE = free cache memory
STATUS =1/0 if success/failure
MAX_SIZE= maximum size of cache [def=20]
CALLS: ***
CREATE_CACHE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EMPTY_CACHE, EXIST
FREE_POINTER, GET_POINTER, IS_BLANK, IS_STRING, MAKE_POINTER, RESTORE_CACHE
SAVE_CACHE, SET_POINTER, SHOW_CACHE, TRIM, delvarx [5], is_struct
CALLED BY:
FIND_CAT, FIND_PROC
History : Version 1, 6-Nov-1999, D.M. Zarro. Written
9-Jun-2005, S.L.Freeland - assure pointer is scalar
for /GET option (avoid rsi induced problem
in subscripting Version differences)
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : CACHE_LIST
Purpose : Cache time-based listing
Category : Utility
Explanation : Useful for speeding up searches if time window does
not change, or if search is within time window of last
search. Each listing is stored in unique common block
that is dynamically named: cache_name, and in a dynamic
variable named: var_name.
Syntax : cache_list,name,times,list,tstart=tstart,tend=tend
Inputs : NAME = unique name for string ID
LIST = list array to retrieve or cache (if /SET)
TIMES = TAI times of retrieved list elements
Keywords : TSTART = listing start time [def = min(TIMES)]
TEND = list end time [def = max(TIMES)]
SET = set to store list (def = GET)
COUNT = # or retrieved list elements
STATUS = 0 if something failed, or 1 for success
CALLS: ***
ANYTIM2TAI, EXIST, IS_BLANK, VALID_TIME, is_struct, str_replace [1], str_replace [2]
History : 20 Nov 1999 D. Zarro (SM&A/GSFC) - written
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: calc_rad_loss
Purpose: Calculate radiative loss rate from Chianti version 5.1 for a
plasma at given temperatures and emission measures
Calling arguments:
in_emis - emission measure (scalar or array) in 10^49 cm^-3
in_tempr - temperature (scalar or array) in K (note: NOT MK)
Output:
Scalar or array (same size as emis and temp input) of radiative loss rate
in ergs/second.
Method:
Radiative loss rate = EM * 1.e49 * 6.e-22 / SQRT(T/1.e5) erg s^-1
Cox & Tucker (1969)
Interpolate from table of loss rate (erg s^-1) vs. temperature (K)
made from Chianti v. 5.1 using rad_loss.pro
Table made using coronal abundances, the default density of 10^10 cm^-3,
and the Mazzotta ionization equilibrium
Written: Brian Dennis December 2005
Modifications:
9-Jan-2006, Kim. renamed, added common, and documentation.
11-Jan-2006, Kim. Fix path to txt file
CALLS:
CALLED BY
GOES__DEFINE
[Previous]
[Next]
NAME:
CALTRANS
PURPOSE:
Calculates a linear transform to map one image onto another.
CATEGORY:
CALLING SEQUENCE:
m = caltrans(p)
INPUTS:
p = float(2,2,n) Set of reference point coordinates in both images.
n : number of points, n >= 3 (n>=1 for transtype = s).
p(0,0,*), p(1,0,*) : x and y coord. of points in reference image.
p(0,1,*), p(1,1,*) : x and y coord. of points in image to be
transformed.
p can be created conveniently with the setpts procedure.
KEYWORDS (INPUT):
transtype : can be either string, float element, or structure:
transtype = string. Type of transformation, default = 'g'.
'g' = general linear transformation.
'i' = isotropic expansion, rotation, and shift.
(no transposition, and image and reference
must have square pixels)
's' = shift only.
transtype = float. pixel aspect ratio of image (ypixsize/xpixsize).
Equivalent to transtype='i', but with non-square
image pixels (ref. pixels must still be square).
Use -ypix/xpix if the image is transposed.
transtype = structure. Allows very flexible constrained transf.
The structure must have the following tags:
.type = string ('g','i',or 's'). Type of transformation.
.pix_x = float. image pixel size in x
.pix_y = float. image pixel size in y
.ref_x = float. reference pixel size in x
.ref_y = float. reference pixel size in y
.transpose = int. 0 or 1, if 1, image is transposed.
.phi = float. angle of image_y measured counterclockwise
from ref_y (c.c.wise = pos. towards -ref_x)
CALLED BY:
AUTO_ALIGN_IMAGES, IMG_DEFORM, OPLOT_B, POLY_MOVIE, SETPTS [1], SETPTS [2]
TRACE_MDI_ALIGN
Note: if .type = 'g' then all other tags are ignored.
if .type = 'i' then only the ratios .pix_y/.pix_x,
.ref_y/.ref_x and .transpose are used.
if .type = 's' then all tags are used. The pixel
sizes can be in any (linear) system.
residuals = int. If present and equal to 1: residuals are printed.
OUTPUTS:
m = float(4,2). Matrix elements of the linear transform.
m(*,0) and m(*,1) can directly be used in poly_2d. Refer to
poly_2d for details.
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
PROCEDURE:
Caltrans performs a constrained linear transform. It allows for
image translation, rotation and stretching in x and y. Because
it is a constrained transform, the cross terms m(3,*) are always 0.
The program makes a least square fit if more than 3 points are given. ; MODIFICATION HISTORY:
JPW, Nov. 1989
JPW, Nov. 1994 implemented some of ANM's upgrades:
uses svbksb, and implements transtype='i'
JPW, Nov. 1994 added structure and float options for transtype.
[Previous]
[Next]
NAME:
CALZ_UNRED
PURPOSE:
Deredden a galaxy spectrum using the Calzetti et al. (2000) recipe
EXPLANATION:
Calzetti et al. (2000, ApJ 533, 682) developed a recipe for dereddening
the spectra of galaxies where massive stars dominate the radiation output,
valid between 0.12 to 2.2 microns. (CALZ_UNRED extrapolates between
0.12 and 0.0912 microns.)
CALLING SEQUENCE:
CALZ_UNRED, wave, flux, ebv, [ funred, R_V = ]
INPUT:
WAVE - wavelength vector (Angstroms)
FLUX - calibrated flux vector, same number of elements as WAVE
If only 3 parameters are supplied, then this vector will
updated on output to contain the dereddened flux.
EBV - color excess E(B-V), scalar. If a negative EBV is supplied,
then fluxes will be reddened rather than deredenned.
Note that the supplied color excess should be that derived for
the stellar continuum, EBV(stars), which is related to the
reddening derived from the gas, EBV(gas), via the Balmer
decrement by EBV(stars) = 0.44*EBV(gas)
OUTPUT:
FUNRED - unreddened flux vector, same units and number of elements
as FLUX. FUNRED values will be zeroed outside valid domain
Calz_unred (0.0912 - 2.2 microns).
OPTIONAL INPUT KEYWORD:
R_V - Ratio of total to selective extinction, default = 4.05.
Calzetti et al. (2000) estimate R_V = 4.05 +/- 0.80 from optical
-IR observations of 4 starbursts.
CALLS: ***
POLY
EXAMPLE:
Estimate how a flat galaxy spectrum (in wavelength) between 1200 A
and 3200 A is altered by a reddening of E(B-V) = 0.1.
IDL> w = 1200 + findgen(40)*50 ;Create a wavelength vector
IDL> f = w*0 + 1 ;Create a "flat" flux vector
IDL> calz_unred, w, f, -0.1, fnew ;Redden (negative E(B-V)) flux vector
IDL> plot,w,fnew
NOTES:
Use the 4 parameter calling sequence if you wish to save the
original flux vector.
PROCEDURE CALLS:
POLY()
REVISION HISTORY:
Written W. Landsman Raytheon ITSS December, 2000
[Previous]
[Next]
NAME:
CARR2EX
PURPOSE
Estimate the time of central meridian passage of a Carrington
rotation number
INPUT
NCARR - Vector of Carrington rotation numbers (may be non-integral)
OUTPUT
Time in external format
OPTIONAL KEYWORDS
OFFSET - Reference heliographic longitude(s). The default is 0
(central meridian). For example, if offset = 90, then
the time at which the supplied Carrington rotation number
passed 90 deg heliographic longitude is returned.
DD - If set, return time as a string giving
decimal day, month, and year
CALLING SEQUENCE
TIME = CARR2EX(1850.26)
HISTORY
Feb 11, 1994 - GLS - Written as a generalized version of H. Hara's
CARR2BTIME to handle non-integral Carrington numbers.
Feb 23, 1994 - GLS - Accepts vector input as well as scalar.
May 28, 1997 - SLF - removed references to 'dd79' SW (use anytim.pro)
Oct 6, 1999 - SLF - made return INT instead of FLOAT
To match definition of 'EXTERNAL FORMAT'
CALLS:
CALLED BY
CARR2DATE, TV_SYNOP, disp_synop, mk_imgsum_html
[Previous]
[Next]
Project : SOHO - CDS
Name : CATEGORY
Purpose : List procedure/function names and categories.
Explanation : Creates a list of all .PRO files and then searches them for
the standard CDS header and extracts the Name and Category
fields. The resultant one-line documentation is printed to
the screen or to the file "category.doc".
Use : IDL> category [,file_spec, /hard, /path, list=list]
IDL> category, path='userlib
Inputs : None
Opt. Inputs : file_spec - specification of the files to be searched.
If omitted, the current directory is used.
Outputs : The information can be printed to the screen or to the default
output file "category.doc" (or both).
Opt. Outputs: None
Keywords : hard - specifies that output is to be stored in file
category.doc
path - if present (/path or path=1) use current IDL path
(!path) as the search path but select only the "cds"
directories, otherwise use any directory whose name
contains the string specified by path.
quiet - if specified, do not print to screen.
list - if present, the list of one-liners is returned
in a string array.
Calls : ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], FILE_EXIST [2], STR2ARR [1], STR2ARR [2], break_file [4]
file_exist [1], file_exist [3]
CALLED BY:
FILL_CATEGORY
Restrictions: When the /path option is requested, only directories containing
the letters "cds" will be used. The VMS option is also very
fragile in using the path directories and is likely not
to work if the path contains symbols and libraries etc.
Side effects: None
Category : Utilities, Documentation, Manual
Prev. Hist. : None
Written : Based on PURPOSE, C D Pike, RAL, 23-Jun-1993
Modified : Fixed bug in finding Category line. CDP, 1-Jun-95
Version : Version 2, 1-Jun-95
[Previous]
[Next]
NAME:
CCM_UNRED
PURPOSE:
Deredden a flux vector using the CCM 1989 parameterization
EXPLANATION:
The reddening curve is that of Cardelli, Clayton, and Mathis (1989 ApJ.
345, 245), including the update for the near-UV given by O'Donnell
(1994, ApJ, 422, 158). Parameterization is valid from the IR to the
far-UV (3.5 microns to 0.1 microns).
Users might wish to consider using the alternate procedure FM_UNRED
which uses the extinction curve of Fitzpatrick (1999).
CALLING SEQUENCE:
CCM_UNRED, wave, flux, ebv, funred, [ R_V = ]
or
CCM_UNRED, wave, flux, ebv, [ R_V = ]
INPUT:
WAVE - wavelength vector (Angstroms)
FLUX - calibrated flux vector, same number of elements as WAVE
If only 3 parameters are supplied, then this vector will
updated on output to contain the dereddened flux.
EBV - color excess E(B-V), scalar. If a negative EBV is supplied,
then fluxes will be reddened rather than deredenned.
OUTPUT:
FUNRED - unreddened flux vector, same units and number of elements
as FLUX
OPTIONAL INPUT KEYWORD
R_V - scalar specifying the ratio of total selective extinction
R(V) = A(V) / E(B - V). If not specified, then R_V = 3.1
Extreme values of R(V) range from 2.75 to 5.3
CALLS: ***
POLY
EXAMPLE:
Determine how a flat spectrum (in wavelength) between 1200 A and 3200 A
is altered by a reddening of E(B-V) = 0.1. Assume an "average"
reddening for the diffuse interstellar medium (R(V) = 3.1)
IDL> w = 1200 + findgen(40)*50 ;Create a wavelength vector
IDL> f = w*0 + 1 ;Create a "flat" flux vector
IDL> ccm_unred, w, f, -0.1, fnew ;Redden (negative E(B-V)) flux vector
IDL> plot,w,fnew
NOTES:
(1) The CCM curve shows good agreement with the Savage & Mathis (1979)
ultraviolet curve shortward of 1400 A, but is probably
preferable between 1200 and 1400 A.
(2) Many sightlines with peculiar ultraviolet interstellar extinction
can be represented with a CCM curve, if the proper value of
R(V) is supplied.
(3) Curve is extrapolated between 912 and 1000 A as suggested by
Longo et al. (1989, ApJ, 339,474)
(4) Use the 4 parameter calling sequence if you wish to save the
original flux vector.
(5) Valencic et al. (2004, ApJ, 616, 912) revise the ultraviolet CCM
curve (3.3 -- 8.0 um-1). But since their revised curve does
not connect smoothly with longer and shorter wavelengths, it is
not included here.
REVISION HISTORY:
Written W. Landsman Hughes/STX January, 1992
Extrapolate curve for wavelengths between 900 and 1000 A Dec. 1993
Use updated coefficients for near-UV from O'Donnell Feb 1994
Allow 3 parameter calling sequence April 1998
Converted to IDLV5.0 April 1998
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
CDD
PURPOSE:
Change directory and set IDL prompt to 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 part of the
directory path.
CALLS: ***
CHK_DIR [1], CHK_DIR [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], STR_SEP
CALLED BY:
CDUP, DD, PD, PPD
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 6, September 24, 1997, Liyun Wang, NASA/GSFC
Chop off '/tmp_nmt' from directory name for UNIX system
VERSION:
Version 6, September 24, 1997
[Previous]
[Next]
Project : STEREO - SSC
Name : CDF2TAI()
Purpose : Convert CDF epoch values to CDS TAI time values
Explanation : This procedure calls CDF_EPOCH to break down CDF epoch
variables into year, month, day, etc., and then converts this
into a CDS TAI time value using UTC2TAI.
Use : TAI = CDF2TAI(EPOCH)
Inputs : EPOCH = Array of values with the CDF_EPOCH datatype from a CDF
file. The CDF documentation describes this as the
number of milliseconds since 1-Jan-0000. (Experiment
shows that this value omits leap seconds.)
Opt. Inputs : None
Outputs : Function returns CDS TAI time variable.
Opt. Outputs: None
Keywords : ERRMSG = If defined and passed, then any error messages
will be returned to the user in this parameter
rather than being handled by the IDL MESSAGE
utility. If no errors are encountered, then a null
string is returned. In order to use this feature,
the string ERRMSG must be defined first, e.g.,
ERRMSG = ''
RESULT = CDF2TAI( EPOCH, ERRMSG=ERRMSG )
IF ERRMSG NE '' THEN ...
Also accepts any keywords for UTC2TAI
Calls : ***
TAI2UTC, UTC2TAI
Common : None
Restrictions: None
Side effects: If an error condition is encountered, and the ERRMSG keyword is
used, then the single value -1 is returned.
Category : CDF, Time
Prev. Hist. : None
History : Version 1, 11-Jan-2006, William Thompson, GSFC
Version 2, 16-Feb-2006, William Thompson, GSFC
Speed up by using CDF_EPOCH only for a single date, and
then using TAI2UTC with /NOCORRECT for more processing.
Contact : WTHOMPSON
[Previous]
[Next]
Project : STEREO - SSC
Name : CDF2UTC()
Purpose : Convert CDF epoch values to CDS UTC time format
Explanation : This procedure calls CDF_EPOCH to break down CDF epoch
variables into year, month, day, etc., and then formats this
into one of the CDS UTC time formats via ANYTIM2UTC.
Use : UTC = CDF2UTC(EPOCH)
Inputs : EPOCH = Array of values with the CDF_EPOCH datatype from a CDF
file. The CDF documentation describes this as the
number of milliseconds since 1-Jan-0000. (Experiment
shows that this value omits leap seconds.)
Opt. Inputs : None
Outputs : Function returns CDS UTC time variable.
Opt. Outputs: None
Keywords : ERRMSG = If defined and passed, then any error messages
will be returned to the user in this parameter
rather than being handled by the IDL MESSAGE
utility. If no errors are encountered, then a null
string is returned. In order to use this feature,
the string ERRMSG must be defined first, e.g.,
ERRMSG = ''
RESULT = CDF2UTC( EPOCH, ERRMSG=ERRMSG )
IF ERRMSG NE '' THEN ...
Also accepts any keywords for ANYTIM2UTC
Calls : ***
TAI2UTC
Common : None
Restrictions: None
Side effects: If an error condition is encountered, and the ERRMSG keyword is
used, then the single value -1 is returned.
Category : CDF, Time
Prev. Hist. : None
History : Version 1, 11-Jan-2006, William Thompson, GSFC
Version 2, 16-Feb-2006, William Thompson, GSFC
Speed up by using CDF_EPOCH only for a single date, and
then using TAI2UTC with /NOCORRECT for more processing.
Contact : WTHOMPSON
[Previous]
[Next]
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, STR_INDEX [1], STR_INDEX [2]
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
[Previous]
[Next]
Name: centroid
Purpose: calculate the centroid ("center of mass") of 2D array
Input Parameters:
array - 2D array
Output:
function returns centroid [xc,yc]
Keyword Parameters:
invert - if set, operate on the inverted array (ie, dark vs light...)
Calling Example:
center=centroid(array)
CALLS: ***
data_chk [1], data_chk [2]
History:
S.L.Freeland - using Dave Fannings example available at:
http://www.dfanning.com/tip_examples/centroid.pro
added /INVERT and a couple of ssw-isms
[Previous]
[Next]
NAME:
CENTROIDW
PURPOSE:
Calculate the weighted average of ARRAY
CATEGORY:
CALLING SEQUENCE:
CENTROID,ARRAY,XCEN,YCEN
INPUTS:
ARRAY = Rectangular input array of any type except string
OUTPUTS:
XCEN = weighted average of X values
YCEN = weighted average of Y values
CALLED BY:
H_VS_TIME, SPOTTER, fit_limb, ocenter, ssw_find_transit
COMMON BLOCKS:
NONE.
SIDE EFFECTS:
NONE.
PROCEDURE:
MODIFICATION HISTORY:
VERSION 1.0, Written J. R. Lemen, 11 Feb 1991
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT
Purpose : Make a best fit of the sum of components to the supplied data
Explanation : Given a structure describing the set of components to be
fitted (a CFIT structure), CFIT first compiles the
component-wise structure into a "short fit" called SFIT.
In doing so, for each component it takes the value of each
parameter's INITIAL tag as the starting point for the search,
unless the keyword /VALUES is set, in which case the parameter
tag called VALUE is used instead. Both of these tags store
nominal parameter values, but the values are converted to
actual values before being stored in the SFIT structure.
If the SFIT is already supplied through the SFIT keyword, no
new SFIT is compiled, and the values stored in the SFIT are
kept as they are.
HOWEVER, if the parameter A_NOM is defined, those (nominal)
parameter values are converted into actual parameter values
and stored in the SFIT structure, unless the /IGNORE keyword
is set. This happens whether or not the SFIT structure was
supplied initially.
If any components are flagged not to be included in the fit,
all its parameters are flagged as constant.
Given these data, CFIT tries to find that set of parameter
values which gives the best fit of the model to the supplied
function.
Use : YFIT = CFIT(X,Y,A,FIT [,SIGMAA] [+keywords])
Inputs : X,Y : Tabulated function to be fitted.
A_NOM : Array of (nominal) parameter values before/after fit.
IF DEFINED ON ENTRY, THEN THESE VALUES ARE USED AS INITIAL
VALUES, UNLESS /RESET IS SET.
FIT : Fit structure containing one tag for each component in
the fit.
SIGMAA : Errors for each of the parameter values included in A.
Opt. Inputs :
Outputs :
Opt. Outputs: FAILED, FAIL_TYPE : See MCURVEFIT for an explanation. FAILED
will be nonzero if a failure occured,
FAIL_TYPE contains information on the type
of failure. Note that e.g., loss of
precision failures (type 2) is usually the
result of starting very *close* to the
correct parameter values (thus not a
serious failure).
Keywords : WEIGHTS : Set to an array containing the weights to be used in
the \chi^2 calculations. I.e., if the error is
proportional to the square root of the number of
counts in Y, set WEIGHTS=1./Y.
SFIT : Used for internal purposes to speed up execution:
When a fit is made, the component-wise organization of
a FIT STRUCTURE is "compiled" into a short form called
an SFIT structure before subsequent processing.
When fitting a series of spectra in a loop, set this
keyword to any named variable to avoid re-compilation
of the SFIT structure between each time.
The parameter values (tag "A_ACT") inside the SFIT
structure are stored as the *actual* value, not the
*nominal* value. For each parameter:
A_ACT = A_NOM*trans_a + trans_b
where trans_a/b arrays are compiled from the PARAMETER
structure describing each parameter, and also stored as
an array inside the SFIT structure.
VALUES: Create the SFIT structure with values taken from the
param(*).value instead of param(*).initial.
Whenever SFIT already contains an SFIT structure, the
array of *nominal* parameter values A_NOM must be
supplied to update the starting values.
ERROR_ONLY: Passed on to MCURVEFIT, causing no change in the
parameter values, but an estimate of the SIGMAA
array will be made.
IGNORE: Set to ignore any values supplied in A_NOM.
NOCOMPILE : Don't try to compile the evaluation function. If
this keyword is not set, the procedure tries to
compile a function evaluating the fitted function.
DOUBLE : Set to perform fit with double precision arithmetic.
CONST : An array of bytes, one for each parameter, signifying
which components are to be kept constant.
INCLUDE : An array of bytes, one for each component, with a
CHI2 : Contains the \chi^2 value of the final fit.
zero for each component that should be left out.
Calls : ***
COMPILE_SFIT, DEFAULT, MAKE_SFIT_STC, MCURVEFIT, UPDATE_CFIT
CALLED BY:
CFIT_BLOCK, CF_174LG, CF_177LG, CF_180LG, CF_765LG, CF_770LG, CF_GIS1A, CF_GIS1B
CF_GIS1C, CF_GIS2A [1], CF_GIS4A, CF_GIS4B, CF_GIS4C, XCFIT, XCFIT_BLOCK
Common : None.
Restrictions: ...
Side effects: compile_sfit may try to write a program.
Category : Analysis
Prev. Hist. : Component based fitting inspired by XSPEC
Written : S.V.H.Haugan, UiO, 20 January 1997
Modified : Version 2, 6 February 1997
Added KEEP_LIMITS in call to MAKE_SFIT_STC, to avoid
clinching min/max limits in spite of values in the
CONST keyword.
Version 3, 24 September 1997
Added ERROR_ONLY, FAIL_TYPE keywords.
Version 4, 20 November 1997
Made sure that it's the *nominal* errors that are
reported through SIGMAA, by dividing with sfit.trans_a
Version 5, 19 January 1999
Setting default itmax to 200 instead of 20. This may
seem odd, but the truth is that allowing a lot of
iterations *will* cause the fit to converge in most
cases where it failed earlier due to too many
iterations.
Version : 5, 19 January 1999
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT_APATCH
Purpose : Patch CFIT analysis result at specific points
Explanation : Modify fit parameter/status at points given by IX.
Example - modifying and fixing two parameters on the basis of
where another parameter is below a certain threshold
xcfit_block,analysis=ana
handle_value,ana.result_h,result
;; Find points below threshold
ix = where(result(0,*,*) lt 6 and result(0,*,*) ne -100)
;; Fix line position (parameter 1) at those points
average_linepos=average(result(1,*,*),missing=-100)
cfit_apatch,ana,"RESULT",ix,1,average_linepos
cfit_apatch,ana,"FREEZE",ix,1
Also, the PARAM and VALUE parameters may be arrays (with equal
number of elements!)
The allowed modes of operation are explained below, see the
KEY parameter.
Use : CFIT_APATCH,ANALYSIS,KEY,IX [,PARAM,VALUE]
Inputs : ANALYSIS : A CFIT analysis structure.
KEY : A string describing the action to be
taken. Possibilities are:
FAIL : Set all RESULT values (and chi^2) to missing,
freeze them, and flag all fit components as
excluded. Ignores PARAM/VALUE.
UNFAIL : Restore all RESULT/CONST/INCLUDE values to
initial values (given in the fit structure).
Inores PARAM/VALUE.
INITIAL : Restore [all or some] result values to initial
values. PARAM optional, VALUE ignored.
FREEZE : Set CONST status for all or some
parameters. PARAM optional, VALUE ignored.
THAW : Clear CONST status for all/some parameters. PARAM
optional, VALUE ignored.
RESULT : Set RESULT value(s) specified by PARAM to
VALUE.
INCLUDE : Set INCLUDE value(s) specified by PARAM to
(KEY(PARAM, *, *, *, *, *..), ...*))(IX) = VALUE
CONST : Set CONST value(s) specified by PARAM to VALUE.
IX : One-dimensional index into e.g. RESULT(0, VALUE.
operation. In "pseudo-code" the operation resulting from
specifying which points to be affected by the patch
using the RESULT/INCLUDE/CONST KEY values can be written:
Opt. Inputs : PARAM : Specifies which parameter(s) or component(s) that are
to be patched.
VALUE : The value(s) of the patched RESULT/CONST/INCLUDE
points. Must have an equal number of elements as
PARAM.
Outputs : Alters the values in the ANALYSIS input.
Opt. Outputs: None.
Keywords : None.
Calls : ***
CFIT_BPATCH, MAKE_SFIT_STC, PARCHECK, TYP
CALLED BY:
CDS_CORR_GRADIENT
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H. Haugan, 1998
Modified : Not yet.
Version : 1, 3 February 1999
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT_APIXLIST()
Purpose : Return masked CFIT analysis pixels given masking program
Explanation : This function works like the masking feature in XCFIT_BLOCK
Select the "Edit masking program" from the "Mask/patch points
menu". The upper panel of text explains how to write masking
programs.
Given a program that is able to calculate a logical mask
corresponding to each "spatial" point in a CFIT analysis, this
function will execute the program and return the list of
pixels where the calculated mask was "true".
This function is often used in conjunction with the
CFIT_APATCH (or lower-level CFIT_BPATCH) routine(s).
Example 1:
;; "FAIL" all positions with average flux/pixel less than 5
;;
ix=cfit_apixlist(ana,'mask=average(data,1,miss=missing) LT 5')
cfit_apatch,ana,"FAIL",ix
Example 2:
;; "FREEZE" parameter 1 ONLY at all positions where
;; average(signal) is less than 2.5 times average(noise):
progfail = $
['a = sqrt(1./(weights>1e-6)) ; Noise',$
'ix=where(data eq missing or weights eq missing) ; Bad px',$
'if ix(0) ne -1L then a(ix) = missing ; Take em out',$
'b = average(a,1,missing=missing) ;Average noise level',$
'c = average(data,1,missing=missing) ;Average signal',$
'mask = c lt 2.5*b ;Decide...']
;; Get list of points
ix=cfit_apixlist(ana,progfail)
cfit_apatch,ana,"FREEZE",cfit_apixlist(ana,progfail),1
Use : ix = cfit_apixlist(ana,program)
Inputs : ANA : CFIT analysis structure containing data.
PROGRAM : Text array with a series of one-line statements.
See the explanation given by the 'Edit masking
program' option in XCFIT_BLOCK.
Opt. Inputs : None.
Outputs : Returns - literally, the result of "where(mask)"
Opt. Outputs: None.
Keywords : None
Calls : ***
CFIT_APIXLIST_EXEC, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST
HAVE_WINDOWS [1], HAVE_WINDOWS [2], XACK, delvarx [5]
Common : None.
Restrictions: None.
Side effects: None.
Category : Line fitting.
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 1998
Modified : Version 2, 3 February 1999
Added test for have_windows() before using xack.
Version : 2, 3 February 1999
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT_BLOCK
Purpose : Apply a component fit to a block of data.
Explanation : Given a block of spectra in an array with dimensions
(LAMBDA,X,Y,..), with corresponding arrays containing the
wavelengths, fitting weights etc, this routine applies a
component fit to all the individual spectra, yielding a
resulting array (PARAMETERS,X,Y,...).
The first dimension of the result will accommodate all
parameters (stored consecutively as they appear in the fit
structure) and the chi^2 value of the fit at that point, i.e,
the first dimension will have N_PARAMETERS + 1 elements.
The input data array may have up to 7 dimensions.
It is possible to supply a "suggestion" result array, whose
parameter values will be used as initial values for the fit at
each point, unless the keyword USE_RESULT is explicitly set to
zero. The RESULT array should have the same size on input as
it will have on output.
It is also possible to supply an array controlling where
specific components should be turned "off" (INCLUDE), as well
as an array controlling where specific parameters are to be
kept constant (CONST). The first dimension of these arrays
should be of size N_COMPONENTS and N_PARAMETERS, respectively.
Use : CFIT_BLOCK, ANALYSIS = ANALYSIS_STRUCTURE
or
CFIT_BLOCK,LAM,DA,WT,CFIT,MISS,RESULT,RESIDUAL [,INCLUDE,CONST]
Inputs : Either
ANALYSIS_STRUCTURE : A structure containing handles pointing to the data
associated with a data block analysis (all of the
below mentioned stuff, incorporated into one
structure)
or ALL of the following:
LAM : Array containing the wavelength (or similar) for each
data point. If the wavelength calibration does not vary
from point to point, a one-dimensional array with the
same size as the first dimension in DA may be used.
DA : Data Array, containing the counts/fluxes to be fitted.
WT : The weights of each data point.
CFIT : Component Fit structure, describing the function to be
fitted.
MISS : The value used for missing pixels. May be undefined, in
which case it will default to MIN(DA)-1
RESULT: (input and output) The values for the fitted
parameters and the chi^2 values of the fits, for each
data point (X,Y,...). If the CFIT has NP parameters,
the first dimension of the RESULT will have NP+1
elements. If defined on input, RESULT is taken as the
initial values for the fit, unless USE_RESULT is
explicitly set to zero.
If the fit fails to converge at any point, the
corresponding chi^2 value will be set to zero.
Opt. Inputs : INCLUDE : An array describing where components should be
included (or not!) in the fitted function. The first
dimension should have the same number of elements as
the number of components in the CFIT structure, and
the other dimensions should have the same sizes as
the input array. A zero in the data array means that
the corresponding component is excluded at that
point.
CONST : An array describing where parameters should be kept
constant. The first dimension should have the same
number of elements as the number of parameters in the
CFIT structure, and the other dimensions should have
the same sizes as the input array. A nonzero entry in
this array means that the corresponding parameter is
to be kept constant at that point.
Outputs : RESIDUAL : The residual after subtracting the fitted function
from the data array. Has identical dimensions as
the data array.
Opt. Outputs: SIGMA : An array with the numerically determined 1-sigma
values for each parameter. This is only calculated if
the keyword MAKE_SIGMA is set.
NOTE! Numerically determined sigma levels for
parameters depend on several crucial assumptions to be
valid - the WEIGHTS should be *correct*, and the
fitted function should be *linear* in the
parameters.
Of course, the fitted function *isn't* linear, but as
long as it can be linearized in a neighbourhood around
the result that is significantly *larger* than the
true 1-sigma region, that's OK. So - for poor signal
to noise ratios (where the errors are usually large)
the SIGMA values are probably *not* correct.
Keywords : SMART : Set SMART=1 to sort the data points according to total
intensity, and processes them in descending order,
using the previous result as the starting point for
each new fit (will revert to the "default" set of
initial values if a failure results from this
approach). Saves some time in the initial fit (order
10-20%) on some data sets.
Set SMART=2 to recalculate ONLY those points where the
initial result entry for chi^2 is ZERO - this assumes,
of course, that the initial result was supplied, as
well as an appropriate *residual* array.
DOUBLE : Set to force double precision fit calculation. Highly
recommended.
MAKE_SIGMA : Set this to produce the 1-sigma values (SIGMA).
ERROR_ONLY : Set this to leave parameter values as they are,
but produce a sigma estimate.
QUIET : Set to suppress messages from MCURVEFIT about failed
attempts.
PCT_SLIDER_ID : Set to the ID of a slider with MAX=100, MIN=0
to make it reflect the progress of the
calculation.
X_FACE : Set this keyword to make CFIT_BLOCK create a widget
showing the progress of the calculation, as well as
providing a button to halt the process.
USE_RESULT : Set to zero to avoid using any supplied RESULT as
initial values for the fitting. Alternatively you
may of course use DELVARX,RESULT before the call.
FILL_ONLY : Set to skip calculations, to just fill out any
non-existing arrays.
Calls : ***
AVERAGE, CFIT, CFIT_BLOCK_POINT, CFIT_BLOCK_PROGRESS, DEFAULT, DELVARX [1]
DELVARX [2], DELVARX [3], DELVARX [4], DIMREBIN, DIMREFORM, EVAL_SFIT, EXIST
MAKE_SFIT_STC, PARCHECK, TRIM, TYP, XKILL, XREALIZE, delvarx [5]
CALLED BY:
CFIT_ERRDEMO, XCFIT_BLOCK
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 21 January 1997
Modified : Version 2, SVHH, 28 January 1997
Fixed bug in calculating inital value array when not
supplied.
Version 3, SVHH, 4 February 1997
Added /QUIET flag.
Version 4, SVHH, 17 September 1997
Added /SMART, /MAKE_SIGMA, SIGMA and /ERROR_ONLY
keywords, and the ANALYSIS=ANALYSIS_STC calling option.
Version 5, SVHH, 6 May 1998
Added /FILL_ONLY
Version : 5, 6 May 1998
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT_BLOCK_ERROR()
Purpose : Calculate parameter errors from CFIT structure.
Category : Fitting, Class3
Explanation : This procedure bypasses the CURVEFIT error analysis code.
Although the CFIT_BLOCK program has the option of returning
SIGMA values, there is a possibility that the values returned
by CURVEFIT may be incorrect if the fit did not improve the
parameters. In particular, this can happen if CFIT is called
with parameters that have already converged.
Parameters which are held constant in the fit are treated as
true constants, and are not used in determining the errors in
fitted parameters. This depends solely on the specification of
a parameter as a constant in the FIT definition structure. If
a parameter was held constant for specific troublesome pixels,
then it is still considered as a variable in the error
determination.
If a parameter which was held constant for all pixels should be
considered as a variable in the error analysis, then the FIT
structure should be modified before this routine is called.
Syntax : SIGMA = CFIT_BLOCK_ERROR(LAMBDA, DATA, WEIGHTS, FIT, MISSING, $
RESULT)
SIGMA = CFIT_BLOCK_ERROR(ANALYSIS=ANALYSIS)
Examples : XCFIT_BLOCK, X, Y, WT, FIT, -100, RESULT, RESID
SIGMA = CFIT_BLOCK_ERROR(X, Y, WT, FIT, -100, RESULT)
XCFIT_BLOCK, ANALYSIS=ANALYSIS
SIGMA = CFIT_BLOCK_ERROR(ANALYSIS=ANALYSIS)
Inputs : LAMBDA = Array of wavelengths. Can either be one array for
all pixels, or have the same dimensions as DATA.
DATA = Array of data points.
WEIGHTS = The weights of each data point. Alternatively, one
can pass in a single value of 0 to force CFIT_ERROR
to calculate it's own weights, using chi-square
normalization.
FIT = Fit structure as used within CFIT
MISSING = The missing pixel flag value.
RESULT = The result array from CFIT_BLOCK (or XCFIT_BLOCK).
Opt. Inputs : None.
Outputs : The result of the function is an array containing the errors
for each of the parameters in RESULT.
Opt. Outputs: None.
Keywords : ANALYSIS = Instead of passing in the above input arrays, the
ANALYSIS keyword can be used to pass in a CDS
analysis structure from MK_CDS_ANALYSIS which
contains all of the above arrays.
DOUBLE = Set to force double precision calculation. Highly
recommended.
Calls : ***
CFIT_ERROR, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, delvarx [5]
Common : None.
Restrictions: The data must first be fit using either CFIT_BLOCK or
XCFIT_BLOCK.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-Dec-1999, William Thompson, GSFC
Version 2, 06-Feb-2001, William Thompson, GSFC
Allow dummy WEIGHTS to be passed.
Version 3, 26-Nov-2001, William Thompson, GSFC
Added keyword DOUBLE
Contact : WTHOMPSON
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT_BPATCH
Purpose : Patch block result at specific points
Explanation : Sets result parameter PARAM in BLOCK at points given by IX to
VALUE.
Example - modifying and fixing two parameters on the basis of
where another parameter is below a certain threshold
> xcfit_block,lam,da,wts,fit,-100,result,residual,inc,const
> ix = where(result(0,*,*) lt 6 and result(0,*,*) ne -100)
> cfit_bpatch,result,ix,1,average(result(1,*,*),missing=-100)
> cfit_bpatch,const,ix,1,1b
> cfit_bpatch,result,ix,2,average(result(2,*,*),missing=-100)
> cfit_bpatch,const,ix,2,1b
> xcfit_block,lam,da,wts,fit,-100,result,residual,inc,const
Also, the PARAM and VALUE parameters may be arrays (with equal
number of elements!)
Use : CFIT_BPATCH,BLOCK,IX,PARAM,VALUE
Inputs : See example above.
Opt. Inputs : None.
Outputs : Alters the values in BLOCK
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
CFIT_APATCH, XCFIT_BLOCK
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 5 February 1997
Modified : Version 2, 18 September 1997
Added "Use" message.
Version 3, 24 April 1998
Added possibility of patching more than one parameter
at a time.
Version : 3, 24 April 1998
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT_ERRDEMO
Purpose : Demonstrate analytical vs empirical errors of line fitting.
Explanation : Generates a known model for NIS data, adding noise according
to a known formula, and applies a least-square fit with
calculation of estimated errors (sigmas) on the fitted
parameters, then prints out various results.
In general, the estimated errors are correct when the signal
to noise ratio is "good" and the background is negligible in
comparison to the flux from the emission line.
The correct formula for the sigma(line_flux) based on the
estimated sigmas seem to be:
sig_I = 1./sqrt(2) * sqrt((sig_I*w)^2 + (sig_w*I)^2)
due to the fact that the width and the intensity of a line fit
are *not* independently drawn quantities (use e.g.,
CFIT_ERRDEMO,10000,0,NX=1000 to see that the estimated sigma
without the "normalization factor" becomes approx. sqrt(2)
times it's correct value.
There seems to be some coupling between the background level
and the line intensity error estimate that I haven't yet quite
figured out - try very high values for the background
(relative to the emission line) to see what I mean.. The
fitted result is better than what should be expected from the
actual noise level - this could be due to the fact that some
of the (background-related) noise is simply situated outside
the line profile.
Hopefully the program is well enough documented to allow any
logical errors to be caught by others..
Use : CFIT_ERRDEMO [,INTENSITY [,BACKGROUND]] [,NX=NX]
Inputs : INTENSITY : Line intensity (amplitude) in peak counts.
BACKGROUND : Background intensity in peak counts.
NX : Number of realizations of the data with noise
Opt. Inputs : All..
Outputs : None.
Opt. Outputs: None.
Keywords : See inputs
Calls : ***
AVERAGE, CFIT_BLOCK, DEFAULT, EVAL_CFIT, PIX2WAVE, SIGMA, TRIM, mk_comp_gauss
mk_comp_poly
Common : None
Restrictions: ...
Side effects: ...
Category :
Prev. Hist. : None
Written : SVH Haugan, UiO, 13 October 1997
Modified : Not yet.
Version : 1, 13 October 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : CFIT_ERROR
Purpose : Calculate parameter errors from CFIT structure.
Category : Fitting, Class3
Explanation : This procedure bypasses the CURVEFIT error analysis code.
Although the CFIT program has the option of returning SIGMAA
values, there is a possibility that the values returned by
CURVEFIT may be incorrect if the fit did not improve the
parameters. In particular, this can happen if CFIT is called
with parameters that have already converged.
Parameters which are held constant in the fit are treated as
true constants, and are not used in determining the errors in
fitted parameters. If a parameter which was held constant
should be considered as a variable in the error analysis, then
the FIT structure should be modified before this routine is
called.
Syntax : CFIT_ERROR, X, Y, A_NOM, FIT, SIGMAA
CALLED BY:
CFIT_BLOCK_ERROR
Examples : YFIT = CFIT(X, Y, A_NOM, FIT, WEIGHTS=WT)
CFIT_ERROR, X, Y, A_NOM, FIT, SIGMAA, WEIGHTS=WT, CHI2=CHI2
Inputs : X, Y = Data to be fitted
FIT = Fit structure as used within CFIT
Opt. Inputs : A_NOM = Parameters of the fit. If not defined, then the
parameters are derived from the FIT structure.
However, this is not recommended, since the
parameters in the FIT structure may not represent the
best fit to the data.
Outputs : SIGMAA = Errors for each of the parameters in A_NOM. If this
procedure fails, then SIGMAA will be set to -1.
Opt. Outputs: A_NOM = Only changed if not initially defined.
Keywords : WEIGHTS = The weights for each of the data points used in the
fit. If not passed, then constant weighting is
assumed, and the parameter errors are calculated
based on the value of chi-squared.
CHI2 = Returns the chi-squared value.
SFIT = Structure from MAKE_SFIT_STC. Passing this structure
speeds up execution when the same structure is used
for a series of spectra. The best way to use this
keyword is to pass it in undefined on the first call,
and then reuse the structure on subsequent calls.
DOUBLE = Set to force double precision calculation. Highly
recommended.
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 = ''
CFIT_ERROR, ERRMSG=ERRMSG, ...
IF ERRMSG NE '' THEN ...
Calls : ***
EVAL_SFIT, MAKE_SFIT_STC
Common : None.
Restrictions: The data must first be fit using either CFIT or XCFIT.
Side effects: None.
Prev. Hist. : Some of the code is taken from the routine LSTSQR.
History : Version 1, 02-Dec-1999, William Thompson, GSFC
Version 2, 15-Feb-2000, William Thompson, GSFC
Use STATUS parameter from INVERT rather than DETERM
function to catch singular matrices--more forgiving.
Version 3, 26-Nov-2001, William Thompson, GSFC
Fixed bug when only one parameter is fitted.
Return SIGMAA=-1 if procedure fails.
Added keyword DOUBLE
Contact : WTHOMPSON
[Previous]
[Next]
Project : SDAC
Name : CH_SCALE
Purpose : This procedure computes a scale factor for charsize that is appropriate for
the size of the current graphics. Works for X, PS, and TEKTRONIX
Category : GRAPHICS
Explanation :
scale text in graphics output for X, PS, and TEKTRONIX graphics
also scale to multiplot environment
SCALE TO Y DISTANCE, XSCALING MUST BE DONE IN SETTING UP DISPLAY.
XSCALING ALLOWED USING KEYWORD
Scaling for plot axes is different than for xyouts because of
the scaling factor of 0.5 applied to plot text when any dimension of
!p.multi exceeds 2. This factor is not applied to text labels in
xyouts!
Use :
scale = Ch_scale( Scale [,/xyouts] [,/xcorr])
CALLED BY:
DRAW_FLARE, FS_ARCHIVE_DRAW, FS_GRAPH, GE_WINDOW [1], HXARCHIVE, HXFITS, NOFILL_ARE
QL_ORBIT_PLOT, VERT_MARK, XYPLOT__DEFINE
ch_scale scale xyoutsxyouts xcorr xcorr, hsi_image_plot, hsi_imagefile2png
hsi_one_qlook_image, hsi_show_flags [2], spex_draw_bars
Examples :
xyouts, nx1lab, ylab, 'N', /normal, chars = ch_scale(.8,/xy), col=fcolor(9)
utplot, xsc4(*,0), yplotted, yminor=-1, $
ymargin=[10,2],xmargin=[13,5], title=desc(0), ytitle='Counts S!u-1!n', $
xtitle=' ', xrange=[xmin,xmax], yrange=[ymin,ymax], $
ytype=logplot, psym=psym, chars = ch_scale(0.8), color=9
Inputs :
Scale - Normal scaling factor used in TEKTRONIX graphics.
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords :
XYOUTS -Keyword indicating scale used in XYOUTS call. (input)
XCORR -Keyword indicating to use scaling along x axis. (input)
Calls : ***
FCHECK
Common :
SCALECOM
Restrictions:
Side effects: None.
Prev. Hist :
RAS 4/92
Modified :
Modified 8/29/94 by Amy Skowronek to check for global variable.
If variable is set, result multiplied by global. To scale up
text in multiple plot.
Version 3, richard.schwartz@gsfc.nasa.gov, 7-sep-1997, more documentation
8/9/00, Kim Tolbert, generalize to work for X and PS as well as Tektronix
11/3/00, Kim Tolbert, changed normalized character size for PS
[Previous]
[Next]
Project : HESSI
Name : CHAN_DEFINE
Purpose : Define a channel selection object
Category : Ancillary GBO Synoptic Objects
Syntax : IDL> c=obj_new('chan')
CALLS: ***
ADD_METHOD, ALLOW_WINDOWS, CHAN::ACCEPT, CHAN::ALL, CHAN::CANCEL, CHAN::CLEANUP
CHAN::INIT, CHAN::OPTIONS, CHAN::SET, CHAN::WCHAN, CHAN__DEFINE, IS_STRING, TRIM2
WIDGET_MBASE, XALIVE, XKILL, XMANAGER, XREALIZE, is_number [1], is_number [2]
History : Written 10 March 2002, D. Zarro, L-3Com/GSFC
Modified 15 Nov 2006, Zarro (ADNET/GSFC)
- removed device-dependent font assignments which
caused some systems to crash
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : change_tag_value
Purpose : Change a tag value in a structure
Explanation : Restricted to changing one tag value per call. If tag is not found in structure,
found keyword is 0 and structure is unchanged. Will recurse through nested structures.
If tag is a pointer, then if pointer is valid, puts new value in pointer, otherwise makes a new
pointer to the value.
CALLED BY:
plotman
NOTE: new value must be same type as old value. For a more relaxed routine, use rep_tag_value
Use : change_tag_value, struct, tag_value, tag_name, found=found, err_msg=err_msg
Inputs :
struct - input structure
tag_value - new value to give tag
tag_name - string tag name to change
Opt. Inputs : None.
Outputs : None
Keywords:
found - if tag was found in structure and changed, then found is set to 1
err_msg - error message. Blank if none
;
Common : None.
Restrictions: None.
Side effects: None.
Category : Structure handling
Prev. Hist. : None.
Written : Kim Tolbert, 26-Sep-2000
Modifications:
30-Sep-2005, Kim. Modified doc header
[Previous]
[Next]
Name:
check_check_time
Purpose:
check to see that msod is within the range
0 to 86400000
Input:
msod
ds79
Output:
msod
ds79
History
Written Fall '91 by M.Morrison
27-Jul-92 (MDM) Modified to make "i" a long word
24-Mar-93 (MDM) - Modified logic - see below
27-May-93 (MDM) - Changed the algorithm to be mathematical
instead of a repeat loop
3-Jan-95 (MDM) - Changed to use DOUBLE instead of FLOAT
because when using a reference time of
1-Jan-79, the resolution/accuracy for dates
in 1994 is less than 20 seconds!!
CALLS:
[Previous]
[Next]
PURPOSE
Returns a measure of the circularity of the flevel contour
INPUTS:
plevel = fraction of maximum where circularity is to be measured
OUTPUTS:
measure = a measure of circularity
For a 2:1 ellipse, measure=0.33
for a 1.5:1 ellipse, measure=0.20
for a 1.25:1 ellipse, measure=0.11
METHOD:
Gets the flevel contour using
the structure produced by keyword PATH_INFO in IDL's contour
returns a measure of circularity
(max(radius)-min(radius))/(max(radius)+min(radius))
VERSION HISTORY
schmahl@hessi.gsfc.nasa.gov 2002
CALLS:
CALLED BY
hsi_bproj2size
[Previous]
[Next]
Name: check_compile
Purpose: verify whether input module will compile (syntax checker)
Input Parameters:
module_name - name of idl procedure/function file to check
Keyword Parameters:
log - contents of output log file
Calling Sequence:
status=check_compile(module_name [,log=log])
History:
14-Apr-1994 (SLF) Written (to check submitted software)
5-May-1994 (SLF) Turn off batch monitoring for submitted job
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], anytim2ex [1], anytim2ex [2], break_file [4]
check_log [1], check_log [2], concat_dir [4], data_chk [1], data_chk [2]
ex2fid [1], ex2fid [2], file_append [1], file_append [2], file_exist [1]
file_exist [3], rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2]
tbeep [1], tbeep [2], tbeep [3]
Restrictions:
UNIX only
[Previous]
[Next]
Project : SOHO - CDS
Name : CHECK_CONFLICT
Purpose : To check any conflict of IDL procedure/function names.
Explanation : All .pro file names in the CDS IDL path are checked for
duplicate names.
Use : check_conflict, list [,/quiet, /full]
Inputs : None
Opt. Inputs : None
Outputs : None
Opt. Outputs: list - contains a list of any duplicates found.
Keywords : quiet - if present results are not output on terminal (except
if /full is given, that overrides /quiet for the extra
information.
full - if present, complete information (ie the result
of running PURPOSE on each duplicate file is written
to the screen.
Calls : ***
FIND_DUP, PURPOSE, REMCHAR [1], REMCHAR [2], REMCHAR [3]
Restrictions: None
Side effects: None
Category : Doc
Prev. Hist. : None
Written : C D Pike, RAL, 12-Nov-93
Modified :
Version : Version 1, 12-Nov-93
[Previous]
[Next]
NAME:
CHECK_DUP
PUROSE:
Check for duplicate file names and print list on screen.
Written for VMS only.
CALLING SEQUENCE:
CHECK_DUP [,DIR=DIR, SEARCH=SEARCH, /YOHKOH_SDAC, FILE=FILE]
SAMPLE CALL:
check_dup
check_dup, search='utplot.pro'
check_dup, /y, /f
check_dup, dir='user_disk0:[sdac...]'
KEYWORD ARGUMENTS:
DIR - directory specification to search. Default is
the current path.
SEARCH - file name or wildcard specification to search for.
Default is '*.pro'.
YOHKOH_SDAC - if set, will notify you only if one of the files
is in yohkoh tree (ys:[...]) and the other file isn't.
FILE - If set, send listing to output file called DUP.DAT. Or
specify FILE='filename.ext'.
CALLS: ***
GET_LIB
MODIFICATION HISTORY:
Written AKT 93/1/29
Mod. AKT 93/11/5. Default to search is !path. Added /yohkoh_sdac
keyword - will only look for duplicates across yohkoh/sdac boundary.
And added search and output file keywords and options.
[Previous]
[Next]
Project : SOHO - CDS
Name : CHECK_EXT_TIME
Purpose : Checks CDS external time values for logical consistency.
Explanation : This procedure checks time values in CDS external format to
ensure that the date-time values have valid values. If a
value is found inaccurate, then these values are repaired
with CHECK_INT_TIME.
This procedure should be called whenever the external time is
modified.
Use : CHECK_EXT_TIME, EXT
Inputs : EXT = The UTC date/time as a data structure with the
elements:
YEAR = Integer year (1995).
MONTH = Integer month (1-12).
DAY = Integer day (1-31).
HOUR = Integer hour (0-23).
MINUTE = Integer minute (0-59).
SECOND = Integer second (0-59).
MILLISECOND = Integer millisec (0-999).
Opt. Inputs : None.
Outputs : The input array will be repaired to reflect the correct values.
Opt. Outputs: None.
Keywords : ERRMSG = If defined and passed, then any error messages
will be returned to the user in this parameter
rather than using IDL's MESSAGE utility. If no
errors are encountered, then a null string is
returned. In order to use this feature, the
string ERRMSG must be defined first, e.g.,
ERRMSG = ''
CHECK_EXT_TIME, EXT, ERRMSG=ERRMSG
IF ERRMSG NE '' THEN ...
Calls : ***
CHECK_INT_TIME, DATATYPE [1], DATATYPE [2], DATATYPE [3], INT2UTC, UTC2INT [1]
UTC2INT [2], UTC2INT [3]
CALLED BY:
ANYTIM2CAL, UTC2DOY
Common : None.
Restrictions: Not valid for dates before 1 January 1972.
Side effects: None.
Category : Utilities, Time.
Prev. Hist. : None, but uses CHECK_INT_TIME by W. Thompson, NASA/GSFC/ARC
to check and make the fix.
Written : Donald G. Luttermoser, NASA/GSFC/ARC, 15 February 1995.
Modified : Version 1, Donald G. Luttermoser, GSFC/ARC, 15 February 1995.
Version : Version 1, 15 February 1995.
[Previous]
[Next]
NAME:
CHECK_FITS
PURPOSE:
Check that keywords in a FITS header array match the associated data
EXPLANATION:
Given a FITS array IM, and a associated FITS or STSDAS header HDR, this
procedure will check that
(1) HDR is a string array, and IM is defined and numeric
(2) The NAXISi values in HDR are appropriate to the dimensions
of IM
(3) The BITPIX value in HDR is appropriate to the datatype of IM
If HDR contains a DATATYPE keyword (as in STSDAS headers), then this is
also checked against the datatype of of IM
If the /UPDATE keyword is present, then the FITS header will be
modified, if necessary, to force agreement with the image array
CALLING SEQUENCE:
check_FITS, im, hdr, [ dimen, idltype, /UPDATE, /NOTYPE, /SDAS, /SILENT
ERRMSG = ]'
INPUT PARAMETERS:
IM - FITS (or STSDAS) array, e.g. as read by READFITS
HDR - FITS (or STSDAS) header (string array) associated with IM
OPTIONAL OUTPUTS:
dimen - vector containing actual array dimensions
idltype- data type of the FITS array as specified in the IDL SIZE
function (1 for BYTE, 2 for INTEGER*2, 3 for INTEGER*4, etc.)
OPTIONAL KEYWORD INPUTS:
/NOTYPE - If this keyword is set, then only agreement of the array
dimensions with the FITS header are checked, and not the
data type.
/UPDATE - If this keyword is set then the BITPIX, NAXIS and DATATYPE
FITS keywords will be updated to agree with the array
/SDAS - If this keyword is set then the header is assumed to be from
an SDAS (.hhh) file. CHECK_FITS will then ensure that (1)
a DATATYPE keyword is included in the header and (2) BITPIX
is always written with positive values.
/FITS - If this keyword is present then CHECK_FITS assumes that it is
dealing with a FITS header and not an SDAS header, see notes
below.
/SILENT - If keyword is set and nonzero, the informational messages
will not be printed
OPTIONAL KEYWORD OUTPUT:
ERRMSG = If this keyword is present, 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.
;
CALLS: ***
FXADDPAR [1], FXADDPAR [2], FXPAR [1], FXPAR [2], SXDELPAR [1], SXDELPAR [2]
SXDELPAR [3]
CALLED BY:
FXWRITE [1], FXWRITE [2], HASTROM, HBOXAVE, HCONGRID, HEXTRACT, HREBIN, HREVERSE, HROT
HROTATE, IMCONTOUR, MODFITS, T_FIND, WFPC2_READ, WRITEFITS [1], WRITEFITS [2]
PROCEDURE:
Program checks the NAXIS1 and NAXIS2 parameters in the header to
see if they match the image array dimensions.
NOTES:
An important distinction between an STSDAS header and a FITS header
is that the BITPIX value in an STSDAS header is always positive,
e.g. BITPIX=32 for REAL*4 data. Users should use either the /SDAS
or the /FITS keyword if it is important whether the STSDAS or FITS
convention for REAL*4 data is used. Otherwise, CHECK_FITS assumes
that if a DATATYPE keyword is present then it is dealing with an
STSDAS header.
PROCEDURE CALLS:
STRN(),FXADDPAR, fxpar()
MODIFICATION HISTORY:
Written, December 1991 W. Landsman Hughes/STX to replace CHKIMHD
No error returned if NAXIS=0 and IM is a scalar W. Landsman Feb 93
Fixed bug for REAL*8 STSDAS data W. Landsman July 93
Make sure NAXIS agrees with NAXISi W. Landsman October 93
Converted to IDL V5.0 W. Landsman September 1997
Allow unsigned data types W. Landsman December 1999
Allow BZERO = 0 for unsigned data types W. Landsman January 2000
Added ERRMSG keyword, W. Landsman February 2000
Use FXADDPAR to put NAXISi in proper order W. Landsman August 2000
Improper FXADDPAR call for DATATYPE keyword W. Landsman December 2000
Remove explicit setting of obsolete !err W. Landsman February 2004
Added check for numeric bitpix - Zarro (L-3Com/GSFC), October 2004
[Previous]
[Next]
NAME:
CHECK_FITS
PURPOSE:
Check that keywords in a FITS header array match the associated data
EXPLANATION:
Given a FITS array IM, and a associated FITS header HDR, this
procedure will check that
(1) HDR is a string array, and IM is defined and numeric
(2) The NAXISi values in HDR are appropriate to the dimensions
of IM
(3) The BITPIX value in HDR is appropriate to the datatype of IM
If the /UPDATE keyword is present, then the FITS header will be
modified, if necessary, to force agreement with the image array
CALLING SEQUENCE:
check_FITS, im, hdr, [ dimen, idltype, /UPDATE, /NOTYPE, /SILENT
ERRMSG = ]'
INPUT PARAMETERS:
IM - FITS array, e.g. as read by READFITS
HDR - FITS header (string array) associated with IM
OPTIONAL OUTPUTS:
dimen - vector containing actual array dimensions
idltype- data type of the FITS array as specified in the IDL SIZE
function (1 for BYTE, 2 for INTEGER*2, 3 for INTEGER*4, etc.)
OPTIONAL KEYWORD INPUTS:
/NOTYPE - If this keyword is set, then only agreement of the array
dimensions with the FITS header are checked, and not the
data type.
/UPDATE - If this keyword is set then the BITPIX, NAXIS and NAXISi
FITS keywords will be updated to agree with the array
/FITS, /SDAS - these are obsolete keywords that now do nothing
/SILENT - If keyword is set and nonzero, the informational messages
will not be printed
OPTIONAL KEYWORD OUTPUT:
ERRMSG = If this keyword is present, 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.
CALLS: ***
FXADDPAR [1], FXADDPAR [2], FXPAR [1], FXPAR [2], SXDELPAR [1], SXDELPAR [2]
SXDELPAR [3]
CALLED BY:
FXWRITE [1], FXWRITE [2], HASTROM, HBOXAVE, HCONGRID, HEXTRACT, HREBIN, HREVERSE, HROT
HROTATE, IMCONTOUR, MODFITS, T_FIND, WFPC2_READ, WRITEFITS [1], WRITEFITS [2]
PROCEDURE:
Program checks the NAXIS and NAXISi keywords in the header to
see if they match the image array dimensions, and checks whether
the BITPIX keyword agrees with the array type.
PROCEDURE CALLS:
FXADDPAR, FXPAR(), SXDELPAR
MODIFICATION HISTORY:
Written, December 1991 W. Landsman Hughes/STX to replace CHKIMHD
No error returned if NAXIS=0 and IM is a scalar W. Landsman Feb 93
Fixed bug for REAL*8 STSDAS data W. Landsman July 93
Make sure NAXIS agrees with NAXISi W. Landsman October 93
Converted to IDL V5.0 W. Landsman September 1997
Allow unsigned data types W. Landsman December 1999
Allow BZERO = 0 for unsigned data types W. Landsman January 2000
Added ERRMSG keyword, W. Landsman February 2000
Use FXADDPAR to put NAXISi in proper order W. Landsman August 2000
Improper FXADDPAR call for DATATYPE keyword W. Landsman December 2000
Remove explicit setting of obsolete !err W. Landsman February 2004
Remove SDAS support W. Landsman November 2006
Fix dimension errors introduced Nov 2006
[Previous]
[Next]
Project : SOHO/CDS
Name : CHECK_FTP
Purpose : check if ftp server is alive
Category : utility
Explanation : uses 'ping' and 'ftp'
Syntax : IDL> check_ftp,server,alive
CALLED BY:
GET_NOAA
Examples :
Inputs : SERVER = server name (e.g. smmdac.nascom.nasa.gov)
Opt. Inputs : None.
Outputs : ALIVE = 0/1 if dead or alive
Opt. Outputs: None.
Keywords : QUIET = turn off messages
ERR = error string
PING = ping before ftp'ing
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], DPRINT, ESPAWN, GET_USER_ID, GREP, LOC_FILE [1], LOC_FILE [2]
LOC_FILE [3], MK_TEMP_FILE, PR_SYNTAX, RD_ASCII [1], RD_ASCII [2], RM_FILE, TRIM
concat_dir [4], is_alive [1], is_alive [2]
Common : None.
Restrictions: None.
Side effects: None.
History : 6-Jan-97, Zarro (SAC) - written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name : CHECK_INT_TIME
Purpose : Checks CDS internal time values for logical consistency.
Explanation : This procedure checks time values in CDS internal format to
ensure that the milliseconds of day is neither negative nor
larger than the number of milliseconds in the day in question.
If either is true, then the day and time is repaired. Leap
seconds are taken into account.
This procedure should be called whenever the internal time is
modified.
Use : CHECK_INT_TIME, INT
Inputs : INT = The UTC date/time as a data structure with the
elements:
MJD = The Modified Julian Day number
TIME = The time of day, in milliseconds
since the start of the day.
Both are long integers.
Opt. Inputs : None.
Outputs : The input array will be repaired to reflect the correct number
of milliseconds in the day.
Opt. Outputs: None.
Keywords : ERRMSG = If defined and passed, then any error messages
will be returned to the user in this parameter
rather than using IDL's MESSAGE utility. If no
errors are encountered, then a null string is
returned. In order to use this feature, the
string ERRMSG must be defined first, e.g.,
ERRMSG = ''
CHECK_INT_TIME, INT, ERRMSG=ERRMSG
IF ERRMSG NE '' THEN ...
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_LEAP_SEC, TAG_EXIST [1]
TAG_EXIST [2]
CALLED BY:
CHECK_EXT_TIME, LIST_DURATION, TAI2UTC
Common : None.
Restrictions: Not valid for dates before 1 January 1972.
This procedure requires a file containing the dates of all leap
second insertions starting with 31 December 1971. This file
must have the name 'leap_seconds.dat', and must be in the
directory given by the environment variable TIME_CONV. It must
be properly updated as new leap seconds are announced.
Side effects: None.
Category : Utilities, Time.
Prev. Hist. : Based on CHECK_TIME by M. Morrison, LPARL.
Written : William Thompson, GSFC, 29 September 1993.
Modified : Version 1, William Thompson, GSFC, 29 September 1993.
Version 2, Donald G. Luttermoser, GSFC/ARC, 20 December 1994
Added the keyword ERRMSG. Added a check for the
STRUCTURE-TAG names.
Version 3, Donald G. Luttermoser, GSFC/ARC, 30 January 1995
Added ERRMSG keyword to internally called procedures.
Made the error handling routine more robust. Note
that this procedure can handle both vectors and
scalars.
Version 4, William Thompson, GSFC, 28 January 1997
Allow for long input arrays.
Version 5, William Thompson, GSFC, 25-Oct-2005
Interpret any structure with tags MJD and TIME as CDS
internal time.
Version : Version 5, 25-Oct-2005
[Previous]
[Next]
Project : SOHO - CDS
Name : CHECK_LOCK
Purpose : check if a LOCK file created by APPLY_LOCK has expired
Category : Planning
Explanation : checks creation date of LOCK file saved in file.
Syntax : IDL> expired=check_lock(lock_file)
Inputs : LOCK_FILE = lock file name (with path)
Outputs : EXPIRED = 1 if expired
Keywords :
QUIET = set to suppress messages
ERR = output messages
TIME = LOCK file creation time
CALLS: ***
ANYTIM2TAI, CHKLOG [1], CHKLOG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
GET_PID, GET_USER_ID, GET_UTC, IS_BLANK, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3]
TEST_OPEN
CALLED BY:
LOCK_ZDBASE, MK_PLAN_PRIV, RM_LOCK, db_gbo, ihy_db
Restrictions: LOCK file must be created by APPLY_LOCK
History : Version 1, 17-July-1996, D M Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Name: check_log
Purpose: check idl batch logfile for abnormal termination
Calling Sequence:
check_log, logfile [user=user]
Input Paramters:
logfile - idl batch log to check
Keyword Paramters:
job - batch job name (optional)
user - user list for e-mail
window - lines preceding error to include in output (def=5, -1 = all)
nomail - switch, if set, inhibit mail on ABNORMAL exit (def=mail)
mailnorm - switch, if set, mail on NORMAL exit (def=nomail)
unixerr - switch, if set, limit checks to UNIX errors
ftperr - switch, if set, limit checks to ftp errors
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], PATH_LIB [1], PATH_LIB [2], break_file [4]
concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
get_logenv [1], get_logenv [2], mail [1], mail [2], rd_tfile [1], rd_tfile [2]
rename [1], rename [2], search [1], search [2], tbeep [1], tbeep [2], tbeep [3]
wc_where [1], wc_where [2]
CALLED BY:
check_compile [1], check_compile [2]
History:
1-Mar-1994 (SLF)
2-Mar-1994 (SLF) - add <no job file> and <compile time error> checks
15-Apr-1994 (SLF) - inhibit message if /quiet is set
21-Apr-1994 (SLF) - add UNIXERR/FTPERR keywords and action, call sear
call search.pro, mail SUBJ: info, other mods...
3-May-1994 (SLF) - call search.pro with /case_ignore set
10-May-1994 (SLF) - allow inhibition of unix and ftp checks via log/env
29-Sep-1994 (SLF) - add REMOVE keyword (succesfully completed jobs&logs)
4-Sep-1994 (SLF) - do a RENAME instead of a delete (seperate option after testing
[Previous]
[Next]
PURPOSE:
Returns the number of distinct contours of clnmap at level flevel
METHOD:
Uses the structure produced by keyword PATH_INFO in IDL's contour
INPUTS:
clnmap = 2D array (possibly representing a clean map)
flevel = scalar defining the level selected for defining a source
/plot to get a plot showing the contours at level=flevel
OUTPUTS:
ncontours = number of contours at or above level flevel
CALLED BY:
hsi_bproj2size
EXAMPLE:
xx=(findgen(64)-32)#replicate(1,64)
yy=transpose(xx)
a=5 & b=4.
z=2.^(-(xx/a)^2-(yy/b)^2)
z2=shift(z,15,20)
clnmap=z + z2
ch=check_multiplicity(clnmap,0.5,/plot)
print,ch,' contours'
VERSION HISTORY
ejs FEB 2003, schmahl@hessi.gsfc.nasa.gov;-
[Previous]
[Next]
Project : HESSI
Name : CHECK_NETWORK
Purpose : check if network checking enabled
Category : system utility sockets
Syntax : IDL> help,check_network()
Outputs : 1/0 is SEARCH_NETWORK is defined to 1
Keywords : None
CALLS: ***
CHKLOG [1], CHKLOG [2]
CALLED BY:
HSI_FIND_FILE
History : 14 April 2002, Zarro (L-3Com/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : CHECK_TAPE_DRV
Purpose : Associate tape drive numbers with device files. *Unix only*
Explanation : This is an internal routine to the CDS/SERTS Unix tape handling
utilities. It converts tape drive numbers to actual device
names, and checks to make sure that the device file is open.
**Unix only**
Use : CHECK_TAPE_DRV, UNIT, LOGICAL_DRIVE, DRIVE, LUN
Inputs : UNIT = Tape unit number. Tape drives are selected via the UNIX
environment variables "MT1", "MT2", etc. The desired
tape drive is thus specified by numbers, as in VMS.
Must be from 0 to 9.
Opt. Inputs : None.
Outputs : LOGICAL_DRIVE = Name of environment variable pointing to tape
drive device file, e.g. "MT0".
DRIVE = Name of device file, e.g. '/dev/nrst0'.
LUN = Logical unit number used for reads and writes.
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
DISMOUNT [1], DISMOUNT [2], REWIND [1], REWIND [2], SKIPF [1], SKIPF [2], TAPRD [1]
TAPRD [2], TAPWRT [1], TAPWRT [2], WEOF [1], WEOF [2]
Common : CHCK_TAPE_DRVS contains array TAPE_LUN, containing logical unit
numbers for each tape device, and TAPE_OPEN, which tells
whether each device is open or not.
Restrictions: The environment variable "MTn", where n corresponds to the
variable UNIT, must be defined. E.g.,
setenv MT0 /dev/nrst0
Requires IDL v3.1 or later.
Side effects: If the device file is not yet open, then the tape is rewound,
and a file unit is opened to it.
Category : Utilities, I/O, Tape.
Prev. Hist. : William Thompson, Apr 1991.
Written : William Thompson, GSFC, April 1991.
Modified : Version 1, William Thompson, GSFC, 21 December 1993.
Added keyword /NOSTDIO to OPEN statement.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 22 December 1993.
Added spawn to "mt rewind".
Version 3, Wayne Landsman, GSFC, 10 April 1996
Handle write-protected tapes.
Version : Version 3, 10 April 1996
[Previous]
[Next]
Name: checkdata
Category: UTIL
Purpose: Check an input against a specified set of properties. This allows
an input to be matched against several criteria, such as: is it a float/
double array with 128-133 elements?
Calling sequence:
data_is_ok = checkdata( data, TYPE=[4,5], N_ELEM=Lindgen(5)+128 )
Inputs:
data - item of interest.
Outputs:
0 / 1 if the data did not / did meet the specified criteria.
Input keywords:
The test on the following criteria will evaluate to true if the
data meets ONE of the criteria:
TYPE - array containing possible specified IDL type codes for the data.
N_ELEM - array containing specified number of elements of data.
N_DIMEN - array containing specified number of dimensions of data.
STRUCT_NAME - specified name of data structure.
These keywords are different from the above in that the data must perfectly
match all values within each of these criteria. Thus, to return true, the
data must have ALL specified structure tag names.
DIMEN - array containing specified dimensions of data.
TAG_NAME - specified tag names of data structure
Output keywords:
Calls: ***
required_tags
[Previous]
[Next]
PROJECT : SDAC
NAME:
CHECKFONT
PURPOSE:
This function changes the default widget hardware font to be one of the user's
choosing.
If no hardware font matches are found, then a font widget appears
for the user to select from.
CATEGORY:
widget font
CALLING SEQUENCE:
var = CHECKFONT([FONT=font, message=message])
CALLED BY:
none
CALLS TO:
PICKFONT (xfont clone)
INPUTS:
none
OPTIONAL INPUTS:
FONT : string or string array listing the hardware font to be
set as the widget default font. Wildcards are allowed.
MESSAGE = message to be displayed by the view window.
OUTPUTS:
Returns the selected font as a string.
OPTIONAL OUTPUTS:
none
CALLS: ***
PICKFONT
CALLED BY:
CP_CAT, UVSP_CAT
COMMON BLOCKS:
none
SIDE EFFECTS:
The size of the selected font will effect vector drawn fonts.
A temporary pixmap window is created.
RESTRICTIONS:
Need X window device.
PROCEDURE:
Search the hardware fonts for a match with the user's input.
Switch the default widget font to the resulting match.
MODIFICATION HISTORY:
oct-1993, Elaine Einfalt (HSTX)
[Previous]
[Next]
NAME:
CHECKSUM32
PURPOSE:
To compute the 32bit checksum of an array (ones-complement arithmetic)
EXPLANATION:
The 32bit checksum is adopted in the FITS Checksum convention
http://heasarc.gsfc.nasa.gov/docs/heasarc/fits/checksum.html
CALLING SEQUENCE:
CHECKSUM32, array, checksum, [/FROM_IEEE, /NoSAVE]
INPUTS:
array - any numeric idl array. If the number of bytes in the array is
not a multiple of four then it is padded with zeros internally
(the array is returned unchanged). Convert a string array
(e.g. a FITS header) to bytes prior to calling CHECKSUM32.
OUTPUTS:
checksum - unsigned long scalar, giving sum of array elements using
ones-complement arithmetic
OPTIONAL INPUT KEYWORD:
/FROM_IEEE - If this keyword is set, then the input is assumed to be in
big endian format (e.g. an untranslated FITS array). This keyword
only has an effect on little endian machines (e.g. Linux boxes).
/NoSAVE - if set, then the input array is not saved upon exiting. Use
the /NoSave keyword to save time if the input array is not needed
in further computations.
METHOD:
Uses TOTAL() to sum the array into a double precision variable. The
overflow bits beyond 2^32 are then shifted back to the least significant
bits. Due to the limited precision of a DOUBLE variable, the summing
is done in chunks determined by MACHAR(). Adapted from FORTRAN code in
heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/general/checksum/node30.html
Could probably be done in a cleverer way (similar to the C
implementation) but then the array-oriented TOTAL() function could not
be used.
CALLS: ***
HOST_TO_IEEE [1], HOST_TO_IEEE [2], HOST_TO_IEEE [3], HOST_TO_IEEE [4]
IS_IEEE_BIG [1], IS_IEEE_BIG [2], N_bytes
CALLED BY:
FITS_ADD_CHECKSUM, FITS_TEST_CHECKSUM [1], FITS_TEST_CHECKSUM [2]
RESTRICTIONS:
(1) Requires V5.2 or later (uses unsigned integers)
(2) Not valid for object or pointer data types
EXAMPLE:
Find the 32 bit checksum of the array x = findgen(35)
IDL> checksum32, x, s ===> s = 2920022024
FUNCTION CALLED:
IS_IEEE_BIG(), N_BYTES()
MODIFICATION HISTORY:
Written W. Landsman June 2001
Work correctly on little endian machines, added /FROM_IEEE and /NoSave
W. Landsman November 2002
Pad with zeros when array size not a multiple of 4 W.Landsman Aug 2003
Always copy to new array, somewhat slower but more robust algorithm
especially for Linux boxes W. Landsman Sep. 2004
Sep. 2004 update not implemented correctly (sigh) W. Landsman Dec 2004
[Previous]
[Next]
Project : SDAC
Name : CHECKVAR
Purpose : This procedure checks sets a non-existent variable
to its default values.
Category : GEN
Explanation : The variable is checked to see if it is defined,
if it's not defined it is set to the given
default. The ultimate default value is 0.
Use :
Inputs : A - The variable to be checked for existence.
If A does not exist, then it is set to
to Deflt or Deflt2 in turn.
Deflt - The first default, may be a variable.
Deflt2= The second default, may be a variable,
if not set then A is set to 0
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords :
Calls : None
CALLED BY:
ADD_SCATTER_DRM, ATMOS, AVERAGE_STEPS, AXIS__DEFINE [2], Ai_bpow [1], Ai_bpow [2]
Ai_thermal [1], Ai_thermal [2], Ai_vth_bpow [1], Ai_vth_bpow [2], Apar_init [1]
Apar_init [2], BATSE_DEADTM, BATSE_FLARES_WEEK, BATSE_MATCH_SEQUENCE, BATSE_ON
BATSE_POINTING, BAT_MERGE, BPOW, BUILD_DRM, BURST_FLARE, CALIBRATE [1]
CALIBRATE [2], CAL_SHER, CH2KVT, CHOOSE_FL, CLEAN_GOES, CLEAN_JOURNAL, CNTRATE
COMPARE_SHUTTERS, CONT_DEF, CONT_EDGES, CONT_READ, CRAB_OCC_STR, CURVFIT [1]
CURVFIT [2], Create a FITS primary Header and Data Unit, DATPLOT, DCFREAD
DEFAULTS_2, DESPIKE_1D, DET_XSEC, DIFF_DRM, DISCP_RESP, DISCSP_BANDS, DISCSP_READ
DO_WRITE_DD, DUMMYPLOTS, EMENU, EVAL_SHERB, EXTRACT_TRIGGERS, Energy_res [2]
Enorm_drm, FAST_RATIO, FCOLOR [1], FDBREAD, FILE_SEARCHER [1], FILE_SEARCHER [2]
FILTER_ATTEN, FIND_GOOD_OCCS, FITS READER CLASS, FITS WRITER CLASS
FITS WRITER CLASS FOR ANY RHESSI DATA TYPES
FITS WRITER CLASS FOR RHESSI IMAGES, FIT_BACKGRND, FLDISPLAY, FLISTOC
FLUORESCENCE, FRAMEWORK ABSTRACT CLASS DEFINITION, FSDEF, FSOC, FS_ARCHIVE_RW
FS_GRAPH, FS_OPEN [1], FS_READ_DD, F_3POW, F_BPOS_NLINE, F_COMPOSITE, F_MTH_EXP_BPOW
F_MTH_POW_BPOW, F_MULTI_SPEC, F_POW, F_VTH_ION, Fits_spectra [1], Fits_spectra [2]
Flux model of a thermal bremsstrahlung plus broken powerlaw
Flux model of thermal bremsstrahlung plus thintarget broken, GAUSS_INTG
GD_TITLE, GETFLARE, GETUT [1], GETUT [2], GET_DAYN, GET_HXRBS_FITS, GET_OCCS
GET_OCC_ONDAY, GET_TRIG, GE_WINDOW [1], GE_WINDOW_SIM, GFITS_R, GOES_DEGLITCH
GOES_MEWE_TEM, GOES__DEFINE, GRS_LIGHTCURVE
HESSI BACK PROJECTION STRATEGY ABSTRACT CLASS
HESSI BINNED EVENTLIST CLASS DEFINITION
HESSI CALIBRATED EVENTLIST CLASS DEFINITION [1]
HESSI CALIBRATED EVENTLIST CLASS DEFINITION [2]
HESSI FRAMEWORK TEMPLATE CLASS [2], HESSI FRAMEWORK TEMPLATE CLASS [3]
HESSI IMAGE FILE CLASS DEFINITION [1]
HESSI IMAGE RAW CLASS DEFINITION [2]
HESSI IMAGE STRATEGY CLASS DEFINITION, HESSI IMAGE [1]
HESSI MODULATION PATTERN CLASS DEFINITION [1]
HESSI MODULATION PATTERN CLASS DEFINITION [5]
HESSI MODULATION PATTERN STRATEGY CLASS DEFINITION
HESSI MONITOR RATE CLASS DEFINITION, HESSI PACKET CLASS DEFINITION
HESSI Packet to EventList, HESSI ROLL_DB CLASS DEFINITION, HESSI_FILTERS
HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS, HESSI_SHUTTERS, HKG_STR
HSI_ANNSEC2XY [1], HSI_ANNSEC2XY [2], HSI_ANNSEC_BPROJ [1]
HSI_ANNSEC_BPROJ [3], HSI_ANNSEC_MAP [1], HSI_ANNSEC_MAP [2]
HSI_ANNSEC_MAP_INFO [1], HSI_ANNSEC_MAP_INFO [2], HSI_ANNSEC_MODUL_PATTERN
HSI_ANNSEC_MPAT [1], HSI_ANNSEC_MPAT [2], HSI_ANNSEC_PROFILE [1]
HSI_ANNSEC_PROFILE [2], HSI_ASPECT_SIM, HSI_BESEL_PSF, HSI_CHK_DUPLICATE
HSI_COUNTS_PER_MODEL, HSI_CSPECTRUM_DIST, HSI_DRM_MOD CLASS
HSI_DRM_MOD_CONTROL__DEFINE, HSI_EVENTLIST_SELECT_BY_ENERGY
HSI_EVENTLIST_TO_SPECTROGRAM [1], HSI_FILL_FASTRATE_PACKET, HSI_FILL_FORWARD
HSI_GET_MOD_PAT, HSI_GRID_PARAMETERS, HSI_HIST_GROUP, HSI_INPUT_MODEL
HSI_LIVETIME_PACKET_BUILD, HSI_LIVETIME_SIM, HSI_MAP_CLEAN [1]
HSI_MEM_SATO [1], HSI_MK_FASTRATE_PACKET, HSI_MK_MODUL_PATRN
HSI_MODULATE_POINT_SOURCE, HSI_MODUL_PATTERN_BPROJ, HSI_MODUL_PATTERN_BUILD
HSI_MODUL_PATTERN_PROFILE, HSI_MODUL_PATTERN_PSF, HSI_MODUL_PATTERN_RD_ONE
HSI_MODUL_PATTERN_READ, HSI_PACKET2FITS, HSI_PIXEL_COORD, HSI_PIXON_ERROR_CALC
HSI_PTR_LISTSORT, HSI_RD_FITS_SPECTRUM, HSI_RD_RASPMT, HSI_RD_WEIGHT_MAP
HSI_SCALE_IMAGE, HSI_SCORE2FILE, HSI_SCORE_BPROJ, HSI_SCTIME_ADD
HSI_SCTIME_DIFF, HSI_SPEC2CDIST, HSI_SPECTROGRAMACCBIN [5]
HSI_SPECTROGRAMCHAN_OVERLAP_FIX, HSI_SPECTROGRAM_DECIM_CORRECT
HSI_SPECTROGRAM_DECIM_TABLE, HSI_SPECTRUM__DEFINE, HSI_SRM__DEFINE
HSI_SUM_MODUL_PATTERN, HSI_TIME_JUMP, HSI_TIME_RESET, HXARCHIVE, HXFITS, HXR2FILE
HXRBS, HXRBS_DEGLITCH, HXT_CAL_DRM [1], HXT_CAL_DRM [2], HXT_CAL_FIX [1]
HXT_CAL_FIX [2], IGAIN, Intervals [1], Intervals [2], JUMPER, JUMPER_SHER, LAD_DRM
LAD_RESP, LINE_COMPLEX, LIST_OP [1], LIST_OP [2], LIVETIME [1], LLD_CHAN
Load_Main [1], Load_Main [2], Load_sher, MAILPLOT, MAP_DISCLA2CONT, MEMORY_INTRVLS
MERGE_BATSE, MERGE_BURSTS, MORE_OCCULTS, MOVIE_MAP, Modify_Merge_list [1]
Modify_Merge_list [2], Modify_sled [2], N511_VS_HVSPEC, NEAR_PC_RESP [1]
NEAR_PC_RESP [2], NEAR_PIN_CAL [1], NEAR_PIN_CAL [2], NEAR_PIN_RESP [1]
NEAR_PIN_RESP [2], NOFILL_ARE, OCC_AVG, OCC_DBASE, OCC_FROM_FITS, OCC_PROFILE
OP_COM [1], OP_COM [2], PAIRXSEC, PARA_LIVETIME, PARSE_COMLINE, PHOTON_MODEL
PICK_POINTING, PLOT_ANGC [1], PLOT_ANGC [2], PLOT_GD, PLOT_GD_CALC
PLOT_HESSI_FILTERS, PLOT_OCCS, PLOT_OCC_ONDAY
POINT SPREAD FUNCTION CLASS DEFINITION, POINT [1], PROFILES2
Packet to fast rate, Pointing_Change, QLARCHIVE, QLDISPLAY, QL_DAY_PLOT
QL_ORBIT_PLOT, QL_PLOTTER, RAWDUMP, RD_TGRS_SPEX [1], RD_TGRS_SPEX [2]
READ_DISCLA, READ_HXRS_4_SPEX [1], READ_HXRS_4_SPEX [2], READ_HXRS_4_SPEX [3]
READ_OCC_DISCSP, READ_RESULTS, READ_RESULTS2, READ_SHERB, RESOLVE_NEW_OBS
RESP_CALC response calculation, RESTORE_OVERFLOW, RESTORE_QLOOK
RHESSI IMAGE SINGLE CLASS DEFINITION, ROUTINE_NAME [4], ROUTINE_NAME [7]
RUN_BATSE, RUN_CURVEFIT [1], RUN_CURVEFIT [2]
Radiospectrogram FITS File reader [1], Read_mat_xcom, SAVE_DCDATA, SC4TREAD
SEARCH_HXRBS_DB, SELECTION MANAGER ABSTRACT CLASS, SETUP_ARRAYS, SETUP_BATSE
SETUP_BATSE_ARRAYS, SETUP_DRM, SETUT [1], SETUT [2], SETUTBASE [1], SETUTBASE [2]
SETUTEND [1], SETUTEND [2], SETUTSTART [1], SETUTSTART [2], SET_GRAPHICS [1]
SET_GRAPHICS [2], SET_UTLABEL, SET_UTPLOT [1], SET_UTPLOT [2], SLED
SPECTROGRAM CLASS DEFINITION, SPECTRUM CLASS DEFINITION, SPEX_BACKGROUND [1]
SPEX_BACKGROUND [2], SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_FITINT__DEFINE
SPEX_FIT__DEFINE, SPEX_GEN__DEFINE, SPEX_HANDLES [1], SPEX_HANDLES [2]
SPEX_HANDLES_STR [1], SPEX_HANDLES_STR [2], SPEX_PLOT_SAVED [1]
SPEX_PLOT_SAVED [2], SPEX_PROC [1], SPEX_PROC [2], SPEX_RUN_CURVEFIT [1]
SPEX_RUN_CURVEFIT [2], SPEX_SAVE [1], SPEX_SAVE [2], SPEX_SAVE_DATA [1]
SPEX_SAVE_DATA [2], SPEX_THISTORY [1], SPEX_THISTORY [2], SPEX__DEFINE
SSW_CROSSCORR, STRATEGY HOLDER TOOLS ABSTRACT CLASS, STRUCTURE TO VOTABLE
Shers_load [1], Show Image [2], TEK_INIT [1], TEK_INIT [2], TEK_PRINT [1]
TEK_PRINT [2], TEST_CAL, UNFORMAT_INTERVALS, UPDATE_LINE_TEMPLATES, USE_VLTH
UTHELP, UTLABEL [1], UTLABEL [2], UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4]
UTPLOT [5], Vlth, WCHECK_SET [1], WRAP_TXT, WRITE_DD, X_EOUT_DRM [1], X_EOUT_DRM [2]
anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], apar_check [1]
apar_check [2], array_insert, avsig_1 [6], axis_get_expanded_range, base_flash
batse_file_search [1], batse_file_search [2], bpow_taper, check_plotlimits
constbacksub [1], constbacksub [2], countsmod_plot [1], countsmod_plot [2]
cw_edroplist, cw_energy_range, cw_range, cw_ut_range, double_click_detect
drm_4_spex [1], drm_4_spex [2], drm_albedo, f_vth_thick, fcolor [2]
fcount_rate [1], fcount_rate [2], file__define, find_contig_ranges, fit_comp_kw
fits2rm, goes_reducer [1], grid_diffraction, help_merge [1], help_merge [2]
hesi_grid_trans, hessi_grid_trans, hsi_as_rdpacket, hsi_chk_obj
hsi_compute_image_axis, hsi_cw_energy_range, hsi_cw_ut_range, hsi_do_plotman
hsi_image__getaxis [2], hsi_image__plot [2], hsi_image_fitsread
hsi_image_plot, hsi_imagefile2png, hsi_imagefile_2_plotman
hsi_imagemisc_widget, hsi_lc_dims, hsi_make_hessi_ct, hsi_obs_summ_fill [1]
hsi_obs_summ_fill [2], hsi_obs_summ_soc__define
hsi_obs_summary_adapter__define, hsi_pixon_residuals, hsi_plot_flux
hsi_pmap2xy, hsi_qlook__define, hsi_shutter_transmission
hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
hsi_spectrogram__define [2], hsi_spectrogram__define [3]
hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1]
hsi_spectrum__filewrite, hsi_time_bin_auto, hsi_ui_flarecat, hsi_ui_img
hsi_ui_lc, hsi_ui_mon, hsi_ui_obs, hsi_ui_ql, hsi_ui_qlimage, hsi_ui_spec
hxr_cnt2phot, hxrbs_response, hxrs_response [1], hxrs_response [2]
hxrs_response [3], list_sp_files, low_e_spec_eff [1], low_e_spec_eff [2]
mark_intervals, mark_poly, modify_sled [1], mrdfits_spectra, option_changer [1]
option_changer [2], plot_goes_ospex, plotman, point [2], printx [1], printx [2]
pro set_bpow [1], pro set_bpow [2], pro set_vth_bpow [1], pro set_vth_bpow [2]
rd_sxs_pha [1], rd_sxs_pha [2], rd_wbs_pha [1], rd_wbs_pha [2], read_4_spex [1]
read_4_spex [2], read_batse_4_spex [1], read_batse_4_spex [2], read_dd
read_hessi_4_spex [1], read_hessi_4_spex [2], read_hessi_fits_4_spex [1]
read_hessi_fits_4_spex [2], read_hirex_4_spex [1], read_hirex_4_spex [2]
read_smm_4_spex [1], read_smm_4_spex [2], read_yohkoh_4_spex [1]
read_yohkoh_4_spex [2], select_widg, setup_spex [1], setup_spex [2]
soxs_readfile, spec_plot [1], spec_plot [2], spec_plot [3], spec_plot [4]
spectral_ratio [1], spectral_ratio [2], spectro_plot, spectro_plot2
spex_batse_preview [1], spex_batse_preview [2], spex_bk__define
spex_bkgrd t_d rate trange1 trange2 order sigmasigma [1]
spex_bkgrd t_d rate trange1 trange2 order sigmasigma [2]
spex_bkint__define, spex_bksub__define, spex_current [1], spex_current [2]
spex_customplot [1], spex_customplot [2], spex_data__define, spex_delete [1]
spex_delete [2], spex_gen_strategy_holder, spex_hold [1], spex_hold [2]
spex_image__define, spex_intervals [1], spex_intervals [2], spex_merge [1]
spex_merge [2], spex_preview [1], spex_preview [2], spex_source [1]
spex_source [2], spex_spec_plot [1], spex_spec_plot [2], spex_spec_plot [3]
spex_spec_plot [4], stretch_box, stretch_circle, t_utplot [1], t_utplot [2]
wbs_response [1], wbs_response [2], wcheck_set [2], where_are [1], where_are [2]
wrt_photon_list, xdroplist, xsel_list_multi, xzchange, ysinpixpix
Common : None
Restrictions:
Side effects: None.
Prev. Hist :
First written by RAS, 1987
Modified :
Version 2, RAS, 16-Nov-1989
Version 3, RAS, 5-Feb-1997, 2nd default is zero!
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
CHG_CTABLE
PURPOSE:
Change current color table in terms of gamma, bottom and top
CATEGORY:
EXPLANATION:
There are cases where there is a need to change the current color
table in terms of gamma, first and last color index to
use. This routine does exactly this.
SYNTAX:
chg_ctable, gamma=gamma, bottom=bottom, top=top
CALLED BY:
MK_GIF
EXAMPLES:
IDL> loadct, 3
IDL> chg_ctable, gamma=0.67, bottom=20
INPUTS:
None required.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORDS:
GAMMA = Gamma value (0.1 to 10.0) to be set
BOTTOM = First color index to use
TOP = Last color index to use
NCOLORS = number of colors to use. Use color indices from BOTTOM
to the smaller of !D.TABLE_SIZE-1 and NCOLORS-1.;
COMMON:
COLORS
RESTRICTIONS:
But be called only after LOADCT (otherwise variables in COLORS
common blocks will not be defined.
SIDE EFFECTS:
Current color table is changed.
HISTORY:
Version 1, November 20, 1995, Liyun Wang, NASA/GSFC. Written
CONTACT:
Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
Project : SOHO - CDS
Name : CHILD_POINTER()
Purpose : to retrieve child of a pointer variable
Category : Help
Explanation : use appropriate WIDGET or HANDLE info routines
Syntax : IDL> child=child_pointer(pointer)
Inputs : POINTER = pointer variable
Opt. Inputs : None
Outputs : CHILD = child ID of pointer
Opt. Outputs: None
Keywords : None
CALLS: ***
VALID_POINTER
CALLED BY:
XLIST
Common : None
Restrictions: None
Side effects: None
History : Version 1, 1-Sep-1995, D.M. Zarro. Written
Version 2, 17-Jul-1997, D.M. Zarro. Modified
-- Updated to version 5 pointers
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
CHK_DIR()
PURPOSE:
Check the validity of a directory name.
EXPLANATION:
CALLING SEQUENCE:
Result = CHK_DIR(dir_name)
INPUTS:
DIR_NAME -- A string specifying the directory name. For VMS system,
a valid directory name can be a logical name, or
any string with a format of '[...]', '[...]aaa.dir',
or 'aaa.dir'
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT -- 1 if the directory name is valid, 0 otherwise
OPTIONAL OUTPUTS:
OUTPUT -- A string indicating the real directory path
KEYWORD PARAMETERS:
FULLNAME -- if set and OUTPUT is present, OUTPUT will contain the full
path specification for the directory
CALLS: ***
CHKLOG [1], CHKLOG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], STR_INDEX [1]
STR_INDEX [2]
CALLED BY:
ADD_PATH [1], ADD_PATH [2], CDD, CDS_COMPRESS, CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], DATA_PATHS, DMOVIE [1], DMOVIE [2], FIX_IAP, GET_NOAA
GET_RECENT_EIT, IMAGE_TOOL_EVENT, MK_CDS_GIF, MK_PLAN_FORM, MK_STUDY, PICKFILES
QUERY_ANOMALY, REBIN_FID, RESTORE_ANALYSIS, RESTORE_CDS_ADEF, SAVE_CDS_ADEF
WIMG_INFO3, WIMG_INFO4, WINFO_ACTIV, WLISTER, WLOAD, WLOADC, WLOADINFO1, WRITE_ANOMALY
WSAVE_PS [2], WTIME_HEIGHT, XCDS_COSMIC, XPORT, XSTUDY, concat_dir [4], mk_minim
mk_stdim, mk_stdim_list, w_las_exp_norm, wprint, wsave1, wsave2, xpickfile2
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written October 9, 1994, by Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
Version 2, Liyun Wang, GSFC/ARC, December 16, 1994
Made work for VMS directories
Version 3, Liyun Wang, GSFC/ARC, December 29, 1994
Added keyword FULLNAME
Fixed bug of false reporting if the given string represents
a plain file under Unix OS
Version 4, William Thompson, GSFC, 29 August 1995
Modified to use OS_FAMILY()
Version 5, Zarro, 29 April 1997
Added check for blank input
VERSION:
Version 5
[Previous]
[Next]
Project : SDAC
Name : CHK_STRUCT_NAME
Purpose : check if a structure name is unique
Explanation :
Use : STATUS=CHK_STRUCT_NAME(SNAME)
Inputs : SNAME = structure name to check
Opt. Inputs : None.
Outputs : STATUS =0/1 if SNAME already exists/doesn't exist
Opt. Outputs: None.
Keywords : TEMPLATE = extant structure with name SNAME
: VERBOSE = for messages
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3]
CALLED BY:
REP_STRUCT_NAME
Common : None.
Restrictions: None.
Side effects: None.
Category : Structure handling
Prev. Hist. : None.
Written : Dominic Zarro (ARC)
Version : Version 1.0, 7 July 1995
[Previous]
[Next]
Project : SDAC
Name :
CHKARG
Purpose :
Determine calling arguments of procedure or function.
Explanation :
Determines the calling arguments of an IDL procedure or function. Used
by SCANPATH, but can also be called separately.
Use :
CHKARG [, NAME ]
Inputs :
None required.
Opt. Inputs :
NAME = Name of procedure to check arguments of. If not passed, then
it will be prompted for.
Outputs :
The arguments of the procedure are printed to the screen.
Opt. Outputs:
name = name of routine
proc = string array with lines of procedure
lname = libr/direc location of procedure
found = 1/0 if file is found/not found
Keywords :
PATH = optional directory/library search path. Same format
and semantics as !PATH. If omitted, !PATH is used.
SEARCH_ONLY = search path but do not print procedure arguments
RESET = clear commons
FOUND = 1 if found, 0 otherwise
PROGRESS = present progress bar
OUT = list of function/procedure calls
QUIET = turnoff printing
Calls : ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, GET_LIB, GET_MOD
GET_PROC, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], PROGMETER, REVERSE, RM_FILE
STRIP_ARG, XKILL, break_file [4], concat_dir [4]
CALLED BY:
EPLOT, Energy_res [1], FSOC, F_TH_NT, GET_BSC, GHOST_AMOUNT, GHOST_BUSTER
GHOST_PLOT_ONE, GHOST_TEST, GIS_CALIB, GIS_PLOT, HSI_SPECTROSCOPY_LIST
OBJ_DISSECT, PLOT_BSC [1], PLOT_BSC [2], PULSE_SPREAD
RESP_CALC response calculation, SCANPATH, SEL_BSC, SPEX_SAVE_DATA [1]
SPEX_SAVE_DATA [2], bcs_chi_norm, cal_bsc, read_4_spex [1], read_4_spex [2]
spectral_ratio [1], spectral_ratio [2], spex_preview [1], spex_preview [2]
Common :
None.
Restrictions:
Cannot access built-in IDL procedures
Side effects:
None.
Category :
Documentation, Online_help.
Prev. Hist. :
Written DMZ (ARC) Oct 1990
Converted to version 2 (DMZ Jul'92)
Written :
D. Zarro, GSFC/SDAC, October 1990.
Modified :
Version 1, William Thompson, GSFC, 23 April 1993.
Incorporated into CDS library.
Version 2, Dominic Zarro, GSFC, 1 August 1994.
Cleaned up
Version 3, Dominic Zarro (GSFC) 21 September 1994.
added checks for blank lines in documentation
Version 4, Zarro (GSFC), 21 April 1995
added SEARCH keyword
Version 5, Zarro (SM&A/GSFC), 10 Feb 1999
put on steroids
Version 6, Zarro (SM&A/GSFC), 20 May 1999
added OUT and QUIET keywords
[Previous]
[Next]
Project : SOHO - CDS
Name :
CHKLOG
Purpose :
Determine actual name of logical or environment variable.
Explanation :
This routine determines the actual name of a logical name (VMS) or
environment variable (UNIX). In VMS the routine TRNLOG,/FULL is used;
otherwise GETENV is used.
Use :
Result = CHKLOG( VAR [, OS ] )
Inputs :
VAR = String containing the name of the variable to be translated.
Opt. Inputs :
None.
Outputs :
The result of the function is the translated name, or (in VMS) an array
containing the translated names.
Opt. Outputs:
OS = The name of the operating system, from !VERSION.OS.
Keywords :
DELIM = delimiter to use for separating substrings
FULL = do full translation (VMS only)
PRESERVE = return input name if no translation found
Category :
Utilities, Operating_system.
Prev. Hist. :
Written - DMZ (ARC) May 1991
Modified - DMZ (ARC) Nov 1992, to use GETENV
Written :
D. Zarro, GSFC/SDAC, May 1991.
Modified :
Version 1, Zarro, ARC/GSFC 23 April 1993.
Version 2, GSFC, 1 August 1994.
Added capability for vector inputs
Version 3, Liyun Wang, GSFC/ARC, January 3, 1995
Added capability of interpreting the "~" character under UNIX
Version 4, Zarro, GSFC/ARC, February 17 1997
Added call to EXPAND_TILDE, corrected many potential bugs
Version 5, Zarro, GSFC/SAC, June 9 1998
Added recursive call for environment variables embedded
in input
Version 6, Zarro, GSFC/SAC, August 10 1998
Added recursive call for nested environment variables
(after RAS broke it)
Version 7, Zarro, SM&A/GSFC, 16 May 1999
Added check for "naked" "$" or "~" inputs
Version 8, Zarro, SM&A/GSFC, 10 June 1999
Added check for different OS delimiters and made Windows
friendly
Version 9, 9-Sep-1999, William Thompson, GSFC
Fixed bug with TRNLOG,FULL=FULL under version 4 in VMS.
Version 10, 14-dec-1999, richard.schwartz@gsfc.nasa.gov
Switched get_path_delim to get_delim and allowed
both slashes under Windows, '/' and '\'.
Version 11, 20-Dec-1999, Zarro
Fixed bug when recursing on delimited input
Version 12, 07-Mar-2000, William Thompson, GSFC
Don't translate terminal logical names in VMS, i.e. those which
end in the characters ".]"
Version 13, 25-April-2000, Zarro (SM&/GSFC)
Added another level of recursion for multiply-defined
env's, i.e., env's defined in terms of other env's, which
somehow stopped working after version 5.
e.g., $SSW_HESSI -> $SSW/hessi/idl -> /ssw/hessi/idl
Version 14, 28-Jul-2000, R.D.Bentley (MSSL)
Suppress replacement of \\ with \ for windows
Version 15, 22-Aug-2000, Zarro (EIT/GSFC)
Removed calls to DATATYPE
Version 16, 24-July-2002, Zarro (LAC/GSFC)
Replaced TRIM with faster TRIM2
Version 17, 4-Nov-2002, Zarro (EER/GSFC)
Removed checks for multiple delimiters in input
CALLED BY
ANNOUNCEMENTS, APPEND_SDB, APPLY_LOCK, BCS, CH2KVT_GAIN, CHECK_ANOMALY, CHECK_LOCK
CHECK_NETWORK, CHK_DIR [1], CHK_DIR [2], CLEAN_PATH, COMPRESS_QLOOK
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DECOMPOSE_BATSE_DRM, DISCP_RESP
DN_FILE, DO_ARCHIVEPLOTS, DO_EVENTLISTS, DO_PSPLOTS, EIT_COPY, EIT_GBO, EXP_ZDBASE
EXTRACT_TRIGGERS, FAST_LAD_DRM, FAST_SPEC_DRM, FCS, FILELIST, FILE_NAME, FIND_CAT
FIND_PROC, FIX_DIR_NAME, FLARES, FLARE_FDB, FLARE_F_NAME, FLARE_LIST, FLDISPLAY
FSPLOT, FS_OPEN [1], FTP_SYNOP, FTP__DEFINE, GET_GZIP, GET_LAD_GAIN, GET_MOD, GET_NAR
GET_PROC, GET_TEMP_DIR, GET_USER_ID, GET_UVSP, GOES_MEWE_TEM, HESSI_DATA_PATHS [1]
HESSI_DATA_PATHS [2], HESSI_DEV, HKG_DBASE, HSI_LOC_FILE, HSI_SOCK_FILE
HTTP__DEFINE, HXARCHIVE, HXFITS, IS_DIR, IS_DIR2, ITOOL_PKFILE_BS, LAD_RESP
LOCAL_NAME, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], MDI_COPY, MKLOG, MK_DIR
MK_PLAN_FORM, MK_STUDY, MK_SUMER_DBASE, MOD_PLOT, NOTEPAD, PLOT_FLARE, QLPRINT
QL_ORBIT_PLOT, RD_ASCII [1], RD_BATSE_511CAL, RD_DMP, RD_GOES_SDAC, READ_DNFILE
READ_GAPFILE, READ_HVFILE, REWRITE_FDB, RPC_SERVER, Run_FILE_SEARCH [1]
Run_FILE_SEARCH [2], SCANPATH, SEARCH_NETWORK, SEND_PRINT, SET_CDS_SDB
SET_GRAPHICS [1], SET_GRAPHICS [2], SPEX_COMMONS [2], SPEX_COMMONS [4]
SPEX_ENV [2], SPEX_ENV [4], SPEX_ENV [5], SPEX_PROC [1], SPEX_PROC [2]
SPEX_SUMMARY [1], SPEX_SUMMARY [2], SYNOP_DEFINE, Shers_load [1], TIME_ARC_NAME
TRACE_COPY, TRACE_GBO, UPDATE_MM, WBDA [1], WBDA [2], WBSC_LTC_EV [1]
WBSC_LTC_EV [2], WRITE_ANOMALY, WRITE_DIR, WRITE_FDB, WRITE_LOG, XCAT, XDIFF, XEDIT
XREPORT, batse_read_cat, batse_write_log, calc_rad_loss, concat_dir [4], db_gbo
def_tapd [1], def_tapd [2], def_tapd [3], drm_4_spex [1], drm_4_spex [2]
expand_dirs, fix_path, get_tape, gextal, hessi_grid_trans, hessi_setup_info
hessi_var, hxrbs_response, ihy_db, is_open, mewe, rd_hxt_drm [1], rd_hxt_drm [2]
read_cat, setup_spex [1], setup_spex [2], ssw_packages, sumer_ffdb, synop_link
wbs_response [1], wbs_response [2], xpickfile
[Previous]
[Next]
Project : SDAC
Func Name : CHKTAG
Purpose : Check for presence of a particular tag in a structure
Explanation :
Use : check=chktag(stc,tag)
Inputs :
STC = structure name
TAGS = tag name to check for;
Opt. Inputs : None.
Outputs : 1 if present, 0 otherwise
Opt. Outputs: None.
Keywords : RECUR = set to search recursively down nested structures
Category : Structure
Prev. Hist. : None.
Written : DMZ (ARC) Oct 1993
CALLS:
CALLED BY
BSC_ERRCAL [1], BSC_ERRCAL [2], FRAME ABSTRACT CLASS DEFINITION
FRAMEWORK ABSTRACT CLASS DEFINITION, GT_BSC_FLUX, HSI_ANNSEC_MPAT [1]
HSI_ANNSEC_MPAT [2], HSI_FILL_FASTRATE_PACKET, HSI_MK_FASTRATE_PACKET
HSI_RD_PACKET_TIMES, HSI_SPECTROGRAMCHAN_OVERLAP_FIX
HSI_SPECTROGRAM_DECIM_CORRECT, HSI_SPECTROGRAM_DECIM_TABLE, MJD2ANY
Radio Spectrogram FITS File reader, Radiospectrogram FITS File reader [1]
Radiospectrogram FITS File reader [2], SEL_BSC, SPECTROGRAM CLASS DEFINITION
WBSC [1], WBSC [2], WR_CPU_DTB, combine_bsc_flux, hsi_aspect [1], hsi_aspect [2]
hsi_bad_pak, hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
hsi_spectrogram__define [2], hsi_spectrogram__define [3]
hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1]
hsi_ui_widgetupdate, pr_fdss
[Previous]
[Next]
Project : HESSI
Name : CHMOD
Purpose : wrapper around FILE_CHMOD that catches errors
Category : system utility
Syntax : IDL> file_chmod,file
Outputs : None
CALLS: ***
ERR_STATE, IS_BLANK, SINCE_VERSION [1], SINCE_VERSION [2]
CALLED BY:
EIT_COPY, FTP__DEFINE, HTTP__DEFINE, MAP__DEFINE, MDI_COPY, MK_DIR, TRACE_COPY
TRACE_GBO, db_gbo, ihy_db, rd_week_file [2], uncompress, weekid [2], ydb_exist [2]
History : 17 Apr 2003, Zarro (EER/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
CIC
PURPOSE:
Interpolate an irregularly sampled field using Cloud in Cell method
EXPLANATION:
This function interpolates an irregularly sampled field to a
regular grid using Cloud In Cell (nearest grid point gets
weight 1-dngp, point on other side gets weight dngp, where
dngp is the distance to the nearest grid point in units of the
cell size).
CATEGORY:
Mathematical functions, Interpolation
CALLING SEQUENCE:
Result = CIC, VALUE, POSX, NX[, POSY, NY, POSZ, NZ,
AVERAGE = average, WRAPAROUND = wraparound,
ISOLATED = isolated, NO_MESSAGE = no_message]
INPUTS:
VALUE: Array of sample weights (field values). For e.g. a
temperature field this would be the temperature and the
keyword AVERAGE should be set. For e.g. a density field
this could be either the particle mass (AVERAGE should
not be set) or the density (AVERAGE should be set).
POSX: Array of X coordinates of field samples, unit indices: [0,NX>.
NX: Desired number of grid points in X-direction.
OPTIONAL INPUTS:
POSY: Array of Y coordinates of field samples, unit indices: [0,NY>.
NY: Desired number of grid points in Y-direction.
POSZ: Array of Z coordinates of field samples, unit indices: [0,NZ>.
NZ: Desired number of grid points in Z-direction.
KEYWORD PARAMETERS:
AVERAGE: Set this keyword if the nodes contain field samples
(e.g. a temperature field). The value at each grid
point will then be the weighted average of all the
samples allocated to it. If this keyword is not
set, the value at each grid point will be the
weighted sum of all the nodes allocated to it
(e.g. for a density field from a distribution of
particles). (D=0).
WRAPAROUND: Set this keyword if you want the first grid point
to contain samples of both sides of the volume
(see below).
ISOLATED: Set this keyword if the data is isolated, i.e. not
periodic. In that case total `mass' is not conserved.
This keyword cannot be used in combination with the
keyword WRAPAROUND.
NO_MESSAGE: Suppress informational messages.
Example of default allocation of nearest grid points: n0=4, *=gridpoint.
0 1 2 3 Index of gridpoints
* * * * Grid points
|---|---|---|---| Range allocated to gridpoints ([0.0,1.0> --> 0, etc.)
0 1 2 3 4 posx
Example of ngp allocation for WRAPAROUND: n0=4, *=gridpoint.
0 1 2 3 Index of gridpoints
* * * * Grid points
|---|---|---|---|-- Range allocated to gridpoints ([0.5,1.5> --> 1, etc.)
0 1 2 3 4=0 posx
OUTPUTS:
Prints that a CIC interpolation is being performed of x
samples to y grid points, unless NO_MESSAGE is set.
RESTRICTIONS:
Field data is assumed to be periodic with the sampled volume
the basic cell, unless ISOLATED is set.
All input arrays must have the same dimensions.
Postition coordinates should be in `index units' of the
desired grid: POSX=[0,NX>, etc.
Keywords ISOLATED and WRAPAROUND cannot both be set.
PROCEDURE:
Nearest grid point is determined for each sample.
CIC weights are computed for each sample.
Samples are interpolated to the grid.
Grid point values are computed (sum or average of samples).
NOTES:
Use tsc.pro for a higher-order interpolation scheme, ngp.pro for a lower
order interpolation scheme. A standard reference for these
interpolation methods is: R.W. Hockney and J.W. Eastwood, Computer
Simulations Using Particles (New York: McGraw-Hill, 1981).
EXAMPLE:
nx=20
ny=10
posx=randomu(s,1000)
posy=randomu(s,1000)
value=posx^2+posy^2
field=cic(value,posx*nx,nx,posy*ny,ny,/average)
surface,field,/lego
MODIFICATION HISTORY:
Written by Joop Schaye, Feb 1999.
Avoid integer overflow for large dimensions P.Riley/W.Landsman Dec. 1999
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
CIR_MASK()
PURPOSE:
Get indices of a circular mask over a 2D array
CATEGORY:
Utility
EXPLANATION:
There are cases where there is a need of getting indices of
all pixels of a circular region in a 2D array. This routine
does just that.
SYNTAX:
Result = cir_mask(array, x0, y0, r0)
INPUTS:
ARRAY - 2D array
X0 - X position of the center of the circular region, in pixels
Y0 - Y position of the center of the circular region, in pixels
R0 - Radius of the circular region, in pixels
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - Indices of pixels inside (or outside, if OUTSIDE keyword
is set) the circular region. A -1 is returned if an
error occurs
OPTIONAL OUTPUTS:
None.
KEYWORDS:
OUTSIDE - Set this keyword to mask outside of the circular region
ERROR - Error message returned; a null string if no error
CALLED BY:
msok_poi_copy [1], msok_poi_copy [2]
return a solar disk mask using SSW standard keywords, trace_make_vignette
COMMON:
None.
RESTRICTIONS:
Number of elements in ARRAY cannot exceed the maximum limit of
long integer
SIDE EFFECTS:
None.
HISTORY:
Version 1, February 15, 1996, Liyun Wang, GSFC/ARC. Written
CONTACT:
Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
Project : SOHO - CDS
Name : CIRCLE_SYM
Purpose : Define (part of) a circle as the user plotting symbol.
Explanation : Calls usersym to define an circle as the user symbol
to be used when psym=8 is specified in (o)plot. The symbol
will be filled if requested.
Use : IDL> circle_sym, quad, thick=2, /fill
IDL> plot,indgen(10),psym=8
Inputs : quad - defines which quadrant of the circle to plot.
zero or undefined means use full circle.
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : thick = the thickness of the perimeter line
fill = means fill the symbol
symsize = the size of the symbol
Calls : None
CALLED BY:
BP_SEEK_POS, CDSFOV, CHECK_NIS_WCAL, DEMO_4TH_PIX, EXPINT_DEMO, MONO_SPEC
NEW_FF_DEMO, NIS1_RELCAL, NIS2_RELCAL, NIS_BIAS_DEMO, NIS_WAVECAL_DEMO, OVSA_FIT
OVSA__DEFINE, PLOT_CDS_CRAYS, PLOT_CHIANTI_NE, PLOT_CHIANTI_TE, PLOT_DELTAT
PLOT_EXPINT, PLOT_IONEQ, PLOT_POPULATIONS, PLOT_RASTER, PLOT_SCI_TLM
PLOT_SLIT_OFFSETS, PLOT_TEMP_POS, PLOT_VDS_BIAS, POLY_SPEC, SLIT4V5_DEMO
SYNOPTIC_STATS, SYNOP_STAB_DEMO, TILT_NIS1_DEMO, TILT_NIS2_DEMO, TP_DRAW_RASDUR
VDS_BIAS_GLITCH, ovsa_interact
Common : None
Restrictions: None
Side effects: None
Category : Util, plotting
Prev. Hist. : None
Written : C D Pike, RAL, 21-Apr-94
Modified : Version 2, 16-Aug-1999, William Thompson, GSFC
Added keyword SYMSIZE
Version : Version 2, 16-Aug-1999
[Previous]
[Next]
NAME:
CIRRANGE
PURPOSE:
To force an angle into the range 0 <= ang < 360.
CALLING SEQUENCE:
CIRRANGE, ang, [/RADIANS]
INPUTS/OUTPUT:
ang - The angle to modify, in degrees. This parameter is
changed by this procedure. Can be a scalar or vector.
The type of ANG is always converted to double precision
on output.
OPTIONAL INPUT KEYWORDS:
/RADIANS - If present and non-zero, the angle is specified in
radians rather than degrees. It is forced into the range
0 <= ang < 2 PI.
CALLED BY:
HELIO, MOONPOS, NUTATE
PROCEDURE:
The angle is transformed between -360 and 360 using the MOD operator.
Negative values (if any) are then transformed between 0 and 360
MODIFICATION HISTORY:
Written by Michael R. Greason, Hughes STX, 10 February 1994.
Get rid of WHILE loop, W. Landsman, Hughes STX, May 1996
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Name:
CLEAN
Purpose:
To fix-up a gif image with a weird color table. Gifs, in general,
have color tables in random order. It is helpful to have them sorted
out in intensity order. CLEAN_GIF does that. It is designed to be
used on memory-resident gif images or as a replacement for READ_GIF
(with a slight change of parameter order from READ_GIF).
Usage:
ZFIX_GIF,a,r,g,b,f - Read a gif image, clean, and return in (a,r,g,b)
ZFIX_GIF,a,rgb,f - Read a gif image, clean, and return in (a,rgb)
ZFIX_GIF,a,f - Read a gif image, clean, and return in (a)
ZFIX_GIF,a,r,g,b - Clean (a,r,g,b) in place
ZFIX_GIF,a,rgb - Clean (a,rgb) in place
PARAMETERS:
A - the image to fix. (I/O; if 'F' specified, output only)
RGB - a 256x3 matrix containing the complete color table (I/O)
(This may be used INSTEAD of r,g, and b).
R - a 256 element array; the red part of the color table (I/O)
G - a 256 element array; the green part of the color table (I/O)
B - a 256 element array; the blue part of the color table (I/O)
F - A file to load in. (Input only)
Method:
If necessary, a gif image is read in from a file. Then the
color table is sorted and the image values diddled to match the
sorting order. Finally, appropriate values are stuck back into th
parameters.
CALLS: ***
CLEAN_GIF, READ_GIF, data_chk [1], data_chk [2]
CALLED BY:
imagr [1], imagr_batch
History:
Written by Craig DeForest, 2-Sep-98
[Previous]
[Next]
Project : SOHO - CDS
Name : CLEAN_EXPOSURE
Purpose : Clean cosmic rays from single (slit spectrogram) exposure
Explanation : This routine identifies cosmic rays by comparing pixels with
the median of the surrounding pixels inside a rectangular box.
The routine is specifically designed to work with slit
spectrograms, with the first dimension of the data being the
dispersion direction, and the second dimension along the
slit. The rectangular box used to calculate the local median
value is longer in the slit direction than in the dispersion
direction. The size of the median box can be set through the
keywords XBOX/YBOX.
The routine does a fairly good job of identifying cosmic rays
when comparing with cosmic rays identified by eye. The method
is, however, not foolproof. Both false alarms and undetected
cosmic rays do occur, so manual inspection is encouraged.
A pixel P is determined to be a (first approximation) cosmic
ray:
IF ( P LT LIMIT AND (P - MEDIAN) GT MAX_VAR_LOW )
OR ( P GE LIMIT AND (P / MEDIAN) GT MAX_FACTOR_HI )
where LIMIT, MAX_VAR_LOW and MAX_FACTOR_HI can be set through
keywords. They have useful default values for debiased CDS NIS
exposures. For other instruments, these parameters, as well as
XBOX,YBOX, will need to be retuned.
Since this definition often leaves (minimally) affected pixels
on the borders of cosmic ray hits untouched, all pixels having
a (first approximation) cosmic ray neighbour to its left or
right, or directly above or below will be marked as cosmic
rays as well. This may be turned off by setting the keyword
NO_NEIGHBOUR, or modified by setting the KERNEL keyword to a
convolution kernel that is used to flag neighbours.
If a MISSING value is supplied, identified cosmic ray pixels
are set to this value. Supplying the MISSING value will also
leave pixels with this value out in the calculation of the
local median.
If the keyword FILL is set, or if no MISSING value is
supplied, the cosmic ray pixels are filled with the median of
the surrounding pixels.
Use : CLEAN_EXPOSURE,EXPOSURE
Inputs : EXPOSURE : A 2-dimensional array of counts.
Opt. Inputs : None.
Outputs : EXPOSURE is altered.
Opt. Outputs: None.
Keywords : MISSING : The value of possible missing data (like
already-identified cosmic rays), and the value used
to flag the cosmic ray pixels. If this value is not
supplied, the FILL option is automatically used.
FILL : Set this flag to fill in the cosmic ray pixels with the
value of the local median.
NO_NEIGHBOUR : Set this flag to avoid flagging nearest
neighbours (left, right, above, below) of first
approximation cosmic ray pixels as cosmic rays.
The effect of the KERNEL keyword is turned off
when NO_NEIGHBOUR is set.
XBOX/YBOX: Determines the size of the box used to calculate
the local median.
LIMIT : Determines the dividing line between high/low pixels,
see the algorithm description.
MAX_VAR_LOW : See the algorithm description
MAX_FACTOR_HI : See algorithm description.
KERNEL : See algorithm description, and it's use in the
program. Setting NO_NEIGHBOUR disables this keyword.
Calls : ***
DEFAULT, FMEDIAN
CALLED BY:
CDS_CLEAN_EXP, EIS_RASTER_BROWSER [1], eis_raster_browser [2]
Common : None.
Restrictions: None.
Side effects: None.
Category : General Utility
Prev. Hist. : None.
Written : S. V. H. Haugan, UiO, 11 December 1996
Modified : Version 2, SVHH, 6 May 1998
Version 3, SVHH, 17 August 1998
Fixed bug introduced with the kernel keyword in
version 2. Without NO_NEIGHBOUR set, the default
kernel was always applied twice (regardless of
the KERNEL keyword setting), causing the neighbours
of neighbours to be flagged too).
Version : 3, 17 August 1998
[Previous]
[Next]
Project : SDAC
Name : CLEAN_GOES
Purpose : This procedure finds and removes the glitches in the
GOES xray data due to the changes in the analogue
filtering used to accommodate the full dynamic range.
Category : GOES
Explanation : CLEAN_GOES finds bad data points (spikes or bad values due to gain changes)
eliminates them, and interpolates across them by using the surrounding
points.
Use : clean_goes, goes, tarray = tarray, yarray = yarray, yclean = yclean, $
bad0 = bad0, bad1 = bad1, numstat=numstat, tstat=tstat, stat=stat, error=error
Inputs :
Opt. Inputs : GOES - structure obtained from RD_GXD with tags time, day, lo, and hi
replacing TARRAY and YARRAY.
Outputs : None
Opt. Outputs: None
Keywords : TARRAY- time in utime format, sec from 1-jan-1979, dblarr(nbins)
YARRAY- raw GOES, fltarr(nbins, 2)
YCLEAN- despiked YARRAY
SATELLITE- GOES satellite number, GOES8 and 9 are considerably more
resilient to gain change spikes, use integers
BAD0 - indices of cleaned Lo channel
BAD1 - indices of cleaned Hi channel
NUMSTAT- Default value is -1, if not then data are assumed
to originate in SDAC format GOES fits files. Gain change
times are indicated in TSTAT
TEST- scaling factor for glitch test, default 7, larger
values make the clean more (too) sensitive.
SECOND- Second pass through for clean
TSTAT
STAT
ERROR
Calls : ***
CHECKVAR [1], DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], FCHECK, F_DIV, SPLINE, anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5], checkvar [2], delvarx [5], find_fits_bad, where_arr [1]
where_arr [2]
CALLED BY:
GOES__DEFINE
Common : None
Restrictions:
Side effects: None.
Prev. Hist :
Modified : New version of CLEAN_GOES, based on clean_goes.old by AKT
This version uses a faster and simpler despike algorithm
based exclusively on scaled first differences. This is
a test version. When the spikes are located, the spline
interpolation algorithm is used to fill the data.
Version 1, ras, 29-jan-1997
Version 2, ras, 4-feb-1997, good data is checked to avoid
repeats before using spline interpolation. Spline interpolation
only used over short intervals containing bad data points
instead of passing the entire observing interval to the
spline routine.
Version 3, ras, 7-feb-1997, data isn't cleaned if it is
less than default values of ([7e-8,1e-8])(ich), cleaning
test more stringent on GOES8+, removed 2nd cleaning,
added satellite keyword.
Version 4, RAS, 9-apr-1997, modified cleaning algorithm to
exclude long gaps.
Version 5, RAS, 19-May-1997, long gap algorithm patched
temporarily, needs re-examination.
[Previous]
[Next]
NAME:
CLEAN_JOURNAL
PURPOSE:
This procedure removes some of the output in journal files to make
the resultant files more easily modified into procedures.
CATEGORY:
UTIL, GEN, STRING
CALLING SEQUENCE:
clean_journal, file, items=items
CALLS: ***
CHECKVAR [1], RD_TEXT, checkvar [2]
INPUTS:
File: The file to clean.
OPTIONAL INPUTS:
ITEMS: An array of text strings. The lines which begin with these strings are
eliminated. The defaults are:
['print',';','retall','xmanager','wdelete','chkarg', $
'.',',','help','$']
OUTPUTS:
none explicit, only through commons;
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
Version 1, RAS 5-June 1996
Version 2, RAS 4-dec-1996
[Previous]
[Next]
Project : SOHO-CDS
Name : CLEAN_PATH
Purpose : clean up SSW path by reorganizing directories
Category : utility
Explanation : use this to move SUMER and YOHKOH UCON libraries to
end of IDL path to avoid potential conflicts.
Syntax : clean_path,new_path
Outputs : NEW_PATH = rearranged IDL !path
Opt. Outputs: None
Keywords : NOSITE = exclude site directories
RESET = reset back to original state
NOUCON = exclude Yohkoh UCONS
CALLS: ***
ARR2STR [1], Arr2Str [2], CHECK_IDL_PATH, CHKLOG [1], CHKLOG [2], DELVARX [1]
DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST, GET_LIB, GET_PATH_DELIM, IS_DIR
LOCAL_NAME, SINCE_VERSION [1], SINCE_VERSION [2], TRIM2, delvarx [5]
CALLED BY:
LIST_PATH
Common : None
Restrictions: None
Side effects: If NEW_PATH not on command line, !path is reset automatically
History : Written 22 Oct 1997, D. Zarro, SAC/GSFC
Version 2, 11-Dec-2001, William Thompson, GSFC
Moved rsi to top, so $IDL_DIR/lib/obsolete is not
removed from the path.
Don't change case of directories.
12 Feb 02 - Zarro (EITI/GSFC) - made Windows compatible and
added check for pre-version 4 directories in !path
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
CLEANPLOT
PURPOSE:
Reset all plotting system variables (!P,!X,!Y,!Z) to their default values
EXPLANATION:
Reset all system variables (!P,!X,!Y,!Z) which are set by the user
and which affect plotting to their default values.
CALLING SEQUENCE:
Cleanplot, [ /Silent, /ShowOnly]
INPUTS:
None
CALLS: ***
SINCE_VERSION [1], SINCE_VERSION [2]
CALLED BY:
BCS, CDS_LINEFIT_WRAP, CW_LOADCT, DSP_AUX, DSP_WAV, FCS, HFLARE, HSI_MAP_CLEAN [1]
HXRBS, MK_CDS_PLAN, MOVIE_MAP, SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PROC [1]
SPEX_PROC [2], WBDA [1], WBDA [2], WBSC [1], WBSC [2], plotman
OPTIONAL KEYWORD INPUT:
/SHOWONLY - If set, then CLEANPLOT will display the plotting system
variables with nondefault values, but it will not reset them.
/SILENT - If set, then CLEANPLOT will not display a message giving the
the system variables tags being reset. One cannot set
both /SILENT and /SHOWONLY
OUTPUTS:
None
SIDE EFFECTS:
The system variables that concern plotting are reset to their default
values. A message is output for each variable changed.
The !P.CLIP and CRANGE, S, WINDOW, and REGION fields of the
!X, !Y, and !Z system variables are not checked since these are
set by the graphics device and not by the user.
PROCEDURE:
This does NOT reset the plotting device.
This does not change any system variables that don't control plotting.
RESTRICTIONS:
If user default values for !P, !X, !Y and !Z are different from
the defaults adopted below, user should change P_old etc accordingly
MODIFICATION HISTORY:
Written IDL Version 2.3.0 W. Landsman & K. Venkatakrishna May '92
Handle new system variables in V3.0.0 W. Landsman Dec 92
Assume user has at least V3.0.0 W. Landsman August 95
V5.0 has 60 instead of 30 TICKV values W. Landsman Sep. 97
Change !D.N_COLORS to !D.TABLE_SIZE for 24 bit displays
W. Landsman April 1998
Added silent keyword to supress output & modified X_old to
handle the new !X and !Y tags in IDL 5.4 S. Penton July 2000
Test for visual depth if > V5.1 W. Landsman July 2000
Macs can report a visual depth of 32 W. Landsman March 2001
Call device,get_visual_depth only for device which allow it
W. Landsman June 2001
Default !P.color is 16777215 for 16 bit systems
W. Landsman/M. Hadfield November 2001
Added ShowOnly keyword W. Landsman April 2002
[Previous]
[Next]
NAME:
CLEANPLOT
PURPOSE:
Reset all plotting system variables (!P,!X,!Y,!Z) to their default values
EXPLANATION:
Reset all system variables (!P,!X,!Y,!Z) which are set by the user
and which affect plotting to their default values.
CALLING SEQUENCE:
Cleanplot, [ /Silent, /ShowOnly]
INPUTS:
None
CALLS: ***
SINCE_VERSION [1], SINCE_VERSION [2]
CALLED BY:
BCS, CDS_LINEFIT_WRAP, CW_LOADCT, DSP_AUX, DSP_WAV, FCS, HFLARE, HSI_MAP_CLEAN [1]
HXRBS, MK_CDS_PLAN, MOVIE_MAP, SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PROC [1]
SPEX_PROC [2], WBDA [1], WBDA [2], WBSC [1], WBSC [2], plotman
OPTIONAL KEYWORD INPUT:
/SHOWONLY - If set, then CLEANPLOT will display the plotting system
variables with nondefault values, but it will not reset them.
/SILENT - If set, then CLEANPLOT will not display a message giving the
the system variables tags being reset. One cannot set
both /SILENT and /SHOWONLY
OUTPUTS:
None
SIDE EFFECTS:
The system variables that concern plotting are reset to their default
values. A message is output for each variable changed.
The !P.CLIP and CRANGE, S, WINDOW, and REGION fields of the
!X, !Y, and !Z system variables are not checked since these are
set by the graphics device and not by the user.
PROCEDURE:
This does NOT reset the plotting device.
This does not change any system variables that don't control plotting.
RESTRICTIONS:
If user default values for !P, !X, !Y and !Z are different from
the defaults adopted below, user should change P_old etc accordingly
MODIFICATION HISTORY:
Written IDL Version 2.3.0 W. Landsman & K. Venkatakrishna May '92
Handle new system variables in V3.0.0 W. Landsman Dec 92
Assume user has at least V3.0.0 W. Landsman August 95
V5.0 has 60 instead of 30 TICKV values W. Landsman Sep. 97
Change !D.N_COLORS to !D.TABLE_SIZE for 24 bit displays
W. Landsman April 1998
Added silent keyword to supress output & modified X_old to
handle the new !X and !Y tags in IDL 5.4 S. Penton July 2000
Test for visual depth if > V5.1 W. Landsman July 2000
Macs can report a visual depth of 32 W. Landsman March 2001
Call device,get_visual_depth only for device which allow it
W. Landsman June 2001
Default !P.color is 16777215 for 16 bit systems
W. Landsman/M. Hadfield November 2001
Added ShowOnly keyword W. Landsman April 2002
[Previous]
[Next]
NAME:
CLEAR_SCREEN
PURPOSE:
Writes escape sequence to clear screen and set cursor to top left corner
CALLING SEQUENCE:
clear_screen
INPUTS:
none
OUTPUTS:
none
CALLED BY:
Fortran_Read, General_Menu [1], Integration, Load_User_CT, MDisp, Modif_Axis
Modif_PS, Modify Titles, Save_User_CT, Sca_Write, Symbols, Tv_Zoom, teambb [1]
teambb [2]
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
RDB 17-Feb-94 Written
[Previous]
[Next]
Project : SOHO - CDS
Name : CLEAR_STRUCT
Purpose : clear all field values in a structure
Explanation : initializes field values by setting to 0 or blank
strings as appropriate.
Use : NEW_STRUCT=CLEAR_STRUCT(STRUCT)
Inputs : STRUCT = input structure
Opt. Inputs : None.
Outputs : NEW_STRUCT = initialized original structure
Opt. Outputs: None.
Keywords : None.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3]
CALLED BY:
CONCAT_STRUCT, HESSI IMAGE FILE CLASS DEFINITION [1], MATCH_STRUCT, XCAMP
db_gbo, ihy_db
Common : None.
Restrictions: None.
Side effects: None.
Category : Structure handling
Prev. Hist. : None.
Written : Dominic Zarro (ARC)
Version : Version 1.0, 22 September 1994
[Previous]
[Next]
NAME:
CLEAR_UTPLOT
PURPOSE:
Restores plotting structures !x and !y to their values prior to calls to
SET_UTPLOT or UTPLOT..
CALLING SEQUENCE:
CLEAR_UTPLOT
KEYWORD INPUTS:
NO_UTBASE - Don't clear UTBASE from common. Useful for datasets where
the data is relative to the base and only the plot limits need clearing.
CALLED BY:
AR_SPECTRUM, BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_SPMOVIE [1]
BCS_SPMOVIE [2], GOES_TEK [1], GOES_TEK [2], HXISXPLOT, HXT_FANS, HXT_LCURVE
MARKS2BOX, OBS_PLOT, PLOT_OCCS, READ_HXT_CAL, TERM_QUICK, TERM_REVIEW
TERM_REVIEW_GIF, TEST_ATT, WBDA [1], WBDA [2], WBSC_LTC_EV [1], WBSC_LTC_EV [2]
fit_bsc_plot, gr_summary_plot, high_mag_lat, ovsa_interact, plot_ssw_fov
plot_trav [1], plot_trav [2], plot_trav [3], plotbft [1], ploty [1], ploty [2]
rd_sxs_pha [1], rd_sxs_pha [2], rd_wbs_pha [1], rd_wbs_pha [2]
read_yohkoh_4_spex [1], read_yohkoh_4_spex [2], xhkplot, xread_hist
COMMON BLOCKS:
COMMON CLEARCOMMON,XOLD,YOLD,CLEARSET = holding area for previous
!x and !y structures if clearset=1
common utcommon - utbase,utstart,utend,xst
RESTRICTIONS:
None.
PROCEDURE:
Restores structures !x and !y and resets the common variable CLEARSET.
Next call to SET_UTPLOT will again store !x and !y.
Call CLEAR_UTPLOT if execution stops in the middle of any UTPLOT
package calls to clear plotting structures !x and !y.
MODIFICATION HISTORY:
Written by Richard Schwartz for IDL Version 2 91/02/17
20-Aug-92 (MDM) Added clearing UTBASE, UTSTART and UTEND
1-Nov-92 (DMZ) Added check that xold and yold exist
17-Mar-93 (MDM) Set !quiet=0 instead of =1
16-nov-93 removed !quiet
27-jan-1998, richard.schwartz@gsfc.nasa.gov, added NO_UTBASE keyword.
[Previous]
[Next]
NAME:
clearplot
PURPOSE:
To clear the IDL plotting parameters
CALLED BY:
ANAL_BCS_PHA, AR_SPECTRUM, BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_MULTI [1]
BCS_MULTI [2], BCS_SPMOVIE [1], BCS_SPMOVIE [2], BSC_RASTER, COVER_PAGE [2]
FIG_OPEN, FWD_MINIMUM, HXT_FANS, MARKS2BOX, PLOT_BSC [1], PLOT_BSC [2], STEREO_LOOP
TERM_QUICK, TERM_REVIEW, TERM_REVIEW_GIF, TEST_ATT, WBDA [1], WBDA [2], WBSC [1]
WBSC [2], bsc_spec_plot [1], bsc_spec_plot [2], cal_fig_mich
exp_scale min_exp max_exp [1], first_bcs, fit_bsc_plot
get_linearity sig e_min e_max, hxt_images2ps, lc_array formerly actonpro
lc_array1 formerly actonpro, ltc, mplot_nar, op_pass_sheets [1]
op_pass_sheets [2], plot_ar_pfi, plot_eit_area, plot_eit_entrance
plot_eit_filters, plot_eit_flux, plot_eit_mirror, plotbft [1], read_ltc file
sxt_images2ps, xhkplot, xread_hist
HISTORY:
Written Sep-91 by M.Morrison
3-Mar-92 (MDM) - Added !x.margin and !y.margin and
!p.title
[Previous]
[Next]
Project : SOHO - CDS
Name : CLIPBOX
Purpose : To draw a box around the outside of the clip box
Explanation : PLOTS is used to draw a box on the outside of clip box.
Use : CLIPBOX,THICK
Inputs : None necessary.
Opt. Inputs : THICK : Thickness of the line. Default 1
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : ***
CCEIL, CROUND
CALLED BY:
CWQ_DSPWAV [1], CWQ_SPECTR [1], CW_PZOOM [1], DSPEXP, DSPWAV, DSP_AUX, DSP_WAV
NDSPSPEC, PQLZOOM, cw_pzoom [2], cwq_dspwav [2], cwq_spectr [2]
Common : None.
Restrictions: None.
Side effects: None.
Category :
Prev. Hist. : None.
Written : SVHH, 26 May 1994
Modified :
Version : 1 - 26 May 1994
[Previous]
[Next]
Name:
clon2ex
Purpose:
Calculate times corresponding to input 'Carrington'
longitudes.
Input:
CLON_ARR - A 2xN array with rotation number in the first index
and longitude in degrees in the second index,
OR
An N vector containing decimal rotation numbers.
Output:
TIME_ARR
CALLS: ***
dd792ex
CALLED BY:
BUILD_SSX, TV_SSX, mk_imgsum_html
History:
Written 16-Aug-92 by G. Slater
[Previous]
[Next]
Project : HESSI
Name : CLONE__DEFINE
Purpose : Define a CLONE class
Category : objects
Explanation : CLONE class contains a single method for
cloning an arbitrary object. Pointers and objects
are cloned recursively.
Usage: : inherit class in your class__define procedure
e.g:
pro your_class__define
temp={your_class, property tags...,inherits parents,inherits clone}
return
end
(note use of multiple inheritance)
then,
IDL> your_obj=obj_new(your_class)
then use it as a procedure:
IDL>your_obj->clone,cloned_obj
or as a function:
IDL> cloned_obj=your_obj->clone()
Alternatively, CLONE method can be added dynamically to an existing
object, via:
IDL> add_method,'clone',object
Just make sure that there are no CLONE methods in current class or
adjacent inherited parent classes -- or there will be a conflict
Outputs : class with clone method
CALLS: ***
CLONE::CLEANUP, CLONE::CLONE, CLONE::CLONE, CLONE::INIT, FREE_VAR, OBJ_CLONE
OBJ_STRUCT, PTR_CLONE, STC_CLONE
History : Written 8 July 2000, D. Zarro, EIT/GSFC
Modified 30 October 2006, Zarro (ADNET/GSFC)
- removed EXECUTE
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : CLONE_VAR
Purpose : Clone a variable by saving it to an IDL save file
and then restoring it into a new copy of itself.
Useful for cloning objects, pointers, & structures.
Unnecessary for regular variables.
Category : utility objects pointers
Syntax : IDL> clone=clone_var(variable)
Inputs : VARIABLE = variable to clone
Outputs : CLONE = cloned copy
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EXIST, GET_RID, GET_TEMP_DIR
concat_dir [4]
CALLED BY:
HSI_CALC_IMAGE_ERROR, OBJ_CLONE, PTR_CLONE, STC_CLONE
History : Written 29 Nov 2002, D. Zarro (EER/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
CLOSE_ANACUBE
PURPOSE:
Close ANA data cube opened with OPEN_ANACUBE
CATEGORY:
CALLING SEQUENCE:
close_anacube
INPUTS:
none
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
OUTPUTS:
OPTIONAL OUTPUT PARAMETERS:
CALLED BY:
OPEN_ANACUBE
COMMON BLOCKS:
anacube,anacube_window
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
Mar-99 RDB Written
[Previous]
[Next]
Project : HESSI
Name : CLOSE_LUN
Purpose : Same as FREE_LUN but with error checks
Category : system utility i/o
Syntax : IDL> close_lun,lun
Inputs : LUN = logical unit number to free and close
Outputs : None
Keywords : None
CALLS: ***
SINCE_VERSION [1], SINCE_VERSION [2], is_number [1], is_number [2]
CALLED BY:
ALLOW_GIF, EIS_GET_HDR [1], EIS_GET_HDR [2], FTP__DEFINE, HTTP__DEFINE, MRD_HEAD
PRINT_HTML, RD_ASCII_BYTE, SOCK_OPEN, SSW_LAST_UPDATE, TRACE_JSMOVIE, VALID_FITS
XMLPARSER__DEFINE, db_gbo, ihy_db
History : 6 May 2002, Zarro (L-3Com/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
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
[Previous]
[Next]
Project : SOHO - CDS
Name : CMP_ALL_PRO
Purpose : Compares all procedure files in one path against another.
Explanation :
Use : CMP_ALL_PRO, PATH1, PATH2
Inputs : PATH1 = Primary path to use in the comparison. All the
".pro" files in PATH1 will be compared against their
equivalents (if any) in PATH2.
PATH2 = Secondary path list. This is a character string
listing one or more paths to use in looking for
equivalents of the procedure files found in PATH1.
The format is that used by FIND_WITH_DEF.
Opt. Inputs : None.
Outputs : Messages about which files differ, or are not found, are
printed to the terminal screen.
Opt. Outputs: None.
Keywords : CODE_ONLY = If set, then the FILE_DIFF routine is called to
determine whether or not the routine differs only
in documentation, or in the code as well.
Calls : ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], BREAK_PATH [1], BREAK_PATH [2]
BREAK_PATH [3], CMP_FILES, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], GETTOK [1], GETTOK [2]
GETTOK [3], GETTOK [4], break_file [4], concat_dir [4]
Common : None.
Restrictions: None.
Side effects: None.
Category : Software_management.
Prev. Hist. : None.
Written : William Thompson, GSFC, 30 April 1993.
Modified : Version 1, William Thompson, GSFC, 30 April 1993.
Version 2, William Thompson, GSFC, 21 June 1993.
Modified so that "not found" messages are shorter.
Version 3, William Thompson, GSFC, 21 August 1997
Added keyword CODE_ONLY
Version : Version 3, 21 August 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : CMP_FILES()
Purpose : Checks whether two text files are identical or not.
Explanation : This routine reads in two text files and compares them line by
line to determine if they are different or not, similar to the
Unix routine "cmp".
Use : Result = CMP_FILES( FILENAME1, FILENAME2 )
IF CMP_FILES('file1.pro','file2.pro') EQ 1 THEN $
PRINT,'file1.pro and file2.pro are different'
Inputs : FILENAME1, FILENAME2 are the names of the two files to check
against each other.
Opt. Inputs : None.
Outputs : The result of the function is one of the following values:
0 = The files are identical
1 = The files are different
2 = An error occured
Opt. Outputs: None.
Keywords : CODE_ONLY = If set, then the FILE_DIFF routine is called to
determine whether or not the routine differs only
in documentation, or in the code as well. This is
only applicable to IDL .pro files.
Calls : ***
file_diff
CALLED BY:
CMP_ALL_PRO, CMP_LIBS, CMP_TREES
Common : None.
Restrictions: None.
Side effects: None.
Category : Software_management.
Prev. Hist. : None.
Written : William Thompson, GSFC, 30 April 1993.
Modified : Version 1, William Thompson, GSFC, 30 April 1993
Version 2, William Thompson, GSFC, 21 August 1997
Added keyword CODE_ONLY
Version : Version 2, 21 August 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : CMP_LIBS
Purpose : Compares one IDL library against another.
Explanation : Compares all procedure files in one path against any matches
found in another path. This routine differs from CMP_TREES in
that it does not expect the two libraries to be organized in
the same way. Only procedure files found in the first
directory tree will be used for comparison.
Use : CMP_LIBS, DIR1, PATH2
Inputs : DIR1 = Start of the first directory tree to use in the
comparison. All the files "*.pro" in DIR1 and
subdirectories will be compared against their
equivalents (if any) in the tree given by PATH2.
PATH2 = A path expression for the second library (or set of
libraries. Use a plus sign before any directory to
signal that the tree should be expanded.
Opt. Inputs : None.
Outputs : Messages about which files differ, or are not found, are
printed to the terminal screen.
Opt. Outputs: None.
Keywords : OUTPUT = The name of a file to store the output in. If not
passed, then the output is written to the screen
using /MORE.
FILES = The filenames to compare. If not passed, then
"*.pro" is used. The FILES keyword can be used to
change this to "*.*" for instance.
UNIX = If set, then the Unix "cmp" command is used to do the
comparison, rather than depending on IDL.
CODE_ONLY = If set, then the FILE_DIFF routine is called to
determine whether or not the routine differs only
in documentation, or in the code as well. This is
only applicable to IDL .pro files. Ignored if
/UNIX is set.
DIFFER_ONLY = If set, then don't print any messages about files
which are not found in the second library.
Calls : ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CMP_FILES, CONCAT_DIR [1]
CONCAT_DIR [2], CONCAT_DIR [3], FILEPATH, FIND_ALL_DIR [1], FIND_ALL_DIR [2]
FIND_ALL_DIR [3], FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3]
break_file [4], concat_dir [4]
Common : None.
Restrictions: None.
Side effects: None.
Category : Software_management.
Prev. Hist. : None.
Written : William Thompson, GSFC, 26 May 1995
Modified : Version 1, William Thompson, GSFC, 26 May 1995
Version 2, William Thompson, GSFC, 21 August 1997
Added keyword CODE_ONLY
Version 3, William Thompson, GSFC, 17 February 1998
Added /NOCURRENT to FIND_WITH_DEF call
Version : Version 3, 17 February 1998
[Previous]
[Next]
Project : SOHO - CDS
Name : CMP_TREES
Purpose : Compares all procedure files in one path against another.
Explanation : Compares all procedure files in one path against the
corresponding files in another parallel path. This routine
differs from CMP_LIBS in that the two trees are expected to be
identically structured. If a routine is found in a particular
directory in the first tree, then it is expected to be in same
directory in the second tree.
Use : CMP_TREES, DIR1, DIR2
Inputs : DIR1 = Start of the first directory tree to use in the
comparison. All the files "*.pro" in DIR1 and
subdirectories will be compared against their
equivalents (if any) in the tree starting with DIR2.
DIR2 = Start of the second path list.
Opt. Inputs : None.
Outputs : Messages about which files differ, or are not found, are
printed to the terminal screen.
Opt. Outputs: None.
Keywords : OUTPUT = The name of a file to store the output in. If not
passed, then the output is written to the screen
using /MORE.
FILES = The filenames to compare. If not passed, then
"*.pro" is used. The FILES keyword can be used to
change this to "*.*" for instance.
UNIX = If set, then the Unix "cmp" command is used to do the
comparison, rather than depending on IDL.
QUOTED = If set, then filenames will be quoted. When used
with /UNIX, then gets around problem with embedded
blanks in filenames.
CODE_ONLY = If set, then the FILE_DIFF routine is called to
determine whether or not the routine differs only
in documentation, or in the code as well. This is
only applicable to IDL .pro files. Ignored if
/UNIX is set.
Calls : ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CMP_FILES, CONCAT_DIR [1]
CONCAT_DIR [2], CONCAT_DIR [3], FILEPATH, FIND_ALL_DIR [1], FIND_ALL_DIR [2]
FIND_ALL_DIR [3], break_file [4], concat_dir [4]
Common : None.
Restrictions: None.
Side effects: None.
Category : Software_management.
Prev. Hist. : None.
Written : William Thompson, GSFC, 31 May 1994
Modified : Version 1, William Thompson, GSFC, 31 May 1994
Version 2, William Thompson, GSFC, 13 June 1994
Added keyword FILES. Changed FILENAME to OUTPUT.
Added keyword UNIX.
Version 3, William Thompson, GSFC, 15 June 1994
Changed so that output is the same, regardless of
whether or not the UNIX keyword is set.
Version 4, William Thompson, GSFC, 31 March 1995
Changed so that only the directories where differences
are found are printed out.
Version 5, William Thompson, GSFC, 14 April 1995
Made compatible with VMS.
Version 6, William Thompson, GSFC, 21 August 1997
Added keyword CODE_ONLY
Version 7, William Thompson, GSFC, 27 July 2004
Added keyword QUOTED
Version : Version 7, 27 July 2004
[Previous]
[Next]
NAME:
CMPS_FORM
PURPOSE:
This function puts up a form the user can configure a PostScript
device driver. The function result (if the user selects either the
ACCEPT or CREATE FILE buttons) can be sent directly to the DEVICE
procedure by means of its _Extra keyword. User's predefined
configurations may be retrieved from a common block.
AUTHOR:
Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
craigm@lheamail.gsfc.nasa.gov
$Id: cmps_form.pro,v 1.5 2004/10/03 09:40:08 craigm Exp $
Based almost entirely on, but a totally revamped version of, CMPS_FORM by
FANNING SOFTWARE CONSULTING (David Fanning Ph.D.) http://www.dfanning.com
MAJOR TOPICS:
Device Drivers, Hardcopy Output, PostScript Output
CALLED BY:
ATV
PROCEDURE:
This is a pop-up form widget. It is a modal or blocking widget.
Keywords appropriate for the PostScript DEVICE command are returned.
Use your LEFT mouse button to move the "Plot Window" around the page.
Use your RIGHT mouse button to draw your own "Plot Window" on the page.
HELP:
formInfo = CMPS_FORM(/Help)
CALLING SEQUENCE:
formInfo = CMPS_FORM(xoffset, yoffset, Cancel=cancelButton)
OPTIONAL INPUTS:
XOFFSET -- Optional xoffset of the top-level base of cmps_form. Default is
to try to center the form on the display.
YOFFSET -- Optional yoffset of the top-level base of cmps_form. Default is
to try to center the form on the display.
INPUT KEYWORD PARAMETERS:
BITS_PER_PIXEL -- The initial configuration of the bits per pixel button.
BLOCKING -- Set this keyword to make this a blocking widget under IDL 5.0.
(All widget programs block under IDL 4.0.)
COLOR -- The initial configuration of the color switch.
DEFAULTS -- A stucture variable of the same type and structure as the
RETURN VALUE of cmps_form. It will set initial conditions. This makes
it possible to start cmps_form up again with the same values it had the
last time it was called. For example:
mysetup = cmps_form()
newsetup = cmps_form(Defaults=mysetup)
ENCAPSULATED -- The initial configuration of the encapsulated switch.
FILENAME -- The initial filename to be used on the form.
HELP -- Prints a helpful message in the output log.
INCHES -- The initial configuration of the inches/cm switch.
INITIALIZE -- If this keyword is set, the program immediately returns the
"localdefaults" structure. This gives you the means to configue the
PostScript device without interrupting the user.
SELECT -- used only when INITIALIZE is set. Set SELECT to a
string which identifies the predefined configuration to
be returned by cmps_form when INITIALIZE is set. This is
a convenient way to select a predefined config
non-interactively.
LANDSCAPE -- The initial configuration of the landscape/portrait switch.
LOCALDEFAULTS -- A structure like the DEFAULTS structure. If specified,
then it is added as a predefined configuration entry called "Local".
See below for a further discussion of predefined configurations.
PREDEFINED -- An alternate way to specify predefined
configurations. Pass an array of structures to
populate the "predefined" dropbox in the
dialog. This array, if specified, overrides the the
common block technique.
XOFFSET -- The initial XOffSet of the PostScript window.
YOFFSET -- The initial YOffSet of the PostScript window.
XSIZE -- The initial XSize of the PostScript window.
YSIZE -- The initial YSize of the PostScript window.
ASPECT -- The aspect ratio of the window (Y/X). This keyword can
substitute for one of XSIZE or YSIZE.
PRESERVE_ASPECT -- Set this keyword if you want to hold the
aspect ratio constant.
PAPERSIZE -- If set, allows user to specify the size of the paper
media to be printed on, as a scalar string. NOTE:
this specification cannot be passed to DEVICE, but
can be selected for completeness's sake. Default is
'Letter'.
MARGINSIZE -- Size of the margins on all sides. Default is 0.25 inches.
When MARGINSIZE is non-zero, a graphic cannot directly
abut the edge of the page. This is normally a good thing,
since there is often a non-printable region which borders
the page.
DEFAULTPAPER -- Default paper size to use, when it is unspecified
in a predefined, "local", or "default"
configuration. This value also overrides any
configuration from common blocks. European users
will probably set this to 'A4'.
PARENT -- if this widget is invoked by another widget program,
then this keyword parameter must be set to the top level
widget which is to serve as the group leader. Failure
to do so will result in unexpected behavior. IDL 4
programs do not need to pass this parameter. Default:
NONE.
OUTPUT KEYWORD PARAMETERS
CANCEL -- This is an OUTPUT keyword. It is used to check if the user
selected the "Cancel" button on the form. Check this variable rather
than the return value of the function, since the return value is designed
to be sent directly to the DEVICE procedure. The varible is set to 1 if
the user selected the "Cancel" button. Otherwise, it is set to 0.
CREATE -- This output keyword can be used to determine if the user
selected the 'Create File' button rather than the 'Accept' button.
The value is 1 if selected, and 0 otherwise.
PAPERSIZE -- If set to a named variable, any newly selected paper
size is returned in that variable.
XPAGESIZE -- Size of paper in "X" dimension, in units given by
the returned config structure.
YPAGESIZE -- Size of paper in "Y" dimension, in units given by
the returned config structure.
PAGEBOX -- specifies the page rectangle relative to the plot
window, in normalized units. A 4-vector of the form
[XLL, YLL, XUR, YUR] is returned, giving the positions
of the lower left (LL) and upper right (UR) corners of
the page with respect to the plot window. Thus, the
following command:
PLOT, x, y, position=PAGEBOX
will construct a graphic whose plot region exactly
fills the page (with no margin around the edges).
Naturally, the page is usually larger than the
graphics window, so the normalized coordinates will
usually fall outside the range [0,1].
However, the bounding box constructed by the
Postscript driver includes only the graphics window.
Anything drawn outside of it may be clipped or
discarded.
RETURN VALUE:
formInfo = { cmps_form_INFO, $
xsize:0.0, $ ; The x size of the plot
xoff:0.0, $ ; The x offset of the plot
ysize:0.0, $ ; The y size of the plot
yoff:0.0 $ ; The y offset of the plot
filename:'', $ ; The name of the output file
inches:0 $ ; Inches or centimeters?
color:0, $ ; Color on or off?
bits_per_pixel:0, $ ; How many bits per image pixel?
encapsulated:0,$ ; Encapsulated or regular PostScript?
isolatin1:0,$ ; Encoded with ISOLATIN1?
landscape:0 } ; Landscape or portrait mode?
USAGE:
The calling procedure for this function in a widget program will
look something like this:
info.ps_config = cmps_form(/Initialize)
formInfo = cmps_form(Cancel=canceled, Create=create, $
Defaults=info.ps_config)
IF NOT canceled THEN BEGIN
IF create THEN BEGIN
thisDevice = !D.Name
Set_Plot, "PS"
Device, _Extra=formInfo
Enter Your Graphics Commands Here!
Device, /Close
Set_Plot, thisDevice
info.ps_config = formInfo
ENDIF ELSE
info.ps_config = formInfo
ENDIF
MAJOR FUNCTIONS and PROCEDURES:
None. Designed to work originally in conjunction with XWindow, a
resizable graphics window. [ NOTE: this modified version of
cmps_form, by Craig Markwardt, is incompatible with the original
version of XWINDOW. ]
MODIFICATION HISTORY:
Based on cmps_form of : David Fanning, RSI, March 1995.
Major rewrite by: Craig Markwardt, October 1997.
- Drawing and updating of form and sample box are now modular
- Option of storing more than one predefined postscript configuration
- Selection of paper size by name
- Access to predfined configurations through (optional) common
block
Several additions, CM, April 1998 VERSION CM2.0
- better integration of paper sizes throughout program.
Predefined configurations now also know about paper.
- allow passing predefined configurations instead of using
common block
- addition of ISOLATIN selection, and streamlining of dialog
appearance
Fixed bug in INITIALIZE w.r.t. paper sizes, CM, Nov 1998
Added SELECT keyword, CM, 09 Dec 1998
Added Parent keyword to allow modal widgets in IDL 5, 19 Jan 1999
Added "Choose" button for filename selection, 19 Sep 1999
Added ability to program different button names, 19 Sep 1999
Added ASPECT and PRESERVE_ASPECT, based on work by Aaron Barth, 18
Oct 1999
Removed NOCOMMON documentation and logic, 19 Oct 1999, CM
Added aspect to cmps_form_numevents (per Aaron Barth), 18 Oct 1999
Corrected small bug under Initialize keyword (inches), 18 Oct 1999
Made call to *_pscoord more consistent, 18 Oct 1999
Added XPAGESIZE, YPAGESIZE and PAGEBOX keywords, 19 Oct 1999
Small cosmetic cleanup, CM, 01 Feb 2000
Fix for IDL 5.5's handling of structures with arrays, CM, 11 Dec 2001
Replaced obsolete PICKFILE call with DIALOG_PICKFILE, Jeff Guerber,
24 Sep 2004
Transfer DEFAULTS and LOCALDEFAULTS values via STRUCT_ASSIGN,/NOZERO
instead of EXECUTE, Jeff Guerber, 24 Sep 2004.
Set CANCELBUTTON and CREATEBUTTON immediately on entry, so they're
defined even if user kills the window, Jeff Guerber, 24 Sep 2004.
COMMON BLOCKS:
The user may store frequently used or helpful configurations in a
common block, and cmps_form() will attempt to access them. This
provides a way for the user to have persistent, named,
configurations.
NOTE: this format has changed since the last version. You may
have to quit your IDL session for the changes to take effect
properly. If you have place a predefined configuration in your
startup file, you should review the new format.
COMMON CMPS_FORM_CONFIGS, cmps_form_DEFAULT_PAPERSIZE, $
cmps_form_STDCONFIGS
cmps_form_DEFAULT_PAPERSIZE - a string designating the default
paper size, when none is given.
The predefined configurations
offerred by this program will
respect the default value. (See
also the DEFAULTPAPER keyword.)
cmps_form_STDCONFIGS - An array of cmps_form_CONFIG structures,
each containing information about one
predefined configuration, such as its
name and size of paper. Each "config"
element is a cmps_form_INFO structure,
which contains the actual postscript
configuration.
See the IDL source code cmps_form_LOAD_CONFIGS for an example of how
to make a list of configurations. One possibility would be to
declare and populate the common block from within the user's
start-up script, allowing the same configurations to appear in
every session.
cmps_form() takes its initial list of configurations from this
common block if it exists. A default list is provided ala the
procedure cmps_form_LOAD_CONFIGS. Any modifications that take place
during the cmps_form() widget session are not transferred back to
the common block upon return. It might be useful to be able to do
this, through some form of 'save' procedure.
Also, if the PREDEFINED keyword is used, then the common block is
not consulted.
$Id: cmps_form.pro,v 1.5 2004/10/03 09:40:08 craigm Exp $
[Previous]
[Next]
NAME:
CNTRD
PURPOSE:
Compute the centroid of a star using a derivative search
EXPLANATION:
CNTRD uses an early DAOPHOT "FIND" centroid algorithm by locating the
position where the X and Y derivatives go to zero. This is usually a
more "robust" determination than a "center of mass" or fitting a 2d
Gaussian if the wings in one direction are affected by the presence
of a neighboring star.
CALLING SEQUENCE:
CNTRD, img, x, y, xcen, ycen, [ fwhm , /KEEPCENTER, /SILENT, /DEBUG
EXTENDBOX = ]
INPUTS:
IMG - Two dimensional image array
X,Y - Scalar or vector integers giving approximate integer stellar
center
OPTIONAL INPUT:
FWHM - floating scalar; Centroid is computed using a box of half
width equal to 1.5 sigma = 0.637* FWHM. CNTRD will prompt
for FWHM if not supplied
OUTPUTS:
XCEN - the computed X centroid position, same number of points as X
YCEN - computed Y centroid position, same number of points as Y,
floating point
Values for XCEN and YCEN will not be computed if the computed
centroid falls outside of the box, or if the computed derivatives
are non-decreasing. If the centroid cannot be computed, then a
message is displayed and XCEN and YCEN are set to -1.
OPTIONAL OUTPUT KEYWORDS:
/SILENT - Normally CNTRD prints an error message if it is unable
to compute the centroid. Set /SILENT to suppress this.
/DEBUG - If this keyword is set, then CNTRD will display the subarray
it is using to compute the centroid.
EXTENDBOX = {non-negative positive integer}. CNTRD searches a box with
a half width equal to 1.5 sigma = 0.637* FWHM to find the
maximum pixel. To search a larger area, set EXTENDBOX to
the number of pixels to enlarge the half-width of the box.
Default is 0; prior to June 2004, the default was EXTENDBOX= 3
/KeepCenter = By default, CNTRD finds the maximum pixel in a box
centered on the input X,Y coordinates, and then extracts a new
box about this maximum pixel. Set the /KeepCenter keyword
to skip then step of finding the maximum pixel, and instead use
a box centered on the input X,Y coordinates.
PROCEDURE:
Maximum pixel within distance from input pixel X, Y determined
from FHWM is found and used as the center of a square, within
which the centroid is computed as the value (XCEN,YCEN) at which
the derivatives of the partial sums of the input image over (y,x)
with respect to (x,y) = 0. In order to minimize contamination from
neighboring stars stars, a weighting factor W is defined as unity in
center, 0.5 at end, and linear in between
RESTRICTIONS:
(1) Does not recognize (bad) pixels. Use the procedure GCNTRD.PRO
in this situation.
(2) DAOPHOT now uses a newer algorithm (implemented in GCNTRD.PRO) in
which centroids are determined by fitting 1-d Gaussians to the
marginal distributions in the X and Y directions.
(3) The default behavior of CNTRD changed in June 2004 (from EXTENDBOX=3
to EXTENDBOX = 0).
(4) Stone (1989, AJ, 97, 1227) concludes that the derivative search
algorithm in CNTRD is not as effective (though faster) as a
Gaussian fit (used in GCNTRD.PRO).
MODIFICATION HISTORY:
Written 2/25/86, by J. K. Hill, S.A.S.C., following
algorithm used by P. Stetson in DAOPHOT.
Allowed input vectors G. Hennessy April, 1992
Fixed to prevent wrong answer if floating pt. X & Y supplied
W. Landsman March, 1993
Convert byte, integer subimages to float W. Landsman May 1995
Converted to IDL V5.0 W. Landsman September 1997
Better checking of edge of frame David Hogg October 2000
Avoid integer wraparound for unsigned arrays W.Landsman January 2001
Handle case where more than 1 pixel has maximum value W.L. July 2002
Added /KEEPCENTER, EXTENDBOX (with default = 0) keywords WL June 2004
[Previous]
[Next]
PROJECT:
SOHO
NAME:
CNVT_COORD()
PURPOSE:
Conversion between any 2 of 4 coord systems for solar images
EXPLANATION:
For image displaying, especially for the solar images, there
can be at least four coordinate systems involved, and they are:
1. Device coordinate system, in device pixels
2. Data (image) coordinate system, in data pixels (base 1)
3. Solar disk coordinate system, in arc seconds
4. Heliographic coordinate system, in degrees
This routine can do the conversion between any two of
them. For the solar disk system (with origin at the disk
center), the positive directions of the X and Y axes point to
the west limb and north limb, respectively.
CALLING SEQUENCE:
Result = CNVT_COORD(xx [, yy], csi=csi, from=from, to=to)
INPUTS:
XX -- X coordinates of points to be converted. Scalar or
vector if YY is passed; if YY is not passed,
XX must be either 2-element vector or Nx2 array.
Depending on the coordinate system, values of XX can be
pixel number in X direction for device system (1) or
data (image) system (2), or Solar X in arcsec in solar
disk system (3), or latitude in degrees for
heliographic system (4).
CSI -- Coordinate system information structure that contains some
basic information of the coordinate systems
involved. For more information about CSI, take a look
at itool_new_csi.pro
CALLED BY:
CURSOR_INFO, EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], EIS_IMAGE_TOOL_EVENT [1]
EIS_IMAGE_TOOL_EVENT [2], EIS_ITOOL_PTOOL [1], EIS_ITOOL_PTOOL [2], IMAGE_TOOL
IMAGE_TOOL_EVENT, ITOOL2MAP, ITOOL_DISP_ROT, ITOOL_DRAW, ITOOL_IMG_MATCH
ITOOL_LIMBFITTER, ITOOL_PTOOL, ITOOL_RANGE, ITOOL_SELECT_IMG, MAKE_AUTO_FIT
MAKE_MANUAL_FIT, MK_LIMBFIT_BS, MK_POINT_BASE, ROT_SUBIMAGE, UPDATE_FITLIMB
Note: Units used for CRVAL1 and CRVAL2 are arc seconds in
case of solar images. If the reference point is
the solar disk center, CRVAL1 = CRVAL2 = 0.0. The
reference point can also be the first pixel of
the image (i.e., the pixel on the lower-left
corner of the image).
FROM -- Code for the original coordinate system (see explanation)
TO -- Code for the new coordinate system to be converted
to. Possible values are the same as those of FROM
OPTIONAL INPUTS:
YY -- Y coordinates of points to be converted. Scalar or
vector; must have the same number of elements as XX
Depending on the coordinate system, values of YY can be
pixel number in Y direction for device system (1) or
data (image) system (2), or Solar Y in arcsec in solar
disk system (3), or longitude in degrees for
heliographic system (4).
OUTPUTS:
RESULT -- A Nx2 array, containing new coordinates;
refer to the input description of XX (and YY) for returned
values for different coordinate systems. A scalar
value of -1 will be returned for a non-valid
conversion or wrong type of data.
OPTIONAL OUTPUTS:
OFF_LIMB -- Flag which is true if the coordinates are beyond
the solar limb. Only used for converting to the
heliographic system
KEYWORD PARAMETERS:
DATE -- date in CCSDS or ECS time format; required for
conversion between heliographic coordinate system to
or from other system. If not passed, CSI.DATE_OBS
will be used.
CALLS: ***
ARCMIN2HEL, CNVT_1TO3, CNVT_2TO3, HEL2ARCMIN [1], HEL2ARCMIN [2]
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
HISTORY:
Version 1, November 16, 1994, Liyun Wang, GSFC/ARC, Written.
Version 2, August 28, 1996, Liyun Wang, NASA/GSFC
Used ROUND (instead of FIX) to get coordinates for device
and data systems
Version 3, August 13, 1997, Liyun Wang, NASA/GSFC
Made conversion from 1 to 3 more accurate especially when
showing images with less pixels
Made DATE as optional keyword.
Version 4, September 2, 1997, Liyun Wang, NASA/GSFC
Modified to use column major array for I/O.
VERSION:
Version 4, September 2, 1997
[Previous]
[Next]
NAME:
CO_ABERRATION
PURPOSE:
Calculate changes to Ra and Dec due to "the effect of aberration",
EXPLANATION:
as described in Meeus, Chap 23.
CALLING SEQUENCE:
co_aberration, jd, ra, dec, d_ra, d_dec, [EPS = ]
INPUTS
jd : Julian Date [scalar or vector]
ra, dec : Arrays (or scalars) of the ra and dec's in degrees
CALLED BY:
EQ2HOR, HOR2EQ
Note: if jd is a vector, ra and dec MUST be vectors of the same length.
OUTPUTS
d_ra, d_dec: the corrections to ra and dec due to aberration (must then
be added to ra and dec to get corrected values).
OPTIONAL INPUT KEYWORD:
eps : set this to the true obliquity of the ecliptic (in radians), or
it will be set for you if you don't know it (in that case, set it to
an empty variable).
CALLS: ***
NUTATE, SUNPOS, TEN
EXAMPLE:
Compute the change in RA and Dec of Theta Persei (RA = 2h46m,11.331s, Dec =
49d20',54.54" on 2028 Nov 13.19 TD
IDL> jdcnv,2028,11,13,.19*24,jd ;Get Julian date
IDL> co_aberration,jd,ten(2,46,11.331)*15,ten(49,20,54.54),d_ra,d_dec
==> d_ra = 30.045" d_dec = 6.697"
NOTES:
These formula are from Meeus, Chapters 23. Accuracy is much better than 1
arcsecond.
REVISION HISTORY:
Written, June 2002, Chris O'Dell, U. of Wisconsin
[Previous]
[Next]
NAME:
CO_NUTATE
PURPOSE:
Calculate changes in RA and Dec due to nutation of the Earth's rotation
EXPLANATION:
Calculates necessary changes to ra and dec due to
the nutation of the Earth's rotation axis, as described in Meeus, Chap 23.
Uses formulae from Astronomical Almanac, 1984, and does the calculations
in equatorial rectangular coordinates to avoid singularities at the
celestial poles.
CALLING SEQUENCE:
CO_NUTATE, jd, ra, dec, d_ra, d_dec, [EPS=, D_PSI =, D_EPS = ]
INPUTS
JD: Julian Date [scalar or vector]
RA, DEC : Arrays (or scalars) of the ra and dec's of interest
CALLED BY:
EQ2HOR, HOR2EQ
Note: if jd is a vector, ra and dec MUST be vectors of the same length.
OUTPUTS:
d_ra, d_dec: the corrections to ra and dec due to nutation (must then
be added to ra and dec to get corrected values).
OPTIONAL OUTPUT KEYWORDS:
EPS: set this to a named variable that will contain the obliquity of the
ecliptic.
D_PSI: set this to a named variable that will contain the nutation in the
longitude of the ecliptic
D_EPS: set this to a named variable that will contain the nutation in the
obliquity of the ecliptic
CALLS: ***
NUTATE
EXAMPLE:
(1) Example 23a in Meeus: On 2028 Nov 13.19 TD the mean position of Theta
Persei is 2h 46m 11.331s 49d 20' 54.54". Determine the shift in
position due to the Earth's nutation.
IDL> jd = JULDAY(11,13,2028,.19*24) ;Get Julian date
IDL> CO_NUTATE, jd,ten(2,46,11.331)*15.,ten(49,20,54.54),d_ra,d_dec
====> d_ra = 15.843" d_dec = 6.217"
PROCEDURES USED:
NUTATE
REVISION HISTORY:
Written Chris O'Dell, 2002
Vector call to NUTATE W. Landsman June 2002
[Previous]
[Next]
NAME:
CO_REFRACT()
PURPOSE:
Calculate correction to altitude due to atmospheric refraction.
DESCRIPTION:
CO_REFRACT can calculate both apparent altitude from observed altitude and
vice-versa.
CALLING SEQUENCE:
new_alt = CO_REFRACT(old_alt, [ ALTITUDE= , PRESSURE= , $
TEMPERATURE= , /TO_OBSERVED , EPSILON= ])
INPUT:
old_alt - Observed (apparent) altitude, in DEGREES. (apparent if keyword
/TO_OBSERVED set). May be scalar or vector.
OUTPUT:
Function returns apparent (observed) altitude, in DEGREES. (observed if
keyword /TO_OBSERVED set). Will be of same type as input
altitude(s).
OPTIONAL KEYWORD INPUTS:
ALTITUDE : The height of the observing location, in meters. This is
only used to determine an approximate temperature and pressure,
if these are not specified separately. [default=0, i.e. sea level]
PRESSURE : The pressure at the observing location, in millibars.
TEMPERATURE: The temperature at the observing location, in Kelvin.
EPSILON: When keyword /TO_OBSERVED has been set, this is the accuracy
to obtain via the iteration, in arcseconds [default = 0.25
arcseconds].
/TO_OBSERVED: Set this keyword to go from Apparent->Observed altitude,
using the iterative technique.
Note, if altitude is set, but temperature or pressure are not, the
program will make an intelligent guess for the temperature and pressure.
DESCRIPTION:
Because the index of refraction of air is not precisely 1.0, the atmosphere
bends all incoming light, making a star or other celestial object appear at
a slightly different altitude (or elevation) than it really is. It is
important to understand the following definitions:
Observed Altitude: The altitude that a star is SEEN to BE, with a telescope.
This is where it appears in the sky. This is always
GREATER than the apparent altitude.
Apparent Altitude: The altitude that a star would be at, if *there were no
atmosphere* (sometimes called "true" altitude). This is
usually calculated from an object's celestial coordinates.
Apparent altitude is always LOWER than the observed
altitude.
Thus, for example, the Sun's apparent altitude when you see it right on the
horizon is actually -34 arcminutes.
This program uses couple simple formulae to estimate the effect for most
optical and radio wavelengths. Typically, you know your observed altitude
(from an observation), and want the apparent altitude. To go the other way,
this program uses an iterative approach.
CALLS: ***
CO_REFRACT_FORWARD
CALLED BY:
EQ2HOR, HOR2EQ
EXAMPLE:
The lower limb of the Sun is observed to have altitude of 0d 30'.
Calculate the the true (=apparent) altitude of the Sun's lower limb using
mean conditions of air pressure and temperature
IDL> print, co_refract(0.5) ===> 0.025degrees (1.55')
WAVELENGTH DEPENDENCE:
This correction is 0 at zenith, about 1 arcminute at 45 degrees, and 34
arcminutes at the horizon FOR OPTICAL WAVELENGTHS. The correction is
NON-NEGLIGIBLE at all wavelengths, but is not very easily calculable.
These formulae assume a wavelength of 550 nm, and will be accurate to
about 4 arcseconds for all visible wavelengths, for elevations of 10
degrees and higher. Amazingly, they are also ACCURATE FOR RADIO
FREQUENCIES LESS THAN ~ 100 GHz.
It is important to understand that these formulae really can't do better
than about 30 arcseconds of accuracy very close to the horizon, as
variable atmospheric effects become very important.
REFERENCES:
1. Meeus, Astronomical Algorithms, Chapter 15.
2. Explanatory Supplement to the Astronomical Almanac, 1992.
3. Methods of Experimental Physics, Vol 12 Part B, Astrophysics,
Radio Telescopes, Chapter 2.5, "Refraction Effects in the Neutral
Atmosphere", by R.K. Crane.
DEPENDENCIES:
CO_REFRACT_FORWARD (contained in this file and automatically compiled).
AUTHOR:
Chris O'Dell
Univ. of Wisconsin-Madison
Observational Cosmology Laboratory
Email: odell@cmb.physics.wisc.edu
REVISION HISTORY:
version 1 (May 31, 2002)
Update iteration formula, W. Landsman June 2002
Corrected slight bug associated with scalar vs. vector temperature and
pressure inputs. 6/10/2002
Fixed problem with vector input when /TO_OBSERVED set W. Landsman Dec 2005
[Previous]
[Next]
Project : Hinode/EIS
Name : COALIGN_FITS
Purpose : coalign image arrays from two FITS files
Category : imaging
Syntax : IDL> coalign_fits,fits1,fits2,data1,data2
Inputs : FITS1, FITS2 = FITS file names
Outputs : DATA1 = image array from first file
DATA2 = coaligned image array from second file
CALLS: ***
COREG_MAP, FITS2MAP [1], FITS2MAP [2], IS_STRING
History : Written 23 September 2006, D. Zarro (ADNET/GSFC)
First IDL program post-Hinode launch.
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
collexc
PURPOSE:
Compute effective excitation rate coefficients for a given Temperature
in units of cm^3 s-1
CALLING SEQUENCE:
collexc,ato_data,Te6,wave,stage,exrate
The line intensity is I (ph cm-3 s-1) = Ne * Nz * exrate where
Ne (cm-3) and Nz (cm-3) are the electron density and the number density
of the responsible stage.
INPUTS:
ato_data = Structure containing atomic data (returned from rd_atodat)
Te6 = Vector of electron temperatures (MK)
OPTIONAL INPUT KEYWORD:
Dens = Log10(Ne) where Ne = electron density in cm-3
This keyword only has an effect on S XV calculations
OPTIONAL OUTPUT KEYWORD:
qdens = log10(Ne) of returned data
OUTPUTS:
wave = Wavelength (in Ang) of lines
stage = Vector describing ion stage as number of electrons (1=H like)
exrate = Effective excitation rate (cm+3 s-1)
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DSPLINE, GAMINC [1], GAMINC [2]
GAMINC [3], delvarx [5], interp2d [1], interp2d [2], interp2d [3], tbeep [1]
tbeep [2], tbeep [3]
CALLED BY:
bcs_line
RESTRICTIONS:
The density-dependent ratios x/w, y/w, z/w must be in the ato_data
structure if the dens= keyword can have any effect.
HISTORY:
10-sep-93, J. R. Lemen (LPARL), Written
27-oct-93, JRL, Te6 no longer needs to be monotonic
11-mar-94, JRL, Added dens and qdens keywords
[Previous]
[Next]
Project : SOHO - CDS
Name :
COLOR_BAR
Purpose :
Display a color bar on an image display screen.
Explanation :
Unless the optional parameters are set, the user is prompted to enter
in where the color bar should be placed.
Use :
COLOR_BAR [, ARRAY ]
COLOR_BAR, [ ARRAY, ] MX, MY, IX, IY
COLOR_BAR, [ ARRAY, ] X1, X2, Y1, Y2, /NORMAL
Inputs :
None required.
Opt. Inputs :
ARRAY = Image array to use in determining the scale.
One of the following two sets of parameters can be used to specify the
position of the color bar. Otherwise, the color bar can be positioned
interactively.
MX, MY = Dimensions of color bar, in device coordinates
IX, IY = Position of lower left-hand corner of color bar.
or
X1, X2 = Position of the left and right edges of the color bar, in
normalized coordinates. Requires the /NORMAL keyword to be
set.
Y1, Y2 = Position of the bottom and top edges of the color bar, in
normalized coordinates.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
NORMAL = If set, then the normalized positioning option is selected.
COLOR = Color used for drawing the box around the color bar.
MAX = The maximum value of ARRAY to be considered in scaling the
color bar, as used by BYTSCL. The default is either the
highest color index available, or the value set by SETFLAG.
MIN = The minimum value of ARRAY to be considered in scaling the
color bar, as used by BYTSCL. The default is either zero
or the value set by SETFLAG.
TOP = The maximum value of the scaled color bar, as used by
BYTSCL. The default is !D.TABLE_SIZE-1.
BOTTOM = The minimum value of the scaled color bar, as used by
BYTSCL. The default is 0.
VELOCITY = If set, then the image is scaled using FORM_VEL as a
velocity image. Can be used in conjunction with COMBINED
keyword. Ignored if NOSCALE is set.
COMBINED = Signals that the image is to be displayed in one of two
combined color tables. Can be used by itself, or in
conjunction with the VELOCITY or LOWER keywords.
LOWER = If set, then the image is placed in the lower part of the
color table, rather than the upper. Used in conjunction
with COMBINED keyword.
MISSING = Value flagging missing pixels. Used when passing ARRAY to
help determine the scale.
ABOVE = If set, and the color bar is horizontal, then the axis label
is drawn above the color bar rather than below.
RIGHT = If set, and the color bar is vertical, then the axis label
is drawn to the right of the color bar, instead of the left.
BSCALED = Returns the bytescaled image passed to the TV command.
TITLE = Character string label to apply to color bar. Default is
none.
TICKLEN = Length of tick marks. Default is !TICKLEN.
TICKNAME = String array giving the annotation of each tick.
TICKS = Number of major tick intervals to draw.
TICKV = Array of values for each tick mark.
TYPE = If 1, then the scaling is logarithmic. If this option is
used, then the scale must be explicitly set, with the
minimum and maximum values being greater than zero.
Other standard keywords for the AXIS command are also supported.
Calls : ***
EXPAND_TV, GET_IM_KEYWORD, SELECT_BOX, TVAXIS, TVSELECT, TVUNSELECT, WHERE_MISSING
CALLED BY:
HSI_PIXON_IMAGE [1], HSI_PIXON_IMAGE [2], TP_COLBAR, eit_ratio, norh_plot
norh_plot_alpha
Common :
None.
Restrictions:
To get the best results, care must be taken to make the color bar range
match that of the displayed image. The easiest way to do this is to
use SETFLAG,MIN=...,MAX=... to control the range for both displaying
the image and the color bar. Or one can pass the image array to this
routine to calculate the scale from.
In general, the SERTS image display routines use several non-standard
system variables. These system variables are defined in the procedure
IMAGELIB. It is suggested that the command IMAGELIB be placed in the
user's IDL_STARTUP file.
Some routines also require the SERTS graphics devices software,
generally found in a parallel directory at the site where this software
was obtained. Those routines have their own special system variables.
Side effects:
Messages about the size and position of the displayed image are printed
to the terminal screen. This can be turned off by setting !QUIET to 1.
Category :
Utilities, Image_display.
Prev. Hist. :
William Thompson, May 1992.
William Thompson, August 1992, renamed BADPIXEL to MISSING.
William Thompson, September 1992, use COMBINED keyword in place of
INTENSITY.
Written :
William Thompson, GSFC, May 1992.
Modified :
Version 1, William Thompson, GSFC, 14 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 19 October 1994
Added keywords TICKLEN,TICKNAME,TICKS,TICKV,TYPE
Version 3, William Thompson, GSFC, 8 April 1998
Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
Version 4, William Thompson, GSFC, 18 Sep 1998
Version 5, William Thompson, GSFC, 11 November 1999
Added keyword _EXTRA
Version 6, 11-May-2005, William Thompson, GSFC
Handle NaN values
Version 7, 3-Jan-2006, William Thompson, GSFC
Added keyword BOTTOM
Version 8, William Thompson, GSFC, 26-Sep-2006
Added keyword BSCALED
Version :
Version 8, 26-Sep-2006
[Previous]
[Next]
NAME:
COLORBAR
PURPOSE:
The purpose of this routine is to add a color bar to the current
graphics window.
AUTHOR:
FANNING SOFTWARE CONSULTING
David Fanning, Ph.D.
1645 Sheely Drive
Fort Collins, CO 80526 USA
Phone: 970-221-0438
E-mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
CATEGORY:
Graphics, Widgets.
CALLING SEQUENCE:
COLORBAR
INPUTS:
None.
KEYWORD PARAMETERS:
BOTTOM: The lowest color index of the colors to be loaded in
the bar.
CHARSIZE: The character size of the color bar annotations. Default is 1.0.
COLOR: The color index of the bar outline and characters. Default
is !P.Color..
DIVISIONS: The number of divisions to divide the bar into. There will
be (divisions + 1) annotations. The default is 6.
FONT: Sets the font of the annotation. Hershey: -1, Hardware:0, True-Type: 1.
FORMAT: The format of the bar annotations. Default is '(I5)'.
INVERTCOLORS: Setting this keyword inverts the colors in the color bar.
MAXRANGE: The maximum data value for the bar annotation. Default is
NCOLORS.
MINRANGE: The minimum data value for the bar annotation. Default is 0.
MINOR: The number of minor tick divisions. Default is 2.
NCOLORS: This is the number of colors in the color bar.
POSITION: A four-element array of normalized coordinates in the same
form as the POSITION keyword on a plot. Default is
[0.88, 0.10, 0.95, 0.90] for a vertical bar and
[0.10, 0.88, 0.90, 0.95] for a horizontal bar.
;
RANGE: A two-element vector of the form [min, max]. Provides an
alternative way of setting the MINRANGE and MAXRANGE keywords.
RIGHT: This puts the labels on the right-hand side of a vertical
color bar. It applies only to vertical color bars.
TICKNAMES: A string array of names or values for the tick marks.
TITLE: This is title for the color bar. The default is to have
no title.
TOP: This puts the labels on top of the bar rather than under it.
The keyword only applies if a horizontal color bar is rendered.
VERTICAL: Setting this keyword give a vertical color bar. The default
is a horizontal color bar.
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], REVERSE
CALLED BY:
SCATTER3D, XDETECTOR [1], XMAP [1], XMAP [2], xwhisker [1], xwhisker [2]
COMMON BLOCKS:
None.
SIDE EFFECTS:
Color bar is drawn in the current graphics window.
RESTRICTIONS:
The number of colors available on the display device (not the
PostScript device) is used unless the NCOLORS keyword is used.
EXAMPLE:
To display a horizontal color bar above a contour plot, type:
LOADCT, 5, NCOLORS=100
CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $
C_COLORS=INDGEN(25)*4, NLEVELS=25
COLORBAR, NCOLORS=100, POSITION=[0.15, 0.85, 0.95, 0.90]
MODIFICATION HISTORY:
Written by: David W. Fanning, 10 JUNE 96.
10/27/96: Added the ability to send output to PostScript. DWF
11/4/96: Substantially rewritten to go to screen or PostScript
file without having to know much about the PostScript device
or even what the current graphics device is. DWF
1/27/97: Added the RIGHT and TOP keywords. Also modified the
way the TITLE keyword works. DWF
7/15/97: Fixed a problem some machines have with plots that have
no valid data range in them. DWF
12/5/98: Fixed a problem in how the colorbar image is created that
seemed to tickle a bug in some versions of IDL. DWF.
1/12/99: Fixed a problem caused by RSI fixing a bug in IDL 5.2. Sigh... DWF.
3/30/99: Modified a few of the defaults. DWF.
3/30/99: Used NORMAL rather than DEVICE coords for positioning bar. DWF.
3/30/99: Added the RANGE keyword. DWF.
3/30/99: Added FONT keyword. DWF
5/6/99: Many modifications to defaults. DWF.
5/6/99: Removed PSCOLOR keyword. DWF.
5/6/99: Improved error handling on position coordinates. DWF.
5/6/99. Added MINOR keyword. DWF.
5/6/99: Set Device, Decomposed=0 if necessary. DWF.
2/9/99: Fixed a problem caused by setting BOTTOM keyword, but not NCOLORS. DWF.
8/17/99. Fixed a problem with ambiguous MIN and MINOR keywords. DWF
8/25/99. I think I *finally* got the BOTTOM/NCOLORS thing sorted out. :-( DWF.
10/10/99. Modified the program so that current plot and map coordinates are
saved and restored after the colorbar is drawn. DWF.
3/18/00. Moved a block of code to prevent a problem with color decomposition. DWF.
4/28/00. Made !P.Font default value for FONT keyword. DWF.
9/26/00. Made the code more general for scalable pixel devices. DWF.
1/16/01. Added INVERTCOLORS keyword. DWF.
5/11/04. Added TICKNAME keyword. DWF.
[Previous]
[Next]
NAME:
COLORBAR__DEFINE
PURPOSE:
The purpose of this routine is to implement a COLORBAR object
class. The ColorBar is rendered in the direct graphics system.
AUTHOR:
FANNING SOFTWARE CONSULTING
David Fanning, Ph.D.
1645 Sheely Drive
Fort Collins, CO 80526 USA
Phone: 970-221-0438
E-mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
CATEGORY:
Graphics.
CALLING SEQUENCE:
colorbar = Obj_New("COLORBAR")
INPUTS:
All inputs to the program are via keyword parameters.
KEYWORD PARAMETERS:
Background: Background color. This is the color with which the colorbar is
erased. The default color is !P.Background.
Bottom: Bottom color index of colors allocated to colorbar.
Charsize: Character size of annotation. Default is 1.0.
Color: Color of annotation and outline. Default is !P.Color.
Font: Font to use for annotation. Default is -1, Hershey fonts.
Format: Format of annotation. Default is "(F8.2)".
Major: The number of major tick intervals. Default is 5.
Minor: The number of minor tick intervals. Default is 2.
MinusOne: Set this keyword to choose MinusOne keyword on the Congrid command
that resizes the colorbar into the window.
NColors: The number of colors allocated to colorbar. Default is (256 <
!D.N_Colors).
Neighbor: Set to indicate Nearest Neighbor sampling for Congrid. Default is
0 (Bilinear).
Position: The position of colorbar in normalized coordinates. Default for a
horizontal colorbar is [0.15, 0.88, 0.85, 0.95]. Default for a
vertical colorbar is [0.88, 0.15, 0.95, 0.85]. These defaults are
designed for a 400 by 400 window.
Range: The data range on colorbar. Default is [0, 255].
TickLen: The length of tick marks. Default is -0.1
TickV: Locations for the tick marks in data units. This is the same as
the [XY]TickV keyword. Default is to do what IDL would do
normally.
Vertical: Set this keyword if you want a vertical colorbar. Default is
horizontal.
XEraseBox: A five-element vector of X points (normalized) for erasing the
colorbar plot. Normally this keyword will not have to be used.
The program uses the plot REGION for erasing. But larger
character sizes can result in annotation going outside the
region enclosed by the plot. If that is the case, then use this
keyword along with YEraseBox to specify a larger-than-normal
erasure area. The points are sent to the POLYFILL command for
erasing.
POLYFILL, xEraseBox, yEraseBox, /Normal, Color=background
YEraseBox: A five-element vector of Y points (normalized) for erasing the
colorbar plot.
Log: Set this keyword to log-scale the colorbar
OBJECT METHODS:
Draw: This procedure method draws the colorbar in the display window. The
ERASE keyword to this method will erase the current colorbar (by
calling the ERASE method) before drawing the colorbar in the display
window.
colorbar->Draw
Erase: This procedure method erases the colorbar object in the window. It
accomplishes this by performing a POLYFILL in the background color.
This method is primarily useful for interactive graphics display
devices.
colorbar->Erase
GetProperty: This procedure method allows one to obtain the current state
of the object via the keyword parameters listed above.
colorbar->GetProperty, Range=currentRange, Title=currentTitle
Print, currentRange, currentTitle
SetProperty: This procedure method allows one to set the properties of the
colorbar object via the keywords described above. In addition,
a DRAW and ERASE keyword are provided so that the colorbar can
be immediately drawn when the new property is set.
colorbar->SetProperty, Range=[500, 15000], /Erase, /Draw
CALLS: ***
COLORBAR::CLEANUP, COLORBAR::DRAW, COLORBAR::ERASE, COLORBAR::GETPROPERTY
COLORBAR::INIT, COLORBAR::LOADCT, COLORBAR::SETPROPERTY, CONGRID [1]
CONGRID [2], CONGRID [3], LOADCT
COMMON BLOCKS:
None.
SIDE EFFECTS:
The display window is not erased first.
RESTRICTIONS:
None.
EXAMPLE:
To create a colorbar, use it, then destroy it, type:
colorbar = Obj_New("COLORBAR", Title='Colorbar Values', Range=[0,1000],$
Format='(I4)')
Window
LoadCT, 5
colorbar->Draw
colorbar->SetProperty, Range=[0,500], /Erase, /Draw
Obj_Destroy, colorbar
MODIFICATION HISTORY:
Written by: David Fanning, Fanning Software Consulting,
26 November 1998.
Added Horizontal keyword to SetProperty method and fixed problem in
going from Vertical to Horizontal color bars. 29 Nov 1998. DWF.
Added LoadCT method and current color table index to object.
6 December 1998.
Fixed a bug dealing with nearest neighbor resampling. 30 Mar 1999. DWF.
Fixed a bug with how NCOLORS and BOTTOM keywords interacted.
29 Aug 1999. DWF.
10 Oct 99. Modified the program so that current plot and map coordinates
are saved and restored after the colorbar is drawn. DWF.
26 May 2000 Added {XY}TICKV capability to the draw method. This
required adding TickV to the object data structure, and to the
INIT, GetProperty and SetProperty methods.
Changed default tick length to -0.1. DWF (and Jack Saba)
22-May-2003, Kim Tolbert. Added log keyword
06-Nov-2003, Kim Tolbert. If log, ensure that range is >0, but allow less than 1.
[Previous]
[Next]
NAME:
COLORINFO
PURPOSE:
Get information about the color mode for the current IDL session.
CATEGORY:
Color utilities.
CALLING SEQUENCE:
RESULT = COLORINFO()
INPUTS:
None
OPTIONAL INPUTS:
None
KEYWORD PARAMETERS:
QUIET If set, no information is printed on-screen.
(default is to print the color information on-screen).
OUTPUTS:
RESULT A structure containing the color information
RESULT.NCOLORS => Total number of colors available
RESULT.TABLE_SIZE => Size of the color table
RESULT.VISUAL_NAME => Name of the current visual
RESULT.VISUAL_DEPTH => Bit depth of the current visual
RESULT.DECOMPOSED => Decomposed color flag
(0, 1, or 'Unknown')
OPTIONAL OUTPUTS:
None
COMMON BLOCKS:
None
SIDE EFFECTS:
If a window has not been created in this session, this routine
creates (and then deletes) a pixmap window.
RESTRICTIONS:
Only runs on X, Windows, and Macintosh displays.
Only runs under IDL 5.0 and higher.
EXAMPLE:
info = colorinfo()
MODIFICATION HISTORY:
Written by: Liam.Gumley@ssec.wisc.edu
$Id: colorinfo.pro,v 1.2 1999/07/16 18:47:49 gumley Exp $
[Previous]
[Next]
NAME:
COLORSET
PURPOSE:
Select true color (24 bit) if available, or pseudo color (8 bit) visual
consistently on X, Windows, and Macintosh.
CATEGORY:
Startup utilities.
CALLING SEQUENCE:
COLORSET
INPUTS:
None
OPTIONAL INPUTS:
None
KEYWORD PARAMETERS:
RETAIN Specifies the default method used
for backing store when creating new windows.
0 => No backing store
1 => Server or window system performs backing store
2 => Make IDL perform backing store (DEFAULT)
DECOMPOSED Specifies the the way in which graphics
color index values are interpreted when using displays with
decomposed color (TrueColor or DirectColor visuals).
0 = > Color indices given by single 8 bit values (DEFAULT)
1 = > Color indices given by three 8 bit values
PSEUDOCOLOR If set, try selecting PseudoColor (8-bit) mode
(default is to try selecting TrueColor (24-bit) mode).
QUIET If set, no color information is printed
(default is to print the color table size, and number of colors).
OUTPUTS:
None
OPTIONAL OUTPUTS:
None
CALLS: ***
ALLOW_WINDOWS
COMMON BLOCKS:
None
SIDE EFFECTS:
This routine changes the IDL visual for the rest of the IDL session.
RESTRICTIONS:
Only affects X, WIN, and MAC displays.
Only has an effect if run before any windows have been
created, and if no DEVICE commands have been executed.
EXAMPLE:
;Execute the following command immediately after IDL startup.
colorset
MODIFICATION HISTORY:
Written by: Liam.Gumley@ssec.wisc.edu
$Id: colorset.pro,v 1.5 1999/07/16 18:38:51 gumley Exp $
Modified, 12-Dec-01 (Zarro, EITI), added catch error call
18-April-02, (Zarro, NASA/GSFC) - temporarily disabled ALLOW_WINDOWS
18-May-02, (Zarro, NASA/GSFC) - renabled ALLOW_WINDOWS
[Previous]
[Next]
Project : SOHO - CDS
Name :
COMBINE_COLORS
Purpose :
Combines two color tables into one.
Explanation :
Combines two color tables into the lower and upper parts of a combined
color table. To use this color table, scale intensities using
FORM_INT. Alternately, use the /COMBINED and /LOWER keywords with
EXPTV and PUT, which then call FORM_INT and FORM_VEL automatically.
Use :
COMBINE_COLORS
The following example shows how to put one intensity image I1 using
color table #3 next to another image I2 using color table #5.
LOADCT,3 ;Select first color table
COMBINE_COLORS,/LOWER ;Save lower color table
LOADCT,5 ;Select second color table
COMBINE_COLORS ;Combine the color tables
PUT,I1,1,2,/COMBINED,/LOWER ;Display first image on left
PUT,I2,2,2,/COMBINED ;And second image on right
Inputs :
None.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
UPPER = Save the current color table in a common block, to be the
upper part of the combined table. If neither the UPPER nor
LOWER keyword is set, then UPPER is assumed.
LOWER = Save the current color table in a common block, to be
the lower part of the combined table.
DISABLE = If set, then TVSELECT is not used.
Calls : ***
TVSELECT, TVUNSELECT
CALLED BY:
COMBINE_VEL, XLOAD
Common :
COLORS: The IDL color common block.
COMBINE_COL: Used internally to save the two color tables between
calls.
Restrictions:
In general, the SERTS image display routines use several non-standard
system variables. These system variables are defined in the procedure
IMAGELIB. It is suggested that the command IMAGELIB be placed in the
user's IDL_STARTUP file.
Some routines also require the SERTS graphics devices software,
generally found in a parallel directory at the site where this software
was obtained. Those routines have their own special system variables.
Side effects:
The color table is changed so that values in the lower half of the
device range (typically 0-127) use the first color table, and values in
the upper half (typically 128-255) use the second color table. Each
part of the color table has only half the resolution of the original
color tables.
Category :
Utilities, Image_display.
Prev. Hist. :
W.T.T., Feb. 1992, from COMBINE_VEL.
William Thompson, April 1992, changed to use TVLCT,/GET instead of
common block, and added DISABLE keyword.
W.T.T., Sep. 1992. Returned COLORS common block.
William Thompson, Oct 1992, added UPPER keyword, and rewrote to allow
loading the upper and lower common blocks in any order, and to
allow each to be independently reloaded.
Written :
William Thompson, GSFC, February 1992.
Modified :
Version 1, William Thompson, GSFC, 14 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 8 April 1998
Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
Version :
Version 2, 8 April 1998
[Previous]
[Next]
Project : SOHO - CDS
Name : COMBINE_STRUCT
Purpose : Combine two structures
Explanation : Combines two structures by using STRUCT_ASSIGN
to mitigate problems caused by nested anonymous
structures.
Use : NEW_STRUCT=COMBINE_STRUCT(STRUCT1,STRUCT2)
Inputs : STRUCT1,2 = input structures
Outputs : NEW_STRUCT = concatanated structure
Keywords : ERR = err string
NOTAG_CHECK = don't check if tag names match.
NOCHECK = skip input checking
Category : Structure handling
Written : 3-Oct-2000, Dominic Zarro (EIT/GSFC) - to avoid and
handle variable sized tags
Modified : 20-Dec-2002, Zarro (EER/GSFC) - take advantage of relaxed
structure assignment
Contact : dzarro@solar.stanford.edu
CALLS:
[Previous]
[Next]
Project : SOHO - CDS
Name :
COMBINE_VEL
Purpose :
Combines current color table with a velocity color table.
Explanation :
Combines the current color table with the velocity color table as
formed by LOAD_VEL.
The procedure gets the current color tables using TVLCT,/GET, and then
uses LOAD_VEL to get the velocity color table.
To use this color table, scale velocities using FORM_VEL with the
/COMBINED keyword, and scale intensities using FORM_INT. Alternately,
use the /COMBINED and /VELOCITY keywords with EXPTV and PUT, which then
call FORM_INT and FORM_VEL automatically.
Use :
COMBINE_VEL
The following example shows how to put an intensity image I next to its
corresponding velocity image V. Standard color table #3 is used for
the intensity image.
LOADCT,3 ;Select color table for int. image
COMBINE_VEL ;Combine with velocity color table
PUT,I,1,2,/COMBINED ;Display intensity image on left
PUT,V,2,2,/COMBINED,/VELOCITY ;And velocity on right
Inputs :
None.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
REVERSE_SWITCH = If passed, and non-zero, then the red and blue color
tables in the velocity color table are switched.
TURQUOISE = If set, then turquoise is used instead of blue.
GREEN_SWITCH = If set, then red and green are used instead of red
and blue. Ignored if TURQUOISE is set.
LIGHTEN = If set, then some green is added to the blue to
lighten the image. Ignored if TURQUOISE or
GREEN_SWITCH are set.
DISABLE = If set, then TVSELECT not used.
PRELOADED = If set, then a color table preloaded using
COMBINE_VEL or COMBINE_COLORS is combined with the
velocity color table instead of the current table.
Calls : ***
COMBINE_COLORS, LOAD_VEL, TVSELECT, TVUNSELECT
CALLED BY:
XLOAD
Common :
None, but calls COMBINE_COLORS which uses the COLORS and COMBINE_COL
common blocks.
Restrictions:
In general, the SERTS image display routines use several non-standard
system variables. These system variables are defined in the procedure
IMAGELIB. It is suggested that the command IMAGELIB be placed in the
user's IDL_STARTUP file.
Some routines also require the SERTS graphics devices software,
generally found in a parallel directory at the site where this software
was obtained. Those routines have their own special system variables.
Side effects:
The color table is changed so that values in the lower half of the
device range (typically 0-127) represent velocities as formed by the
routine FORM_VEL, and values in the upper half (typically 128-255)
represent intensities. Each part of the color table has only half the
resolution of the original color tables.
Category :
Utilities, Image_display.
Prev. Hist. :
W.T.T., Oct. 1987.
W.T.T., Nov. 1990. Modified for version 2 of IDL.
W.T.T., Jan. 1991. Changed REVERSE_SWITCH to keyword. Added keywords
GREEN_SWITCH and LIGHTEN.
William Thompson, April 1992, changed to use TVLCT,/GET instead of
common block, and added DISABLE keyword.
W.T.T., Sep. 1992. Returned COLORS common block.
William Thompson, Oct 1992, changed to use COMBINE_COLORS, and added
PRELOADED keyword.
Written :
William Thompson, GSFC, October 1987.
Modified :
Version 1, William Thompson, GSFC, 13 May 1993.
Incorporated into CDS library.
Version :
Version 1, 13 May 1993.
[Previous]
[Next]
NAME:
COMDIM
PURPOSE:
Collapse degenerate dimensions of an array.
CATEGORY:
GEN
CALLING SEQUENCE:
Result = COMDIM(Array)
INPUTS:
Array: Array to be collapsed.
OUTPUTS:
Result: Reformed array.
CALLED BY:
DOBASELINE, EIT__DEFINE
RESTRICTIONS:
Use Version 2 function Reform to make Version 1 code compatible.
MODIFICATION HISTORY:
Mod. 05/06/96 by RCJ. Added formal documentation.
[Previous]
[Next]
NAME:
COMDIM2
PURPOSE:
Collapse degenerate dimensions of an array.
CATEGORY:
GEN
CALLING SEQUENCE:
Result = COMDIM(Array)
INPUTS:
Array: Array to be collapsed.
OUTPUTS:
Result: Reformed array.
CALLED BY:
BCS_CLEAN [1], BCS_CLEAN [2], EIT_PARTIAL, FILE_NAME, GT_BDA_MODE [1]
GT_BDA_MODE [2], HSI_FIND_FILE, HSI_SOCK_LIST, MAKE_MAP, PARSE_TIME, SITE__DEFINE
SOCK_FILES, STR_FIND, SYNOP_DEFINE, YMD2DATE, mk_bsa_interv [1], mk_bsa_interv [2]
RESTRICTIONS:
Use Version 2 function Reform to make Version 1 code compatible.
MODIFICATION HISTORY:
Mod. 05/06/96 by RCJ. Added formal documentation.
Mod. 16-Sep-01, Zarro (EITI/GSFC) - collapse single element array to
scalar, e.g, a[1] -> a
[Previous]
[Next]
Project : SOHO - CDS
Name : COMP_BGAUSS
Purpose : Evaluate broadened Gaussian for use in CURVEFIT/CFIT/MCURVEFIT
Explanation : Evaluates a single Gaussian component, plus broadening wings.
The first three parameters have the same meaning as the
Gaussian parameters in the standard GAUSSFIT procedure, i.e.:
G(x) = A0 * EXP(-((x-A1)/A2)^2/2)
The wings are defined as
W(x) = A0 * Alpha / ( ((x-A1)/(Kappa*A2))^2 + 1 )
where Kappa=2*SQRT(2*ALOG(2)) and Alpha is defined as
Alpha = A3 ;x GE A1 (right wing)
Alpha = A3 * A4 ;x LT A1 (left wing)
Thus, A3 is the wing amplitude, and A4 is the left/right
asymmetry. The broadened Gaussian is then defined as
F(x) = (1 - Alpha) * G(x) + W(x)
Use : COMP_BGAUSS,X,A,F [,PDER]
Inputs : As usual for any CURVEFIT function
Opt. Inputs : PDER : Partial derivatives are calculated if parameter is
present
Outputs : F : The evaluated broadened Gaussian at the given points
Opt. Outputs: PDER
Keywords : None.
Calls : None.
CALLED BY:
BGAUSS, VDS_BURNIN_NEW
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : Modified from COMP_GAUSS by S.V.H. Haugan.
Written : William Thompson, GSFC, 05-Jan-1999
Modified : Version 1, 05-Jan-1999, William Thompson, GSFC
Version 2, 26-Mar-1999, William Thompson, GSFC
Corrected bug with extreme parameters--set derivatives
to zero.
Version 3, 26-Jun-2000, William Thompson, GSFC
Corrected bugs in some partial derivatives
Version : Version 3, 26-Jun-2000
[Previous]
[Next]
Project : SOHO, YOHKOH
Name : COMP_FITS_CEN
Purpose : compute XCEN (or YCEN) from FITS standard keywords
Category : imaging, FITS
Explanation :
Syntax : xcen=comp_fits_cen(crpix1,cdelt1,naxis1,crval1)
OR
ycen=comp_fits_cen(crpix2,cdelt2,naxis2,crval2)
CALLS: ***
EXIST, PR_SYNTAX
CALLED BY:
FLIP_MAP, GET_FITS_CEN, ROT_FITS_HEAD, sswstruct_fill [1]
Examples :
Inputs : CRPIX = reference pixel coordinate
CDELT = pixel scaling
NAXIS = pixel dimension of image
Opt. Inputs : CRVAL = reference data coordinate [def=0]
Outputs : CEN = center of FOV in data units
History : Written, 15 November 1998, D.M. Zarro (SM&A)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO, YOHKOH
Name : COMP_FITS_CRPIX
Purpose : Compute CRPIX from FOV center
Category : imaging, FITS
Explanation :
Syntax : crpix=comp_fits_crpix(cen,cdelt,naxis,crval)
CALLS: ***
EXIST, PR_SYNTAX
CALLED BY:
EIT_PARTIAL, FITS WRITER CLASS FOR RHESSI IMAGES, FLIP_MAP, MAP2FITS
MAP__DEFINE, MDI__DEFINE, READ_TRACE_FOV, SPIRIT__DEFINE, map2index, read_trace
ssw_track_fov, sswstruct_fill [1], trace_wave2point
Examples :
Inputs : CEN = data coordinate of FOV center
CDELT = pixel scaling
NAXIS = pixel dimension of image
Opt. Inputs : CRVAL = reference data coordinate [def=0]
Opt. Inputs : None
Outputs : CRPIX = reference pixel coordinate
History : Written, 15 November 1998, D.M. Zarro (SM&A)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO, YOHKOH
Name : COMP_FITS_CRVAL
Purpose : Compute CRVAL from FOV center
Category : imaging, FITS
Explanation :
Syntax : crval=comp_fits_crval(cen,cdelt,naxis,crpix)
CALLS: ***
EXIST, PR_SYNTAX
CALLED BY:
ssw_flare_locator
Examples :
Inputs : CEN = data coordinate of FOV center
CDELT = pixel scaling
NAXIS = pixel dimension of image
Opt. Inputs : CRPIX = reference pixel coordinate [def=0]
Opt. Inputs : None
Outputs : CRVAL = reference pixel coordinate value
History : Written, 15 November 1998, D.M. Zarro (SM&A)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : COMP_GAUSS
Purpose : Evaluate gaussian component for use in CURVEFIT/CFIT/MCURVEFIT
Explanation : Evaluates a single gaussian component. The parameters have the
same meaning as the gaussian parameters in the standard
GAUSSFIT procedure.
Use : COMP_GAUSS,X,A,F [,PDER]
Inputs : As usual for any CURVEFIT function
Opt. Inputs : PDER : Partial derivatives are calculated if parameter is
present
Outputs : F : The evaluated gaussian at the given points
Opt. Outputs: PDER
Keywords : None.
Calls : None.
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 21 January 1997
Modified : Version 2, SVHH, 27 May 1997
Calculating only points where z2 < 1000, to avoid
unnecessary time spent and unnecessary illegal operand
errors.
Version : 2, 27 May 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : COMP_POLY
Purpose : Evaluate polynomial component for fitting.
Explanation : Input coefficients A determine degree of polynomial, otherwise
this is straightforward - see e.g., CURVEFIT for explanations
about this type of function.
Use : COMP_POLY,X,A,F [,PDER]
Inputs : As all CURVEFIT evaluation functions
Opt. Inputs : PDER
Outputs : F : Evaluated function
Opt. Outputs: PDER : Partial derivatives.
Keywords : None.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], POLY
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 21 January 1997
Modified : Not yet
Version : 1, 21 January 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : COMP_PPOLY
Purpose : Evaluate pivoted polynomial component for fitting.
Explanation : The first parameter is the pivot value. The remaining
parameters are the standard parameters for the polynomial. The
result is returned as
A1 + A2*(X-A0) + A3*(X-A0)^2 + ...
The normal usage is to hold A0 constant at a value within the
range of X, while fitting the remaining parameters. Since X-A0
is close to zero, roundoff errors are minimized.
Use : COMP_PPOLY,X,A,F [,PDER]
Inputs : X = The points at which the function should be evaluated.
A = As explained above.
Opt. Inputs : PDER
Outputs : F = Evaluated function
Opt. Outputs: PDER = Partial derivatives.
Keywords : None.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], POLY
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : Modified from COMP_POLY by S.V.H.Haugan, UiO, 21 January 1997
History : Version 1, 17-Feb-2000, William Thompson, GSFC
Version : Version 1, 17-Feb-2000
[Previous]
[Next]
Project : SOHO - CDS
Name : COMP_VOIGT
Purpose : Evaluate Voigt profile for use in CURVEFIT/CFIT/MCURVEFIT
Explanation : Evaluates a single Voigt component. The parameters are
amplitude, line position, doppler width, and rocking width.
The Voigt profile is then evaluated as
PVOIGT, ABS(A3/A2), (x-A1)/A2, H
F(x) = A0 * H(x) / (SQRT(!PI)*A2)
Use : COMP_VOIGT,X,A,F [,PDER]
Inputs : As usual for any CURVEFIT function
Opt. Inputs : PDER : Partial derivatives are calculated if parameter is
present
Outputs : F : The evaluated Voigt profile at the given points
Opt. Outputs: PDER
Keywords : None.
Calls : ***
PVOIGT
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : Modified from COMP_GAUSS by S.V.H. Haugan, and from MVOIGT by
Dominic Zarro.
Written : William Thompson, GSFC, 08-Jan-1999
Modified : Version 1, 12-Jan-1999, William Thompson, GSFC
Version : Version 1, 12-Jan-1999
[Previous]
[Next]
NAME:
COMPARE_STRUCT
PURPOSE:
Compare all matching tag names and return differences
EXPLANATION:
Compare all matching Tags names (except for "except_Tags")
between two structure arrays (may have different struct.definitions),
and return a structured List of fields found different.
CALLING SEQUENCE:
diff_List = compare_struct( struct_A, struct_B [ EXCEPT=, /BRIEF,
/FULL, /NaN, /RECUR_A, /RECUR_B )
INPUTS:
struct_A, struct_B : the two structure arrays to compare.
Struct_Name : for internal recursion use only.
OPTIONAL INPUT KEYWORDS:
EXCEPT = string array of Tag names to ignore (NOT to compare).
/BRIEF = number of differences found for each matching field
of two structures is printed.
/FULL = option to print even if zero differences found.
/NaN = if set, then tag values are considered equal if they
are both set to NaN
/RECUR_A = option to search for Tag names
in sub-structures of struct_A,
and then call compare_struct recursively
for those nested sub-structures.
/RECUR_B = search for sub-structures of struct_B,
and then call compare_struct recursively
for those nested sub-structures.
Note:
compare_struct is automatically called recursively
for those nested sub-structures in both struct_A and struct_B
(otherwise cannot take difference)
OUTPUT:
Returns a structure array describing differences found,
which can be examined using print,diff_List or help,/st,diff_List.
PROCEDURE:
Match Tag names and then use where function on tags.
EXAMPLE:
Find the tags in the !X system variable which are changed after a
simple plot.
IDL> x = !X ;Save original values
IDL> plot, indgen(25) ;Make a simple plot
IDL> help,/str,compare_struct(x,!X) ;See how structure has changed
and one will see that the tags !X.crange and !X.S are changed
by the plot.
MODIFICATION HISTORY:
written 1990 Frank Varosi STX @ NASA/GSFC (using copy_struct)
modif Aug.90 by F.V. to check and compare same # of elements only.
Converted to IDL V5.0 W. Landsman September 1997
Added /NaN keyword W. Landsman March 2004
[Previous]
[Next]
Project : SOHO - CDS
Name : COMPILE_SFIT
Purpose : Write and compile evaluation function for given SFIT
Explanation : Every SFIT corresponds to a specific function that can be
compiled and executed by e.g., MCURVEFIT in to evaluate the
function being fitted. This routine writes and compiles that
function, unless it's already compiled or unless errors
occur.
The output is placed in the directory pointed to by the
environment variable "IDL_COMPILE_DIR", or in the current
directory if IDL_COMPILE_DIR is not set. The directory pointed
to by the environment variable should be in the IDL !path, of
course, and be writable.
NOTE that IDL_COMPILE_DIR should be a *private* directory,
to avoid security problems.
Use : COMPILE_SFIT,SFIT
Inputs : SFIT : "Short" fit structure -- see e.g., MAKE_SFIT_STC
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], SINCE_VERSION [1]
SINCE_VERSION [2], TEST_OPEN, TRIM, WRT_ASCII, concat_dir [4]
CALLED BY:
CFIT
Common : COMPILE_SFIT_COMMON
To circumvent routine_info() bug.
Restrictions: See Explanation for the IDL_COMPILE_DIR, though most problems
are caught and handled correctly, signalling failure by
setting SFIT.COMPILED = 2b
Side effects: Writes an IDL program to IDL_COMPILE_DIR, or to current
directory.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 21 January 1997
Modified : Version 2, SVHH, 2 April 1997
Added CATCH,error to work with demo mode.
Version 3, SVHH, 15 January 1999
Using common block instead of routine_info() to
log successfully compiled functions.
Version : 3, 15 January 1999
[Previous]
[Next]
Project : SOHO - CDS
Name : CONCAT2D()
Purpose : Concatenate two or more 2-d arrays.
Explanation : Concatenate two or more 2-d arrays to produce one output array.
eg if a = intarr(20,25)
b = intarr(20,2)
c = intarr(20,27) then
x = concat3d(a,b,c) will return an array of dimensions (20,54)
Use : IDL> x = concat2d(a,b [,c,d,e] (max of 5 input arrays)
Inputs : a,b,c... input 2-d arrays, the first dimensions of which must
be the same size.
Opt. Inputs : None
Outputs : Function returns the concatenation.
Opt. Outputs: None
Keywords : None
Calls : ***
UNIQ [1], UNIQ [2], UNIQ [3]
CALLED BY:
NORH_PR_EVX [1], NORH_PR_EVX [2], NORP_RD_AVG [1], NORP_RD_AVG [2]
NORP_RD_DAILY [1], NORP_RD_DAILY [2], SEL_LINE_MENU, TOK_RD_DAILY, TYKW_RD_DAILY
Common : None
Restrictions: First dimensions of input arrays must be the same.
Side effects: None
Category : Util, array
Prev. Hist. : None
Written : C D Pike, RAL, 13-May-94
Modified :
Version : Version 1, 13-May-94
[Previous]
[Next]
Project : SOHO - CDS
Name : CONCAT3D()
Purpose : Concatenate two or more 3-d arrays.
Explanation : Concatenate two or more 3-d arrays to produce one output array.
eg if a = intarr(20,25,10)
b = intarr(20,25,12)
c = intarr(20,25,5) then
x = concat3d(a,b,c) will return an array of dimensions (20,25,27)
Use : IDL> x = concat3d(a,b [,c,d,e] (max of 5 input arrays)
Inputs : a,b,c... input 3-d arrays, the first 2 dimensions of which must
have the same size.
Opt. Inputs : None
Outputs : Function returns the concatenation.
Opt. Outputs: None
Keywords : None
Calls : ***
UNIQ [1], UNIQ [2], UNIQ [3]
Common : None
Restrictions: First 2 dimensions of input arrays must be the same.
Side effects: None
Category : Util, array
Prev. Hist. : None
Written : C D Pike, RAL, 13-May-94
Modified :
Version : Version 1, 13-May-94
[Previous]
[Next]
Project : SOHO - CDS
Name :
CONCAT4DOS
Purpose :
Concatenates IDL procedure files for copying to DOS machine.
Explanation :
Concatenates IDL procedure files together into a form suitable for
copying to a DOS machine.
All the .PRO files in the current directory are copied into a special
"dos" subdirectory, with the following changes made:
1. All filenames are truncated to eight characters.
2. All procedure files with names beginning with the same
first eight characters are concatenated together into a
single file.
Use :
CD, directory ;(go to desired directory)
CONCAT4DOS ;or CONCAT4DOS, /SUBDIRECTORIES
Inputs :
None.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
SUBDIRECTORIES = If set, then subdirectories are also recursively
processed.
Calls : ***
ASK, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FDECOMP [1], FDECOMP [2]
FDECOMP [3], break_file [4]
Common :
None.
Restrictions:
None.
Side effects:
A "dos" subdirectory is created. On VMS machines, a temporary command
file called "CONCAT4DOS.COM" is created and then destroyed. On UNIX
machines the temporary file is called "concat4dos.sh".
Category :
Utilities, Operating_system.
Prev. Hist. :
William Thompson, August 1992.
Written :
William Thompson, GSFC, August 1992.
Modified :
Version 1, William Thompson, GSFC, 9 July 1993.
Incorporated into CDS library.
Modified so that a temporary file is created on UNIX machines
as well, to speed up.
Version 2, William Thompson, GSFC, 18 April 1994.
Added SUBDIRECTORIES switch, and copying of documentation (.txt
or .tex) files.
Version :
Version 2, 18 April 1994.
[Previous]
[Next]
Project : SSW
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. Can be also used to append two directory names
Use : IDL> full_name = concat_dir(directory,filename)
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)
Inputs : DIRECTORY the directory path (string)
FILE the basic file name and extension (string)
can be an array of filenames or directory
names
Opt. Inputs : None
Outputs : The function returns the concatenated string. If the file
input is a string array then the output will be a string
array also.
Keywords : DIR -- If set, the second argument is treated as a directory
name instead of a file name (it has no effect if not
under VMS system)
CHECK -- Check the validity of directory name(s) if set
NOTRANSLATE - bypass translation of environmental/logicals
Calls : ***
BREAK_PATH [1], BREAK_PATH [2], BREAK_PATH [3], Bell, CHKLOG [1], CHKLOG [2]
CHK_DIR [1], CHK_DIR [2]
CALLED BY:
ADD_ANOMALY, ADD_PATH [1], ADD_PATH [2], ANDRIL_SXT, ANNOUNCEMENTS, ARR2GIF
BAT_MERGE, BCS, BCS_COMP, BCS_LOAD_CAT, BCS_POINT, BUILD_DRM, CALC_DMM_DR, CALIB_HIST
CAT_DIRECTORY, CDSHEADFITS, CDS_ADEF_PARSEFILE, CDS_AR_OBS, CDS_COMPRESS
CDS_PLAN_BRIEF, CDS_SATURATE, CDS_SLINE, CDS_SLINE_DATA, CDS_SLIT6_BURNIN
CDS_VEL_SLICE [2], CDS_WAVE_CAT, CDS_WAVE_FILES, CD_BUILD_CDROMCAT
CD_DELETE_FILES, CD_DISK_SPACE, CD_FIND_DBASE, CD_LOAD_CDROM, CD_REG_CDROM
CD_SEARCH_DBASE, CD_SORT_DBASE, CD_VIEW_DBASE, CFITSLIST, CF_174LG, CF_177LG
CF_180LG, CF_765LG, CF_770LG, CF_GIS1A, CF_GIS1B, CF_GIS1C, CF_GIS2A [1], CF_GIS4A
CF_GIS4B, CF_GIS4C, CH2KVT_GAIN, CHECK_ANOMALY, CHECK_FTP, CHIANTI_DEM, CHKARG
CH_GET_FILE, CH_LINE_LIST, CH_SYNTHETIC, CLONE_VAR, CMP_ALL_PRO, CMP_LIBS, CMP_TREES
COMPILE_SFIT, COMPRESS_QLOOK, CREATE_STRUCT [1], CREATE_STRUCT [2], CW_LOADCT
CW_PLMONITOR, Create_update_tar, DECOMPOSE_BATSE_DRM, DECOMP_R, DEFAULTS
DEMO_4TH_PIX, DET_SAVE_DEF, DISCP_RESP, DISPLAY_CDS_BURNIN, DN_FILE
DO_ARCHIVEPLOTS, DO_EVENTLISTS, DO_PSPLOTS, EIS_CPT_FILE_NAME [1]
EIS_CPT_FILE_NAME [2], EIS_CPT_environment_wrapper [1]
EIS_CPT_environment_wrapper [2], EIS_GET_HDR_STRUC, EIS_GET_STUDY [1]
EIS_GET_STUDY [2], EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2]
EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], EIS_LIST_EXPER [1]
EIS_LIST_EXPER [2], EIS_LIST_MAIN [1], EIS_LIST_MAIN [2], EIT_CATRD [1]
EIT_COPY, EIT_DISPLAY, EIT_GBO, EIT_MKMOVIE, EIT_PREP, EIT__DEFINE, EMISS_CALC
EVAL_SHERB, EXPINT_DEMO, EXPORT_PLAN, EXPORT_STUDY, EXTRACT_TRIGGERS, F1
FAST_LAD_DRM, FAST_SPEC_DRM, FB_RAD_LOSS, FCS, FF_DEMO, FF_GC, FF_ODDEVEN, FILE2FID
FILELIST, FILL_CATEGORY, FILL_TFTD, FIND_CAL [1], FIND_CAL [2], FIND_COMPRESSED
FIND_DATFILE, FIND_FID, FIND_FILES, FIND_FILE_DUR, FIND_SEU, FIND_WIND_DIR
FIRST_LIGHT [1], FIRST_LIGHT [2], FITS2TIFF, FITSRGB_to_TIFF, FIX_IAP, FLARES
FLARE_FDB, FLARE_LIST, FLARE_POS, FLDISPLAY, FLIST, FSOC, FSPLOT, FTP_BBSO, FTP_GETPUT
FTP_MLSO_IMAGES, FTP_MWSO, FTP_NOBE, FTP_SYNOP, F_TH_NT, GAP_FILE, GDSPSPEC
GET_AVGSPEC, GET_CDS_TEMPS, GET_COMPILED_TKI, GET_DISCSP511, GET_LAD_GAIN
GET_LATEST_IAP, GET_LATEST_KAP, GET_MOD, GET_NAR, GET_NOAA, GET_ORBIT [1]
GET_ORBIT [2], GET_ORBIT_CDF, GET_ORBIT_CDF2, GET_ORBIT_FITS, GET_PROC
GET_RAWDATA, GET_RECENT_EIT, GET_SC_ATT [1], GET_SC_ATT [2], GET_SC_POINT
GET_SPEC_CAL, GET_SPEC_GAIN, GET_SUMER_FILES, GET_SYNOPTIC, GET_UVSP, GHOST_BUSTER
GIF2PICT, GIFS2MPEG, GIS_CALIB_ANALOGUE, GIS_CALIB_FF_LTGD, GIS_DUMMY, GIS_ERROR
GOES_TEMP_DIR, GOFNT, GRS_EXTRACT, GT_EXPTIME [2], GT_MIRRPOS, GT_NUMEXP, GT_NUMWIN
GT_SLITNUM, GT_SLITPOS, GT_START, GT_WINSIZE, GT_WLABEL, GT_WLIMITS, GT_WNUM, G_C
G_OF_T, HAVE_FILES, HEADCAT, HESSI IMAGE STRATEGY CLASS DEFINITION
HESSI SOHDATA CLASS DEFINITION, HESSI_DEV, HKG_DBASE, HSI_CHK_DUPLICATE
HSI_CLK_DELTA_WRITE, HSI_CLOCK_DRIFT, HSI_DO_QLOOK_PLOTS, HSI_FIND_FILE
HSI_GET_LAST_FLARE_ID, HSI_SOCK_FILE, HSI_VCFILE_PACKET_RATE, HSI_VCFILE_TIMES
HSI_WRITE_LEVEL0, HTTP__DEFINE, HXA2HXAXY [1], HXA2HXAXY [2], HXFITS, HXT_EFF
HXT_FLARE_POS, HXT_POSSI4, HXT_POWL, HXT_PROB, Hsi_contact2fits [1]
Hsi_contact2fits [2], Hsi_daily_catalog [1], Hsi_daily_catalog [2], IDL5TO4
IDL_ROUTINE, IHY_READ, IMAGE_TOOL, IMAGE_TOOL_EVENT, INTEGRAL_CALC, ISOTHERMAL
ITOOL_EIT_DEGRID, ITOOL_GETFILE, ITOOL_OVERLAYER, ITOOL_PICKFILE
ITOOL_PKFILE_BS, JITTER_HTML, JSMOVIE, JSMOVIE2, LAD_RESP, LATEST_SFDS_GIF, LISTBCS
LIST_TM, LIST_WITH_PATH [1], LIST_WITH_PATH [2], LIST_WITH_PATH [3], LOCAL_DIFFS
LOCK_ZDBASE, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], MAKE_CHIANTI_SPEC, MAKE_FF
MAKE_GIFS, MAKE_IMAGE_EIT img hdr, MAKE_ION_LIST, MAP2FITS, MAP2JPEG, MAP__DEFINE
MAX_TEMP, MDI_COPY, MDI_GBO, MERGE_BATSE, MERGE_BURSTS, MERGE_DISCSP_HKG_OCC
MK_AGIF, MK_CDS_ANALYSIS, MK_CDS_GIF, MK_CDS_PLAN, MK_FID, MK_GIF, MK_HEAD_CAT
MK_MER_CONT, MK_ORB_WEEK, MK_PLAN_FORM, MK_PLAN_HTML, MK_RASTER, MK_SOHO_TARGET
MK_SSX, MK_SUB_DIR, MK_SUMER_DBASE, MK_SYNOPTIC, MK_TEMP_DIR, MK_TEMP_FILE, MOD_PLOT
NDSPSPEC, NET_DIR_DIFF, NEW_FF_DEMO, NIS_BIAS_DEMO, ORBIT_FILE_TYPE
OVSA_BASELINE_SELECTOR, PEEK, PICK_CAN_PRELIM, PICK_LINE, PLAN_XCAT_SUMM
PLOT_CDS_CRAYS, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], PLOT_DELTAT, PLOT_DEM
PLOT_FLARE, PLOT_HESSI_FILTERS, PLOT_IONEQ, PLOT_POPULATIONS, PLOT_SCI_TLM
PLOT_SPEC [2], PLOT_TEMP_POS, POP_PROCESSES, POP_SOLVER, PRINT_STR, PR_NODE, QLPRINT
QL_ORBIT_PLOT, QUERY_ANOMALY, RATE_COEFF, RATIO_PLOTTER [1], RAW2BIN
RD_BATSE_511CAL, RD_CHIANTI, RD_CPU_DTB, RD_FULL_LOAD [1], RD_FULL_LOAD [2]
RD_GOES_SDAC, RD_IMAGE_FITS, RD_PLAN_AREA, RD_SERTS, READCDSFITS, READCOL [3]
READSUM, READ_ABUND, READ_ANALIST, READ_CAL_SPEC, READ_COEF, READ_DEM, READ_DNFILE
READ_FULL_ATT, READ_GAPFILE, READ_HVFILE, READ_IONEQ, READ_KLGFB, READ_MONTH_CAT
READ_PS [1], READ_PS2, READ_SC_ATT, READ_SPLINE, REBIN_FID, REGEN_SYNOP, REWRITE_FDB
Returns the current chianti version number warns, SCANPATH, SCHEDULE
SETUP_DRM, SETUP_ELEMENTS, SETUP_ION, SFITSLIST, SHOW_CDHS, SHOW_DATAWIN, SHOW_EVARS
SHOW_FITS_HDR, SHOW_LINELIST, SHOW_PLAN, SHOW_POPS, SHOW_RASTER, SHOW_SCATTER
SHOW_SLIT6, SHOW_STUDY, SHOW_SYNOPTIC, SHOW_SYNOP__DEFINE, SITE__DEFINE
SLIT45_IMAGE_DEMO, SLIT4V5_DEMO, SOCK_SSW, SOHO_CAMPAIGN, SORT_FILES
SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_ENV [2], SPEX_ENV [4], SPEX_ENV [5]
SPEX_PROC [1], SPEX_PROC [2], SPEX_SUMMARY [1], SPEX_SUMMARY [2], SPEX__DEFINE
SSW_LOCAL_PATH, STR2FILE, STUDY_BRIEF, ST_MK_UDP_STC, ST_SUMER, ST_SUMER_PURGE
ST_TKI_INIT, SUMER_DISPLAY_IMA, SUMER_DISTORT_COR, SUMER_FILE, SUMER_GIF_IMA
SUMER_GIF_SPECTRUM, SUMER_HARCOPY_SPECTRUM, SUMER_HARDCOPY_IMA
SUMER_PICK_FLAT, SUMER_SEARCH_PD_EVENT, SUMER_TOOL_PD_EVENT, SUMM_CALS
SUM_GET_LINELIST, SXS_EFF, SXT_POWL, SXT_TEEM2 [1], SXT_TEEM2 [2], SXT_TEEM2 [3]
SYNOPTIC_STATS, Shers_load [1], TEST_OPEN2, TFTD, TIFF2GIF, TIME_ARC_NAME, TKI_CALL
TKI_CHKIT, TKI_DISPLAY_DET, TKI_INIT_SPEC, TKI_MASTER_CALL, TKI_RESTORESET
TKI_SAVESETTING, TKI_TCMD_EXEC, TP_GET_DUMDATA, TRACE_COPY, TRACE_GBO, TR_DARK_SUB
TR_FLAT_SUB, TWO_PHOTON, UNIX_CMD [1], UNIX_CMD [2], UNIX_SPAWN, UNLOCK_ZDBASE
UPDATE_CAMPAIGN, UPDATE_CDS_TARGETS, UPDATE_KAP, UPDATE_LINE_TEMPLATES
UPDATE_SOHO_TARGETS, URL_GET, USE_CHIANTI, VDS_BIAS_GLITCH, VDS_DUMMY, WBDA [1]
WBDA [2], WBSC_LTC_EV [1], WBSC_LTC_EV [2], WHICH, WIN_SPAWN, WRITE_ANOMALY
WRITE_CALFITS, WRITE_CAP, WRITE_CIF, WRITE_FDB, WRITE_HKBYDATE, WRITE_IAP
WRITE_MONTH_CAT, WRT_BSDCAL_CFL, WRT_HXTMVE_JCL, WRT_HXTMVE_JCL3, WR_CPU_DTB
WR_PLAN_AREA, XCAT, XCDS_BOOK, XCDS_COSMIC, XCPT, XDIFF, XGAUSSFIT, XGET_SYNOPTIC
XMOVIE_SFM, XPS_SETUP, XREPORT, XREPORT_EDIT, XR_RD_ABUNDANCE, XSEL_PD_EVENT
XSM_PREP, XSPECT_SETSUMPAR, XTEXT, XTKI, ZETA_0, ZION2FILENAME, ZONE_DEF_ID
ZONE_DEF_LABEL, ace_files, add_pro [1], add_pro [2], ads_into_att, ads_into_pnt
adsdirs [1], adsdirs [2], any_fsp, anyrts, atr2hxa_dbase, bbso_copy [1]
bbso_copy [2], bbso_name_fix, bcs_emiss was bcs_counts, break_doc [1]
break_doc [2], break_doc [3], cancel_dsn_fil, cdrom_files [2], cfl_summary [1]
cfl_summary [2], ch_ss, check_compile [1], check_compile [2], check_dumps [1]
check_log [1], check_log [2], check_oldprocess [1], check_oldprocess [2]
check_oldprocess [3], check_oldprocess [4], check_process [1]
check_process [2], check_ql_after_lz, check_sci5k_trunc, chk_batse_env [1]
chk_batse_env [2], configure_http, cp_fns [1], cp_fns [2], ctraj2orbit
daily_forecast [2], data2files, data_compress [1], data_compress [2]
data_compress [3], db_gbo, db_save_study_entry_create [1]
db_save_study_entry_create [2], db_save_study_entry_create [3]
db_save_study_entry_create [4], dbase2disk, delete_week [1], delete_week [2]
destr_bilin [1], destr_bilin [2], destretch [1], destretch [3], destretcht
disk2_mo [1], disk2_mo [2], disk_monitor [1], disk_monitor [2], diskbench
disp_sci160k [1], disp_sci160k [2], disp_sci5k, disp_therm_rs232, do_ads, do_aip
do_disp_month, do_fit_gcross, do_i0_dps_reformat, do_reg_backup, do_tr_inventory
dps_fname2time, dps_proc_lev0_hk, dps_proc_mem_dump, drm_4_spex [1]
drm_4_spex [2], dsn_check [1], dsn_check [2], dsp_menu, eis_cpt_gui [1]
eis_cpt_gui [2], eis_dr_obj__DEFINE [1], eis_dr_obj__DEFINE [2]
eis_get_events_filename [1], eis_get_events_filename [2]
eis_get_events_filename [3], eis_get_events_filename [4], eis_lines_gui [1]
eis_lines_gui [2], eis_mk_plan_gui [1], eis_mk_plan_gui [2]
eis_mk_raster_gui__define [1], eis_mk_raster_gui__define [2]
eis_mk_study_gui [1], eis_mk_study_gui [2], eis_plot_spectrum [1]
eis_plot_spectrum [2], eis_read_study_lists [1], eis_read_study_lists [2]
eis_sci_obj_gui, eis_study_gui [1], eis_study_gui [2]
eis_view_study_descriptions [1], eis_view_study_descriptions [2], eit_degrid
eit_dump, eit_eff_area, eit_file2path, eit_files, eit_flat, eit_fulldiskdb
eit_genx_cat, eit_getlimb, eit_norm_response [1], eit_parms, eit_proton_summary
eit_temp, emi_summary, exp_file, extract_val, fidrange [1], fidrange [2]
file_compress [1], file_compress [2], file_list [1], file_list [2], file_list2
file_path [1], file_path [2], file_purge [1], file_purge [2]
file_uncompress [1], file_uncompress [2], find_dbo_dir, fit_model_components
fitstap2tap [1], fitstap2tap [2], fl_goesplot [1], fl_goesplot [2]
fl_goesplot [3], fl_mktext, fl_summary [1], fl_summary [2], fl_summary [3]
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], fl_sxtobsnar [1]
fl_sxtobsnar [2], flares2disk, fmt_rasm, freebound, freebound_ion, ftp_copy [1]
ftp_copy [2], ftp_copy2sites, ftp_copy_new, ftp_defprompt, full_graph_gif
genx2html [1], genx2html [2], get1doc [1], get1doc [2], get_15, get_19, get_25, get_26
get_ads [1], get_ads [2], get_atomic [1], get_atomic [2], get_bcscal
get_contributions, get_daily [1], get_daily [2], get_gevloc_data
get_hk_info [1], get_hk_info [2], get_hk_mnem, get_ieq, get_ionbal [1]
get_ionbal [2], get_ksc_holiday, get_mk3 [1], get_mk3 [2], get_sdm_val, get_selsis
get_sirius [1], get_sirius [2], get_solar_indices, get_string [1]
get_string [2], get_sxa, get_tty_type [1], get_tty_type [2], get_uvxsections
get_visible, go_batch [1], go_batch [2], go_comp_sfr_arch
go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_ssw_batch
go_sxt_sss2secondary, go_yo_prod_batch, goes2str, goes3sec_copy, goes_plot [1]
goes_plot [2], goes_plot [3], goes_plot [4], goes_plot [5], gt_exptime [1]
gtab_file, help_prefix, help_windows, hist_count, hsi_1orbit_allpak, hsi_as_ptlist
hsi_as_ptrddb, hsi_as_ptwrdb, hsi_as_wascii, hsi_cld_sav_init
hsi_clk_delta_calc, hsi_clock_drift_redo, hsi_clock_drift_soc
hsi_filedb_read [1], hsi_filedb_read [2], hsi_filedb_write
hsi_filedb_write_ascii, hsi_find_in_archive, hsi_image__getaxis [2]
hsi_mk_dbase_dir, hsi_monthly_filename
hsi_mult_filedb_inp filedb_dir filedb_dir, hsi_mult_qspec, hsi_new_spec_bck
hsi_one_qlook_image, hsi_one_qlook_spectrum, hsi_orbpar4bck
hsi_params_write_pro, hsi_plot_qlook_image, hsi_qlook_call_ospex [1]
hsi_qlook_call_ospex [2], hsi_qspec [1], hsi_qspec [2], hsi_ras_rdeph [1]
hsi_ras_rdeph [2], hsi_ras_rdhipp, hsi_rd_ephfile, hsi_rd_orbit_files
hsi_read_all_flare_list, hsi_sim_flare, hsi_state_vectors
hsi_write_all_flare_list, hsi_write_decimation_settings
hsi_write_txt_flare_list, html_basics, html_doc, html_get_files
html_remove_template, hxrbs_response, hxt_anycomp, hxt_cutoff, hxt_pattern_maker
hxt_plcomp, hxt_thcomp, id2nam, idl_server_command, idl_server_control, ihy_db
image2movie, ion2filename, ip_que_dmpver, jitter_gif_xyimg, keyword_db, kluge_att
kp_name_fix, laststat [1], laststat [2], list_mo_log [1], list_mo_log [2]
mail [1], mail [2], make_fake_dark, make_ssw_mirror, mdi_cat, mdi_files, mdi_link
mdi_write_genxcat, mdifocus2, mdiiss, mdimrot, mdipdist, mdiprot, mk_aoslos
mk_att [1], mk_att [2], mk_bad_pix_map_load, mk_desat, mk_desat_wl, mk_dpc_image
mk_evn [1], mk_evn [2], mk_fem [1], mk_fem [2], mk_fem_aoslos [1]
mk_fem_aoslos [2], mk_fem_file [1], mk_fem_file [2], mk_ff_load, mk_gbl
mk_gev [1], mk_gev [2], mk_gif_mag_index, mk_gsn_obs, mk_gsn_obs_s1, mk_gx
mk_hst_summary, mk_imgsum_html, mk_lasteit_movie, mk_mapfile [1], mk_mapfile [2]
mk_mdi_fits, mk_mdi_iap, mk_mo_disk, mk_mo_disk2, mk_mo_list, mk_mo_log, mk_nar [1]
mk_nar [2], mk_opsdb_list [1], mk_opsdb_list [2], mk_orb_file, mk_orbit [1]
mk_orbit [2], mk_pix [1], mk_pix [2], mk_pnt, mk_pubydb, mk_rasm_files, mk_sd2
mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdcs, mk_sdl, mk_sdm, mk_sdmi, mk_sdp, mk_sfc [1]
mk_sfc [2], mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs, mk_sft [1]
mk_sft [2], mk_sfw, mk_sl [1], mk_sl [2], mk_sot, mk_soup_hcat, mk_spd, mk_ssc [1]
mk_ssc [2], mk_ssc_batch [1], mk_ssc_batch [2], mk_ssl, mk_strip_file
mk_sumer_dbase_ff, mk_sxc, mk_sxh, mk_sxl, mk_syn_sfc [1], mk_syn_sfc [2]
mk_synsfc_coeff [1], mk_synsfc_coeff [2], mk_trace_i0, mk_week_file [1]
mk_week_file [2], mk_ydbtape [1], mk_ydbtape [2], mo2wks, mo_check, mo_filelist
mo_patch, mo_prep, mo_tap_dump, mobad_summ, model_spec, moffat2d, monitor_center [1]
monitor_scratch [1], monitor_scratch [2], month_sfd_fits [1]
month_sfd_fits [2], msok_copy_jpg, msok_poi_copy [1], msok_poi_copy [2]
mwritefits, new_disp_sci5k [1], new_disp_sci5k [2], new_dpath [1], new_dpath [2]
new_version [1], new_version [2], nob_img_copy, nob_name_fix, nobeyama_update
norik_name_fix, nts_copy [1], nts_copy [2], obj_save, obs_summary, oneline [1]
oneline [2], path_data [1], path_data [2], path_sw [1], path_sw [2], plot_eit_flux
plot_loi_summary [1], plot_loi_summary [2], ploty [1], ploty [2], pnt2atr
pr_gsn [1], pr_gsn [2], pr_trav_summ, pr_visible, pref_info, pref_super, prep_gendat
ratio_plotter [2], raw_list2pixmap, rd_dpc_table, rd_egse_hk_txt, rd_fdss
rd_goes_fits, rd_goesp_ascii, rd_goesx_ascii, rd_guf_ascii, rd_hirsaiso
rd_hxt_drm [1], rd_hxt_drm [2], rd_modb, rd_old_obs, rd_pnt_hist, rd_rasm, rd_sci5k
rd_sdl, rd_selsisi_dir, rd_sld, rd_sls, rd_sot, rd_soup, rd_ssl, rd_sxa, rd_sxc, rd_sxl
rd_therm_rs232, rd_video_menu, rd_week_file [2], rd_ydbtap, rd_ydbtapedir
read_ftp, read_genxcat, read_hessi_4_ospex, read_mdi, read_sooncheck
read_soxs_4_ospex, read_spartan, read_trace, read_xsm_4_ospex, redo_disploi
redo_mon_sci5k, ref_term [2], res_freq, reslot, revchk, rmosaic [1], rmosaic [2]
rmosaic [3], run_dsnfil, sav_string [1], sav_string [2], save_idl_routines
scratcf, scratch [1], scratch [2], sda2fits, search_files, search_obs
selsis_copy [1], selsis_copy [2], selsisi2fits, selsisi_copy, set_oldpath [1]
set_oldpath [2], setup_spex [1], setup_spex [2], sfc_check, sft2sfc, sft_files
show_contacts, show_hxafid, show_pix [1], show_pix [2], show_pixf, soon2fits
soon_catstat, soon_com2html, soon_search [1], soon_search [3], soon_search_www
special_movie, spex_batse_preview [1], spex_batse_preview [2]
spex_preview [1], spex_preview [2], spex_xsm_fits2drm, ssc_files [1]
ssc_files [2], ssc_files [3], ssw_addmm_gen, ssw_bin, ssw_check_contrib
ssw_colors, ssw_conflicts, ssw_contrib_monitor, ssw_ct2rgb, ssw_findstuff2html
ssw_get_sources, ssw_getapplet, ssw_install [1], ssw_install [2]
ssw_install_explinkages, ssw_instr_info, ssw_javamovie, ssw_jsulr2data, ssw_move
ssw_path, ssw_set_chianti, ssw_setsswdb_gen, ssw_setup_windows
ssw_start_rpcserver, ssw_strfind, ssw_swmap_bestof, ssw_swmap_info
ssw_swmap_uniqinfo, ssw_time2paths, ssw_track_demo, ssw_unspike_cube
ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup, ssw_url2data, sswdb_files
sswdb_info, sswdb_install, sswdb_upgrade, sswloc, struct_where, sumer_destretch
sumer_ffdb, sun_today [1], sun_today [2], sun_today [3], sw2tree [1], sw2tree [2]
sxi_files, sxl_analysis, sxt2file, sxt2mpeg, sxt_dn_int, sxt_files, sxt_flux [1]
sxt_flux [2], sxt_flux [3], sxt_fsp_resp, sxt_his2dbase, sxt_html, sxt_mornint
sxt_mwave, sxt_patch_att, sxt_plan, sxt_prep [1], sxt_prep [2], sxt_prep [3]
sxt_resp_inp, sxt_ssc2sss, sxt_ssn2fits [1], sxt_ssn2fits [2], sxt_summary
sxt_t6_resp0, sxt_uvf_info [1], sxt_uvf_info [3], sxt_where, sxtpnt_sum
synop_link, synop_movie, synth, tbb_info [1], tbb_info [2], tfr_decom
thumbnail_table_html, tim2dbase, tim2tfss, timeline, timeline2html, topsdb [1]
topsdb [2], tr_head_info, tr_inventory_telem, tr_lut_conv, tr_mk_seq_alph
tr_rd_inventory, tr_reformat, tr_summary_head, tr_tab_head, trace_cat
trace_cat2data, trace_cosmic2hist_accum
trace_decode_idl PLEASE USE trace_jpeg_decomp, trace_do_data_requests
trace_dph2struct [1], trace_euv_resp [2], trace_file2path, trace_files
trace_get1www_image, trace_get_vignette, trace_jpeg_dbase, trace_jpeg_decomp
trace_last_movie [1], trace_last_movie [3], trace_last_movie_queue
trace_make_tma, trace_make_tmr [1], trace_make_tmr [2], trace_make_vignette
trace_movie_index [1], trace_movie_index [2], trace_movies_prioritize [1]
trace_movies_prioritize [2], trace_newmoviedata, trace_psf_isothermal
trace_rd_jpeg, trace_recent_movie_summary, trace_special_movie [1]
trace_special_movie [2], trace_special_movie [3], trace_special_movie2
trace_struct2filename, trace_submit_request, trace_success_file, trace_t_resp
trace_unspike_time, trace_where, trace_write_genxcat, ucon_check, ucon_path
uncompress, url_decode, verner_xs, wbs_response [1], wbs_response [2], wconroi
web_seq, weekid [1], weekid [2], weekid [3], wfile, wr_selsisi_dir, write_access [1]
write_access [2], write_genxcat, write_trace, wrt1orbit [1], wrt1orbit [2]
wrt_fits_bin_exten [2], wrt_sci160k_img, wrt_sumer, wrttcplog, wrttcplog_test
wrtwkdat, wwwidl_server_check, wwwidl_watchdog [1], wwwidl_watchdog [2]
xcheckip, xdisp_fits, xdisp_sci5k, xdisp_tfr, xdisp_trace [1], xdisp_trace2
xdisp_trace3, xhkplot, xpickfile2, xr_mk_abun_file, xread_hist, xsearch_obs
xset_chain [1], xset_chain [2], xso_search, xsw2tree, xsw2tree_event, xswlist [2]
xwrite_hist, ycopy, ydb_exist [1], ydb_exist [2], ydb_exist [3], ydb_exist [4]
ydb_install [1], ydb_install [2], ydb_use, ydump, yo_index2path, yo_mkos1_dbase
yo_xda2legacy, yohkoh_files, yopos [1], yopos [2]
Restrictions: Assumes Unix type format if os is not VMS or windows.
Side effects: None
Category : Utilities, Strings
Prev. Hist. : Yohkoh routine by M. Morrison
Written : CDS version by C D Pike, RAL, 19/3/93
Modified :
Version 2, Liyun Wang, GSFC/ARC, January 3, 1995
Made it capable of concatenating directory names
Added keywords CHECK and DIR for output
Version 3, William Thompson, GSFC, 3 May 1995
Modified so spurious $ characters in front of VMS logical names
are ignored. This makes it easier to port software written for
Unix to VMS.
Version 4, William Thompson, GSFC, 29 August 1995
Modified to use OS_FAMILY.
Version 5, Samuel Freeland, GSFC, 21-February 1996
Merge SLF change to Decode Environmental/Logicals
Version 5.1, Samuel Freeland, LPARL, 12-mar-1996
restore /NOTRANS keyword
Version 5.2, RAS, HSTX, 20-Jun-1996, protect against '..' from concealed
directories in VMS
Version 5.3 J. Newmark, 03-Jun-1998, changed loops to long integer
Version 6, 14-Jan-1999, William Thompson, GSFC
Automatically decode environment variables starting with "$" in
the Windows. Treat case where dirname ends in '/' in Windows.
VERSION:
Version 6, 14-Jan-1999
[Previous]
[Next]
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.
CALLED BY:
ADD_ANOMALY, ADD_PATH [1], ADD_PATH [2], ANDRIL_SXT, ANNOUNCEMENTS, ARR2GIF
BAT_MERGE, BCS, BCS_COMP, BCS_LOAD_CAT, BCS_POINT, BUILD_DRM, CALC_DMM_DR, CALIB_HIST
CAT_DIRECTORY, CDSHEADFITS, CDS_ADEF_PARSEFILE, CDS_AR_OBS, CDS_COMPRESS
CDS_PLAN_BRIEF, CDS_SATURATE, CDS_SLINE, CDS_SLINE_DATA, CDS_SLIT6_BURNIN
CDS_VEL_SLICE [2], CDS_WAVE_CAT, CDS_WAVE_FILES, CD_BUILD_CDROMCAT
CD_DELETE_FILES, CD_DISK_SPACE, CD_FIND_DBASE, CD_LOAD_CDROM, CD_REG_CDROM
CD_SEARCH_DBASE, CD_SORT_DBASE, CD_VIEW_DBASE, CFITSLIST, CF_174LG, CF_177LG
CF_180LG, CF_765LG, CF_770LG, CF_GIS1A, CF_GIS1B, CF_GIS1C, CF_GIS2A [1], CF_GIS4A
CF_GIS4B, CF_GIS4C, CH2KVT_GAIN, CHECK_ANOMALY, CHECK_FTP, CHIANTI_DEM, CHKARG
CH_GET_FILE, CH_LINE_LIST, CH_SYNTHETIC, CLONE_VAR, CMP_ALL_PRO, CMP_LIBS, CMP_TREES
COMPILE_SFIT, COMPRESS_QLOOK, CREATE_STRUCT [1], CREATE_STRUCT [2], CW_LOADCT
CW_PLMONITOR, Create_update_tar, DECOMPOSE_BATSE_DRM, DECOMP_R, DEFAULTS
DEMO_4TH_PIX, DET_SAVE_DEF, DISCP_RESP, DISPLAY_CDS_BURNIN, DN_FILE
DO_ARCHIVEPLOTS, DO_EVENTLISTS, DO_PSPLOTS, EIS_CPT_FILE_NAME [1]
EIS_CPT_FILE_NAME [2], EIS_CPT_environment_wrapper [1]
EIS_CPT_environment_wrapper [2], EIS_GET_HDR_STRUC, EIS_GET_STUDY [1]
EIS_GET_STUDY [2], EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2]
EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], EIS_LIST_EXPER [1]
EIS_LIST_EXPER [2], EIS_LIST_MAIN [1], EIS_LIST_MAIN [2], EIT_CATRD [1]
EIT_COPY, EIT_DISPLAY, EIT_GBO, EIT_MKMOVIE, EIT_PREP, EIT__DEFINE, EMISS_CALC
EVAL_SHERB, EXPINT_DEMO, EXPORT_PLAN, EXPORT_STUDY, EXTRACT_TRIGGERS, F1
FAST_LAD_DRM, FAST_SPEC_DRM, FB_RAD_LOSS, FCS, FF_DEMO, FF_GC, FF_ODDEVEN, FILE2FID
FILELIST, FILL_CATEGORY, FILL_TFTD, FIND_CAL [1], FIND_CAL [2], FIND_COMPRESSED
FIND_DATFILE, FIND_FID, FIND_FILES, FIND_FILE_DUR, FIND_SEU, FIND_WIND_DIR
FIRST_LIGHT [1], FIRST_LIGHT [2], FITS2TIFF, FITSRGB_to_TIFF, FIX_IAP, FLARES
FLARE_FDB, FLARE_LIST, FLARE_POS, FLDISPLAY, FLIST, FSOC, FSPLOT, FTP_BBSO, FTP_GETPUT
FTP_MLSO_IMAGES, FTP_MWSO, FTP_NOBE, FTP_SYNOP, F_TH_NT, GAP_FILE, GDSPSPEC
GET_AVGSPEC, GET_CDS_TEMPS, GET_COMPILED_TKI, GET_DISCSP511, GET_LAD_GAIN
GET_LATEST_IAP, GET_LATEST_KAP, GET_MOD, GET_NAR, GET_NOAA, GET_ORBIT [1]
GET_ORBIT [2], GET_ORBIT_CDF, GET_ORBIT_CDF2, GET_ORBIT_FITS, GET_PROC
GET_RAWDATA, GET_RECENT_EIT, GET_SC_ATT [1], GET_SC_ATT [2], GET_SC_POINT
GET_SPEC_CAL, GET_SPEC_GAIN, GET_SUMER_FILES, GET_SYNOPTIC, GET_UVSP, GHOST_BUSTER
GIF2PICT, GIFS2MPEG, GIS_CALIB_ANALOGUE, GIS_CALIB_FF_LTGD, GIS_DUMMY, GIS_ERROR
GOES_TEMP_DIR, GOFNT, GRS_EXTRACT, GT_EXPTIME [2], GT_MIRRPOS, GT_NUMEXP, GT_NUMWIN
GT_SLITNUM, GT_SLITPOS, GT_START, GT_WINSIZE, GT_WLABEL, GT_WLIMITS, GT_WNUM, G_C
G_OF_T, HAVE_FILES, HEADCAT, HESSI IMAGE STRATEGY CLASS DEFINITION
HESSI SOHDATA CLASS DEFINITION, HESSI_DEV, HKG_DBASE, HSI_CHK_DUPLICATE
HSI_CLK_DELTA_WRITE, HSI_CLOCK_DRIFT, HSI_DO_QLOOK_PLOTS, HSI_FIND_FILE
HSI_GET_LAST_FLARE_ID, HSI_SOCK_FILE, HSI_VCFILE_PACKET_RATE, HSI_VCFILE_TIMES
HSI_WRITE_LEVEL0, HTTP__DEFINE, HXA2HXAXY [1], HXA2HXAXY [2], HXFITS, HXT_EFF
HXT_FLARE_POS, HXT_POSSI4, HXT_POWL, HXT_PROB, Hsi_contact2fits [1]
Hsi_contact2fits [2], Hsi_daily_catalog [1], Hsi_daily_catalog [2], IDL5TO4
IDL_ROUTINE, IHY_READ, IMAGE_TOOL, IMAGE_TOOL_EVENT, INTEGRAL_CALC, ISOTHERMAL
ITOOL_EIT_DEGRID, ITOOL_GETFILE, ITOOL_OVERLAYER, ITOOL_PICKFILE
ITOOL_PKFILE_BS, JITTER_HTML, JSMOVIE, JSMOVIE2, LAD_RESP, LATEST_SFDS_GIF, LISTBCS
LIST_TM, LIST_WITH_PATH [1], LIST_WITH_PATH [2], LIST_WITH_PATH [3], LOCAL_DIFFS
LOCK_ZDBASE, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], MAKE_CHIANTI_SPEC, MAKE_FF
MAKE_GIFS, MAKE_IMAGE_EIT img hdr, MAKE_ION_LIST, MAP2FITS, MAP2JPEG, MAP__DEFINE
MAX_TEMP, MDI_COPY, MDI_GBO, MERGE_BATSE, MERGE_BURSTS, MERGE_DISCSP_HKG_OCC
MK_AGIF, MK_CDS_ANALYSIS, MK_CDS_GIF, MK_CDS_PLAN, MK_FID, MK_GIF, MK_HEAD_CAT
MK_MER_CONT, MK_ORB_WEEK, MK_PLAN_FORM, MK_PLAN_HTML, MK_RASTER, MK_SOHO_TARGET
MK_SSX, MK_SUB_DIR, MK_SUMER_DBASE, MK_SYNOPTIC, MK_TEMP_DIR, MK_TEMP_FILE, MOD_PLOT
NDSPSPEC, NET_DIR_DIFF, NEW_FF_DEMO, NIS_BIAS_DEMO, ORBIT_FILE_TYPE
OVSA_BASELINE_SELECTOR, PEEK, PICK_CAN_PRELIM, PICK_LINE, PLAN_XCAT_SUMM
PLOT_CDS_CRAYS, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], PLOT_DELTAT, PLOT_DEM
PLOT_FLARE, PLOT_HESSI_FILTERS, PLOT_IONEQ, PLOT_POPULATIONS, PLOT_SCI_TLM
PLOT_SPEC [2], PLOT_TEMP_POS, POP_PROCESSES, POP_SOLVER, PRINT_STR, PR_NODE, QLPRINT
QL_ORBIT_PLOT, QUERY_ANOMALY, RATE_COEFF, RATIO_PLOTTER [1], RAW2BIN
RD_BATSE_511CAL, RD_CHIANTI, RD_CPU_DTB, RD_FULL_LOAD [1], RD_FULL_LOAD [2]
RD_GOES_SDAC, RD_IMAGE_FITS, RD_PLAN_AREA, RD_SERTS, READCDSFITS, READCOL [3]
READSUM, READ_ABUND, READ_ANALIST, READ_CAL_SPEC, READ_COEF, READ_DEM, READ_DNFILE
READ_FULL_ATT, READ_GAPFILE, READ_HVFILE, READ_IONEQ, READ_KLGFB, READ_MONTH_CAT
READ_PS [1], READ_PS2, READ_SC_ATT, READ_SPLINE, REBIN_FID, REGEN_SYNOP, REWRITE_FDB
Returns the current chianti version number warns, SCANPATH, SCHEDULE
SETUP_DRM, SETUP_ELEMENTS, SETUP_ION, SFITSLIST, SHOW_CDHS, SHOW_DATAWIN, SHOW_EVARS
SHOW_FITS_HDR, SHOW_LINELIST, SHOW_PLAN, SHOW_POPS, SHOW_RASTER, SHOW_SCATTER
SHOW_SLIT6, SHOW_STUDY, SHOW_SYNOPTIC, SHOW_SYNOP__DEFINE, SITE__DEFINE
SLIT45_IMAGE_DEMO, SLIT4V5_DEMO, SOCK_SSW, SOHO_CAMPAIGN, SORT_FILES
SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_ENV [2], SPEX_ENV [4], SPEX_ENV [5]
SPEX_PROC [1], SPEX_PROC [2], SPEX_SUMMARY [1], SPEX_SUMMARY [2], SPEX__DEFINE
SSW_LOCAL_PATH, STR2FILE, STUDY_BRIEF, ST_MK_UDP_STC, ST_SUMER, ST_SUMER_PURGE
ST_TKI_INIT, SUMER_DISPLAY_IMA, SUMER_DISTORT_COR, SUMER_FILE, SUMER_GIF_IMA
SUMER_GIF_SPECTRUM, SUMER_HARCOPY_SPECTRUM, SUMER_HARDCOPY_IMA
SUMER_PICK_FLAT, SUMER_SEARCH_PD_EVENT, SUMER_TOOL_PD_EVENT, SUMM_CALS
SUM_GET_LINELIST, SXS_EFF, SXT_POWL, SXT_TEEM2 [1], SXT_TEEM2 [2], SXT_TEEM2 [3]
SYNOPTIC_STATS, Shers_load [1], TEST_OPEN2, TFTD, TIFF2GIF, TIME_ARC_NAME, TKI_CALL
TKI_CHKIT, TKI_DISPLAY_DET, TKI_INIT_SPEC, TKI_MASTER_CALL, TKI_RESTORESET
TKI_SAVESETTING, TKI_TCMD_EXEC, TP_GET_DUMDATA, TRACE_COPY, TRACE_GBO, TR_DARK_SUB
TR_FLAT_SUB, TWO_PHOTON, UNIX_CMD [1], UNIX_CMD [2], UNIX_SPAWN, UNLOCK_ZDBASE
UPDATE_CAMPAIGN, UPDATE_CDS_TARGETS, UPDATE_KAP, UPDATE_LINE_TEMPLATES
UPDATE_SOHO_TARGETS, URL_GET, USE_CHIANTI, VDS_BIAS_GLITCH, VDS_DUMMY, WBDA [1]
WBDA [2], WBSC_LTC_EV [1], WBSC_LTC_EV [2], WHICH, WIN_SPAWN, WRITE_ANOMALY
WRITE_CALFITS, WRITE_CAP, WRITE_CIF, WRITE_FDB, WRITE_HKBYDATE, WRITE_IAP
WRITE_MONTH_CAT, WRT_BSDCAL_CFL, WRT_HXTMVE_JCL, WRT_HXTMVE_JCL3, WR_CPU_DTB
WR_PLAN_AREA, XCAT, XCDS_BOOK, XCDS_COSMIC, XCPT, XDIFF, XGAUSSFIT, XGET_SYNOPTIC
XMOVIE_SFM, XPS_SETUP, XREPORT, XREPORT_EDIT, XR_RD_ABUNDANCE, XSEL_PD_EVENT
XSM_PREP, XSPECT_SETSUMPAR, XTEXT, XTKI, ZETA_0, ZION2FILENAME, ZONE_DEF_ID
ZONE_DEF_LABEL, ace_files, add_pro [1], add_pro [2], ads_into_att, ads_into_pnt
adsdirs [1], adsdirs [2], any_fsp, anyrts, atr2hxa_dbase, bbso_copy [1]
bbso_copy [2], bbso_name_fix, bcs_emiss was bcs_counts, break_doc [1]
break_doc [2], break_doc [3], cancel_dsn_fil, cdrom_files [2], cfl_summary [1]
cfl_summary [2], ch_ss, check_compile [1], check_compile [2], check_dumps [1]
check_log [1], check_log [2], check_oldprocess [1], check_oldprocess [2]
check_oldprocess [3], check_oldprocess [4], check_process [1]
check_process [2], check_ql_after_lz, check_sci5k_trunc, chk_batse_env [1]
chk_batse_env [2], configure_http, cp_fns [1], cp_fns [2], ctraj2orbit
daily_forecast [2], data2files, data_compress [1], data_compress [2]
data_compress [3], db_gbo, db_save_study_entry_create [1]
db_save_study_entry_create [2], db_save_study_entry_create [3]
db_save_study_entry_create [4], dbase2disk, delete_week [1], delete_week [2]
destr_bilin [1], destr_bilin [2], destretch [1], destretch [3], destretcht
disk2_mo [1], disk2_mo [2], disk_monitor [1], disk_monitor [2], diskbench
disp_sci160k [1], disp_sci160k [2], disp_sci5k, disp_therm_rs232, do_ads, do_aip
do_disp_month, do_fit_gcross, do_i0_dps_reformat, do_reg_backup, do_tr_inventory
dps_fname2time, dps_proc_lev0_hk, dps_proc_mem_dump, drm_4_spex [1]
drm_4_spex [2], dsn_check [1], dsn_check [2], dsp_menu, eis_cpt_gui [1]
eis_cpt_gui [2], eis_dr_obj__DEFINE [1], eis_dr_obj__DEFINE [2]
eis_get_events_filename [1], eis_get_events_filename [2]
eis_get_events_filename [3], eis_get_events_filename [4], eis_lines_gui [1]
eis_lines_gui [2], eis_mk_plan_gui [1], eis_mk_plan_gui [2]
eis_mk_raster_gui__define [1], eis_mk_raster_gui__define [2]
eis_mk_study_gui [1], eis_mk_study_gui [2], eis_plot_spectrum [1]
eis_plot_spectrum [2], eis_read_study_lists [1], eis_read_study_lists [2]
eis_sci_obj_gui, eis_study_gui [1], eis_study_gui [2]
eis_view_study_descriptions [1], eis_view_study_descriptions [2], eit_degrid
eit_dump, eit_eff_area, eit_file2path, eit_files, eit_flat, eit_fulldiskdb
eit_genx_cat, eit_getlimb, eit_norm_response [1], eit_parms, eit_proton_summary
eit_temp, emi_summary, exp_file, extract_val, fidrange [1], fidrange [2]
file_compress [1], file_compress [2], file_list [1], file_list [2], file_list2
file_path [1], file_path [2], file_purge [1], file_purge [2]
file_uncompress [1], file_uncompress [2], find_dbo_dir, fit_model_components
fitstap2tap [1], fitstap2tap [2], fl_goesplot [1], fl_goesplot [2]
fl_goesplot [3], fl_mktext, fl_summary [1], fl_summary [2], fl_summary [3]
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], fl_sxtobsnar [1]
fl_sxtobsnar [2], flares2disk, fmt_rasm, freebound, freebound_ion, ftp_copy [1]
ftp_copy [2], ftp_copy2sites, ftp_copy_new, ftp_defprompt, full_graph_gif
genx2html [1], genx2html [2], get1doc [1], get1doc [2], get_15, get_19, get_25, get_26
get_ads [1], get_ads [2], get_atomic [1], get_atomic [2], get_bcscal
get_contributions, get_daily [1], get_daily [2], get_gevloc_data
get_hk_info [1], get_hk_info [2], get_hk_mnem, get_ieq, get_ionbal [1]
get_ionbal [2], get_ksc_holiday, get_mk3 [1], get_mk3 [2], get_sdm_val, get_selsis
get_sirius [1], get_sirius [2], get_solar_indices, get_string [1]
get_string [2], get_sxa, get_tty_type [1], get_tty_type [2], get_uvxsections
get_visible, go_batch [1], go_batch [2], go_comp_sfr_arch
go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_ssw_batch
go_sxt_sss2secondary, go_yo_prod_batch, goes2str, goes3sec_copy, goes_plot [1]
goes_plot [2], goes_plot [3], goes_plot [4], goes_plot [5], gt_exptime [1]
gtab_file, help_prefix, help_windows, hist_count, hsi_1orbit_allpak, hsi_as_ptlist
hsi_as_ptrddb, hsi_as_ptwrdb, hsi_as_wascii, hsi_cld_sav_init
hsi_clk_delta_calc, hsi_clock_drift_redo, hsi_clock_drift_soc
hsi_filedb_read [1], hsi_filedb_read [2], hsi_filedb_write
hsi_filedb_write_ascii, hsi_find_in_archive, hsi_image__getaxis [2]
hsi_mk_dbase_dir, hsi_monthly_filename
hsi_mult_filedb_inp filedb_dir filedb_dir, hsi_mult_qspec, hsi_new_spec_bck
hsi_one_qlook_image, hsi_one_qlook_spectrum, hsi_orbpar4bck
hsi_params_write_pro, hsi_plot_qlook_image, hsi_qlook_call_ospex [1]
hsi_qlook_call_ospex [2], hsi_qspec [1], hsi_qspec [2], hsi_ras_rdeph [1]
hsi_ras_rdeph [2], hsi_ras_rdhipp, hsi_rd_ephfile, hsi_rd_orbit_files
hsi_read_all_flare_list, hsi_sim_flare, hsi_state_vectors
hsi_write_all_flare_list, hsi_write_decimation_settings
hsi_write_txt_flare_list, html_basics, html_doc, html_get_files
html_remove_template, hxrbs_response, hxt_anycomp, hxt_cutoff, hxt_pattern_maker
hxt_plcomp, hxt_thcomp, id2nam, idl_server_command, idl_server_control, ihy_db
image2movie, ion2filename, ip_que_dmpver, jitter_gif_xyimg, keyword_db, kluge_att
kp_name_fix, laststat [1], laststat [2], list_mo_log [1], list_mo_log [2]
mail [1], mail [2], make_fake_dark, make_ssw_mirror, mdi_cat, mdi_files, mdi_link
mdi_write_genxcat, mdifocus2, mdiiss, mdimrot, mdipdist, mdiprot, mk_aoslos
mk_att [1], mk_att [2], mk_bad_pix_map_load, mk_desat, mk_desat_wl, mk_dpc_image
mk_evn [1], mk_evn [2], mk_fem [1], mk_fem [2], mk_fem_aoslos [1]
mk_fem_aoslos [2], mk_fem_file [1], mk_fem_file [2], mk_ff_load, mk_gbl
mk_gev [1], mk_gev [2], mk_gif_mag_index, mk_gsn_obs, mk_gsn_obs_s1, mk_gx
mk_hst_summary, mk_imgsum_html, mk_lasteit_movie, mk_mapfile [1], mk_mapfile [2]
mk_mdi_fits, mk_mdi_iap, mk_mo_disk, mk_mo_disk2, mk_mo_list, mk_mo_log, mk_nar [1]
mk_nar [2], mk_opsdb_list [1], mk_opsdb_list [2], mk_orb_file, mk_orbit [1]
mk_orbit [2], mk_pix [1], mk_pix [2], mk_pnt, mk_pubydb, mk_rasm_files, mk_sd2
mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sdcs, mk_sdl, mk_sdm, mk_sdmi, mk_sdp, mk_sfc [1]
mk_sfc [2], mk_sfd [1], mk_sfd [2], mk_sfd [3], mk_sfd [4], mk_sfs, mk_sft [1]
mk_sft [2], mk_sfw, mk_sl [1], mk_sl [2], mk_sot, mk_soup_hcat, mk_spd, mk_ssc [1]
mk_ssc [2], mk_ssc_batch [1], mk_ssc_batch [2], mk_ssl, mk_strip_file
mk_sumer_dbase_ff, mk_sxc, mk_sxh, mk_sxl, mk_syn_sfc [1], mk_syn_sfc [2]
mk_synsfc_coeff [1], mk_synsfc_coeff [2], mk_trace_i0, mk_week_file [1]
mk_week_file [2], mk_ydbtape [1], mk_ydbtape [2], mo2wks, mo_check, mo_filelist
mo_patch, mo_prep, mo_tap_dump, mobad_summ, model_spec, moffat2d, monitor_center [1]
monitor_scratch [1], monitor_scratch [2], month_sfd_fits [1]
month_sfd_fits [2], msok_copy_jpg, msok_poi_copy [1], msok_poi_copy [2]
mwritefits, new_disp_sci5k [1], new_disp_sci5k [2], new_dpath [1], new_dpath [2]
new_version [1], new_version [2], nob_img_copy, nob_name_fix, nobeyama_update
norik_name_fix, nts_copy [1], nts_copy [2], obj_save, obs_summary, oneline [1]
oneline [2], path_data [1], path_data [2], path_sw [1], path_sw [2], plot_eit_flux
plot_loi_summary [1], plot_loi_summary [2], ploty [1], ploty [2], pnt2atr
pr_gsn [1], pr_gsn [2], pr_trav_summ, pr_visible, pref_info, pref_super, prep_gendat
ratio_plotter [2], raw_list2pixmap, rd_dpc_table, rd_egse_hk_txt, rd_fdss
rd_goes_fits, rd_goesp_ascii, rd_goesx_ascii, rd_guf_ascii, rd_hirsaiso
rd_hxt_drm [1], rd_hxt_drm [2], rd_modb, rd_old_obs, rd_pnt_hist, rd_rasm, rd_sci5k
rd_sdl, rd_selsisi_dir, rd_sld, rd_sls, rd_sot, rd_soup, rd_ssl, rd_sxa, rd_sxc, rd_sxl
rd_therm_rs232, rd_video_menu, rd_week_file [2], rd_ydbtap, rd_ydbtapedir
read_ftp, read_genxcat, read_hessi_4_ospex, read_mdi, read_sooncheck
read_soxs_4_ospex, read_spartan, read_trace, read_xsm_4_ospex, redo_disploi
redo_mon_sci5k, ref_term [2], res_freq, reslot, revchk, rmosaic [1], rmosaic [2]
rmosaic [3], run_dsnfil, sav_string [1], sav_string [2], save_idl_routines
scratcf, scratch [1], scratch [2], sda2fits, search_files, search_obs
selsis_copy [1], selsis_copy [2], selsisi2fits, selsisi_copy, set_oldpath [1]
set_oldpath [2], setup_spex [1], setup_spex [2], sfc_check, sft2sfc, sft_files
show_contacts, show_hxafid, show_pix [1], show_pix [2], show_pixf, soon2fits
soon_catstat, soon_com2html, soon_search [1], soon_search [3], soon_search_www
special_movie, spex_batse_preview [1], spex_batse_preview [2]
spex_preview [1], spex_preview [2], spex_xsm_fits2drm, ssc_files [1]
ssc_files [2], ssc_files [3], ssw_addmm_gen, ssw_bin, ssw_check_contrib
ssw_colors, ssw_conflicts, ssw_contrib_monitor, ssw_ct2rgb, ssw_findstuff2html
ssw_get_sources, ssw_getapplet, ssw_install [1], ssw_install [2]
ssw_install_explinkages, ssw_instr_info, ssw_javamovie, ssw_jsulr2data, ssw_move
ssw_path, ssw_set_chianti, ssw_setsswdb_gen, ssw_setup_windows
ssw_start_rpcserver, ssw_strfind, ssw_swmap_bestof, ssw_swmap_info
ssw_swmap_uniqinfo, ssw_time2paths, ssw_track_demo, ssw_unspike_cube
ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup, ssw_url2data, sswdb_files
sswdb_info, sswdb_install, sswdb_upgrade, sswloc, struct_where, sumer_destretch
sumer_ffdb, sun_today [1], sun_today [2], sun_today [3], sw2tree [1], sw2tree [2]
sxi_files, sxl_analysis, sxt2file, sxt2mpeg, sxt_dn_int, sxt_files, sxt_flux [1]
sxt_flux [2], sxt_flux [3], sxt_fsp_resp, sxt_his2dbase, sxt_html, sxt_mornint
sxt_mwave, sxt_patch_att, sxt_plan, sxt_prep [1], sxt_prep [2], sxt_prep [3]
sxt_resp_inp, sxt_ssc2sss, sxt_ssn2fits [1], sxt_ssn2fits [2], sxt_summary
sxt_t6_resp0, sxt_uvf_info [1], sxt_uvf_info [3], sxt_where, sxtpnt_sum
synop_link, synop_movie, synth, tbb_info [1], tbb_info [2], tfr_decom
thumbnail_table_html, tim2dbase, tim2tfss, timeline, timeline2html, topsdb [1]
topsdb [2], tr_head_info, tr_inventory_telem, tr_lut_conv, tr_mk_seq_alph
tr_rd_inventory, tr_reformat, tr_summary_head, tr_tab_head, trace_cat
trace_cat2data, trace_cosmic2hist_accum
trace_decode_idl PLEASE USE trace_jpeg_decomp, trace_do_data_requests
trace_dph2struct [1], trace_euv_resp [2], trace_file2path, trace_files
trace_get1www_image, trace_get_vignette, trace_jpeg_dbase, trace_jpeg_decomp
trace_last_movie [1], trace_last_movie [3], trace_last_movie_queue
trace_make_tma, trace_make_tmr [1], trace_make_tmr [2], trace_make_vignette
trace_movie_index [1], trace_movie_index [2], trace_movies_prioritize [1]
trace_movies_prioritize [2], trace_newmoviedata, trace_psf_isothermal
trace_rd_jpeg, trace_recent_movie_summary, trace_special_movie [1]
trace_special_movie [2], trace_special_movie [3], trace_special_movie2
trace_struct2filename, trace_submit_request, trace_success_file, trace_t_resp
trace_unspike_time, trace_where, trace_write_genxcat, ucon_check, ucon_path
uncompress, url_decode, verner_xs, wbs_response [1], wbs_response [2], wconroi
web_seq, weekid [1], weekid [2], weekid [3], wfile, wr_selsisi_dir, write_access [1]
write_access [2], write_genxcat, write_trace, wrt1orbit [1], wrt1orbit [2]
wrt_fits_bin_exten [2], wrt_sci160k_img, wrt_sumer, wrttcplog, wrttcplog_test
wrtwkdat, wwwidl_server_check, wwwidl_watchdog [1], wwwidl_watchdog [2]
xcheckip, xdisp_fits, xdisp_sci5k, xdisp_tfr, xdisp_trace [1], xdisp_trace2
xdisp_trace3, xhkplot, xpickfile2, xr_mk_abun_file, xread_hist, xsearch_obs
xset_chain [1], xset_chain [2], xso_search, xsw2tree, xsw2tree_event, xswlist [2]
xwrite_hist, ycopy, ydb_exist [1], ydb_exist [2], ydb_exist [3], ydb_exist [4]
ydb_install [1], ydb_install [2], ydb_use, ydump, yo_index2path, yo_mkos1_dbase
yo_xda2legacy, yohkoh_files, yopos [1], yopos [2]
EXAMPLES:
IDL> pixfile = concat_dir('$DIR_GIS_MODEL','pixels.dat')
IDL> file = ['f1.dat','f2.dat','f3.dat']
IDL> dir = '$DIR_NIS_CAL'
IDL>
CALLS: ***
BREAK_PATH [1], BREAK_PATH [2], BREAK_PATH [3], Bell, CHKLOG [1], CHKLOG [2]
CHK_DIR [1], CHK_DIR [2]
RESTRICTIONS:
The version of CONCAT_DIR available at
http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/system/concat_dir.pro
includes (mostly) additional VMS-specific keywords.
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
Changed loops to long integer W. Landsman December 1998
Added Mac support, translate Windows environment variables,
& treat case where dirname ends in '/' W. Landsman Feb. 2000
Assume since V5.5, remove VMS support W. Landsman Sep. 2006
[Previous]
[Next]
Project : SOHO - CDS
Name : CONCAT_STRUCT
Purpose : concatanate two structures
Explanation : concatanates two structures by using COPY_STRUCT to
avoid the problem of concatanating two differently named
structures.
Use : NEW_STRUCT=CONCAT_STRUCT(STRUCT1,STRUCT2)
Inputs : STRUCT1,2 = input structures
Opt. Inputs : None.
Outputs : NEW_STRUCT = concatanated structure
Opt. Outputs: None.
Keywords : ERR = err string
NOTAG_CHECK = don't check if tag names match.
NONEST_CHECK = don't check if nested elements differ
Category : Structure handling
CALLS: ***
CLEAR_STRUCT, COPY_STRUCT [1], COPY_STRUCT [2], COPY_STRUCT [3], DELVARX [1]
DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, GET_MAX_TAG, MATCH_STRUCT
MERGE_STRUCT, SINCE_VERSION [1], SINCE_VERSION [2], delvarx [5], is_struct
CALLED BY:
FIND_CDS_STUDY, GET_CDS_ASRUN, GET_CDS_RASTER, GET_CDS_STUDY, IAP2STC
ITOOL_LOAD_IMAGE, LIST_SUPPORT, LIST_TO_DETAIL, MK_CDS_PLAN, MK_PLAN_ADD
MK_PLAN_CHANGE, MK_PLAN_CLONE, MK_PLAN_CONV, MK_PLAN_LOAD, MK_PLAN_PRIV
MK_PLAN_RECAL, MK_PLAN_WRITE, MK_SOHO, MK_STUDY, RD_PLAN, RD_RESOURCE, READ_CDS
STEREO_LOOP, UPDATE_KAP, UPD_SCI_PLAN, XCDS_BOOK, XCPT, get_gevloc_data
mk_query [1], mk_query [2], mk_query_genx, mreadfits_sxig12, ssw_get_sources
ssw_getdst, time_window, timegrid, trace_get_vignette
History : 22 September 1994, Zarro (ARC) - written
22 April 2006, Zarro (L-3Com/GSFC) - improved with STRUCT_ASSIGN
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Name: confac
Purpose: simplify interface to congrid
Input Parameters:
image - image to congrid (2D or 3D ok)
factor - congrid factor (arbitrary default=.25)
Keyword Parameters:
interpolate - bilinear interp - (see congrid)
cubic - cubic spline inter (see congrid)
CALLS: ***
BOX_MESSAGE, CONGRID [1], CONGRID [2], CONGRID [3], data_chk [1], data_chk [2]
CALLED BY:
IMAGE_REGISTER, eit_proton_summary
History:
Written by Tom Berger, LMSAL
12-Nov-1998 - S.L.Freeland - added a little doc -> SSW
10-Dec-1999 - S.L.Freeland - protect against no FAC (supply default=.25)
allow "image" to be 3D ("cube")
Got rid of unstructured exit...
[Previous]
[Next]
Name: configure_http
Purpose: configure an HTTP server within the SSW environment
Input Parameters:
path_http - pathname for 'top HTTP' (prompted if not supplied)
top_http - URL for 'top HTTP' (prompted if not supplied)
Keyword_parameters:
imply relative to http parent
Calling Sequence:
configure_http [path_http, top_http]
-OR- configure_http,/XXX ; set path and url http => parent_http/XXX
-OR- configure_http,/LOCAL ; use current directory
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2], file_exist [1]
file_exist [3], get_logenv [1], get_logenv [2], set_logenv [1], set_logenv [2]
str_replace [1], str_replace [2]
CALLED BY:
special_movie, trace_do_data_requests, trace_request_summary
trace_submit_request
History:
2-jun-1997 - S.L.Freeland (sxt/ypop/eit/trace...)
4-April-1998 - S.L.Freeland slightly more general (cdaw prep)
14-April-1998 - S.L.Freeland - add /LOCAL switch and function
Motivation:
http utilities available under SSW use the enviromentals
$path_http and $top_http to generate WWW documents, etc.
For sites with only ONE parent http, those environmentals may
be set in $SSW/site/setup/setup.ssw_env - this routine allows
multiple 'tops' at a site, interactive or batch job re-definitions
[Previous]
[Next]
NAME:
CONFLX
PURPOSE:
Calculate continuum flux in (ph s-1 A-1) or (erg s-1 A-1).
The resultant flux assumes an emission measure of 1.e50 cm^3.
CALLING SEQUENCE:
Continuum_flux = CONFLX(TE_6,WAVE) ; photons s-1 A-1
Continuum_flux = CONFLX(TE_6,WAVE,/erg) ; erg s-1 A-1
INPUTS:
TE_6 = Electron temperature in MK. (1-d vector or scalar)
WAVE = Wavelength in Angstroms. (1-d vector or scalar)
OPTIONAL INPUTS:
OPT = Options: (must be scalar integer)
Bit Value Effect
0 1 This bit sets the units of the flux calculations.
If this bit is not set: photons s-1
If this is set: erg s-1.
1 2 This bits controls the calculation which is used
to compute the continuum flux.
If this bit is NOT set: approx of Mewe, Groenschild,
and van den Oord (1985, Paper V).
If this bit IS set: Mewe, Lemen, and van den Oord (1986,
Paper VI).
**** Prior to 29-Sep-94 default was OPT = 0 *****
**** After 29-Sep-94 default is OPT = 2 *****
ERG = 1 Will force Bit 0 of OPT to be set: calculation in erg s-1.
APPROX = 1 Will unset Bit 1 of OPT (to use Mewe Paper V approximations)
**** ERG and/or APPROX keywords will be ignored if OPT is defined. *****
OUTPUTS:
Function result = Vector (or array) continuum fluxes.
If one input is a scalar and other is a vector, the result will be
a vector which is the length of the input variable.
If both inputs are vectors, the output will be a two-dimensional
array of the type: FLTARR(N_ELEMENTS(TE_6),N(ELEMENTS(WAVE)).
CALLS: ***
ACGAUNT [1], ACGAUNT [2]
CALLED BY:
bcs_spec, mewe_spec mewe_spec_lwa, mewe_spec [1], mewe_spec [2]
COMMON BLOCKS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
TE_6 must not be of complex type.
WAVE must not be of complex type.
TE_6 and WAVE must be scalers or 1-d vectors. Multi-dimensional
arrays are not permitted and may cause the routine to halt with
an error.
PROCEDURE:
OPT = 0 (OPT and 2) eq 0 [bit 0 is not set]
Calculation is based on equations no. 29 and 30
in R. Mewe, J. Schrijver, and J. Sylwester (A. & A. Suppl., 40, 327.),
but the G_c formula was updated and is given by Mewe, Gronenchild,
and van den Oord (Paper V, A. & A. Suppl. Ser. 62, 197). Equation (3)
of Paper V reads as:
G_c = 27.83*(Te_6+0.65)^(-1.33) + 0.15 * wave^0.34 * Te_6^0.422
The approximation works well in the range of the BCS (e.g., 1.8 - 3.2 A).
OPT => (OPT and 2) eq 2 [bit 1 is set]
Calculation is performed using the ACGAUNT routine given by Mewe,
Lemen, and van den Oord (Paper VI, 1986, A. & A. Suppl., 65, 511.).
If OPT is not set, will default to OPT=2
MODIFICATION HISTORY:
Mar, 1986, Written, J.R. Lemen, MSSL
Dec, 1987, J.R. Lemen, LPARL
Removed the restriction that either TE_6 or WAVE could be a
vector, but not both. See discussion above under "OUTPUTS:".
The option to use the improved approximation given by Mewe,
Lemen, and van den Oord (1986) was added.
Feb, 1988, J.R. Lemen, LPARL
Added the option of erg s-1 A-1 or ph s-1 A-1
Feb, 1991, N.Nitta
Changed to IDL Version 2.0 format (getting rid of linkimage)
31-jul-93, JRL, Added check on exponent to prevent Floating underflow message
22-sep-94, JMM, removed check on the exponent, do calculation in logs
to avoid the underflows.
29-sep-94, JRL, Added ERG and APPROX switches. Changed default to opt=2
1-oct-94, JRL, Removed a diagnostic stop
22-Feb-96, JRL, Minor change to document header
[Previous]
[Next]
Project : SOHO - CDS
Name :
CONGRDI()
Purpose :
Interpolates an array into another array.
Explanation :
This procedure interpolates an array into another array. It emulates
CONGRIDI, except that the image is smoothed from edge to edge.
Consequently, the points will not interpolate the same way. CONGRIDI
uses the formula:
I_NEW = I_OLD * N_NEW / N_OLD
where I_OLD is a point in the original array, N_OLD is the size of the
old array (in one of the dimensions), and N_NEW is the size of the new
array. CONGRDI, on the other hand, uses the formula:
I_NEW = I_OLD * (N_NEW - 1) / (N_OLD - 1)
In this case, a point on the edge I_OLD = N_OLD-1 will transform to
N_NEW-1.
Use :
NEW_ARRAY = CONGRDI( ARRAY, NXP, NYP )
Inputs :
ARRAY = The two-dimensional array to be interpolated.
NXP, NYP = The dimensions of the output array.
Opt. Inputs :
None.
Outputs :
The function returns the interpolated array.
Opt. Outputs:
None.
Keywords :
None.
Calls :
None.
CALLED BY:
EXPAND_TV
Common :
None.
Restrictions:
ARRAY must be two-dimensional, and NXP and NYP must both be > 1.
In general, the SERTS image display routines use several non-standard
system variables. These system variables are defined in the procedure
IMAGELIB. It is suggested that the command IMAGELIB be placed in the
user's IDL_STARTUP file.
Some routines also require the SERTS graphics devices software,
generally found in a parallel directory at the site where this software
was obtained. Those routines have their own special system variables.
Side effects:
None.
Category :
Utilities, Image_display.
Prev. Hist. :
W.T.T., Oct. 1987.
Written :
William Thompson, GSFC, October 1987.
Modified :
Version 1, William Thompson, GSFC, 13 May 1993.
Incorporated into CDS library.
Version :
Version 1, 13 May 1993.
[Previous]
[Next]
NAME:
CONS_DEC
PURPOSE:
Obtain the X and Y coordinates of a line of constant declination
EXPLANATION:
Returns a set of Y pixels values, given an image with astrometry, and
either
(1) A set of X pixel values, and a scalar declination value, or
(2) A set of declination values, and a scalar X value
Form (1) can be used to find the (X,Y) values of a line of constant
declination. Form (2) can be used to find the Y positions of a set
declinations, along a line of constant X.
CALLING SEQUENCE:
Y = CONS_DEC( DEC, X, ASTR, [ ALPHA ])
INPUTS:
DEC - Declination value(s) in DEGREES (-!PI/2 < DEC < !PI/2).
If X is a vector, then DEC must be a scalar.
X - Specified X pixel value(s) for line of constant declination
If DEC is a vector, then X must be a scalar.
ASTR - Astrometry structure, as extracted from a FITS header by the
procedure EXTAST
OUTPUT:
Y - Computed set of Y pixel values. The number of Y values is the
same as either DEC or X, whichever is greater.
OPTIONAL OUTPUT:
ALPHA - the right ascensions (DEGREES) associated with the (X,Y) points
CALLS: ***
AD2XY
CALLED BY:
IMCONTOUR
RESTRICTIONS:
Implemented only for the TANgent, SIN and CAR projections
NOTES:
The algorithm (and notation) is based on AIPS Memo 27 by Eric Greisen,
with modifications for a coordinate description (CD) matrix as
described in Paper II of Greisen & Calabretta (2002, A&A, 395, 1077).
These documents are available from
http://www.cv.nrao.edu/fits/documents/wcs/wcs.html
REVISION HISTORY:
Written, Wayne Landsman STX Co. April 1988
Use new astrometry structure, W. Landsman HSTX Jan. 1994
Use CD matrix, add SIN projection W. Landsman HSTX April, 1996
Converted to IDL V5.0 W. Landsman September 1997
Fix case where DEC is scalar, X is vector W. Landsman RITSS Feb. 2000
Fix possible sign error introduced Jan. 2000 W. Landsman May 2000
Work for the CARee' projection W. Landsman May 2003
[Previous]
[Next]
NAME:
CONS_RA
PURPOSE:
Obtain the X and Y coordinates of a line of constant right ascension
EXPLANATION:
Return a set of X pixel values given an image with astrometry,
and either
(1) a set of Y pixel values, and a scalar right ascension (or
longitude), or
(2) a set of right ascension values, and a scalar Y value.
In usage (1), CONS_RA can be used to determine the (X,Y) values
of a line of constant right ascension. In usage (2), CONS_RA can
used to determine the X positions of specified RA values, along a
line of constant Y.
CALLING SEQUENCE:
X = CONS_RA( RA, Y, ASTR, [ DEC] )
INPUTS:
RA - Right Ascension value in DEGREES (0 < RA < 360.). If Y is a
vector, then RA must be a scalar
Y - Specified Y pixel value(s) for line of constant right ascension
If RA is a vector, then Y must be a scalar
ASTR - Astrometry structure as extracted from a FITS header by the
procedure EXTAST
OUTPUTS
X - Computed set of X pixel values. The number of elements of X
is the maximum of the number of elements of RA and Y.
OPTIONAL OUTPUT:
DEC - Computed set of declinations (in DEGREES) for X,Y, coordinates
NOTES:
The algorithm (and notation) is based on AIPS Memo 27 by Eric Greisen,
with modifications for a coordinate description (CD) matrix as
described in Paper II of Calabretta & Greisen (2002, A&A, 395, 1077).
These documents are available from
http://www.cv.nrao.edu/fits/documents/wcs/wcs.html
CALLS: ***
AD2XY
CALLED BY:
IMCONTOUR
RESTRICTIONS:
Implemente