[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:
Implemented only for the TANgent, SIN and CARtesian projections
REVISION HISTORY:
Written, Wayne Landsman STX Co. April, 1988
Algorithm adapted from AIPS memo No. 27 by Eric Griessen
New astrometry structure
Converted to IDL V5.0 W. Landsman September 1997
Added SIN projection W. Landsman January 2000
Fix possible sign error introduced Jan. 2000 W. Landsman May 2000
Work for the CARee' projection W. Landsman May 2003
[Previous]
[Next]
Project : SOHO - CDS
Name :
CONTV
Purpose :
Places contour plots over displayed images.
Explanation :
Places contour plots over images displayed with the EXPTV or similar
procedure.
Use :
CONTV, ARRAY
CONTV, ARRAY, MX, MY, JX, JY
Inputs :
ARRAY = Image to make contour plot from. This may have a different
number of pixels as the original image being overlaid.
Also, the origin and pixel scale(s) may differ from the
original image.
Opt. Inputs :
MX, MY = The size of the image on the display screen.
JX, JY = The position of the lower left-hand corner of the image on
the display screen.
If the optional parameters are not passed, then they are retrieved with
GET_TV_SCALE. It is anticipated that these optional parameters will
only be used in extremely rare circumstances.
Outputs :
The values of MX, MY and JX, JY are printed to the terminal screen.
Opt. Outputs:
None.
Keywords :
COLOR = Color to use for drawing the contours.
LEVELS = Levels to use for drawing the contours.
MAX_VALUE= Maximum value to use for drawing the contours. Pixels with
values above MAX_VALUE will be ignored in drawing the
contours.
DISABLE = If set, then TVSELECT not used.
THICK = Plotting thickness.
ORIGIN = Two-element array containing the coordinate value in
physical units of the center of the first pixel in the
image. If not passed, then [0,0] is assumed.
SCALE = Pixel scale in physical units. Can have either one or two
elements. If not passed, then 1 is assumed in both
directions.
Calls : ***
GET_TV_SCALE, TVSELECT, TVUNSELECT
CALLED BY:
NIS_QUICKLOOK, UTPLOT_IMAGE, XCOR_CDS
Common :
None.
Restrictions:
ARRAY must be two-dimensional.
It is important that the user select the graphics device/window, and
image region before calling this routine. For instance, if the image
was displayed using EXPTV,/DISABLE, then this routine should also be
called with the /DISABLE keyword. If multiple images are displayed
within the same window, then use SETIMAGE to select the image before
calling this routine.
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:
If the optional parameters MX, MY, and JX, JY are passed, then it is
assumed that the image being overlaid was displayed with the same
settings, and that the scale was in pixels (SCALE=1) with the first
pixel in the original image being equivalent to [0,0].
Category :
Utilities, Image_display.
Prev. Hist. :
W.T.T., Oct. 1987.
W.T.T., Feb. 1991, modified to use TVSELECT, TVUNSELECT.
William Thompson, May 1992, changed to call GET_TV_SCALE.
William Thompson, Nov 1992, removed call to INIT_SC1_SC4.
William Thompson, Dec 1992, added THICK keyword.
William Thompson, Jan 1993, corrected small positioning error.
Written :
William Thompson, GSFC, October 1987.
Modified :
Version 1, William Thompson, GSFC, 13 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 3 September 1993.
Added ORIGIN and SCALE keywords. Rewrote to use the graphics
scale generated by the routine that displayed the image. This
relaxes some of the restrictions imposed by the original
routine. It is no longer necessary for the overlaid contour
plot and the original image to match pixel for pixel.
Version 3, William Thompson, GSFC, 9 November 1993.
Removed (unnecessary) restriction that scales be positive.
Version 4, 14-May-2001, William Thompson, GSFC
Use modern system variables.
Version :
Version 4, 14-May-2001
[Previous]
[Next]
NAME:
CONV_A2H
PURPOSE:
Converts arcmins-from-suncenter coordinates to heliographic
coordinates.
METHOD:
This is a vectorized version and replacement of PIX2HEL. It calls
GET_PB0R with the date to get the line-of-sight axial tilt. The SXT
roll angle correction is no longer default, allowing use with GBO data.
It will also work with any CONSISTENT pixel resolution.
CALLING SEQUENCE:
lonlat = conv_a2h(ang, date)
lonlat = conv_a2h(ang, date, /string)
lonlat = conv_a2h(ang, date, off_limb=off_limb)
INPUT:
ang - is a vector of angles from sun center in default units of
arcseconds. It should be 2xN.
(0,*) = angle in E/W direction with W positive
(1,*) = angle in N/S direction with N positive
date - Unless the date is supplied, today's date is used.
This will affect the Solar axial tilt, B0.
OUTPUT:
lonlat - Heliographic coordinates in decimal degrees.
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
If the input coordinates are off the solar limb,
the output is the radial projection back to the nearest
point on the limb.
Output is FLOAT (or DOUBLE if input is DOUBLE)
CALLED BY:
NAR2COORD, PP_MWLT2SXT, chk_pointing, conv_a2c, conv_p2c, conv_p2h [1], conv_p2h [2]
mk_gsn_obs_s1, pr_gsn [1], pr_gsn [2], ssw_flare_locator
OPTIONAL KEYWORD INPUT:
arcmin - when set the input is in arcminutes.
string - If set, returns coordinates as strings
with 'N/S' and 'W/E' attatched.
OPTIONAL KEYWORD OUTPUT:
off_limb- A flag which is set to 1 when there are
points off the limb.
CAUTIONS: Note the treatment of points off the limb.
CALLS: ***
CONV_H2HS [1], CONV_H2HS [2], anytim2ints [1], anytim2ints [2], get_rb0p [1]
get_rb0p [2]
HISTORY:
Written by A.McAllister Jun-93
16-Jun-93 (MDM) - Various changes.
17-Jun-93 (MDM) - Renamed variable XYZ to avoid conflict with astron
library function called XYZ
22-Jun-93 (MDM) - Corrected typo
29-Jun-93 (AHM) - Fixed up the large longitude and pole point code.
3-Aug-93 (MDM) - Corrected the date option
- Incorporated 27-jul-93 (AHM) bug fix in large
longitude code.
16-Oct-93 (MDM) - Changed the header information
[Previous]
[Next]
NAME:
conv_a2p
PURPOSE:
To convert from a an angle from sun center to a pixel location
SAMPLE CALLING SEQUENCE:
pix = conv_a2p(ang, date)
pix = conv_a2p(ang, suncenter=[400,400])
INPUT:
ang - The angle in arcseconds as viewed from the earth.
(0,*) = E/W direction with W positive
(1,*) = N/S direction with N positive
OPTIONAL INPUT:
date - The date for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
pix - The pixel coordinates of the point(s) in question. Larger pixel
address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
CALLS: ***
anytim2ints [1], anytim2ints [2], get_rb0p [1], get_rb0p [2], gt_pix_size
sxt_cen [1], sxt_cen [2]
CALLED BY:
CONV_A2HXT, SFD_CDS, SOHO_COORDS, align_prep [1], align_prep [2], align_prep [3]
conv_c2p, conv_h2p [1], conv_h2p [2], mk_coal_movie, sxt_obs_coord [1]
sxt_obs_coord [2]
OPTIONAL KEYWORD INPUT:
roll - This is the S/C roll value in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter- Pass the derived location of the sun center in pixels (x,y)
pix_size- The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows the
routine to be used for ground based images.
HISTORY:
Written 16-Jun-93 by M.Morrison
29-Jun-93 (AHM) Corrected calling sequence.
3-Aug-93 (MDM) Corrected the date option
16-Oct-93 (MDM) Removed the "tilt" keyword option
[Previous]
[Next]
NAME:
CONV_H2A
PURPOSE:
Computes arcsecs-from-suncenter coordinates from
heliographic coordinate inputs (inverse of CONV_A2H).
CALLING SEQUENCE:
arcvec = conv_h2a(helio, date [,/arcmin])
INPUT:
helio - is a vector of heliocentric coordinates. It should be 2xN.
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
They can also be strings in the form 'N30W23'.
date - Unless the date is supplied, today's date is used.
This will affect the Solar axial tilt, B0.
OUTPUT:
arcvec - The angle in arcseconds as viewed from the earth.
(0,*) = E/W direction with W positive
(1,*) = N/S direction with N positive
CALLED BY:
HELIOCENTRIC, PP_MWLT2SXT, PP_SXT2ANY, conv_c2a, conv_c2p, conv_h2p [1]
conv_h2p [2], foreshort, mk_gsn_obs_s1, read_soon, track_h2a [1], track_h2a [2]
track_h2a [3], xsxt_prep_event
OPTIONAL KEYWORD INPUT:
arcmin - If set, output is in arcminutes, rather than
arcseconds.
OPTIONAL KEYWORD OUTPUT:
behind - Returns a binary vector set to 1 when points are behind
the visible limb.
CAUTIONS: There is a limit (although large) on how many pixels IDL's
memory will support at once.
CALLS: ***
CONV_HS2H [1], CONV_HS2H [2], anytim2ints [1], anytim2ints [2], get_rb0p [1]
get_rb0p [2]
HISTORY:
Written 10-Jun-93 by A. McAllister (using HEL2PIX and then VEC_H2P
as the starting point)
16-Jun-93 (MDM) - Modified the header and parameters somewhat
17-Jun-93 (MDM) - Renamed variable XYZ to avoid conflict with astron
library function called XYZ
22-Jun-93 (MDM) - Corrected typo
28-Jun-93 (AHM) - Fixed bug affecting vector usage.
29-Jun-93 (AHM) - added BEHIND keyword.
21-Jul-93 (MDM) - Modified header information
3-Aug-93 (MDM) Corrected the date option
[Previous]
[Next]
NAME:
conv_h2p
PURPOSE:
To convert from a pixel location to heliocentric coordinates
SAMPLE CALLING SEQUENCE:
pix = conv_h2p(helio, date)
pix = conv_h2p( [ew,ns], date)
pix = conv_h2p(helio, suncenter=[400,400])
INPUT:
helio - The heliocentric angle in degrees
(0,*) = longitude (degrees) W positive
(1,*) = latitude (degrees) N positive
OPTIONAL INPUT:
date - The date for the conversion in question. This is needed
for SXT so that the pixel location of the center of the sun
can be determined.
OUTPUT:
pix - The pixel coordinates of the point(s) in question. Larger pixel
address towards the N and W.
(0,*) = E/W direction
(1,*) = N/S direction
CALLS: ***
CONV_H2A [1], CONV_H2A [2], conv_a2p [1], conv_a2p [2]
CALLED BY:
ALIGN1BIGGRAM, CONV_H2HXT [1], CONV_H2HXT [2], HEL2PIX, LAY1GKM, NAR2COORD
SXT_QLOOK, get_hxt_pos, sleazy_rot, sol_rot [1], sol_rot [2], ssw_track_fov
sxt_obs_coord [1], sxt_obs_coord [2], xsxt_prep_event
OPTIONAL KEYWORD INPUT:
roll - This is the S/C roll value in degrees
hxa - If set, use HXA_SUNCENTER to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
cmd - If set, use SXT_CMD_PNT to determine the location of the
sun center in pixels. Default is to use GET_SUNCENTER.
suncenter- Pass the derived location of the sun center in pixels (x,y)
pix_size- The size of the pixels in arcseconds. If not passed, it
uses GT_PIX_SIZE (2.45 arcsec). This option allows the
routine to be used for ground based images.
radius - The radius in pixels. GET_RB0P is called to get the radius
and it is used to get the pixel size. This option allows the
routine to be used for ground based images.
OPTIONAL KEYWORD OUTPUT:
behind - A flag which is set to 1 when there are points behind the limb.
HISTORY:
Written 16-Jun-93 by M.Morrison
Corrected keyword useage 29-jun-93 A.McA.
16-Oct-93 (MDM) - Removed the tilt keyword input
[Previous]
[Next]
NAME:
CONV_UNIX_VAX
PURPOSE:
To convert Unix IDL data types to Vax IDL data types.
EXPLANATION:
CONV_UNIX_VAX assumes the Unix IDL data type is IEEE standard in either
big-endian or little-endian format.
CALLING SEQUENCE:
CONV_UNIX_VAX, variable, [ SOURCE_ARCH = ]
PARAMETERS:
variable - The data variable to be converted. This may be a scalar
or an array. Valid datatypes are integer, longword,
floating point, and double precision. The result of the
conversion is passed back in the original variable.
OPTIONAL INPUT KEYWORD:
SOURCE_ARCH = name (string) of source architecture
if using this function on a VAX, otherwise
!VERSION.ARCH is used to determine the conversion.
**If run on a VAX, the default is to assume the source to be
a little-endian machine with IEEE floating point
(e.g. MIPSEL or Alpha***).
CALLED BY:
HOST_TO_IEEE [1], HOST_TO_IEEE [2], HOST_TO_IEEE [3], HOST_TO_IEEE [4]
IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3], IEEE_TO_HOST [4]
RD_TGRS_SPEC [1], RD_TGRS_SPEC [2], USE_VAX_FLOAT, rd_spec
RESTRICTIONS:
Requires that data be from IEEE standard Unix machines
(e.g. SUN, MIPSEL, or Alpha).
EXAMPLE:
Read a 100 by 100 matrix of floating point numbers from a data
file created on a Sun. Then convert the matrix values into
VAX format.
IDL> openr,1,'vax_float.dat
IDL> data = fltarr(100,100)
IDL> forrd,1,data
IDL> CONV_UNIX_VAX,data,SOURCE_ARCH='sparc'
MODIFICATION HISTORY:
Version 1 By John Hoegy 13-Jun-88
04-May-90 - WTT: Created CONV_UNIX_VAX from VAX2SUN,
reversing floating point procedure.
Modified P. Keegstra September 1994
Implemented MIPSEL and ALPHA architecture,
distinguishing VMS and OSF
Modified P. Keegstra February 1995
Added 386 PC based architectures
If since V5.1 then VMS is always little endian June 1998
Convert to IDL V5.0 W. Landsman June 1998
[Previous]
[Next]
NAME:
CONV_VAX_UNIX
PURPOSE:
To convert VAX IDL data types to UNIX (Sun,MIPS,etc.) IDL data types.
EXPLANTION:
Generally used on non-Vax machines to parse data created on Vaxes.
The architecture is obtained from IDL sys.var. !VERSION.ARCH.
CALLING SEQUENCE:
var_unix = conv_vax_unix( var_vax, [TARGET_ARCH = ] )
INPUT PARAMETER:
var_vax - The data variable to be converted. This may be a scalar
or an array. All IDL datatypes are valid (including
structures). The result of the conversion is returned by the
function.
OPTIONAL INPUT KEYWORD:
TARGET_ARCH = name (string) of desired target architecture
(e.g. 'sparc' or 'mipsel'). If not supplied, then
!VERSION.ARCH is used to determine the target architecture.
Note that CONV_VAX_UNIX will leave variables unchanged on a
VMS machine, unless the TARGET_ARCH keyword is set.
CALLED BY:
ASCII_RAW, CALIB_HIST, COEFDATA, DN_FILE, EDITOC, FIND_PACKET, FS_OPEN [1], FS_READ_DD
GAP_FILE, HOST_TO_IEEE [1], HOST_TO_IEEE [2], HOST_TO_IEEE [3], HOST_TO_IEEE [4]
HV_FILE, MERGE_BURSTS, QL_READBDB, READSUM, READ_BATSE_DD, READ_BDAS_DRM
READ_DNFILE, READ_GAPFILE, READ_HVFILE, READ_OCC_DISCSP, READ_SHER, SB4_Read
USE_VAX_FLOAT, UVSP_CAT, UVSP_CATPRINT, WRITE_LOG, batse_read_cat, batse_write_log
load_struct, read_cat, read_dd, uvspplot, xzchange
EXAMPLE:
Read a 100 by 100 matrix of floating point numbers from a data
file created on a VAX. Then convert the matrix values into Sun format.
IDL> openr,1,'vax_float.dat'
IDL> data = fltarr(100,100)
IDL> readu,1,data
IDL> data = conv_vax_unix( data )
NOTE:
Prior to IDL V5.1, the architecture "alpha" was ambiguous, since VMS
alpha IDL used VAX D-float while OSF/1 alpha IDL uses little-endian
IEEE. The program uses !VERSION.OS to do the right thing when
converting to a representation appropriate for the current
platform. To convert to a representation appropriate for
an OSF/1 alpha on a VAX or (pre V5.1) VMS alpha, please specify
the "mipsel" (or "i386") architecture.
MODIFICATION HISTORY:
Written F. Varosi August 1990
Modified P. Keegstra April 1992
Implemented MIPSEL architecture
Modified P. Keegstra July 1994
Implemented ALPHA architecture, distinguishing VMS and OSF
Modified P. Keegstra February 1995
Added 386 PC based architectures
Modified P. Keegstra March 1995
Added note, restored and fixed old specifiers
for 386 PC based architectures
Modified W. Landsman for VAX problems in V4.0 August 1995
Work for double complex variables August 1995
Remove informational messages under VMS August 1997
Since V5.1, IDL VMS uses little endian IEEE June 1998
Convert to IDL V5.0 June 1998
[Previous]
[Next]
PROJECT:
SDAC
NAME:
CONVERT_2_STREAM
PURPOSE:
This procedure converts fixed-length-record files to stream files.
CATEGORY:
GEN, I/O
CALLING SEQUENCE:
convert_2_stream, filename [,/delete]
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FCHECK, OS_FAMILY, break_file [4]
INPUTS:
filename - name of indexed file to convert to stream
new file has _stream appended to its extension,
unless delete keyword is activated
KEYWORD INPUTS:
rec_length - logical record length. For fixed-record-length files that have
been ftp'd onto a VMS system, pad bytes are placed at the end of the file to
fill out the last 512 block record. if
OPTIONAL INPUTS:
delete - if set delete the old file
OUTPUTS:
none
OPTIONAL OUTPUTS:
Outfile - filename to write to if given.
CALLED BY:
SPECTRA2FITS
COMMON BLOCKS:
none
SIDE EFFECTS:
new file is created in the directory of the old file
IF file is already a stream file it will be deleted
RESTRICTIONS:
Only run on VMS machines.
File must not be in STREAM format Already
must have permission to create the new file and delete the old
PROCEDURE:
none
MODIFICATION HISTORY:
ras, 16-apr-95
eac, 23-aug-95 ; if delete keyword activated, then
new filename will be same as old, only 1 ver higher
eac, 23-aug-95 ; add +vers to newfile name, so program won't bomb
on version numbers > 1
ras, added more documentation, 7 June 1996
Version 5, richard.schwartz@gsfc.nasa.gov, 1-sep-1997, added outfile arg.
Version 6, richard.schwartz@gsfc.nasa.gov, 8-oct-1997, check for VMS.
[Previous]
[Next]
NAME:
CONVOLVE
PURPOSE:
Convolution of an image with a Point Spread Function (PSF)
EXPLANATION:
The default is to compute the convolution using a product of
Fourier transforms (for speed).
CALLING SEQUENCE:
imconv = convolve( image1, psf, FT_PSF = psf_FT )
or:
correl = convolve( image1, image2, /CORREL )
or:
correl = convolve( image, /AUTO )
INPUTS:
image = 2-D array (matrix) to be convolved with psf
psf = the Point Spread Function, (size < or = to size of image).
OPTIONAL INPUT KEYWORDS:
FT_PSF = passes out/in the Fourier transform of the PSF,
(so that it can be re-used the next time function is called).
FT_IMAGE = passes out/in the Fourier transform of image.
/CORRELATE uses the conjugate of the Fourier transform of PSF,
to compute the cross-correlation of image and PSF,
(equivalent to IDL function convol() with NO rotation of PSF)
/AUTO_CORR computes the auto-correlation function of image using FFT.
/NO_FT overrides the use of FFT, using IDL function convol() instead.
(then PSF is rotated by 180 degrees to give same result)
METHOD:
When using FFT, PSF is centered & expanded to size of image.
CALLS: ***
REAL_PART
CALLED BY:
ANDRIL_SXT, FILTER_IMAGE, MAX_ENTROPY, MAX_LIKELIHOOD, adrlb, hsi_polar_clean
HISTORY:
written, Frank Varosi, NASA/GSFC 1992.
Appropriate precision type for result depending on input image
Markus Hundertmark February 2006
Fix the bug causing the recomputation of FFT(psf) and/or FFT(image)
Sergey Koposov December 2006
[Previous]
[Next]
PROJECT:
SDAC
NAME:
COORD_CONV
PURPOSE:
This procedure computes the data, normal, and device coordinates for an input point that
is any of the three types, and returns the 3 types in xout and yout in
that order.
CATEGORY:
CALLING SEQUENCE:
COORD_CONV, X, Y, Xout, Yout
CALLS:
none
INPUTS:
Default type for input point is data. Otherwise specified by keywords DATA,NORMAL, DEVICE.
x: xaxis coordinate, must be scalar
y: yaxis coordinate, must be scalar
OPTIONAL INPUTS:
none
OUTPUTS:
Xout: the input coordinate converted to [DATA, NORMAL, DEVICE ] units as a vector
Yout: the input coordinate converted to [DATA, NORMAL, DEVICE ] units as a vector
OPTIONAL OUTPUTS:
none
KEYWORDS:
DATA: If set, input is in DATA coordinates
NORMAL: If set, input is in NORMAL coordinates
DEVICE: If set, input is in DEVICE coordinates
CALLED BY:
WFSURVEY
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
Kim Tolbert 11/26/91
[Previous]
[Next]
NAME: coord_l2v
PURPOSE: To convert linear pixel coordinates to x,y,z pixels.
CALLING SEQUENCE: xyz=coord_l2v(linind,size(array))
PARAMETERS: linind is the linear index into an array
arrsz is the result of size(array)
OUTPUT: xyz contains x, xy, or xyz integer pixel coordinates.
RETURN TYPE: INTEGER
CALLED BY:
area_mean, dejitter, gbo_rot_t, get_rect, limbpnts, rect_rot, ssw_flare_locator
RESTRICTIONS: The 3-D option is limited by the limited memory given to
nested routines. It is impossible to do large arrays.
CALLS: ***
modd
HISTORY: Drafted by A. McAllister, 12-feb-93.
Reform keyword returns the same shape as array, A.McA. 25-mar-93.
[Previous]
[Next]
NAME: coord_v2l
PURPOSE: To convert pixels (x,y,z) to linear coordinates
CALLING SEQUENCE: linind=coord_v2l(xyz,size(array))
PARAMETERS: xyz contains xy (or xyz) integer pixel coordinates
arrsz is the result of size(array) which may be larger
then the region contained in xyz
OUTPUT: linind is the linear index into an array, LONG.
CALLS: MODD
CALLED BY:
filter [3], limbpnts, spike_id, spikes [1], spikes [2]
HISTORY: Drafted by A. McAllister, 12-feb-93.
[Previous]
[Next]
NAME:
COPY_STRUCT
PURPOSE:
Copy all fields with matching tag names from one structure to another
EXPLANATION:
COPY_STRUCT is similar to the intrinisc STRUCT_ASSIGN procedure but
has optional keywords to exclude or specify specific tags.
Fields with matching tag names are copied from one structure array to
another structure array of different type.
This allows copying of tag values when equating the structures of
different types is not allowed, or when not all tags are to be copied.
Can also recursively copy from/to structures nested within structures.
Note that the number of elements in the output structure array
is automatically adjusted to equal the length of input structure array.
If this not desired then use pro copy_struct_inx which allows
specifying via subscripts which elements are copied where in the arrays.
CALLING SEQUENCE:
copy_struct, struct_From, struct_To, NT_copied
copy_struct, struct_From, struct_To, EXCEPT=["image","misc"]
copy_struct, struct_From, struct_To, /RECUR_TANDEM
INPUTS:
struct_From = structure array to copy from.
struct_To = structure array to copy values to.
KEYWORDS:
EXCEPT_TAGS = string array of tag names to ignore (to NOT copy).
Used at all levels of recursion.
SELECT_TAGS = tag names to copy (takes priority over EXCEPT).
This keyword is not passed to recursive calls in order
to avoid the confusion of not copying tags in sub-structures.
/RECUR_FROM = search for sub-structures in struct_From, and then
call copy_struct recursively for those nested structures.
/RECUR_TO = search for sub-structures of struct_To, and then
call copy_struct recursively for those nested structures.
/RECUR_TANDEM = call copy_struct recursively for the sub-structures
with matching Tag names in struct_From and struct_To
(for use when Tag names match but sub-structure types differ).
OUTPUTS:
struct_To = structure array to which new tag values are copied.
NT_copied = incremented by total # of tags copied (optional)
INTERNAL:
Recur_Level = # of times copy_struct calls itself.
This argument is for internal recursive execution only.
The user call is 1, subsequent recursive calls increment it,
and the counter is decremented before returning.
The counter is used just to find out if argument checking
should be performed, and to set NT_copied = 0 first call.
EXTERNAL CALLS:
pro match (when keyword SELECT_TAGS is specified)
CALLS: ***
MATCH [1], MATCH [2], MATCH [3]
CALLED BY:
BAT_MERGE, CALIBRATED EVENTLIST CONTROL STRUCTURE INITIALIZATION
CONCAT_STRUCT, COPY_STRUCT_INX, DRAW_FLARE, EIS_IMAGE_TOOL [1]
EIS_IMAGE_TOOL [2], EIS_LOAD_IMAGE [1], EIS_LOAD_IMAGE [2], HESSI
HSI_DEADTIME_SIM_STR, HSI_LIVETIME_SIM, HSI_SCORE2FILE, HSI_Spectrum_Control
IMAGE_TOOL, ITOOL_LOAD_IMAGE, LIST_TO_DETAIL, LOAD_TP_STRUCT, MK_CDS_PLAN, MK_SOHO
MK_STUDY, READ_KAP, TP_DB2INT, TP_DISP_RAST, TP_TP2INT, TWIDGET, UPD_SCI_PLAN, XCAMP
XCAT, XCDS_BOOK, XCPT, XPORT, XPS_SETUP, db_gbo, hsi_flarelist_extend
hsi_ui_params2control, ihy_db, spex_image_control
PROCEDURE:
Match Tag names and then use corresponding Tag numbers.
HISTORY:
written 1989 Frank Varosi STX @ NASA/GSFC
mod Jul.90 by F.V. added option to copy sub-structures RECURSIVELY.
mod Aug.90 by F.V. adjust # elements in TO (output) to equal
# elements in FROM (input) & count # of fields copied.
mod Jan.91 by F.V. added Recur_Level as internal argument so that
argument checking done just once, to avoid confusion.
Checked against Except_Tags in RECUR_FROM option.
mod Oct.91 by F.V. added option SELECT_TAGS= selected field names.
mod Aug.95 by W. Landsman to fix match of a single selected tag.
mod Mar.97 by F.V. do not pass the SELECT_TAGS keyword in recursion.
Converted to IDL V5.0 W. Landsman September 1997
mod May 01 by D. Schlegel use long integers
[Previous]
[Next]
NAME:
COPY_STRUCT
PURPOSE:
Copy all fields with matching tag names from one structure to another
EXPLANATION:
COPY_STRUCT is similar to the intrinisc STRUCT_ASSIGN procedure but
has optional keywords to exclude or specify specific tags.
Fields with matching tag names are copied from one structure array to
another structure array of different type.
This allows copying of tag values when equating the structures of
different types is not allowed, or when not all tags are to be copied.
Can also recursively copy from/to structures nested within structures.
Note that the number of elements in the output structure array
is automatically adjusted to equal the length of input structure array.
If this not desired then use pro copy_struct_inx which allows
specifying via subscripts which elements are copied where in the arrays.
CALLING SEQUENCE:
copy_struct, struct_From, struct_To, NT_copied
copy_struct, struct_From, struct_To, EXCEPT=["image","misc"]
copy_struct, struct_From, struct_To, /RECUR_TANDEM
INPUTS:
struct_From = structure array to copy from.
struct_To = structure array to copy values to.
KEYWORDS:
EXCEPT_TAGS = string array of tag names to ignore (to NOT copy).
Used at all levels of recursion.
SELECT_TAGS = tag names to copy (takes priority over EXCEPT).
This keyword is not passed to recursive calls in order
to avoid the confusion of not copying tags in sub-structures.
/RECUR_FROM = search for sub-structures in struct_From, and then
call copy_struct recursively for those nested structures.
/RECUR_TO = search for sub-structures of struct_To, and then
call copy_struct recursively for those nested structures.
/RECUR_TANDEM = call copy_struct recursively for the sub-structures
with matching Tag names in struct_From and struct_To
(for use when Tag names match but sub-structure types differ).
OUTPUTS:
struct_To = structure array to which new tag values are copied.
NT_copied = incremented by total # of tags copied (optional)
INTERNAL:
Recur_Level = # of times copy_struct calls itself.
This argument is for internal recursive execution only.
The user call is 1, subsequent recursive calls increment it,
and the counter is decremented before returning.
The counter is used just to find out if argument checking
should be performed, and to set NT_copied = 0 first call.
EXTERNAL CALLS:
pro match (when keyword SELECT_TAGS is specified)
CALLS: ***
MATCH [1], MATCH [2], MATCH [3]
CALLED BY:
BAT_MERGE, CALIBRATED EVENTLIST CONTROL STRUCTURE INITIALIZATION
CONCAT_STRUCT, COPY_STRUCT_INX, DRAW_FLARE, EIS_IMAGE_TOOL [1]
EIS_IMAGE_TOOL [2], EIS_LOAD_IMAGE [1], EIS_LOAD_IMAGE [2], HESSI
HSI_DEADTIME_SIM_STR, HSI_LIVETIME_SIM, HSI_SCORE2FILE, HSI_Spectrum_Control
IMAGE_TOOL, ITOOL_LOAD_IMAGE, LIST_TO_DETAIL, LOAD_TP_STRUCT, MK_CDS_PLAN, MK_SOHO
MK_STUDY, READ_KAP, TP_DB2INT, TP_DISP_RAST, TP_TP2INT, TWIDGET, UPD_SCI_PLAN, XCAMP
XCAT, XCDS_BOOK, XCPT, XPORT, XPS_SETUP, db_gbo, hsi_flarelist_extend
hsi_ui_params2control, ihy_db, spex_image_control
PROCEDURE:
Match Tag names and then use corresponding Tag numbers.
HISTORY:
written 1989 Frank Varosi STX @ NASA/GSFC
mod Jul.90 by F.V. added option to copy sub-structures RECURSIVELY.
mod Aug.90 by F.V. adjust # elements in TO (output) to equal
# elements in FROM (input) & count # of fields copied.
mod Jan.91 by F.V. added Recur_Level as internal argument so that
argument checking done just once, to avoid confusion.
Checked against Except_Tags in RECUR_FROM option.
mod Oct.91 by F.V. added option SELECT_TAGS= selected field names.
mod Aug.95 by W. Landsman to fix match of a single selected tag.
mod Mar.97 by F.V. do not pass the SELECT_TAGS keyword in recursion.
Converted to IDL V5.0 W. Landsman September 1997
mod May 01 by D. Schlegel use long integers
[Previous]
[Next]
NAME:
COPY_STRUCT_INX
PURPOSE:
Copy matching tags & specified indices from one structure to another
EXPLANATION:
Copy all fields with matching tag names (except for "except_Tags")
from one structure array to another structure array of different type.
This allows copying of tag values when equating the structures of
different types is not allowed, or when not all tags are to be copied.
Can also recursively copy from/to structures nested within structures.
This procedure is same as copy_struct with option to
specify indices (subscripts) of which array elements to copy from/to.
CALLING SEQUENCE:
copy_struct_inx, struct_From, struct_To, NT_copied, INDEX_FROM=subf
copy_struct_inx, struct_From, struct_To, INDEX_FROM=subf, INDEX_TO=subto
INPUTS:
struct_From = structure array to copy from.
struct_To = structure array to copy values to.
KEYWORDS:
INDEX_FROM = indices (subscripts) of which elements of array to copy.
(default is all elements of input structure array)
INDEX_TO = indices (subscripts) of which elements to copy to.
(default is all elements of output structure array)
EXCEPT_TAGS = string array of Tag names to ignore (to NOT copy).
Used at all levels of recursion.
SELECT_TAGS = Tag names to copy (takes priority over EXCEPT).
This keyword is not passed to recursive calls in order
to avoid the confusion of not copying tags in sub-structures.
/RECUR_FROM = search for sub-structures in struct_From, and then
call copy_struct recursively for those nested structures.
/RECUR_TO = search for sub-structures of struct_To, and then
call copy_struct recursively for those nested structures.
/RECUR_TANDEM = call copy_struct recursively for the sub-structures
with matching Tag names in struct_From and struct_To
(for use when Tag names match but sub-structure types differ).
OUTPUTS:
struct_To = structure array to which new tag values are copied.
NT_copied = incremented by total # of tags copied (optional)
INTERNAL:
Recur_Level = # of times copy_struct_inx calls itself.
This argument is for internal recursive execution only.
The user call is 1, subsequent recursive calls increment it,
and the counter is decremented before returning.
The counter is used just to find out if argument checking
should be performed, and to set NT_copied = 0 first call.
EXTERNAL CALLS:
pro match (when keyword SELECT_TAGS is specified)
CALLS: ***
COPY_STRUCT [1], COPY_STRUCT [2], COPY_STRUCT [3], MATCH [1], MATCH [2], MATCH [3]
PROCEDURE:
Match Tag names and then use corresponding Tag numbers,
apply the sub-indices during = and recursion.
HISTORY:
adapted from copy_struct: 1991 Frank Varosi STX @ NASA/GSFC
mod Aug.95 by F.V. to fix match of a single selected tag.
mod Mar.97 by F.V. do not pass the SELECT_TAGS keyword in recursion,
and check validity of INDEX_FROM and INDEX_TO in more detail.
Converted to IDL V5.0 W. Landsman September 1997
Use long integers W. Landsman May 2001
[Previous]
[Next]
Project : SOHO - CDS
Name : COPY_TAG_VALUES
Purpose : Copy tag values of one structure into another structure
Explanation : The values of the tags in the SOURCE structure are copied into
the tags of the DESTINATION structure which have matching tag
names. Tag names may be truncated as long as an unambiguous
identification can be made.
The datatypes of the tags in the DESTINATION stucture are not
changed, and type conversions of the SOURCE values are handled
in the same way IDL normally handles type conflicts.
If the STATUS parameter is used, it is set to one if
everything is OK, and the procedure tries to catch all errors
to return a zero in STATUS if something goes wrong. In this
case, some or all the relevant values may have been copied,
but there is no guarantee about anything.
Attempts to set non-existing tags in DESTINATION will be
ignored, as will any ambiguous assignment, although the STATUS
flag will be set to zero to signal the error.
Use : COPY_TAG_VALUES,DESTINATION,SOURCE [,STATUS]
Inputs : DESTINATION : Any structure.
SOURCE : A structure with some tags bearing the new values of
the corresponding tags in DESTINATION.
Opt. Inputs : None.
Outputs : DESTINATION is altered to reflect the new values.
Opt. Outputs: STATUS : Set to 1 on successful completion, or zero if an
error occurred.
Keywords : None.
Calls : ***
PARCHECK, TYP
CALLED BY:
CWQ_DSPWAV [1], CWQ_IMAGE [1], CWQ_SPECTR [1], CW_CHECKBOX, CW_CUBEVEIW, CW_MOUSE
CW_PLOTZ [1], CW_PZOOM [1], cw_plotz [2], cw_pzoom [2], cwq_dspwav [2]
cwq_image [2], cwq_spectr [2]
Common : None.
Restrictions: The structures must be single structures.
Side effects: None known.
Category : Utility
Prev. Hist. : Taken out of cw_pzoom
Written : SVH Haugan (UiO), 30 April 1996
Modified : Version 2, SVHH, 6 June 1996
Using the stc.(i)=stc.(j) construct instead of
dummy=execute(..).
Version : 2, 6 June 1996
[Previous]
[Next]
Project : SOHO - CDS
Name : COPY_VAR
Purpose : to copy data by pointer
Category : utility
Explanation : Copy data by moving address location.
Effectively the same as: new_var=temporary(var)
but more elegant.
Syntax : IDL> new_var=copy_var(var)
Inputs : VAR = data variable to copy
Opt. Inputs : None
Outputs : NEW_VAR = new data variable to receive value of VAR
Opt. Outputs: None
Keywords : None
CALLS: ***
EXIST, FREE_POINTER, GET_POINTER, MAKE_POINTER, SET_POINTER
CALLED BY:
BOOST_TAG, DO_EIT_SCALING, DROT_XY, LVIEW_XY, REM_TAG [2], SHIFT_MAP, SOHO_XY
SUMER_CALIB
Common : None
Restrictions: None
Side effects: None
History : Written, 22-Feb-98, Zarro (SAC/GSFC)
Modified, 15-Jun-99, Zarro (SM&A/GSFC) - switched back to using TEMPORARY
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO-CDS
Name : COREG_MAP
Purpose : coregister input maps to a reference map
Category : imaging
Syntax : omap=coreg_map(imap,rmap)
Inputs : IMAP = input map(s) to coregister
RMAP = reference map against which to coregister
Outputs : OMAP = output map(s) coregistered to same
pixel dimension, spacing, & roll
Keywords : DROTATE = correct for differential solar rotation
if IMAP and RMAP times are different
CALLS: ***
DROT_MAP, PR_SYNTAX, VALID_MAP
CALLED BY:
COALIGN_FITS
History : Written 20 Aug 2001, Zarro (EITI/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
CORREL_IMAGES
PURPOSE:
Compute the 2-D cross-correlation function of two images
EXPLANATION:
Computes the 2-D cross-correlation function of two images for
a range of (x,y) shifting by pixels of one image relative to the other.
CALLING SEQUENCE:
Result = CORREL_IMAGES( image_A, image_B,
[XSHIFT=, YSHIFT=, XOFFSET_B=, YOFFSET_B=, REDUCTION=,
MAGNIFICATION=, /NUMPIX, /MONITOR )
INPUTS:
image_A, image_B = the two images of interest.
OPTIONAL INPUT KEYWORDS:
XSHIFT = the + & - shift to be applied in X direction, default=7.
YSHIFT = the Y direction + & - shifting, default=7.
XOFFSET_B = initial X pixel offset of image_B relative to image_A.
YOFFSET_B = Y pixel offset, defaults are (0,0).
REDUCTION = optional reduction factor causes computation of
Low resolution correlation of bin averaged images,
thus faster. Can be used to get approximate optimal
(x,y) offset of images, and then called for successive
lower reductions in conjunction with CorrMat_Analyze
until REDUCTION=1, getting offset up to single pixel.
MAGNIFICATION = option causes computation of high resolution correlation
of magnified images, thus much slower.
Shifting distance is automatically = 2 + Magnification,
and optimal pixel offset should be known and specified.
Optimal offset can then be found to fractional pixels
using CorrMat_Analyze( correl_images( ) ).
/NUMPIX - if set, causes the number of pixels for each correlation
to be saved in a second image, concatenated to the
correlation image, so Result is fltarr( Nx, Ny, 2 ).
/MONITOR causes the progress of computation to be briefly printed.
OUTPUTS:
Result is the cross-correlation function, given as a matrix.
CALLED BY:
CORREL_OPTIMIZE, Modify Image Pixels, RAG Exponentiation, RAG Log
PROCEDURE:
Loop over all possible (x,y) shifts, compute overlap and correlation
for each shift. Correlation set to zero when there is no overlap.
MODIFICATION HISTORY:
Written, July,1991, Frank Varosi, STX @ NASA/GSFC
Use ROUND instead of NINT, June 1995, Wayne Landsman HSTX
Avoid divide by zero errors, W. Landsman HSTX April 1996
Remove use of !DEBUG W. Landsman June 1997
Subtract mean of entire image before computing correlation, not just
mean of overlap region H. Ebeling/W. Landsman June 1998
[Previous]
[Next]
NAME:
CORREL_OPTIMIZE
PURPOSE:
Find the optimal (x,y) pixel offset of image_B relative to image_A
EXPLANATION"
Optimal offset is computed by means of maximizing the correlation
function of the two images.
CALLING SEQUENCE:
CORREL_OPTIMIZE, image_A, image_B, xoffset_optimum, yoffset_optimum
[ XOFF_INIT=, YOFF_INIT=, MAGNIFICATION=, /PRINT, /NUMPIX,
/MONITOR, PLATEAU_THRESH= ]
INPUTS:
image_A, image_B = the two images of interest.
OPTIONAL INPUT KEYWORDS:
XOFF_INIT = initial X pixel offset of image_B relative to image_A,
YOFF_INIT = Y pixel offset, (default offsets are 0 and 0).
MAGNIFICATION = option to determine offsets up to fractional pixels,
(example: MAG=2 means 1/2 pixel accuracy, default=1).
/NUMPIX: sqrt( sqrt( # pixels )) used as correlation weighting factor.
/MONITOR causes the progress of computation to be briefly printed.
/PRINT causes the results of analysis to be printed.
PLATEAU_THRESH = threshold used for detecting plateaus in
the cross-correlation matrix near maximum, (default=0.01),
used only if MAGNIFICATION > 1. Decrease this value for
high signal-to-noise data
OUTPUTS:
xoffset_optimum = optimal X pixel offset of image_B relative to image_A.
yoffset_optimum = optimal Y pixel offset.
CALLS: ***
CORREL_IMAGES, CORRMAT_ANALYZE
PROCEDURE:
The combination of function correl_images( image_A, image_B ) and
corrmat_analyze of the result is used to obtain the (x,y) offset
yielding maximal correlation. The combination is first executed at
large REDUCTION factors to speed up computation, then zooming in
recursively on the optimal (x,y) offset by factors of 2.
Finally, the MAGNIFICATION option (if specified)
is executed to determine the (x,y) offset up to fractional pixels.
MODIFICATION HISTORY:
Written, July,1991, Frank Varosi, STX @ NASA/GSFC
Added PLATEAU_THRESH keyword June 1997, Wayne Landsman STX
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
NAME:
CORRMAT_ANALYZE
PURPOSE:
Find the optimal (x,y) offset to maximize correlation of 2 images
EXPLANATION:
Analyzes the 2-D cross-correlation function of two images
and finds the optimal(x,y) pixel offsets.
Intended for use with function CORREL_IMAGES.
CALLING SEQUENCE:
corrmat_analyze, correl_mat, xoffset_optimum, yoffset_optimum,
max_corr, edge, plateau, [XOFF_INIT=, YOFF_INIT=, REDUCTION=,
MAGNIFICATION=, PLATEAU_THRESH=, /PRINT]
INPUTS:
correl_mat = the cross-correlation matrix of 2 images.
(as computed by function CORREL_IMAGES( imA, imB ) ).
CALLED BY:
CORREL_OPTIMIZE
NOTE:
If correl_mat(*,*,1) is the number of pixels for each correlation,
(the case when /NUMPIX was specified in call to CORREL_IMAGES)
then sqrt( sqrt( # pixels )) is used as correlation weighting factor.
OPTIONAL INPUT KEYWORDS:
XOFF_INIT = initial X pixel offset of image_B relative to image_A.
YOFF_INIT = Y pixel offset, (both as specified to correl_images).
REDUCTION = reduction factor used in call to CORREL_IMAGES.
MAGNIFICATION = magnification factor used in call to CORREL_IMAGES,
this allows determination of offsets up to fractions of a pixel.
PLATEAU_THRESH = threshold used for detecting plateaus in
the cross-correlation matrix near maximum, (default=0.01),
used only if MAGNIFICATION > 1
/PRINT causes the result of analysis to be printed.
OUTPUTS:
xoffset_optimum = optimal X pixel offset of image_B relative to image_A.
yoffset_optimum = optimal Y pixel offset.
max_corr = the maximal correlation corresponding to optimal offset.
edge = 1 if maximum is at edge of correlation domain, otherwise=0.
plateau = 1 if maximum is in a plateua of correlation function, else=0.
PROCEDURE:
Find point of maximum cross-correlation and calc. corresponding offsets.
If MAGNIFICATION > 1:
the correl_mat is checked for plateau near maximum, and if found,
the center of plateau is taken as point of maximum cross-correlation.
MODIFICATION HISTORY:
Written, July-1991, Frank Varosi, STX @ NASA/GSFC
Use ROUND instead of NINT, June 1995 Wayne Landsman HSTX
Remove use of non-standard !DEBUG system variable W.L. HSTX
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Name: cosmic_stat
Purpose: return number of cosmic ray 'hits' or %affected area
Input Parameters:
index, data - ssw standards (eit,sxt,trace,etc)
Output:
function returns number of detections per image or % if /PERCENT set
Keyword Parameters:
threshold - comparison cutoff (see spikes_id.pro) - default=50
percent (output) - percent pixels effected
percent (switch) - if set, function returns % instead of event counts
peak_spectra - 'spectrum' of image with largest event count
subfov - optional subfield to consider [x0,y0,nx,ny]
(default=[0, 0, naxis1, naxis2]
Method:
call spikes_id for each image and return statistics
CALLS: ***
BOX_MESSAGE, data_chk [1], data_chk [2], spike_id
CALLED BY:
eit_proton_summary, trace_cat2cosmic
History:
Circa Jan 1997 - S.L.Freeland - EIT Proton counter
11-May-1999 - S.L.Freeland - documentation , generalized.
15-July-1999 - S.L.Freeland - assure zero events is reported correctly
(incorrectly reported as one in previous versions)
[Previous]
[Next]
NAME:
COSMO_PARAM
PURPOSE:
Derive full set of cosmological density parameters from a partial set
EXPLANATION:
This procedure is called by LUMDIST and GALAGE to allow the user a choice
in defining any two of four cosmological density parameters.
Given any two of the four input parameters -- (1) the normalized matter
density Omega_m (2) the normalized cosmolgical constant, Omega_lambda (2) the normalized
curvature term, Omega_k and (4) the deceleration parameter q0 -- this
program will derive the remaining two. Here "normalized" means divided by the closure
density so that Omega_m + Omega_lambda + Omega_k = 1. For a more
precise definition see Caroll, Press, & Turner (1992, ArAA, 30, 499).
If less than two parameters are defined, this procedure sets default
values of Omega_k=0 (flat space), Omega_lambda = 0.7, Omega_m = 0.3
and q0 = -0.5
CALLING SEQUENCE:
COSMO_PARAM, Omega_m, Omega_lambda, Omega_k, q0
INPUT-OUTPUTS:
Omega_M - normalized matter energy density, non-negative numeric scalar
Omega_Lambda - Normalized cosmological constant, numeric scalar
Omega_k - normalized curvature parmeter, numeric scalar. This is zero
for a flat universe
q0 - Deceleration parameter, numeric scalar = -R*(R'')/(R')^2
= 0.5*Omega_m - Omega_lambda
NOTES:
If more than two parameters are defined upon input (overspecification),
then the first two defined parameters in the ordered list Omega_m,
Omega_lambda, Omega_k, q0 are used to define the cosmology.
CALLED BY:
GALAGE, LUMDIST
EXAMPLE:
Suppose one has Omega_m = 0.3, and Omega_k = 0.5 then to determine
Omega_lambda and q0
IDL> cosmo_param, 0.3, omega_lambda, 0.5, q0
which will return omega_lambda = 0.2 and q0 = -2.45
REVISION HISTORY:
W. Landsman Raytheon ITSS April 2000
[Previous]
[Next]
Project : SOHO - CDS
Name :
COUNTDOWN
Purpose :
Prints a message showing where you are in a long job.
Explanation :
Calling COUNTDOWN,n_steps,/OPEN prints a character string consisting of
some spaces, a slash, and the total number of steps. Then each
subsequent call prints out the iteration number on the same line in the
spaces before the slash. COUNTDOWN,/CLOSE then resets the behavior of
the terminal to the default, and linefeeds to a new line.
If the graphics device supports widgets, then a text widget is used
instead of the terminal screen/window.
Use :
COUNTDOWN, N_STEPS, /OPEN ;To begin
COUNTDOWN, I_STEP ;Each step
COUNTDOWN, /CLOSE ;To finish
Inputs :
NUMBER = Either the total number of steps, or the step number. Not
required when closing the countdown.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
OPEN = Used to open the countdown.
CLOSE = Used to close the countdown.
FONT = Font to use when displaying the countdown widget. Only
meaningful when the graphics device supports widgets. If not
passed, then the first available 20 point font is used.
Calls : ***
FILEPATH, HAVE_WIDGETS [1], HAVE_WIDGETS [2], TRIM
CALLED BY:
CDS_MOSAIC, CROSS_CORR2, FIX_OBS_SEQ, SNAP_MOVIE
Common :
Common block COUNT_DOWN is used simply to keep track of the logical
unit number used, and whether the countdown is open or not. It also
keeps track of those variables used by the widget part of the software,
when applicable.
Restrictions:
No other output can be sent to the screen when countdown is in effect
(unless the graphics device uses widgets). Should not be used in a
batch job.
Side effects:
If the individual steps are too close together in time, then this could
slow down the calling routine.
Category :
Utilities, User_interface.
Prev. Hist. :
William Thompson, October 1991.
William Thompson, 12 May 1993, converted to use widgets when available.
This makes it compatible with IDL for Windows. Also added FONT
keyword.
Written :
William Thompson, GSFC, October 1991.
Modified :
Version 1, William Thompson, GSFC, 14 May 1993.
Incorporated into CDS library.
Version :
Version 1, 14 May 1993.
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
COVSRT
PURPOSE:
Repack the covariance matrix to the true order of the parameters
EXPLANATION:
Given the covariance matrix COVAR of a fit for MFIT of MA total
parameters, and their ordering IA(i), repack the covariance matrix to
the true order of the parameters. Elements associated with fixed
parameters will be zero.
CALLING SEQUENCE:
COVSRT, covar, ia, mfit
INPUTS:
COVAR --
IA --
MFIT --
OPTIONAL INPUTS:
None.
OUTPUTS:
COVAR --
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
None.
CALLS:
None.
CALLED BY:
NL_MRQMIN
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written November 10, 1994, by Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
VERSION:
Version 1, November 10, 1994
[Previous]
[Next]
NAME:
CR_REJECT
PURPOSE:
General, iterative cosmic ray rejection using two or more input images.
EXPLANATION:
Uses a noise model input by the user, rather than
determining noise empirically from the images themselves.
The image returned has the combined exposure time of all the input
images, unless the bias flag is set, in which case the mean is
returned. This image is computed by summation (or taking mean)
regardless of loop and initialization options (see below).
CALLING SEQUENCE:
cr_reject, input_cube, rd_noise_dn, dark_dn, gain, mult_noise, $
combined_image, combined_npix, combined_noise
MODIFIED ARGUMENT:
input_cube - Cube in which each plane is an input image.
If the noise model is used (rd_noise_dn, dark_dn,
gain), then input_cube must be in units of DN.
If an input noise cube is supplied (rd_noise_dn
<0), then the units of input_cube and noise_cube
merely need to be consistent.
This array is used as a buffer and its contents
are not guaranteed on output (although for now,
weighting=0 with /restore_sky should give you back
your input unaltered).
INPUT ARGUMENTS:
rd_noise_dn - Read noise per pixel. Units are DN.
If negative, then the user supplies an error cube
via the keyword noise_cube. In the latter case,
mult_noise still applies, since it is basically a fudge.
dark_dn - Dark rate in DN per pixel per s. This can be a scalar,
or it can be a dark image divided by the exposure
time.
gain - Electrons per DN.
mult_noise - Coefficient for multiplicative noise term -- helps
account for differing PSFs or subpixel image shifts.
INPUT KEYWORDS:
exptime - If the images have different exposure times, pass
them in a vector. You can leave this off for
frames with the same exposure time, but dark counts
won't be treated correctly.
verbose - If set, lots of output.
nsig - Rejection limit in units of pixel-to-pixel noise
(sigma) on each input image. Can be specified as
an array, in which case the dimension gives the
maximum number of iterations to run. (Default =
[8, 6, 4]
dilation - With dfactor, provides functionality similar to the
expansion of the CR with pfactor and radius in STSDAS
crrej. Dilate gives the size of the border to be
tested around each initially detected CR pixel.
E.g., dilate=1 searches a 9 X 9 area centered on the
original pixel. If dfactor is set, the default is 1.
dfactor - See dilation. This parameter is equivalent to pfactor
in STSDAS crrej. The current threshold for rejection
is multiplied by this factor when doing the search
with the dilated mask. If dilation is set, the default
for this parameter is 0.5.
bias - Set if combining biases (divides through by number
of images at end, since exposure time is 0).
tracking_set - Subscripts of pixels to be followed through the
computation.
noskyadjust - Sky not to be subtracted before rejection tests. Default
is to do the subtraction.
xmedsky - Flag. If set, the sky is computed as a 1-d array
which is a column-by-column median. This is intended
for STIS slitless spectra. If sky adjustment is
disabled, this keyword has no effect.
input_mask - Mask cube input by the user. Should be byte data
because it's boolean. 1 means use the pixel,
and 0 means reject the pixel - these rejections
are in addition to those done by the CR rejection
algorithm as such.
The following keywords control how the current guess at a CR-free
"check image" is recomputed on each iteration:
median_loop - If set, the check image for each iteration is
the pixel-by-pixel median. THE MEAN IS
RETURNED in combined_image even if you set
this option. (Default is mean_loop.)
minimum_loop - If set, the check image for each iteration is
the pixel-by-pixel minimum. THE MEAN IS
RETURNED in combined_image even if you set
this option. (Default is mean_loop.)
mean_loop - If set, the check image for each iteration is
the pixel-by-pixel mean. (Same as the default.)
noclearmask - By default, the mask of CR flags is reset before
every iteration, and a pixel that has been
rejected has a chance to get back in the game
if the average migrates toward its value. If this
keyword is set, then any rejected pixel stays
rejected in subsequent iterations. Note that what
stsdas.hst_calib.wfpc.crrej does is the same
as the default. For this procedure, the default
was NOT to clear the flags, until 20 Oct. 1997.
restore_sky - Flag. If set, the routine adds the sky back into
input_cube before returning. Works only if
weighting=0.
null_value - Value to be used for output pixels to which no
input pixels contribute. Default=0
weighting - Selects weighting scheme in final image
combination:
0 (default) - Poissonian weighting - co-add
detected DN from non-CR pixels. (Pixel-by-
pixel scaling up to total exposure time,
for pixels in stack where some rejected.)
Equivalent to exptime weighting of rates.
1 or more - Sky and read noise weighting of rates.
Computed as weighted average of DN rates,
with total exp time multiplied back in
afterward.
In all cases, the image is returned as a sum in
DN with the total exposure time of the image
stack, and with total sky added back in.
The following keywords allow the initial guess at a CR-free "check
image" to be of a different kind from the iterative guesses:
init_med - If set, the initial check image is
the pixel-by-pixel median. (Not permitted if
input_cube has fewer than 3 planes; default is minimum.)
init_mean - If set, the initial check image is
the pixel-by-pixel mean. (Default is minimum.)
init_min - If set, the initial check image is
the pixel-by-pixel minimum. (Same as the default.)
OUTPUT ARGUMENTS::
combined_image - Mean image with CRs removed.
combined_npix - Byte (or integer) image of same dimensions as
combined_image, with each element containing
the number of non-CR stacked pixels that
went into the result.
combined_noise - Noise in combined image according to noise model
or supplied noise cube.
OUTPUT KEYWORDS:
mask_cube - CR masks for each input image. 1 means
good pixel; 0 means CR pixel.
skyvals - Sky value array. For an image cube with N planes,
this array is fltarr(N) if the sky is a scalar per
image plane, and fltarr(XDIM, N), is the XMEDSKY
is set.
INPUT/OUTPUT KEYWORD:
noise_cube - Estimated noise in each pixel of input_cube as
returned (if rd_noise_dn ge 0), or input noise
per pixel of image_cube (if rd_noise_dn lt 0).
skybox - X0, X1, Y0, Y1 bounds of image section used
to compute sky. If supplied by user, this
region is used. If not supplied, the
image bounds are returned. This parameter might
be used (for instance) if the imaging area
doesn't include the whole chip.
CALLS: ***
DIST, MEDARR, SKYADJ_CUBE
COMMON BLOCKS: none
SIDE EFFECTS: none
METHOD:
COMPARISON WITH STSDAS
Cr_reject emulates the crrej routine in stsdas.hst_calib.wfpc.
The two routines have been verified to give identical results
(except for some pixels along the edge of the image) under the
following conditions:
no sky adjustment
no dilation of CRs
initialization of trial image with minimum
taking mean for each trial image after first (no choice
in crrej)
Dilation introduces a difference between crrej and this routine
around the very edge of the image, because the IDL mask
manipulation routines don't handle the edge the same way as crrej
does. Away from the edge, crrej and cr_reject are the same with
respect to dilation.
The main difference between crrej and cr_reject is in the sky
computation. Cr_reject does a DAOPHOT I sky computation on a
subset of pixels grabbed from the image, whereas crrej searches
for a histogram mode.
REMARKS ON USAGE
The default is that the initial guess at a CR-free image is the
pixel-by-pixel minimum of all the input images. The pixels
cut from each component image are the ones more than nsig(0) sigma
from this minimum image. The next iteration is based on the
mean of the cleaned-up component images, and the cut is taken
at nsig(1) sigma. The next iteration is also based on the mean with
the cut taken at nsig(2) sigma.
The user can specify an arbitrary sequence of sigma cuts, e.g.,
nsig=[6,2] or nsig=[10,9,8,7]. The user can also specify that
the initial guess is the median (/init_med) rather than the
minimum, or even the mean. The iterated cleaned_up images after
the first guess can be computed as the mean or the median
(/mean_loop or /median_loop). The minimum_loop option is also
specified, but this is a trivial case, and you wouldn't want
to use it except perhaps for testing.
The routine takes into account exposure time if you want it to,
i.e., if the pieces of the CR-split aren't exactly the same.
For bias frames (exposure time 0), set /bias to return the mean
rather than the total of the cleaned-up component images.
The crrej pfactor and radius to propagate the detected CRs
outward from their initial locations have been implemented
in slightly different form using the IDL DILATE function.
It is possible to end up with output pixels to which no valid
input pixels contribute. These end up with the value
NULL_VALUE, and the corresponding pixels of combined_npix are
also returned as 0. This result can occur when the pixel is
very noisy across the whole image stack, i.e., if all the
values are, at any step of the process, far from the stack
average at that position even after rejecting the real
outliers. Because pixels are flagged symmetrically N sigma
above and below the current combined image (see code), all
the pixels at a given position can end up getting flagged.
(At least, that's how I think it happens.)
MODIFICATION HISTORY:
5 Mar. 1997 - Written. R. S. Hill
14 Mar. 1997 - Changed to masking approach to keep better
statistics and return CR-affected pixels to user.
Option to track subset of pixels added.
Dilation of initially detected CRs added.
Other small changes. RSH
17 Mar. 1997 - Arglist and treatment of exposure times fiddled
to mesh better with stis_cr. RSH
25 Mar. 1997 - Fixed bug if dilation finds nothing. RSH
4 Apr. 1997 - Changed name to cr_reject. RSH
15 Apr. 1997 - Restyled with emacs, nothing else done. RSH
18 Jun. 1997 - Input noise cube allowed. RSH
19 Jun. 1997 - Multiplicative noise deleted from final error. RSH
20 Jun. 1997 - Fixed error in using input noise cube. RSH
12 July 1997 - Sky adjustment option. RSH
27 Aug. 1997 - Dilation kernel made round, not square, and
floating-point radius allowed. RSH
16 Sep. 1997 - Clearmask added. Intermediate as well as final
mean is exptime weighted. RSH
17 Sep. 1997 - Redundant zeroes around dilation kernel trimmed. RSH
1 Oct. 1997 - Bugfix in preceding. RSH
21 Oct. 1997 - Clearmask changed to noclearmask. Bug in robust
array division fixed (misplaced parens). Sky as
a function of X (option). RSH
30 Jan. 1998 - Restore_sky keyword added. RSH
5 Feb. 1998 - Quick help corrected and updated. RSH
6 Feb. 1998 - Fixed bug in execution sequence for tracking_set
option. RSH
18 Mar. 1998 - Eliminated confusing maxiter spec. Added
null_value keyword. RSH
15 May 1998 - Input_mask keyword. RSH
27 May 1998 - Initialization of minimum image corrected. NRC, RSH
9 June 1998 - Input mask cube processing corrected. RSH
21 Sep. 1998 - Weighting keyword added. RSH
7 Oct. 1998 - Fixed bug in input_mask processing (introduced
in preceding update). Input_mask passed to
skyadj_cube. RSH
5 Mar. 1999 - Force init_min for 2 planes. RSH
1 Oct. 1999 - Make sure weighting=1 not given with noise cube. RSH
1 Dec. 1999 - Corrections to doc; restore_sky needs weighting=0. RSH
17 Mar. 2000 - SKYBOX added. RSH
[Previous]
[Next]
PROJECT:
SDAC
NAME:
CRANGE
PURPOSE:
This function returns the plot range limits for the X,Y, or Z coordinate.
EXPLANATION:
The values of !c.xrange depends on whether plot scale is linear or log.
This function returns the ACTUAL values of the range by interrogating !(xyz).type.
CATEGORY:
GRAPHICS
CALLING SEQUENCE:
range = crange( XYZ )
CALLED BY:
DATPLOT, FIND_EDGE_INTERCEPT, FUNCTION CRANGE XYZ, GE_WINDOW [1], Intervals [1]
Intervals [2], PLOTBATSE, PLOTBATSE_QL, PLOT_OCCS, PLOT_OCC_ONDAY, POINT [1]
PROFILES2, SPEX_BACKGROUND [1], SPEX_BACKGROUND [2], SPEX_COMMONS [2]
SPEX_COMMONS [4], SPEX_FIT__DEFINE, SPEX_FLASH [1], SPEX_FLASH [2]
SPEX_GEN__DEFINE, SPEX_PROC [1], SPEX_PROC [2], goes_oplot, mark_intervals
plotman, point [2], pro set_vth_bpow [1], pro set_vth_bpow [2]
spex_intervals [1], spex_intervals [2], spex_spec_plot [1], spex_spec_plot [2]
spex_spec_plot [3], spex_spec_plot [4]
EXAMPLE:
yoffset = (!y.crange(1) - !y.crange(0)) / 30.
INPUTS:
XYZ- a string specifying the axis of interest.
OUTPUTS:
None, Function returns the actual values of the range.
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3]
SIDE EFFECTS:
None.
RESTRICTIONS:
None.
MODIFICATION HISTORY:
Written by: RAS, 1/6/93
Version 2, richard.schwartz@gsfc.nasa.gov, 7-sep-1997, more documentation
[Previous]
[Next]
NAME:
CREATE_STRUCT
PURPOSE:
Create an IDL structure from a list of tag names and dimensions
EXPLANATION:
Dynamically create an IDL structure variable from list of tag names
and data types of arbitrary dimensions. Useful when the type of
structure needed is not known until run time.
Unlike the intrinsic function CREATE_STRUCT(), this procedure does not
require the user to know the number of tags before run time. (Note
there is no name conflict since the intrinsic CREATE_STRUCT is a
function, and this file contains a procedure.)
CALLING SEQUENCE:
CREATE_STRUCT, STRUCT, strname, tagnames, tag_descript,
[ DIMEN = , /CHATTER, /NODELETE ]
INPUTS:
STRNAME - name to be associated with structure (string)
Must be unique for each structure created. Set
STRNAME = '' to create an anonymous structure
TAGNAMES - tag names for structure elements
(string or string array)
TAG_DESCRIPT - String descriptor for the structure, containing the
tag type and dimensions. For example, 'A(2),F(3),I', would
be the descriptor for a structure with 3 tags, strarr(2),
fltarr(3) and Integer scalar, respectively.
Allowed types are 'A' for strings, 'B' or 'L' for unsigned byte
integers, 'I' for integers, 'J' for longword integers,
'F' or 'E' for floating point, 'D' for double precision
'C' for complex, and 'M' for double complex
Uninterpretable characters in a format field are ignored.
For vectors, the tag description can also be specified by
a repeat count. For example, '16E,2J' would specify a
structure with two tags, fltarr(16), and lonarr(2)
OPTIONAL KEYWORD INPUTS:
DIMEN - number of dimensions of structure array (default is 1)
CHATTER - If /CHATTER is set, then CREATE_STRUCT will display
the dimensions of the structure to be created, and prompt
the user whether to continue. Default is no prompt.
NODELETE - If /NODELETE is set, then the temporary file created
CREATE_STRUCT will not be deleted upon exiting. See below
OUTPUTS:
STRUCT - IDL structure, created according to specifications
CALLED BY:
EIS_GET_HDR_STRUC, fits_interp, mees_log_read
EXAMPLES:
IDL> create_struct, new, 'name',['tag1','tag2','tag3'], 'D(2),F,A(1)'
will create a structure variable new, with structure name NAME
To see the structure of new:
IDL> help,new,/struc
** Structure NAME, 3 tags, 20 length:
TAG1 DOUBLE Array(2)
TAG2 FLOAT 0.0
TAG3 STRING Array(1)
PROCEDURE:
Generates a temporary procedure file using input information with
the desired structure data types and dimensions hard-coded.
This file is then executed with CALL_PROCEDURE.
NOTES:
If CREATE_STRUCT cannot write a temporary .pro file in the current
directory, then it will write the temporary file in the getenv('HOME')
directory.
At present, can fail if a tag_name cannot be used as a proper
structure component definition, e.g., '0.10' will not
work, but a typical string like 'RA' or 'DEC' will.
A partial workaround checks for characters '\' and '/'
and '.' and converts them to '_'. in a tag_name.
Note that 'L' now specifies a LOGICAL (byte) data type and not a
a LONG data type for consistency with FITS binary tables
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FDECOMP [1], FDECOMP [2]
FDECOMP [3], REPCHR [1], REPCHR [2], REPCHR [3], STRNUMBER [1], STRNUMBER [2]
STRNUMBER [3], STRNUMBER [4], concat_dir [4], strsplit
RESTRICTIONS:
The name of the structure must be unique, for each structure created.
Otherwise, the new variable will have the same structure as the
previous definition (because the temporary procedure will not be
recompiled). ** No error message will be generated ***
SUBROUTINES CALLED:
FDECOMP, REPCHR()
MODIFICATION HISTORY:
Version 1.0 RAS January 1992
Modified 26 Feb 1992 for Rosat IDL Library (GAR)
Modified Jun 1992 to accept arrays for tag elements -- KLV, Hughes STX
Accept anonymous structures W. Landsman HSTX Sep. 92
Accept 'E' and 'J' format specifications W. Landsman Jan 93
'L' format now stands for logical and not long array
Accept repeat format for vectors W. Landsman Feb 93
Accept complex and double complex (for V4.0) W. Landsman Jul 95
Work for long structure definitions W. Landsman Aug 97
Converted to IDL V5.0 W. Landsman September 1997
Write temporary file in HOME directory if necessary W. Landsman Jul 98
Use OPENR,/DELETE for OS-independent file removal W. Landsman Jan 99
Use STRSPLIT() instead of GETTOK() W. Landsman July 2002
Assume since V5.3 W. Landsman Feb 2004
[Previous]
[Next]
NAME:
CREATE_STRUCT
PURPOSE:
Create an IDL structure from a list of tag names and dimensions
EXPLANATION:
Dynamically create an IDL structure variable from list of tag names
and data types of arbitrary dimensions. Useful when the type of
structure needed is not known until run time.
Unlike the intrinsic function CREATE_STRUCT(), this procedure does not
require the user to know the number of tags before run time. (Note
there is no name conflict since the intrinsic CREATE_STRUCT is a
function, and this file contains a procedure.)
CALLING SEQUENCE:
CREATE_STRUCT, STRUCT, strname, tagnames, tag_descript,
[ DIMEN = , /CHATTER, /NODELETE ]
INPUTS:
STRNAME - name to be associated with structure (string)
Must be unique for each structure created. Set
STRNAME = '' to create an anonymous structure
TAGNAMES - tag names for structure elements
(string or string array)
TAG_DESCRIPT - String descriptor for the structure, containing the
tag type and dimensions. For example, 'A(2),F(3),I', would
be the descriptor for a structure with 3 tags, strarr(2),
fltarr(3) and Integer scalar, respectively.
Allowed types are 'A' for strings, 'B' or 'L' for unsigned byte
integers, 'I' for integers, 'J' for longword integers,
'F' or 'E' for floating point, 'D' for double precision
'C' for complex, and 'M' for double complex
Uninterpretable characters in a format field are ignored.
For vectors, the tag description can also be specified by
a repeat count. For example, '16E,2J' would specify a
structure with two tags, fltarr(16), and lonarr(2)
OPTIONAL KEYWORD INPUTS:
DIMEN - number of dimensions of structure array (default is 1)
CHATTER - If set, then CREATE_STRUCT() will display
the dimensions of the structure to be created, and prompt
the user whether to continue. Default is no prompt.
/NODELETE - If set, then the temporary file created
CREATE_STRUCT will not be deleted upon exiting. See below
OUTPUTS:
STRUCT - IDL structure, created according to specifications
CALLED BY:
EIS_GET_HDR_STRUC, fits_interp, mees_log_read
EXAMPLES:
IDL> create_struct, new, 'name',['tag1','tag2','tag3'], 'D(2),F,A(1)'
will create a structure variable new, with structure name NAME
To see the structure of new:
IDL> help,new,/struc
** Structure NAME, 3 tags, 20 length:
TAG1 DOUBLE Array(2)
TAG2 FLOAT 0.0
TAG3 STRING Array(1)
PROCEDURE:
Generates a temporary procedure file using input information with
the desired structure data types and dimensions hard-coded.
This file is then executed with CALL_PROCEDURE.
NOTES:
If CREATE_STRUCT cannot write a temporary .pro file in the current
directory, then it will write the temporary file in the getenv('HOME')
directory.
At present, can fail if a tag_name cannot be used as a proper
structure component definition, e.g., '0.10' will not
work, but a typical string like 'RA' or 'DEC' will.
A partial workaround checks for characters '\' and '/'
and '.' and converts them to '_'. in a tag_name.
Note that 'L' now specifies a LOGICAL (byte) data type and not a
a LONG data type for consistency with FITS binary tables
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FDECOMP [1], FDECOMP [2]
FDECOMP [3], REPCHR [1], REPCHR [2], REPCHR [3], STRNUMBER [1], STRNUMBER [2]
STRNUMBER [3], STRNUMBER [4], concat_dir [4], strsplit
RESTRICTIONS:
The name of the structure must be unique, for each structure created.
Otherwise, the new variable will have the same structure as the
previous definition (because the temporary procedure will not be
recompiled). ** No error message will be generated ***
SUBROUTINES CALLED:
CONCAT_DIR(), FDECOMP, REPCHR()
MODIFICATION HISTORY:
Version 1.0 RAS January 1992
Modified 26 Feb 1992 for Rosat IDL Library (GAR)
Modified Jun 1992 to accept arrays for tag elements -- KLV, Hughes STX
Accept anonymous structures W. Landsman HSTX Sep. 92
Accept 'E' and 'J' format specifications W. Landsman Jan 93
'L' format now stands for logical and not long array
Accept repeat format for vectors W. Landsman Feb 93
Accept complex and double complex (for V4.0) W. Landsman Jul 95
Work for long structure definitions W. Landsman Aug 97
Write temporary file in HOME directory if necessary W. Landsman Jul 98
Use OPENR,/DELETE for OS-independent file removal W. Landsman Jan 99
Use STRSPLIT() instead of GETTOK() W. Landsman July 2002
Assume since V5.3 W. Landsman Feb 2004
Added RESOLVE_ROUTINE to ensure recompilation W. Landsman Sep. 2004
Delete temporary with FILE_DELETE W. Landsman Sep 2006
Assume since V5.5, delete VMS reference W.Landsman Sep 2006
[Previous]
[Next]
Project : SDAC
Name : Create_update_tar
Purpose : This procedure creates a tar file suitable for updating a remote file system.
Category : SSW_SYSTEM
Explanation : Based on a date of the previous update, an input, the elements of the path are
searched for updates and copied to a local directory for tarring.
Use : Create_update_tar, last_update_time, ssw_instr $
[, temp_dir=temp_dir, more_path=more_path ]
Inputs :
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords :
Calls : ***
ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EXIST
FCHECK, STR_SEP, SYS2UT, TIME2FILE, anytim [1], anytim [2], anytim [3], anytim [4]
anytim [5], concat_dir [4], curdir [1], curdir [2], ssw_strsplit
Common : None
Restrictions:
Side effects: None.
Prev. Hist :
Modified :
09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
[Previous]
[Next]
Project : HESSI
Name : CRONTAB
Purpose : Simulate running IDL commands in a cron job
Category : Utility
Syntax : IDL> cron,command,tstart
Inputs : COMMAND = command to execute
TSTART = time after which to start
Optional
Inputs : NTIMES = # of times to run [def=1]
Outputs : None
Keywords : TEND = time to stop execution
WAIT_TIME = seconds to wait between execution
VERBOSE = send message output
CALLS: ***
ANYTIM2TAI, ARR2STR [1], Arr2Str [2], EXIST, IS_BLANK, TRIM, VALID_TIME
History : Written 3 July 2001, D. Zarro (EITI/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
cross_corr
PURPOSE:
Perform a cross correlation match on two images
SAMPLE CALLING SEQUENCE:
offset = cross_corr(img1, img2, max_shift)
offset = cross_corr(img1, img2, max_shift, img1s)
INPUTS: iim1: 2-D image, any type.
iim2: 2-D image, any type.
smax: integer = maximum search distance in +/- X and Y directions.
OUTPUTS: iim1s: fltarr(nx,ny) = iim1 shifted by calculated offset vector.
Ideally iim1s = iim2. Note that iim1s will have bad edges.
RETURNS: offset: fltarr(2). offset(0) = x-offset in pixels FROM iim1 to iim2.
offset(1) = y-offset in pixels FROM iim1 to iim2.
CALLED BY:
xdisp_fits, xdisp_trace [1], xdisp_trace2, xdisp_trace3
HISTORY: Written by T. Berger 6-Nov-96.
6-Nov-96 (MDM) - Removed call to function AVG
- Removed "on_error,2"
- Corrected undefined "xmax" and adjusted
so smax is not changed internally
[Previous]
[Next]
Project : SOHO - CDS
Name :
CROSS_CORR2()
Purpose :
Takes two-dimensional cross-correlation of two arrays.
Explanation :
The cross-correlations are calculated by shifting the second array by
-NCORR to +NCORR pixels relative to the first array. This permutation
is performed in both the X and Y directions.
Use :
Result = CROSS_CORR2( ARRAY1, ARRAY2, NCORR [, CORR_X, CORR_Y ] )
Inputs :
ARRAY1 = First array to take cross-correlation of.
ARRAY2 = Second array.
NCORR = Size of the cross-correlation. The calculation will range
between +/- NCORR in both directions. Can also be passed as
a two element array, with different numbers for X and Y.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
CORR_X = Relative shift in the X direction.
CORR_Y = Relative shift in the Y direction.
Keywords :
MISSING = Value flagging missing pixels.
COUNT = If set, then the COUNTDOWN routine is called to show a
running display of where you are in the processing.
REPORT = Report the (x,y) shift determined
Calls : ***
AVERAGE, COUNTDOWN, FMT_VECT, GET_IM_KEYWORD, IS_NOT_MISSING, LOCATE_VAL
CALLED BY:
XCOR_CDS
Common :
None.
Restrictions:
The arrays must be two-dimensional, and must have the same dimensions
as the other.
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. :
William Thompson, March 1991, modified to use BADPIXEL keyword.
William Thompson, August 1992, renamed BADPIXEL to MISSING.
Written :
William Thompson, GSFC.
Modified :
Version 1, William Thompson, GSFC, 13 May 1993.
Incorporated into CDS library.
version 2, C D Pike, RAL, Added REPORT keyword. 27-Jul-95
Version 3, William Thompson, GSFC, 26-Aug-1996
Made more robust in the presence of missing data.
Version 4, William Thompson, GSFC, 07-May-1997
Allow NCORR to be two values.
Version 5, William Thompson, GSFC, 13-Aug-1997
Made less sensitive to roundoff error
Version 6, 11-May-2005, William Thompson, GSFC
Handle NaN values
Version :
Version 6, 11-May-2005
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
CROSS_HAIR
PURPOSE:
Plot a rectangle or cross hair on the current plotting device.
EXPLANATION:
This routine plots a rectangle or a cross hair on the current plotting
device. The size and location of the rectangle or cross hair are saved
in the common block CROSS_HAIR so that when it is called the next
time, the previous rectangle or cross hair can be erased from the
device screen.
CALLING SEQUENCE:
CROSS_HAIR, cx, cy [, width, height [, unit]]
INPUTS:
CX - X position of the cursor center, in device pixels
CY - Y position of the cursor center, in device pixels
OPTIONAL INPUTS:
WIDTH - Width of the rectangle, in device pixels
HEIGHT - Height of the rectangle, in device pixels
If WIDTH and HEIGHT are not passed in, a cross hair will be used.
UNIT - Integer scalar indicating what units to be for boxed cursor.
1: device pixels, 2: image pixcels, and 3: arcseconds
CSI - Coordinate system info structure; required if UNIT is 2 or 3
LENGTH - Length of line segment of the cross hair in device
pixels. Default: 40
COLOR - Index of color used to draw the cross hair. Default color
used: !d.table_size-1
THICK - Thickness of the cross hair, default: 1
LINES - Line style used for drawing the cross hair. Default: 0
(solid line)
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
KEEP -- If set, the cursor will remain on the plotting screen
until the whole screen is erased.
BOXED_CURSOR - Plot boxed cursor if set and if WIDTH and HEIGHT are
given
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
COMMON BLOCKS:
CROSS_HAIR
RESTRICTIONS:
None.
SIDE EFFECTS:
A cross hair is plotted on the current device. When the routine is
called next time, the previous cross hair is erased and a new one is
plotted. If the KEEP keyword is set, the cursor will not be erased
next time this routine is called. The only way to remove it from the
device is to redraw the plotting.
CATEGORY:
Utilities, graphics
PREVIOUS HISTORY:
Written October 4, 1994, by Liyun Wang, NASA/GSFC
MODIFICATION HISTORY:
Version 2, Liyun Wang, NASA/GSFC, November 8, 1994
Added the KEEP keyword
Version 3, Liyun Wang, NASA/GSFC, May 11, 1995
Added BOXED_CURSOR keyword to enable plotting boxed cursor
Changed cross-hair cursor from "+" shape to "x"
Version 4, February 26, 1996, Liyun Wang, NASA/GSFC
Fixed a bug that unit-width or unit-height boxed cursor was
not properly plotted
Version 5, March 13, 1996, Liyun Wang, NASA/GSFC
Changed cross-hair cursor from "x" shape back to "+"
Version 6, William Thompson, GSFC, 8 April 1998
Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
VERSION:
Version 6, 8 April 1998
[Previous]
[Next]
PROJECT:
SDAC
NAME:
CROSSBAR
PURPOSE:
This procedure overplots a crossbar for the procedures point and zoom_coor.
CATEGORY:
GRAPHICS
CALLING SEQUENCE:
CROSSBAR,X,Y
INPUTS:
X: x argument where crossbar is to be plotted.
Y: y argument where crossbar is to be plotted.
OUTPUTS:
No arguments returned, crossbar overplotted on graphics window.
KEYWORDS:
None.
CALLED BY:
MARK_REGION [1], MARK_REGION [2], PEAK_MARK, ZOOM_COOR [1], zoom_coor [2]
RESTRICTIONS:
To get a cross bar of equal height and width requires converting
the coordinates form data to normalized values make a 2 element
array for both x + and - offset and y + and - offset. Convert these
2 arrays back to data coordinate values. Written to support early
programs from SDAC.
HISTORY:
Written by: Shelby Kennard, ~1989.
CONTACT:
richard.schwartz@gsfc.nasa.gov
[Previous]
[Next]
Project : SOHO - CDS
Name :
CRS
Purpose :
Simplified CURSOR, with continuous readout option.
Explanation :
This procedure uses the routine CURSOR to find the coordinates,
expressed in data units, of a point selected with the cursor.
Use :
CRS [, X_VALUE [, Y_VALUE [, PRINT_SWITCH ]]]
CRS ;Values printed to screen.
CRS, X, Y ;Values stored in variables X and Y
CRS, X, Y, 1 ;Values stored in X,Y, and printed to screen.
Inputs :
None required.
Opt. Inputs :
PRINT_SWITCH = Switch used to control printing the values of
X_VALUE, Y_VALUE to the screen. If not passed,
then assumed 0 (no printing) unless no parameters
are passed, in which case 1 (printing) is assumed.
Outputs :
None required.
Opt. Outputs:
X_VALUE = X position in data coordinates of cursor.
Y_VALUE = Y position in data coordinates of cursor.
Keywords :
CONTINUOUS = If set, then a continuously updated display of the
cursor X and Y positions are written to the screen.
On systems which support widgets, the text is
displayed in a special widget.
In continuous operation pressing either the left or
middle mouse button will print out the current
position on a fresh line on the terminal screen.
Pressing the right mouse button quits the program.
The PRINT_SWITCH parameter controls whether or not
the last cursor position is printed or not.
When CONTINUOUS is set, the PRINT_SWITCH variable is
ignored--the position is always printed to the
screen.
FONT = Font to use when displaying the CRS widget. Only
meaningful when the graphics device supports widgets,
and CONTINUOUS is set. If not passed, then the first
available 20 point font is used.
Calls : ***
HAVE_WIDGETS [1], HAVE_WIDGETS [2]
Common :
None.
Restrictions:
Use of the CONTINUOUS keyword may not be supported on some more
primitive graphics terminals.
Side effects:
Using the CONTINUOUS keyword on a device without a mouse or trackball
may not allow the user to exit the program.
Category :
Utilities, User_interface.
Prev. Hist. :
William Thompson Applied Research Corporation
September, 1987 8201 Corporate Drive
Landover, MD 20785
William Thompson, 13 May 1993, added CONTINUOUS and FONT keywords.
William Thompson, 1 June 1993, changed to ignore PRINT_SWITCH when
using in CONTINUOUS mode.
Written :
William Thompson, GSFC, September 1987.
Modified :
Version 1, William Thompson, GSFC, 9 July 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 2 July 2002
Use wait state of 3 for better performance
Version :
Version 2, 2 July 2002
[Previous]
[Next]
Project : SOHO - CDS
Name : CSCALE
Purpose : my own color scale routine
Category : display
Syntax : IDL> a=cscale(b)
Inputs : ARRAY = input array to scale
Outputs : CARRAY = byte scaled array
Keywords :
TOP = top color index to scale to [def=!d.table_size-1]
BOTTOM = bottom color index to scale to [def=0]
MIN = min data to scale [def=min(array)]
MAX = max data to scale [def=max(array)]
MISSING = data to exclude [i.e., set to dmin]
NO_COPY = destroy input array
REVERSE = reverse color scale min->max
LOG = use log10 scale
DRANGE = same as [min,max]
CALLS: ***
DSCALE, EXIST, IS_STRING, NINT [1], NINT [2]
CALLED BY:
FITS2TIFF, ITOOL_EIT_SCALE, ITOOL_TRACE_SCALE, MAKE_MAP, PLOT_MAP
PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
spectro_plot2
History : Version 1, 17-Jan-1998, D M Zarro. Written
Modified 24-Nov-1999, Zarro (SM&A/GSFC) - added check
for unnecessary call to filt_data
Modified 14-March-2000, Zarro (SM&A/GSFC) - fixed
bug in use of cmin/cmax
Modified 1-Jun-2000, Zarro (EIT/GSFC) - fixed another
bug with cmin/cmax
Modified 4-Feb-2003, Zarro (EER/GSFC) - added DRANGE
Modified 11-Jun-2003: Csillaghy (ETH Zurich) - added /NAN
Modified 28-Oct-2003: Zarro (GSI/GSFC) - fixed log scaling bug
where positive values below 1 were being ignored.
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
NAME:
CSPLINE
PURPOSE:
Function to evaluate a natural cubic spline at specified data points
EXPLANATION:
Combines the Numerical Recipes functions SPL_INIT and SPL_INTERP
CALLING SEQUENCE:
result = cspline( x, y, t, [ DERIV = ])
INPUTS:
x - vector of spline node positions, must be monotonic increasing or
decreasing
y - vector of node values
t - x-positions at which to evaluate the spline, scalar or vector
INPUT-OUTPUT KEYWORD:
DERIV - values of the second derivatives of the interpolating function
at the node points. This is an intermediate step in the
computation of the natural spline that requires only the X and
Y vectors. If repeated interpolation is to be applied to
the same (X,Y) pair, then some computation time can be saved
by supplying the DERIV keyword on each call. On the first call
DERIV will be computed and returned on output.
OUTPUT:
the values for positions t are returned as the function value
If any of the input variables are double precision, then the output will
also be double precision; otherwise the output is floating point.
CALLS: ***
REVERSE
CALLED BY:
FM_UNRED
EXAMPLE:
The following uses the example vectors from the SPL_INTERP documentation
IDL> x = (findgen(21)/20.0)*2.0*!PI ;X vector
IDL> y = sin(x) ;Y vector
IDL> t = (findgen(11)/11.0)*!PI ;Values at which to interpolate
IDL> plot,x,y,psym=1 ;Plot original grid
IDL> oplot, t,cspline(x,y,t),psym=2 ;Overplot interpolated values
METHOD:
The "Numerical Recipes" implementation of the natural cubic spline is
used, by calling the intrinsic IDL functions SPL_INIT and SPL_INTERP.
HISTORY:
version 1 D. Lindler May, 1989
version 2 W. Landsman April, 1997
Rewrite using the intrinsic SPL_INIT & SPL_INTERP functions
Converted to IDL V5.0 W. Landsman September 1997
Work for monotonic decreasing X vector W. Landsman February 1999
[Previous]
[Next]
NAME:
CT2LST
PURPOSE:
To convert from Local Civil Time to Local Mean Sidereal Time.
CALLING SEQUENCE:
CT2LST, Lst, Lng, Tz, Time, [Day, Mon, Year]
or
CT2LST, Lst, Lng, dummy, JD
INPUTS:
Lng - The longitude in degrees (east of Greenwich) of the place for
which the local sidereal time is desired, scalar. The Greenwich
mean sidereal time (GMST) can be found by setting Lng = 0.
Tz - The time zone of the site in hours. Use this to easily account
for Daylight Savings time (e.g. 4=EDT, 5 = EST/CDT), scalar
This parameter is not needed (and ignored) if Julian date is
supplied.
Time or JD - If more than four parameters are specified, then this is
the time of day of the specified date in decimal hours. If
exactly four parameters are specified, then this is the
Julian date of time in question, scalar or vector
OPTIONAL INPUTS:
Day - The day of the month (1-31),integer scalar or vector
Mon - The month, in numerical format (1-12), integer scalar or
Year - The year (e.g. 1987)
OUTPUTS:
Lst The Local Sidereal Time for the date/time specified in hours.
CALLS: ***
JDCNV [1], JDCNV [2], JDCNV [3]
CALLED BY:
ECI2GEO, EQ2HOR, GEO2ECI, HOR2EQ, ZENPOS, get_zenang
RESTRICTIONS:
If specified, the date should be in numerical form. The year should
appear as yyyy.
PROCEDURE:
The Julian date of the day and time is question is used to determine
the number of days to have passed since 0 Jan 2000. This is used
in conjunction with the GST of that date to extrapolate to the current
GST; this is then used to get the LST. See Astronomical Algorithms
by Jean Meeus, p. 84 (Eq. 11-4) for the constants used.
EXAMPLE:
Find the Greenwich mean sidereal time (GMST) on 1987 April 10, 19h21m UT
For GMST, we set lng=0, and for UT we set Tz = 0
IDL> CT2LST, lst, 0, 0,ten(19,21), 10, 4, 1987
==> lst = 8.5825249 hours (= 8h 34m 57.0896s)
The Web site http://tycho.usno.navy.mil/sidereal.html contains more
info on sidereal time, as well as an interactive calculator.
PROCEDURES USED:
jdcnv - Convert from year, month, day, hour to julian date
MODIFICATION HISTORY:
Adapted from the FORTRAN program GETSD by Michael R. Greason, STX,
27 October 1988.
Use IAU 1984 constants Wayne Landsman, HSTX, April 1995, results
differ by about 0.1 seconds
Converted to IDL V5.0 W. Landsman September 1997
Longitudes measured *east* of Greenwich W. Landsman December 1998
[Previous]
[Next]
Name: cube_edit
Purpose: edit 3D cube (mouse -OR- command line) w/optional rebin
Input Parameters:
incube - data cube to edit
Output Parameters:
outcube - optional output - the 'edited'/reduced cube
Output:
Function returns subscripts of edited cube -OR- new cube if /DATA set
Keyword Parameter:
data - if set, return value is edited cube, not the subscripts
ss - optional input SubScripts to use (bypass edit, just take subset)
nx,ny - optionally congrid the reduced cube
Calling Sequence:
goodss=cube_edit(incube [,outcube] [,/DATA] ) ;mouse edit
goodss=cube_edit(incube [,outcube],ss=ss[,nx,ny]) ;SS/command line
good3d=cube_edit(incube [,outcube],ss=ss[,nx,ny],/DATA);return edited
cube, not SS
Calling Examples:
new=cube_edit(oldcube) ; mouse edit, return SS
new=cube_edit(oldcube,nx=512,ss=[4,12] ) ; command line, img #4&12
; output= (512,ny',2)
Illustrative Call:
Extract frames 4 and 6 from cube w/rebin
|----- incube ----|
IDL> help,cube_edit(bindgen(128,256,20), ss=[4,6], nx=300, /data)
<Expression> BYTE = Array[300, 600, 2]
Notes/Features:
Use /DATA to return the edited cube - default are SS (subscripts)
Use SS=SS input to do 'command line' (non interactive)
To rebin, specify NX and optionally NY (for example, zoom in on
only specified SS of cube for memory management)
If only NX specified, derive ny (~preserve aspect ratio)
Category:
3D , cube, Movie, X Windows, Image
CALLED BY:
eit_proton_summary, trace_special_movie [1], trace_special_movie [2]
trace_special_movie [3], trace_special_movie2
History:
Circa 1995 - S.L.Freeland -
23-October-1998 - Optimize output cube generation via make_array and
insertion, calls to 'modern' routines
Document, move to SSW/gen...
28-apr-1999 - S.L.Freeland - add rebin option (NX,NY)
documentation , add /DATA return keyword
CALLS: ***
BOX_MESSAGE, CONGRID [1], CONGRID [2], CONGRID [3], DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], WDEF [1], WDEF [2], data_chk [1], data_chk [2]
delvarx [5], tbeep [1], tbeep [2], tbeep [3]
Restrictions:
Simple minded but may prove useful
[Previous]
[Next]
Project : SDAC
Name : CUM_SUM
Purpose : This function returns the cumulative sum along
the first index of an array.
Category : UTIL, MATH
Explanation : A loop is used to sum over each index in a row cumulatively.
Use : Result = CUM_SUM( Array )
Inputs : Array - an array of up to 8 dimensions.
Opt. Inputs : None
Outputs : Function returns an array of the same dimensions.
Opt. Outputs: None
Keywords : None
Calls : ***
IDL_RELEASE, data_chk [1], data_chk [2]
CALLED BY:
HESSI PACKET FILE ABSTRACT CLASS, HSI_CSPECTRUM_DIST, HSI_LIVETIME_SIM
HSI_SPEC2CDIST, MAP_DISCLA2CONT
Common : None
Restrictions: Uses IDL total(/cum, array, 1) if release ge 5.3
Side effects: None.
Prev. Hist : written, richard.schwartz@gsfc.nasa.gov, 24-sep-1997
Modified :
Changed to long index. richard.schwartz@gsfc.nasa.gov, 13-oct-1998.
Revised to use total(/cum, array, 1) which yields the identical result
richard.schwartz@gsfc.nasa.gov, 1-feb-2001
[Previous]
[Next]
Name: curdir
Purpose: return current directory
Output
CALLED BY:
ANDRIL_SXT, BATSE_ONTIMES, COEFDATA, Create_update_tar, EIS_CAT [1], EIS_CAT [2]
EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], EIS_LIST_MAIN [1], EIS_LIST_MAIN [2]
EIT_MKMOVIE, EIT__DEFINE, FILE2FID, FIND_DBFILE, FIND_FID, FITS2TIFF, FLARE_LIST
FLDISPLAY, FLIST, FSPLOT, FS_ARCHIVE_RW, FS_OPEN [1], FTP_BBSO, FTP_KISF
FTP_MLSO_IMAGES, FTP_MWSO, FTP_NOBE, FTP_SYNOP, FTP__DEFINE, F_COMPOSITE, GET_LIB
GET_TEMP_DIR, GE_WINDOW [1], GFITS_R, GHOST_BUSTER, GOES_MEWE_TEM, GOES__DEFINE
GRS_EXTRACT, GRS_RESP, HESSI_DATA_PATHS [1], HESSI_SHUTTERS, HKG_DBASE
HTTP__DEFINE, HXRBS_ESC, LAD_PHA_EDGES, Load_recs, MAP2GIF, MAP2JPEG, MAP2MPEG
MAP__DEFINE, MK_FILE, MK_MER_CONT, MK_MPEG, NEW_EFFECTIVE_AREAS_CODE
NORH_FUJIKI [1], NORH_FUJIKI [2], NORH_HANAOKA [1], NORH_HANAOKA [2]
NORH_KOSHIX [1], NORH_KOSHIX [2], NORH_SYNTH [1], NORH_SYNTH [2]
NORH_SYNTH_BYF [1], NORH_SYNTH_BYF [2], NORH_TRANS_BYF [1], NORH_TRANS_BYF [2]
NUCLEAR_TABLE_LOAD, OCC_DBASE, PARSE_GROSSC_ATTITUDE, PLOT_ANGC [2]
PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], PRINT_GEV, PRINT_NAR, QLDISPLAY, RAWDUMP
READQUAL, READSUM, Read_mat_xcom, SMART_FTP, SOCK_COPY, SOCK_DOWNLOAD
SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_DATA_GENX [1], SPEX_DATA_GENX [2]
SPEX_DRM_GENX [1], SPEX_DRM_GENX [2], SPEX_PROC [1], SPEX_PROC [2]
SPEX_READ_FIT_RESULTS, SPEX_SUMMARY [1], SPEX_SUMMARY [2], SPEX__DEFINE
SYNOP_DEFINE, TIFF2GIF, TRACE_PREP, UPDATE_LINE_TEMPLATES, XDIFF, XR_RD_ABUNDANCE
XSM_PREP, batse_menu, break_doc [1], break_doc [2], break_doc [3], calc_rad_loss
chk_flares [1], chk_flares [2], ckcopy, configure_http, data_compress [1]
data_compress [2], data_compress [3], dbase2disk, dir_since, disk_hog [1]
disk_hog [2], dotar, eit_file2path, eit_files, fidrange [1], fidrange [2]
flares2disk, get1doc [1], get1doc [2], get_selsis, go_yo_prod_batch
hesi_grid_trans, hessi_grid_trans, hsi_params2script, html_get_files
image2movie, kluge_att, ksc_commands, mk_pix [1], mk_pix [2], mk_ssc [1], mk_ssc [2]
mk_ssc_batch [1], mk_ssc_batch [2], mk_ydb_list, mktap_prep, multi_hda2hxi
mwritefits, new_dpath [1], new_dpath [2], new_version [1], new_version [2]
obj_restore, obj_save, pr_status [1], pr_status [2], pro ratesdump, rd_sxs_pha [1]
rd_sxs_pha [2], rd_xda_same, rd_ydbtapedir, read_ftp, read_genxcat, renbad
search_files, show_pix [1], show_pix [2], special_movie, spex_image__define
spex_preview [1], spex_preview [2], ssc_scan2, ssw_contrib_monitor
ssw_get_sources, ssw_javamovie, ssw_move, ssw_time2filelist, ssw_time2paths
ssw_upgrade [1], ssw_upgrade [2], sxt2file, sxt_patch_att, sxt_prep [1]
sxt_prep [2], sxt_prep [3], sxt_ssc2file, sxt_ssc2sss, sxt_ssn2fits [2]
term_times, tfile__define, timeline, topsdb [1], topsdb [2]
trace_decode_idl PLEASE USE trace_jpeg_decomp, trace_file2path
trace_jpeg_decomp, trace_make_vignette, uncompress, wbs_grs_response [1]
wbs_grs_response [2], web_seq, write_access [1], write_access [2], write_genxcat
write_trace, xpickfile, xsearch_obs, xset_chain [1], xset_chain [2], yo_xda2legacy
History:
slf, circa 1-Dec-1992
slf, 9-mar-1993 ; use cd, not spawn
slf, 23-jan-1996 ; problem with UNIX 4.01 (which OS??)
; use spawn for those...
slf, 7-nov-1996 ; force output->scalar ("cd" consistent)
[Previous]
[Next]
NAME:
CURS
PURPOSE:
Selects an X windows cursor shape
CALLING SEQUENCE:
curs ;Interactively select a cursor shape.
curs, sel ;Make the given CURSOR_STANDARD value the cursor
shape.
OPTIONAL INPUT:
sel - Either an integer giving the CURSOR_STANDARD value (usually an
even value between 0 and 152) indicating the cursor shape, or
a string from the following menu
a -- Up arrow
b -- Left-angled arrow
c -- Right-angled arrow
d -- Crosshair
e -- Finger pointing left
f -- Finger pointing right
g -- Narrow crosshair
h -- Cycle through all possible standard cursor shapes
OUTPUTS:
None.
CALLS: ***
SCR_CURMOV [1], SCR_CURMOV [2], SCR_CURMOV [3]
RESTRICTIONS:
Uses the CURSOR_STANDARD keyword of the DEVICE procedure. Although
this keyword is available under Macintosh and Windows IDL, the values
used by this procedure are specific to the X windows device.
PROCEDURE:
If the user supplies a valid cursor shape value, it is set. Otherwise,
an interactive command loop is entered; it will continue until a valid
value is given.
MODIFICATION HISTORY:
Converted to VAX 3100 workstations / IDL V2. M. Greason, STX, May 1990.
Avoid bad cursor parameter values W. Landsman February, 1991
Don't change value of input param W. Landsman August 1995
Converted to IDL V5.0 W. Landsman September 1997
Use SIZE(/TNAME) instead of DATATYPE() W. Landsman October 2001
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
CURSOR_INFO
PURPOSE:
Report cursor's position to a text widget.
EXPLANATION:
In image_tool, cursor's position is displayed in variety of
ways depending on the display mode being set. When using the
zoom feature, such position is also needed. Note: Each time when this
routine is called, coordinates of a reference point in all three
coordinate systems (device, data, and solar) have to be given. Since
this routine has to tell if the cursor is within the plotting area,
the reference point should therefore always be the lower left corner
of the image.
CALLING SEQUENCE:
CURSOR_INFO, cx, cy, widget_id, csi=csi
INPUTS:
CX -- X position of the cursor, in device pixcels
CY -- Y position of the cursor, in device pixcels
WIDGET_ID -- ID of the text widget in which the cursor pistion
is displayed.
CSI -- Coordinate system information structure that contains some
basic information of the coordinate systems involved.
See itool_new_csi.pro for more information about CSI.
D_MODE -- Code for the coordinate system in which the cursor position
is shown. Possible code numbers are:
1. Device coordinate system, in device pixcels
2. Data (image) coordinate system, in data pixels
3. Solar disk coordinate system, in arc seconds
4. Heliographic coordinate system, in degrees
OPTIONAL INPUTS:
None.
OUTPUTS:
Cursor's position is displayed on the given text widget.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
INSIDE - Set this keyword to show cursor position only when
the cursor is inside the image array
CALLS: ***
CNVT_COORD [1], CNVT_COORD [2], NUM2STR
CALLED BY:
ITOOL_DRAW, ITOOL_LIMBFITTER, ITOOL_ZOOM, MAKE_AUTO_FIT, MAKE_MANUAL_FIT
MK_LIMBFIT_BS, POLYGON_CSR, UPDATE_FITLIMB
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written September 14, 1994, Liyun Wang, NASA/GSFC
MODIFICATION HISTORY:
Version 2, Liyun Wang, NASA/GSFC, November 18, 1994
Calls CNVT_COORD to make conversion between any two of four
coordinate systems involved in solar image displaying;
Improved the way of displaying heliographic latitude and longitude
Version 3, August 17, 1995, Liyun Wang, NASA/GSFC
Added INSIDE keyword
Version 4, November 8, 1995, Liyun Wang, NASA/GSFC
Added display for position angle of the cursor
Version 5, November 17, 1995, Liyun Wang, NASA/GSFC
Fixed a bug that caused inaccurate conversion to or from
the heliographic system
Version 6, August 28, 1996, Liyun Wang, NASA/GSFC
Modified such that if cursor is outside the image, image
data pixel is not displayed
Version 7, August 13, 1997, Liyun Wang, NASA/GSFC
Took away DATE keyword (now included in CSI)
VERSION:
Version 7, August 13, 1997
[Previous]
[Next]
NAME:
CURVAL
PURPOSE:
Cursor controlled display of image intensities and astronomical coords
EXPLANATION
CURVAL displays different information depending whether the user
supplied an image array, and/or a FITS header array
CALLING SEQUENCE(S):
curval ;Display x,y and byte intensity (inten)
curval, im ;Display x,y,inten, and also pixel value (from image array)
curval, hdr, [ im, OFFSET = , ZOOM =, FILEIMAGE =]
OPTIONAL INPUTS:
Hdr = FITS Header array
Im = Array containing values that are displayed. Any type.
OPTIONAL KEYWORD INPUTS:
ALT - single character 'A' through 'Z' or ' ' specifying an alternate
astrometry system present in the FITS header. The default is
to use the primary astrometry or ALT = ' '. If /ALT is set,
then this is equivalent to ALT = 'A'. See Section 3.3 of
Greisen & Calabretta (2002, A&A, 395, 1061) for information about
alternate astrometry keywords.
OFFSET - 2 element vector giving the location of the image pixel (0,0)
on the window display. OFFSET can be positive (e.g if the
image is centered in a larger window) or negative (e.g. if the
only the central region of an image much larger than the window
is being displayed.
Default value is [0,0], or no offset.
ZOOM - Scalar specifying the magnification of the window with respect
to the image variable. Use, for example, if image has been
REBINed before display.
FILENAME = name of file to where CURVAL data can be saved.
Data will only be saved if left or center mouse button
are pressed.
OUTPUTS:
None.
CALLS: ***
ADSTRING, EXTAST, GSSSXYAD, REPCHR [1], REPCHR [2], REPCHR [3], SXPAR [1], SXPAR [2]
SXPAR [3], UNZOOM_XY, XY2AD
SIDE EFFECTS:
X and Y values, etc., of the pixel under the cursor are constantly
displayed.
Pressing left or center mouse button prints a line of output, and
starts a new line.
Pressing right mouse button exits the procedure.
If the keyword FILENAME is defined, the date and time, and a heading
will be printed in the file before the data.
MINIMUM IDL VERSION:
V5.0 (uses !MOUSE, square brackets)
PROCEDURES CALLED:
ADSTRING(), EXTAST, GSSSXYAD, RADEC, SXPAR(), UNZOOM_XY, XY2AD
REVISION HISTORY:
Written, K. Rhode, STX May 1990
Added keyword FILENAME D. Alexander June 1991
Don't write to Journal file W. Landsman March 1993
Use astrometry structure W. Landsman Feb 1994
Modified for Mac IDL I. Freedman April 1994
Allow for zoomed or offset image W. Landsman Mar 1996
Proper rounding of zoomed pixel values W. Landsman/R. Hurt Dec. 1997
Converted to IDL V5.0 W. Landsman 10-Dec-1997
Remove unneeded calls to obsolete !ERR W. Landsman December 2000
Replace remaining !ERR calls with !MOUSE.BUTTON W. Landsman Jan 2001
Allow for non-celestial (e.g. Galactic) coordinates W. Landsman Apr 2003
Work if RA/Dec reversed in CTYPE keyword W. Landsman Feb. 2004
Always call UNZOOM_XY for MOUSSE compatibility W. Landsman Sep. 2004
Added ALT keyword W. Landsman October 2004
[Previous]
[Next]
NAME:
CW_ALOGSLIDER
PURPOSE:
The standard slider provided by the WIDGET_SLIDER() function is
integer only. This compound widget provides a logarithmic floating point
slider.
CATEGORY:
Compound widgets.
CALLING SEQUENCE:
widget = CW_ALOGSLIDER(Parent)
INPUTS:
Parent: The ID of the parent widget.
KEYWORD PARAMETERS:
DRAG: Set this keyword to zero if events should only
be generated when the mouse is released. If it is
non-zero, events will be generated continuously
when the slider is adjusted. Note: On slow systems,
/DRAG performance can be inadequate. The default
is DRAG=0.
EDIT: Set this keyword to make the slider label be
editable. The default is EDIT=0.
FORMAT: Provides the format in which the slider value is
displayed. This should be a format as accepted by
the STRING procedure. The default is FORMAT='(G13.6)'
FRAME: Set this keyword to have a frame drawn around the
widget. The default is FRAME=0.
MAXIMUM: The maximum value of the slider. The default is
MAXIMUM=100.
MINIMUM: The minimum value of the slider. Must be greater than 0.
The default is Maximum / 1e6.
SUPPRESS_VALUE: If true, the current slider value is not displayed.
The default is SUPPRESS_VALUE=0.
TITLE: The title of slider. (The default is no title.)
UVALUE: The user value for the widget.
VALUE: The initial value of the slider
VERTICAL: If set, the slider will be oriented vertically.
The default is horizontal.
XSIZE: For horizontal sliders, sets the length.
YSIZE: For vertical sliders, sets the height.
OUTPUTS:
The ID of the created widget is returned.
CALLS: ***
ALOGSLIDER_GET_VALUE, ALOGSLIDER_SET_VALUE, ALOGSLIDE_EVENT
CALLED BY:
ROUTINE_NAME [1], get_slider, out_spectra_4_designer, set_field
SIDE EFFECTS:
This widget generates event structures containing a field
named value when its selection thumb is moved. This is a
floating point value.
PROCEDURE:
WIDGET_CONTROL, id, SET_VALUE=value can be used to change the
current value displayed by the widget.
WIDGET_CONTROL, id, GET_VALUE=var can be used to obtain the current
value displayed by the widget.
MODIFICATION HISTORY:
April 2, 1992, SMR and AB
Based on the RGB code from XPALETTE.PRO, but extended to
support color systems other than RGB.
5 January 1993, Mark Rivers, Brookhaven National Labs
Added EDIT keyword.
7 April 1993, AB, Removed state caching.
28 July 1993, ACY, set_value: check labelid before setting text.
20 FEB 1994, RAS, BASED on cw_fslider
[Previous]
[Next]
NAME:
CW_ANIMATE2
PURPOSE:
Modified version of CW_ANIMATE to add catch error handler in CW_ANIMATE2_LOAD.
This widget displays an animated sequence of images using
X-windows Pixmaps. This is a compound widget, based on the
XINTERANIMATE procedure, with the following advantages:
- It can be included in other applications.
- Multiple copies can be run simultaneously.
The speed and direction of the display can be adjusted using
the widget interface.
CATEGORY:
Image display, compound widgets.
CALLING SEQUENCE:
To initially create:
widget = CW_ANIMATE2(PARENT, SIZEX, SIZEY, NFRAMES)
To reinitialize when another animation is loaded:
CW_ANIMATE2_INIT, ANIMATEBASE, SIZEX, SIZEY, NFRAMES
To load a single image:
CW_ANIMATE2_LOAD, WIDGET, IMAGE = IMAGE, FRAME = FRAME_INDEX
To load a single image that is already displayed in an existing window:
CW_ANIMATE2_LOAD, WIDGET, FRAME = FRAME_INDEX, $
WINDOW = [WINDOW_NUMBER [, X0, Y0, SX, SY]]
(This technique is much faster than reading back from the window.)
To display the animation after all the images have been loaded:
CW_ANIMATE2, WIDGET [, RATE]
To get a copy of the vector of Pixmaps being used by the widget.
If this routine is called, the widget does not destroy the pixmaps
when it is destroyed. The user can then provide them to a later
call to CW_ANIMATE2 to re-use them while skipping the Pixmap creation
and rendering step:
CW_ANIMATE2_GETP, widget, PIXMAPS
INPUTS:
CW_ANIMATE2:
PARENT: The ID of the parent widget.
SIZEX: The width of the displayed image.
SIZEY: The height of the displayed image.
NFRAMES: The number of frames in the animation sequence.
CW_ANIMATE2_INIT:
ANIMATEBASE: The ID of the base animation widget.
SIZEX: The width of the displayed image.
SIZEY: The height of the displayed image.
NFRAMES: The number of frames in the animation sequence.
CW_ANIMATE2_LOAD:
WIDGET: The ID of the widget (as created with CW_ANIMATE2)
into which the image should be loaded.
CW_ANIMATE2_RUN:
WIDGET: The ID of the widget (as created with CW_ANIMATE2)
into which the image should be loaded.
RATE: A value between 0 and 100 that represents the
speed of the animation as a percentage of the
maximum display rate. The fastest animation has
a value of 100 and the slowest has a value of 0.
The default animation rate is 100.
STOP: If this keyword is set, the animation is stopped.
NFRAMES: Specifies the number of frames to animate, must
<= the number specified in CW_ANIMATE2().
KEYWORD PARAMETERS:
CW_ANIMATE2:
PIXMAPS: This keyword provides the new widget with a vector
of pre-existing pixmap (off screen window) IDs.
This vector is usually obtained from a call to
CW_ANIMATE2_GETP applied to a previous animation
widget.
UVALUE: A user supplied value to be stored in the widget's
user value field.
UNAME: A user supplied string name to be stored in the
widget's user name field.
NO_KILL: If NOT set, an "End Animation" button is added to the
animation base. If set the button is not added.
OPEN_FUNC: A user supplied string that specifies a callback
function name. When a value is specified for this
keyword, an "Open..." pushbutton is added to the
window. When the "Open..." pushbutton is clicked
the OPEN_FUNC function is called to load new
animation data.
INFO_FILE: A filename containing text to be displayed by
XDISPLAYFILE when user selects the help button.
CW_ANIMATE2_INIT:
PIXMAPS: This keyword provides the new widget with a vector
of pre-existing pixmap (off screen window) IDs.
This vector is usually obtained from a call to
CW_ANIMATE2_GETP applied to a previous animation
widget.
CW_ANIMATE2_LOAD:
CYCLE: If set, cycle. Normally, frames are displayed
going either forward or backwards. If CYCLE is
set, reverse direction after the last frame in
either direction is displayed.
FRAME: The frame number to be loaded. This is a value
between 0 and NFRAMES. If not supplied, frame 0
is loaded.
IMAGE: The image to be loaded.
ORDER: Set this keyword to display images from the top
down instead of the default bottom up. This keyword
is only used when loading images with the IMAGE
keyword.
TRACK: If set, the frame slider tracks the current frame.
Default is not to track.
WINDOW: When this keyword is specified, an image is copied
from an existing window to the animation pixmap.
When using X windows, this technique is much faster
than reading from the display and then loading with
the IMAGE keyword.
The value of this parameter is either an IDL window
number (in which case the entire window is copied),
or a vector containing the window index and the
rectangular bounds of the area to be copied. For
CALLED BY:
XINTERANIMATE2
example:
WINDOW = [Window_Number, X0, Y0, Sx, Sy]
XOFFSET: The horizontal offset, in pixels from the left of
the frame, of the image in the destination window.
YOFFSET: The vertical offset, in pixels from the bottom of
the frame, of the image in the destination window.
OUTPUTS:
No explicit outputs.
CALLS: ***
COLORMAP_APPLICABLE, CW_ANIMATE2_CLN, CW_ANIMATE2_EV, CW_ANIMATE2_GETP
CW_ANIMATE2_INIT, CW_ANIMATE2_LOAD, CW_ANIMATE2_RUN, CW_BGROUP, GET_CALLER
INITBITMAPBUTTONS, MPEG_CLOSE, MPEG_PUT, MPEG_SAVE, SETBITMAPBUTTONS
XDISPLAYFILE [1], XDISPLAYFILE [2], XLOADCT [1], XLOADCT [2], XLOADCT [3]
SIDE EFFECTS:
If the widget is realized before calls to CW_ANIMATE2_LOAD, the frames
are displayed as they are loaded. This provides the user with an
indication of how things are progressing.
When the widget is destroyed, it destroys the pixmaps used in the
animation, unless they were previously obtained via CW_ANIMATE2_GETP
and the KILL_ANYWAY keyword was not set.
The only event returned by this widget indicates that the user
has pressed the DONE button. The parent application should use
this as a signal to kill the animation widget via WIDGET_CONTROL.
RESTRICTIONS:
If more than one animation widget is running at a time, they
will fight for resources and run slower.
PROCEDURE:
When initialized, this procedure creates pixmaps containing the
frames of the animation sequence. Once the images are loaded,
they are displayed by copying the images from the pixmap or buffer
to the visible draw widget.
EXAMPLE:
Assume the following event handler procedure exists:
PRO EHANDLER, EV
WIDGET_CONTROL, /DESTROY, EV.TOP
end
Enter the following commands to open the file ABNORM.DAT (a series
of images of a human heart) and load the images it contains into
an array H:
OPENR, 1, FILEPATH('abnorm.dat', SUBDIR = 'images')
H = BYTARR(64, 64, 16)
READU, 1, H
CLOSE, 1
H = REBIN(H, 128, 128, 16)
Create an instance of the animation widget at load the frames:
base = widget_base()
animate = CW_ANIMATE2(base, 128, 128, 16)
WIDGET_CONTROL, /REALIZE, base
for i=0,15 do CW_ANIMATE2_LOAD, animate, FRAME=i, IMAGE=H[*,*,I]
Start the animation:
CW_ANIMATE2_RUN, animate
XMANAGER, "CW_ANIMATE2 Demo", base, EVENT_HANDLER = "EHANDLER"
Pressing the DONE button kills the application.
MODIFICATION HISTORY:
AB, June 1992 Heavily based on the XINTERANIMATE procedure.
SR, September 1992 Fixed a problem when a paused animation's
frame selection was moved and the resulting
frame change ended up in another animation.
SR, November 1992 Fixed a problem when a single paused animation
would fail when the frame selection slider
event tried to set do a bad drawing window.
DMS/AB, March, 1993 Got rid of state caching. Got rid of
XMANAGER background tasks in favor of new
"WIDGET_CONTROL,timer=" feature.
ACY, October 1993 Set RETAIN=2 for draw widget to prevent
clipping by an overlapping window when
loading frames.
DMS, Dec, 1993 Added STOP and NFRAMES keywords to CW_ANIMATE2_RUN.
Added KILL_ANYWAY keyword to CW_ANIMATE2_GETP.
WSO, Jan, 1995 Added OPEN_FUNC keyword and updated UI.
ACY, Jan, 1997 Added INFO_FILE keyword to allow user-supplied
files for help text
JLP, Jan, 2000 Allow TrueColor images as input to CW_ANIMATE2_LOAD.
Kim, 4-Feb-2005. Modified cw_animate to add a catch in CW_ANIMATE2_LOAD so
that when it crashes, we can delete the pixmaps. Renamed to CW_ANIMATE2.
Kim, 16-Nov-2005. wimagearea in structure state was being set to 0 at
some point, so it's a 2-byte integer. Later when set widget ID into it, it
overflows. Changed to 0L (long word).
Zarro (L-3Com/GSFC) - 6 April 2006, fixed byte logic for MPEG and COLOR support
[Previous]
[Next]
NAME:
CW_BSELECTOR
PURPOSE:
CW_BSELECTOR is a compound widget that appears as a pull-down
menu whose label shows the widget's current value. When the button
is pressed, the menu appears and the newly selected value becomes
the new title of the pull-down menu.
CATEGORY:
Compound widgets.
CALLING SEQUENCE:
widget = CW_BSELECTOR(Parent, Names)
To get or set the value of a CW_BSELECTOR, use the GET_VALUE and
SET_VALUE keywords to WIDGET_CONTROL. The value of a CW_BSELECTOR
is the index of the selected item.
INPUTS:
Parent: The ID of the parent widget.
Names: A string array, containing one string per button,
giving the name of each button.
KEYWORD PARAMETERS:
EVENT_FUNCT: The name of an optional user-supplied event function
for buttons. This function is called with the return
value structure whenever a button is pressed, and
follows the conventions for user-written event
functions.
FONT: The name of the font to be used for the button
titles. If this keyword is not specified, the default
font is used.
FRAME: Specifies the width of the frame to be drawn around
the base.
IDS: A named variable into which the button IDs will be
stored, as a longword vector.
LABEL_LEFT: Creates a text label to the left of the buttons.
LABEL_TOP: Creates a text label above the buttons.
MAP: If set, the base will be mapped when the widget
is realized (the default).
RETURN_ID: If set, the VALUE field of returned events will be
the widget ID of the button.
RETURN_INDEX: If set, the VALUE field of returned events will be
the zero-based index of the button within the base.
THIS IS THE DEFAULT.
RETURN_NAME: If set, the VALUE field of returned events will be
the name of the button within the base.
RETURN_UVALUE: An array of user values to be associated with
each button. Selecting the button sets the uvalue
of the CW_BSELECTOR to the button's uvalue and
returns the uvalue in the value field of the event
structure. If this keyword isn't specified, the
CW_BSELECTOR's uvalue remains unchanged.
SET_VALUE: The initial value of the buttons. This keyword is
set to the index of the Names array element desired.
So if it is desired that the initial value be the
second element of the Names array, SET_VALUE would
be set equal to 1. This is equivalent to the later
statement:
WIDGET_CONTROL, widget, set_value=value
UVALUE: The user value to be associated with the widget.
XOFFSET: The X offset of the widget relative to its parent.
YOFFSET: The Y offset of the widget relative to its parent.
OUTPUTS:
The ID of the created widget is returned.
CALLS: ***
CW_BSELECTOR2, CW_BSELECTOR2_EVENT, CW_BSELECTOR2_GETV, CW_BSELECTOR2_SETV
CALLED BY:
GET_PT, MK_SOHO_CUSTOM, PLOT_HKLZ, POINTING3, STARFIELD, XGET_SYNOPTIC, mpeg_wid
SIDE EFFECTS:
This widget generates event structures with the following definition:
event = { ID:0L, TOP:0L, HANDLER:0L, INDEX:0, VALUE:0 }
The INDEX field is the index (0 based) of the menu choice. VALUE is
either the INDEX, ID, NAME, or BUTTON_UVALUE of the button,
depending on how the widget was created.
RESTRICTIONS:
Only buttons with textual names are handled by this widget.
Bitmaps are not understood.
MODIFICATION HISTORY:
1 April 1993, DMS, Adapted from CW_BGROUP.
22 Dec. 1993, KDB, Corrected documentation for keyword SET_VALUE.
11 Aug. 1994, Scott Paswaters (NRL)
1) Added MENU=2 to differentiate a pd menu from a button under Motif.
2) Modified the CW_BSELECTOR_SETV procedure to allow changing the labels
of the buttons. Example if you had a pd menu with two buttons 'b1' & 'b2':
WIDGET_CONTROL, cw_bselector_base, SET_VALUE=['b3','b4'] ;** change labels
WIDGET_CONTROL, cw_bselector_base, SET_VALUE=0 ;** to select 'b3'
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_CHECKBOX()
Purpose : "Checkbox" or "cross-box" widget (status on/off).
Explanation : Generates a small widget_draw window showing an on/off status
as either a "checkmark" or a cross.
To set the status, use:
WIDGET_CONTROL,CHECK_ID,SET_VALUE=STATUS
You can also modify other properties (CROSS, THICK, BGCOLOR,
and FGCOLOR) by using e.g.:
WIDGET_CONTROL,CHECK_ID,SET_VALUE={THICK:2,BGCOLOR:3}
To read the status, use:
WIDGET_CONTROL,CHECK_ID,GET_VALUE=VAL
after which VAL will contain a structure:
{ value : value,$
cross : cross,$
boxed : boxed,$
thick : thick,$
bgcolor : bgcolor,$
fgcolor : fgcolor }
The VALUE tag contains the on/off status.
Event structures (generated when the user switches the status
by clicking on the draw window) are as follows:
{CW_CHECKBOX,id:ev.handler,top:ev.top,handler:0L,
value:0/1}
Use : CHECK_ID = CW_CHECKBOX( BASE )
Inputs : BASE : The widget base to put the checkbox on.
Opt. Inputs : See keywords
Outputs : Returns the ID of the compound widget.
Opt. Outputs: None.
Keywords : BGCOLOR : Background color (default 0)
FGCOLOR : Foreground color (default !D.TABLE_SIZE)
THICK : Thickness of the line used to draw the
checkmark/cross.
CROSS : Set to 1 to use a cross instead of a checkmark.
BOXED : Set to draw a box around the edge of the draw window,
using the foreground color. The edge will be drawn
with line thickness equal to the value of BOXED. Odd
values give best results.
XSIZE,YSIZE: Size of draw window, default 20 pixels
UVALUE : The uvalue associated with the compound widget.
Calls : ***
COPY_TAG_VALUES, CW_CHECKBOX_EVENT, CW_CHECKBOX_GETV, CW_CHECKBOX_REALIZE
CW_CHECKBOX_SETV, CW_CHECKBOX_SHOWSTAT, DATATYPE [1], DATATYPE [2], DATATYPE [3]
DEFAULT, EXIST
CALLED BY:
CWF_STATUS, XCDS_ANALYSIS
Common : None
Restrictions: ...
Side effects: ...
Category : Widgets
Prev. Hist. : None
Written : SVH Haugan, UiO, 25 September 1997
Modified : Version 2, William Thompson, GSFC, 8 April 1998
Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit
displays
Version 3, SVHH, 19 November 2003
Fixed problem of cw_checkbox_realize being called
before info structure had been put in place (IDL
seems not to honor the widget_control,id,update=0/1
very well).
Version : Version 3, 19 November 2003
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_CUBEVEIW
Purpose : Compound widget for visualizing data n-cubes (0 < n < 8)
Explanation : Creates a column display on the supplied BASE, containing an
image section and a plot section, allowing the user to
determine which data dimensions should be displayed, and to
move the focus point around inside the data.
When the focus point changes, an event is returned. The event
structure has the standard tags ID, TOP, and HANDLER, and one
tag called FOCUS, containing the indices of the current focus
point.
The data to be displayed can be changed through the
WIDGET_CONTROL, SET_VALUE=<data> mechanism.
The status variables that can be set by keywords or changed by
the SET_VALUE={tag:value} mechanism are:
focus : Current focus point
title : Title shown above the data column
image_dim : The current image dimensions
plot_dim : The current plotted dimension
dimnames : The dimension names
origin : The origin of the data axes
scale : The scale of the data axes
phys_scale : Array of 1/0 determining which of the data axis
scales are to be regarded as "physical", i.e.,
which data axes should be stretched/compressed
according to their SCALE. 1 means treat scale as
physical.
Use : ID = CW_CUBEVIEW(BASE,VALUE=DATA)
Inputs : BASE : The base to put the compound widget on.
Opt. Inputs : None.
Outputs : Returns the ID of the compound widget
Opt. Outputs: None.
Keywords : XSIZE/YSIZE : The sizes of the display windows.
DIMNAMES : An array of strings containing the names associated
with the dimensions.
ORIGIN/SCALE : The origin/scale of the data axes
PHYS_SCALE : Array of 0/1s determining which of the data axis
scales are to be regarded as "physical", i.e.,
which data axes should be stretched/compressed
according to their SCALE. 1 means treat scale as
physical.
MISSING : The value of missing data points, to be excluded in
the color scaling.
UVALUE : The uvalue to be associated with the widget.
IMAGE_DIM : Which dimensions should form the image initially
PLOT_DIM : Which dimension should be plotted initially
TITLE : The title of the data column.
Calls : ***
COPY_TAG_VALUES, CW_CUBEVIEW, CW_CUBEVIEW_DUMMY, CW_CUBEVIEW_EVENT
CW_CUBEVIEW_GETV, CW_CUBEVIEW_GET_IMAGE, CW_CUBEVIEW_GET_PLOT
CW_CUBEVIEW_SETV, CW_CUBEVIEW_SLICETEXT, CW_CUBEVIEW_UPD_INFO, CW_FLIPSWITCH
CW_PLOTZ [1], CW_PZOOM [1], DATATYPE [1], DATATYPE [2], DATATYPE [3], DEFAULT
HANDLE_KILLER_HOOKUP, SINCE_VERSION [1], SINCE_VERSION [2], STR_SEP, TRIM
XPLOTSCALE, XTVSCALE, cw_plotz [2], cw_pzoom [2]
Common : None.
Restrictions: Data must be at least one-dimensional.
Side effects: None known.
Category : Visualization
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 20 January 1997
Modified : Version 2, SVHH, 29 January 1997
Fixed some problems with singular dimensions, and
added "transpose" possibility when only two
nonsingular dimensions.
Version 3, SVHH, 29 May 1997
Added possibility of passing handle as pointer to the
data, and made some checks to see if data extraction
was really necessary (to speed up). Added ROW keyword.
Version 4, SVHH, 4 June 1997
Added update=0/update=1 calls when updating text to
avoid IDL v 5 bug that increased the base size on
every update.
Version 5, SVHH, 17 September 1997
Added return of tag "internal" as part of the "value"
structure under cw_cubeview_getv, added ALL_EVENTS
flag, (both features facilitate overplotting)
Version 6, SVHH, 6 May 1998
Will no longer redraw display etc. after a set_value
operation when there is *no* change in the "ext"
part of the info structure
Version : 6, 6 May 1998
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
CW_DROPLIST()
PURPOSE:
Create a compound widget to simulate a droplist widget
EXPLANATION:
CALLING SEQUENCE:
Result = cw_droplist(parent, value=value, uvalue=uvalue)
INPUTS:
PARENT - The ID of the parent widget
VALUE - String array, Value of list
UVALUE - User value of the list
OPTIONAL INPUTS:
INITIAL - Index of item in the list to be shown initially
XOFFSET - The X offset of the widget relative to its parent
YOFFSET - The Y offset of the widget relative to its parent
FONT - The name of the font to be used for the button titles
OUTPUTS:
RESULT - Widget ID of this compound widget
OPTIONAL OUTPUTS:
BUTTONS - ID of droplist buttons, starting from the "face" (or base)
button (#0)
KEYWORD PARAMETERS:
FRAME - Frame the list button
CALLS: ***
CW_DROPLIST_EVENT, STRPAD
CALLED BY:
XSEL_ITEM
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written May 23, 1995, Liyun Wang, GSFC/ARC
MODIFICATION HISTORY:
Version 1, created, Liyun Wang, GSFC/ARC, May 23, 1995
VERSION:
Version 1, May 23, 1995
[Previous]
[Next]
PROJECT: HESSI
NAME: cw_edroplist
PURPOSE: Create a compound widget that is an editable droplist widget,
i.e. the contents of the text field can be changed by typing, or by selecting
from a droplist. After editing the text, the user can press enter, but doesn't
have to; since kbrd_focus_events is enabled, as soon as any other button is
clicked, an event is generated and the new value is saved. Option to add user's
new value to droplist values, sorted or not.
Widget_control can be called with set_value and get_value, just as with simple
widgets.
Generates an event (described below) that the calling program can respond to.
CALLED BY:
cw_range, hsi_coll_widget, hsi_imagemisc_widget, hsi_memsato_options
hsi_memvis_options, hsi_ui_colloptions, hsi_ui_flarecat, hsi_ui_lc, hsi_ui_spec
Note: A current limitation is that if droplist is long, no scrollbars. So entire
list needs to fit on screen. This is because using buttons for droplist instead
of a real widget_droplist or widget_list for lots of reasons.
CATEGORY: WIDGETS
CALLING SEQUENCE:
widget_id = cw_edroplist (parent, $
value=value, $
format=format, $
xsize=xsize, $
label=label, $
_extra=_extra, $
drop_values=drop_values, $
uvalue=uvalue, $
append=append, $
sortdrop=sortdrop, $
help=help)
INPUTS:
parent - widget id of widget calling cw_edroplist
OPTIONAL INPUTS (KEYWORDS):
value - initial value of text
format - string containing format to display value in, .e.g. '(f10.2)'
xsize - xsize of editable text field
label - Text that will be placed to left of editable text field
_extra - any other keywords - will get passed to widget_base of compound widget
drop_values - values to put in droplist (will be display with same format). If
drop_values is not present, then no droplist is attached to text widget.
uvalue - user value to assign to compound widget
append - if set, appends user-typed values to droplist
sortdrop - 1 means sort appended droplist in ascending order, 2 means descending order
help - if set, just lists this header documentation
OUTPUTS:
Function value returned is widget id of compound widget.
OPTIONAL OUTPUTS: None
Calls: ***
CHECKVAR [1], CW_EDROPLIST_EVENT, CW_EDROPLIST_GET_VALUE
CW_EDROPLIST_SET_VALUE, DOC_MENU, OS_FAMILY, REVERSE, SAME_DATA [1], SAME_DATA [2]
SINCE_VERSION [1], SINCE_VERSION [2], TAG_EXIST [1], TAG_EXIST [2], XALIVE
checkvar [2]
COMMON BLOCKS: None
PROCEDURE:
RESTRICTIONS: None
SIDE EFFECTS: Generates an event with the following structure:
{ id: 0L, top: 0L, handler: 0L, value:0. or 0}
EXAMPLES:
widget_id = cw_edroplist ( base, $
value=2, $
format='(i5)', $
drop_values=[1,2,4,8,16,32,64,128], $
label='Enter value:', $
uvalue='max', $
xsize=6)
widget_control, widget_id, set_value=5
widget_control, widget_id, get_value=val
HISTORY:
Kim Tolbert, Nov 1999
30-Mar-2001, Kim, In set_value, check if value is a STRING variable
30-Aug-2001, Kim, Use same_data function to decide whether to generate an event
(previously used total of diff ne 0, but didn't work for strings)
[Previous]
[Next]
PROJECT: HESSI
NAME: cw_energy_range
PURPOSE: Create a compound widget that allows users to select an energy range.
User can enter low or high energy independently (either by choosing from a
droplist or by typing text, or can choose low and high from a standard set of
energy ranges.
Widget_control can be called with set_value and get_value, just as with simple
widgets.
Generates an event (described below) that the calling program can respond to.
CATEGORY: HESSI WIDGETS
CALLING SEQUENCE:
widget_id = cw_energy_range ( parent, $
value=energy_range, $
uvalue='energy_range', $
_extra=_extra, $
help=help )
INPUTS:
parent - widget id of widget calling cw_energy_range
OPTIONAL INPUTS (KEYWORDS):
value - initial energy range as fltarr(2)
uvalue - user value to assign to compound widget
_extra - any other keywords - will get passed to widget_base of compound widget
help - if set, just lists this header documentation
OUTPUTS:
Function value returned is widget id of compound widget.
OPTIONAL OUTPUTS: None
Calls: ***
CHECKVAR [1], CW_ENERGY_RANGE_EVENT, CW_ENERGY_RANGE_GET_VALUE
CW_ENERGY_RANGE_SET_VALUE, DOC_MENU, TRIM, checkvar [2], cw_range
get_edge_products
COMMON BLOCKS: None
PROCEDURE:
RESTRICTIONS: None
SIDE EFFECTS: Generates an event with the following structure:
{ id: 0L, top: 0L, handler: 0L, value:fltarr(2) }
EXAMPLES:
HISTORY:
Kim Tolbert, rewrote hsi_cw_energy_range to make it general
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_ENTERB
Purpose : A button with user editable content
Explanation : This compound widget produces a button with a label that can
be changed by the user by pressing it. For IDL 4.0.1 and on
it's a nice way of having a very compact entry field.
Supply the original string VALUE, plus an INSTRUCT(ion) to
prompt the user when he alters the VALUE. The UVALUE of the
widget may be used in the usual way.
Use : ID = CW_ENTERB(BASE,VALUE=<text>,INSTRUCT=<text>)
Inputs : BASE : The base to put the button on.
Opt. Inputs : None.
Outputs : Returns the compound widget ID.
Opt. Outputs: None.
Keywords : VALUE : Original (text) value of the button.
INSTRUCT : Prompt text for the user when editing the VALUE
Calls : ***
CW_ENTERB_EVENT, CW_ENTERB_GETV, CW_ENTERB_SETV, DEFAULT, SINCE_VERSION [1]
SINCE_VERSION [2], XINPUT
CALLED BY:
CWF_COMPONENT, XCDS_ANALYSIS, XCROP_CUBE, XPLOTSCALE
Common : None.
Restrictions: Only single-line texts may be used as the VALUE.
Side effects: None?
Category :
Prev. Hist. : None.
Written : S. V. H. Haugan, UiO, 4 January 1997
Modified : Not yet.
Version : 1, 4 January 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_FLIPSWITCH
Purpose : Implements a pusbutton status switch (e.g., On/Off)
Explanation : This compound widget is designed to produce a button for
switching between e.g., modes of operation, switching
something on/off etc.
The VALUE is an array of texts representing different modes,
and the UVALUE should be an array of texts with the same
number of elements.
EVENTS
When the user pushes a flipswitch button, the state (and the
text displayed) of the flipswitch changes. Likewise, the
uvalue of the flipswitch widget changes to the one
corresponding to the new status text. Then the button event is
sent on to the caller, with the ID set to the ID of the
flipswitch widget.
The user program determines the current state by simply
retrieving the UVALUE of the EVENT.ID.
READING/SETTING THE STATE
The state of the flipswitch may be read by either checking the
UVALUE of the widget ID, or through the WIDGET_CONTROL
GET_VALUE mechanism (this actually returns the UVALUE, not the
displayed text).
To set the state of the flipswitch, use the WIDGET_CONTROL
SET_VALUE=<uvalue of desired state> mechanism.
It is also possible to use this routine to implement a "small"
button (since the ysize is fixed).
Use : ID=CW_FLIPSWITCH(BASE,VALUE=<string_arr>,uvalue=<string_arr>)
Inputs : BASE : The base to put the flipswitch on.
Opt. Inputs :
Outputs :
Opt. Outputs:
Keywords : VALUE, UVALUE : Text arrays.
Calls : ***
CW_FLIPSWITCH_EVENT, CW_FLIPSWITCH_GETV, CW_FLIPSWITCH_SETV, DEFAULT
SINCE_VERSION [1], SINCE_VERSION [2], XUPDATE
CALLED BY:
CWF_COMPONENT, CW_CUBEVEIW, XCDS_ANALYSIS, XCFIT, XCFIT_BLOCK, XCR_REMOVE
XPLOTSCALE
Common : None.
Restrictions: Arrays VALUE/UVALUE must have same number of elements > 1
Side effects: None known.
Category : Compound widget
Prev. Hist. : None.
Written : S. V. H. Haugan, UiO, 4 January 1997
Modified : Version 2, SVHH, 15 September 1997
Added support for call mode with only one
value/uvalue (faking a normal button).
Version 3, SVHH, 15 December 1997
Added update on/off to avoid growing parent.
Version : 3, 15 December 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_INFILTRATE
Purpose : Infiltrate a widget hierarchy to tap into its events.
Explanation : CW_INFILTRATE allows a widget program to "listen in" on the
events processed by all other widget hierarchies. This is used
by XRECORDER to record all "native" events of all widgets into
a script file, and as a help to replay the events as a
demonstration.
CW_INFILTRATE uses timer events to periodically check for
newly created widget hierarchies. It will find both registered
and unregistered widgets. As a "free" service, the list of
unregistered top level widgets is pointed to by the handle
returned through the keyword ROGUE. If the value of that
handle is undefined, no existing unregistered top level
widgets have been found.
For each widget hierarchy found, CW_INFILTRATE goes through
all of its constituent widgets (buttons, lists, texts, draw
windows etc, but *not* bases) and inserts a special event
function (or procedure).
Every time a "native" event is generated (one for which
event.id EQ event.handler), the special event handler function
will call yoour "agent" procedure, with the event and the ID
of the CW_INFILTRATE widget as parameters. You may use the
UVALUE of the CW_INFILTRATE widget at your discretion.
Your agent procedure may alter the event, or set it equal to
anything except a structure, which will result in the event
"disappearing".
Since TIMER events cannot be scheduled on unrealized widgets,
it is the calling program's responsibility to set up the first
timer event after the widget hierarchy to which CW_INFILTRATE
belongs has been realized.
Use : ID = CW_INFILTRATE(BASE,AGENT_PROC [,/LIST] [,ROGUE=ROGUE])
Inputs : BASE : The base on which to put the compound widget.
AGENT_PROC : String with the name of the "agent"
procedure. This procedure should take two
arguments: the event being snatched and the ID of
the CW_INFILTRATE widget.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : LIST : Set to make CW_INFILTRATE show a listing of all
XMANAGER-registered widgets (like XMTOOL), and allow
the user to XWIDUMP the contents of that widget
hierarchy to the TTY.
Calls : ***
CW_INFILTRATE_CHECKUP, CW_INFILTRATE_CLEAN, CW_INFILTRATE_EFUNC
CW_INFILTRATE_EPROC, CW_INFILTRATE_EVENT, CW_INFILTRATE_THISONE, XWIDUMP
CALLED BY:
XRECORDER
Common : CW_INFILTRATE_STORE : Keeps the ID of the CW_INFILTRATE
widget.
Restrictions: Pretty special.... uses XMANAGER common block, and will
therefore not work in IDL 5.0 or later.
Only one copy of CW_INFILTRATE may exist at any time.
Side effects: Catches all basic events generated in the infiltrated widget
hierarchies.
Category : Widgets
Prev. Hist. :
Written : Stein V. H. Haugan, UiO, March 1997
Modified : Version 1, SVHH, May 1997
Cleaned up.
Version : 1, 26 May 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_LOADCT()
Purpose : Color table picker w. gamma/top/bottom control.
Explanation : Inspired by (and ripping off) the color table bar in
IMAGE_TOOL, this compound widget provides an easy access to
color table selection and adjustment without calling XLOADCT.
This is an autonomous compound widget, it returns absolutely
NO EVENTS.
The user may control:
bottom: Click and drag left mouse button
gamma : Click and drag middle mouse button
top : Click and drag right mouse button
Use : ID = CW_LOADCT(BASE)
Inputs : BASE : The widget base to put the menu/color bar on.
Opt. Inputs : None.
Outputs : Returns ID of the compound widget.
Opt. Outputs: None.
Keywords : XSIZE, YSIZE : The size of the color bar (widget_draw).
Default is 256 x 20.
FRAME : The frame keyword used in creating the widget_base
surrounding the compound widget.
FONT : The font to use for the pulldown menu with the
color table names.
MENU : Controls the appearance of the top level pulldown
menu with color table names (see WIDGET_BUTTON).
FILE : The file to examine for color tables. If supplied,
the file should exist. See LOADCT for details.
Calls : ***
CLEANPLOT [1], CLEANPLOT [2], CLEANPLOT [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], CONGRID [1], CONGRID [2], CONGRID [3], CW_LOADCT_ADJ_CTABLE
CW_LOADCT_EVENT, CW_LOADCT_NEWSTART, CW_LOADCT_REALIZE, CW_LOADCT_REVERSE
DEFAULT, FILE_EXIST [2], LOADCT, REVERSE_COLORS, TRIM, concat_dir [4]
file_exist [1], file_exist [3]
CALLED BY:
DSPEXP, DSP_WAV, IMAGE_TOOL, NDSPSPEC, XCFIT_BLOCK, XCR_REMOVE, XSPECT, XTVSCALE
dsp_menu
Common : COLORS -- Shared with xloadct and others
CTABLE4ITOOL -- Shared with image_tool
Restrictions: Uses 256 colors.
Side effects: Changes color table.
Category : Utility, Image
Prev. Hist. : See itool_adj_ctable
Written : s.v.h.haugan@astro.uio.no, 29 July 1996
Modified : Version 1, SVHH, 31 July 1996
Copied the contents of itool_adj_ctable into
cw_loadct_ctable, and added FILE keyword to
enable extended color tables.
Version 2, SVHH, 22 August 1996
Started seeing a strange error, a mismatch between the
size of r_orig and r_curr (etc..) with the r_curr ones
being smaller -- changed the initializing to catch
those.
Version 3, SVHH, 27 August 1996
Added REVERSE_COLORS option.
Version 4, SVHH, 15 September 1997
Shrunk the size for IDL v 4.0+ (xpad=1 etc..)
Version 5, William Thompson, GSFC, 8 April 1998
Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
Version : Version 5, 8 April 1998
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_MOUSE()
Purpose : Controlling the "Mouse button action" selection & display
Explanation : In order to make more than three types of actions available
for the mouse buttons, a "Mouse button action" display with a
pulldown menu for each mouse button is created.
The pulldown menus have the following appearance when it is
not pulled down:
1:<btext1> 2:<btext2> 3:<btext3>
where <btext1>, <btext2>, and <btext3> corresponds to the
currently chosen options for mouse buttons 1, 2, and 3,
respectively.
The user may select what type of action is to be hooked to the
different mouse buttons at any time by selecting from the 3
pulldown menus corresponding to the different mouse buttons.
For each selectable action (each pulldown menu item), there
are four entities that should be specified:
Button text (btext): Text to be displayed when an option is
selected.
Menu text (mtext) : Text to appear on the pulldown menu
Action (action) : Any string that identifies the menu
item (much like a normal UVALUE).
Availability(avail): A bit-coded mask for availability.
Bit 1 set (value 1) means this option should be available
for mouse button 1.
Bit 2 set (value 2) means this option should be available
for mouse button 2
Bit 3 set (value 4) means option should be available for
mouse button 3.
Bit 4 set (value 8) means that this option is sensitive to
drag operations.
The <btext> display field on the buttons is changed according
to the selected action automatically.
DURING EVENT PROCESSING:
Upon reciept of a WIDGET_DRAW event, the main program calls
CW_TMOUSE(ID,EVENT) in order to translate the event into an
"action" string corresponding to the event and the current
status of the cw_mouse widget.
If the event is a button press, the action string
corresponding to the pressed button is returned. If it is a
drag sensitive action, the status variable PRESS will be
updated to reflect the pressed button. See below for a
discussion of status variables.
If the event is a motion event with no button pressed, or if
the current action for the button is not drag sensitive, the
value of the MOTION status variable is returned (default
value "MOTION"). See below for a discussion of status
variables.
If the event is a motion event with a drag sensitive action
button pressed down, the corresponding action string will be
returned as if the button was pressed again. (NOTE: There's no
distinction between a PRESS and a DRAG for drag sensitive
actions, other than in the original WIDGET_DRAW event
structure).
If the event is a button release, a value from the 3-element
string array status variable RELEASE is returned. RELEASE(0)
is returned for button 1 and so on. The default value of
RELEASE is ['RELEASE1','RELEASE2','RELEASE3']. See below for a
discussion of status variables.
ALTERING MENU SELECTIONS
The main program may control the selection of actions by
setting the compound widget "value" equal to an array of 3
action strings e.g.:
WIDGET_CONTROL,CW_ID,SET_VALUE=['ACTION1','ACTION2','ACTION3']
which will make button 1 correspond to the action "ACTION1",
button 2 correspond to "ACTION2" etc. The action strings must
match action values supplied in the creation of the compound
widget. The displayed <btext>s will be altered
automatically. An empty string means don't touch the current
selection for that mouse button.
STATUS VARIABLES:
There are some status variables that may be set by the main
program, either through keywords when creating the compound
widget or through the SET_VALUE keyword in WIDGET_CONTROL. The
status variables are:
RELEASE: A 3-element string array with the action texts to
be returned upon button release events.
Default value ['RELEASE1','RELEASE2','RELEASE3']
MOTION: A scalar string with the action text to be returned
for non-drag motion events. Default value "MOTION".
PRESS: During DRAG operations, this status variable contains
the mouse button ID (1,2, or 4) of the pressed mouse
button. This status variable is not settable through
a keyword.
The main program controls the status variables of the compound
widget by assigning a structure value to the the "widget
value" of the compound widget. The tags of the structure
should be corresponding to the status variables, e.g.:
WIDGET_CONTROL,CW_ID,SET_VALUE={MOTION:'TRACKING'}
will set the MOTION status variable to "TRACKING". Motion
events will return this text from CW_TMOUSE after this
operation.
It is also possible for the main program to read the status
variables through:
WIDGET_CONTROL,CW_ID,GET_VALUE=STATUS
This will return a structure in the variable STATUS, with
tags corresponding to the different status variables.
(DE)SENSITIZING MENU OPTIONS
The main program may also control which actions should be
available at any time to the user by using e.g.:
WIDGET_CONTROL,CW_ID,SET_VALUE={INSENSITIVE:["AA","BB"],$
SENSITIVE:["CC","DD"]}
This will ensure that the menu choices corresponding to
action strings "AA" and "BB" will be desensitized (grayed
out), and the choices corresponging to actions "CC" and "DD"
will be sensitized. Other choices will not be affected.
Use : CW_ID = CW_CMOUSE(BASE,MENU)
Inputs : BASE: The widget base to place the display on.
MENU: An array of {CW_MOUSE_S} (see below) with a
description of the available mouse keyclick actions.
The options has the structure
{CW_MOUSE_S, btext:'', mtext:'', action:'', avail:0,flags:0}
btext is the "button text", i.e., the text that is to be
displayed on the pulldown menu if this option is selected.
mtext is the menu text, i.e., the text to be shown in the
pulldown menu.
action is the text to be returned by CW_TMOUSE when an event
corresponding to this menu entry occurs.
flags is used as in cw_pdmenu in order to construct
multi-level pulldown menus. See CW_PDMENU for details.
The field "avail" is used as a bit field:
Bit 0 (value 1) : This option available for button 1
Bit 1 (value 2) : This option available for button 2
Bit 2 (value 4) : This option available for button 3
Bit 4 (value 8) : (Repeat) Pass on motion events when
button is pressed continuously.
See also "Explanation" above.
Opt. Inputs : None
Outputs : Returns widget ID of the compound widget.
Opt. Outputs: None.
Keywords : MOTION: Scalar text to be returned from CW_TMOUSE during
a non-drag motion. Default "MOTION".
RELASE: 3-element text array with the texts to be returned
from CW_TMOUSE upon a button release event.
DISABLE: An array of strings matching those action strings
that are to be made unavailable initially.
Calls : ***
COPY_TAG_VALUES, CW_MOUSE_ENABLE, CW_MOUSE_EVENT, CW_MOUSE_GET_VALUE
CW_MOUSE_ONE_B, CW_MOUSE_SET_VALUE, CW_PSELECT, DATATYPE [1], DATATYPE [2]
DATATYPE [3], DEFAULT, PARCHECK, SINCE_VERSION [1], SINCE_VERSION [2]
TAG_EXIST [1], TAG_EXIST [2], TRIM, TYP
CALLED BY:
DSP_CUBE, DSP_WAV, XCR_REMOVE
Common : None.
Restrictions: The ACTIONS must be strings.
Side effects: None known.
Category : Utility, Display
Prev. Hist. : Based on CMOUSE
Written : Stein Vidar H. Haugan, UiO, 13 June 1996
Modified : Version 2, SVHH, 16 October 1996
Modified IDL v 4.0(.1) widgets to save space.
Version : 2, 16 October 1996
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_PLOTZ()
Purpose : One-window compound widget plot zoom
Explanation : CW_PLOTZ is a general purpose plotting widget that lets the
user zoom in and out on an (alterable) plotted array.
The widget is crated in much the same way as a standard
widget_draw window, although a number of extra keywords are
used in order to control the appearance of the display
(display window size, title, subtitle, etc.).
SETTING THE ARRAY TO BE PLOTTED
can be done through the VALUE keyword of CW_PLOTZ or through
the WIDGET_CONTROL SET_VALUE mechanism. The latter should only
be done after the widget hierarchy has been /realized. Setting
the value is done by:
widget_control,CW_ID,set_value=array
where "array" is either:
a one-dimensional array to be plotted (no x scale
information)
or:
a two-dimensional array (N,2) with the X values in
(*,0) and the Y values in (*,1).
The display is refreshed each time the array is changed.
CONTROLLING THE COMPOUND WIDGET BEHAVIOUR
The appearance and behaviour of this compound widget is
controlled by numerous status variables. The status variables
can be set either through the use of keywords in the
CW_PLOTZ() call, or by using e.g.:
WIDGET_CONTROL,CW_ID,SET_VALUE = STRUCT
where CW_ID is the compound widget ID and STRUCT is a
structure with one or more tags corresponding to display
attributes to be altered. To set e.g., the plot TITLE to be
used:
WIDGET_CONTROL,CW_ID,SET_VALUE = {TITLE:'Zoomable plot'}
See the "KEYWORD DEFAULTS/EXPLANATIONS" section in the main
procedure for an updated list of all the status variables that
may be set through the use of keywords. If a keyword is not
marked with a "*" in the comment section, then it is also
possible to set this status variable through the SET_VALUE
mechanism.
If the status variable CLING is set to 1, the actual
data coordinate values of a user button press are ignored,
and the (x,y) values of the closest data point is used.
Otherwise, the status variables XFOCUS and YFOCUS are used
to mark the spot where the user pressed (and where the
focus point symbol is drawn).
The status variable ZOOM controls the zoom factor, and is
initialized to one. Zoom = 1 means all data is visible.
The status variables REPLOT and REPLOT_FOCUS are "write
sensitive":
REPLOT : Setting this to 1 causes the display to
be refreshed.
REPLOT_FOCUS : Setting this to 1 causes the focus point to
be redrawn, without redisplaying the image.
NO REFRESH IS PERFORMED by set_value when altering
attributes WITHOUT setting THE REPLOT ATTRIBUTE
EVENT HANDLING
CW_PLOTZ can be used in a "dumb" mode through the use of the
/AUTONOMOUS keyword when creating the widget. This causes the
widget to self-acknowledge all zooming/refocusing events,
refreshing the display without passing on events to the parent
base.
Unless the /AUTONOMOUS keyword is set, all WIDGET_DRAW event
are processed in the event handler into an "action string", by
default:
"ZOOM-" for ev.press eq 1 (left button)
"ZOOMP" for ev.press eq 2 (middle button)
"ZOOM+" for ev.press eq 4 (right button)
and
"IGNORE" for any other widget_draw event.
The status variable IGNORE_ACTION contains a string with
a list of action texts to ignore, in the format:
"(IGNORE)(MOTION)(RELEASE1)(RELEASE2)(RELEASE3)"
If an event is translated into an action string that appears
in the IGNORE_ACTION list, the event is gobbled up and
ignored.
If you'd like the user to be in control of (and to be able to
see) what buttons to use, you can use a CW_MOUSE widget (see
keyword CW_MOUSE, and the documentation of CW_MOUSE()). The
CW_MOUSE actions recognized by CW_PLOTZ are:
"ZOOM+" for zooming in (no repointing)
"ZOOM-" for zooming out (no repointing)
"ZOOMP" for repointing (or anything else not on the
IGNORE_ACTION list)
For ZOOM+/ZOOM- actions, the new ZOOM factor is calculated,
but the coordinates of the button press is ignored. For any
other action not to be ignored, the event coordinates are
converted into data coordinates (new XFOCUS/YFOCUS, values are
taken from the nearest datat point if CLING is set).
After this, a {CW_PLOTZ_EVENT} structure is created, and
passed on to the owner of the compound widget. Note that NO
SCREEN OR STATUS UPDATES have been done at this stage (see
"acknowledging events" below).
The event structure {CW_PLOTZ_EVENT} generated by CW_PZOOM
consists of the following tags:
ID : Widget ID of cw_plotz
TOP : Top widget ID.
HANDLER : Handler widget ID
SET : A structure with new information generated
by the user pressing a mouse button. The
tags of this structure {CW_PLOTZ_SET} are:
XFOCUS : X data coordinate of draw event
YFOCUS : Y data coordinate of draw event
FOCUSI : The index of the nearest plot point
ZOOM : The new/current zoom factor.
REPLOT : Always has a value of 1
OLD : Contains the same tags as SET, but with
the old (currently displayed) values.
PLOTREG : The Plot Region that has been used to
display the image. Useful for overplotting
after executing PRESTORE,EVENT.PLOTREG etc.
EVENT : The original WIDGET_DRAW event, or if you use an
XPLOTSCALE object to let the user control the plot
scaling, it could also be an XPLOTSCALE event.
ACKNOWLEDGING EVENTS
In order to acknowledge the event to make the user changes
effective, all that has to be done is to use:
WIDGET_CONTROL,EV.ID,SET_VALUE=EV.SET
this is in fact all that is done when the autonomous mode is
used.
OVERPLOTTING THE DISPLAY
Since the acknowledgement of a zoom/repointing event, or
changing the displayed data causes the display to be updated,
overplotting should be done AFTER setting the focus and/or
zoom values with replot set to 1. Replotting changes the
current data coordinate system, so overplotting may be done in
data coordinates.
Useful entities for overplotting can be retrieved through a
call to WIDGET_CONTROL,CW_ID,GET_VALUE=STATUS, where CW_ID is
the CW_PLOTZ widget ID, and STATUS will be returned as a
structure with the following tags {CW_PLOTZ_VALUE}:
VALUE : HANDLE that points to the data in the form of
an array with (N,2) elements.
Note that the data must not be removed or
altered directly!
XFOCUS : X data coordinate of focus point
YFOCUS : Y data coordinate of focus point
FOCUSI : Index of the current focus point
PLOTREG: The plot region used to display the image.
A note on XTICKS:
The use of XTICKS is somewhat tricky. The standard IDL way of
interpreting this keyword normally gives nonsensical results,
so CW_PZOOM tries to make the tickmarks fall on the center of
the pixels (which looks good for _some_ types of data). It is
also possible to use the function TICK_VEC by setting XTICKS
to a negative value. TICK_VEC tries to do a decent job of
placing UP TO the given number of tickmarks on the
display. Try it.
Use : PZOOM = CW_PLOTZ(BASE [,KEYWORDS])
Inputs : BASE : The base to put the draw window on.
Opt. Inputs : None.
Outputs : Returns the widget ID of the compound widget.
Opt. Outputs: None.
Keywords : Too many to justify updating a separate list here. See the
KEYWORD DEFAULTS section inside the routine.
Calls : ***
COPY_TAG_VALUES, CW_PLOTZ_CLEAN, CW_PLOTZ_EVENT, CW_PLOTZ_GETV, CW_PLOTZ_PLOT
CW_PLOTZ_REALIZE, CW_PLOTZ_SETV, CW_TMOUSE, DATATYPE [1], DATATYPE [2]
DATATYPE [3], DEFAULT, EXT_RANGE, PARCHECK, PCONVERT, PFIND, PRESTORE, PSTORE, TICK_VEC
TYP, XPLOTSCALE
CALLED BY:
CWQ_SPECTR [1], CW_CUBEVEIW, DSP_AUX, XCFIT, XCFIT_BLOCK, cwq_spectr [2]
Common : None.
Restrictions: Surely some.
Side effects: Updating the !P,!X,!Y system variables when refreshing the
display.
Category : Utility, Display
Prev. Hist. : Basically identical to CW_PZOOM.
Written : Stein Vidar Hagfors Haugan, UiO, 3 June 1996
Modified : Version 2, SVHH, 13 June 1996
Added X/YTYPE for logarithmic plots.
Version 3, SVHH, 28 June 1996
Added fix for yrange when all points are equal.
Version 4, SVHH, 1 July 1996
Added /CLEAN switch to PSTORE(), to delete any
previous use of the same window number.
Version 5, 19 August 1996
Modified handling of initial VALUE keyword.
Version 6, 21 January 1997
Added possibility of XPLOTSCALE handling of plotting
range.
Version : 6, 21 January 1997
[Previous]
[Next]
KEYWORD DEFAULTS/EXPLANATIONS
All keywords not marked with * may be altered after widget creation
through the
WIDGET_CONTROL,CW_ID,SET_VALUE={<KEYWORD_NAME>:<keyword_value>}
mechanism.
Widgety things
default,xwsize,200 ;* Widget_draw xsize
default,ywsize,200 ;* Widget_draw ysize
default,xdsize,xwsize-60 ;* Display area xsize
default,ydsize,ywsize-60 ;* Display area ysize
default,origo,[50,40] ; Origin of display area (pixels)
default,uvalue,'CW_PLOTZ'
default,no_copy,0 ;* For setting uvalue of this Compound widget
default,CW_MOUSE,-1L ;* Compound widget mouse control box.
default,motion_events,0 ;* Make the WIDGET_DRAW return motion events
Standard PLOT keywords
blank = STRING(255b)
default,background,-1L ; Use !P.background
default,charsize,-1.0 ; Use !P.charsize
default,xcharsize,-1.0 ; Use !X.charsize
default,ycharsize,-1.0 ; Use !Y.charsize
default,charthick,-1.0 ; Use !P.charthick
default,color,-1L ; Use !P.color
default,font,-2L ; Use !P.font
default,xgridstyle,-1L ; Use !X.gridstyle
default,ygridstyle,-1L ; Use !Y.gridstyle
default,linestyle,-1L ; Use !P.linestyle
default,psym,-10L ; Use !P.psym
default,xstyle,-1L ; Use !X.style
default,ystyle,-1L ; Use !Y.style
default,subtitle,blank ; Use !P.subtitle
default,symsize,-1.0 ; Use !P.symsize
default,thick,-1.0 ; Use !P.thick
default,xthick,-1.0 ; Use !X.thick
default,ythick,-1.0 ; Use !Y.thick
default,xtickformat,blank ; Use !X.tickformat
default,ytickformat,blank ; Use !Y.tickformat
default,xticks,0 ; Use !X.ticks
default,yticks,0 ; Use !Y.ticks
default,ticklen,0.0 ; Use !P.ticklen
default,xticklen,0.0 ; Use !X.ticklen
default,yticklen,0.0 ; Use !Y.ticklen
default,title,blank ; Use !P.title
default,xtitle,blank ; Use !X.title
default,ytitle,blank ; Use !Y.title
default,xtype,0 ; Linear (1 = logarithmic x axis)
default,ytype,0 ; Linear (1 = logarithmic y axis)
Missing value
default,missing,-1.0D ; Missing value, not plotted.
default,xplotscale,-1L ; Plot range scaler
Limitations
default,maxzoom,0 ; Max. zoom, 0 means the sensible limit.
default,minzoom,0.5 ; Min. zoom -how much overwiew could you want!
Focus Symbol
default,focus_type,2 ; Focus Symbol psym, 0 means crosshair
default,focus_size,1.0 ; Focus Symbol symsize/pixelsize of crosshair
default,focus_color,-1L ; Focus Symbol color
default,focus_graph,3 ; Focus Symbol graphics function
default,cling,1 ; Make focus symbol cling to the plot
Miscellaneous
default,autonomous,0 ;* Auto-redisplay.
default,focusi,-1 ; Replace with N_ELEMENTS(value(*,0))/2
; at first opportunity
default,zoom,1.0
Ignore these ACTIONs:
default,ignore_action,'()(MOTION)(RELEASE1)(RELEASE2)(RELEASE3)'
CALLS:
CALLED BY
CWQ_SPECTR [1], CW_CUBEVEIW, DSP_AUX, XCFIT, XCFIT_BLOCK, cwq_spectr [2]
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_PSELECT
Purpose : Simplified management of a pulldown selection menu
Explanation : Often an exclusive button menu takes too much space. This
widget makes it possible to use a pulldown menu for the
selection in stead, with automated altering of the top-level
button for status change.
This compound widget is in many respects very similar to the
standard IDL library routine CW_BSELECT, except that it is
possible to specify both a "menu text" (mtext) and a "button
text" (btext). This allows fairly long descriptions of the
menu choices, whilst keeping down the space required for the
label on the top level button.
EVENTS
Another difference from CW_BSELECT is that the returned events
are always of standard type {WIDGET_BUTTON}, whose ID refers
to the compound widget BASE (not the selected button). The
UVALUE of EVENT.ID is always set to the uvalue of the selected
button.
ALTERING THE CURRENT SELECTION
It is possible to manipulate the current selection from the
main program by setting the compund widget value to the uvalue
of the desired selection. The displayed value on the root
button will be changed accordingly. E.g.:
WIDGET_CONTROL,CW_PSEL_ID,SET_VALUE="AA"
where CW_PSEL_ID is the widget ID returned by CW_PSELECT.
This will find the menu entry with UVALUE "AA" and update the
display as if the user had selected this menu entry manually.
(DE)SENSITIZING BUTTONS
Is possible to turn on/off the sensitivity of specific menu
items by e.g.:
WIDGET_CONTROL,CW_PSEL_ID, $
SET_VALUE={INSENSITIVE:["AA","CC"],$
SENSITIVE:"BB"}
This will desensitize the menu items with uvalues "AA" and
"BB", and sensitize the menu item with uvalue "BB".
Use : id = cw_pselect(base,title,pdmenu)
Inputs : BASE: The base to put the widget on
TITLE: A title to be displayed on the "root" button, normally
indicating what type of data the widget is dealing
with, e.g., "Color chosen:"
PDMENU: An array of structures of the following type:
{PSELECT_S, btext:'', mtext:'', uvalue:'', flags:0}
BTEXT is the button text, MTEXT is the menu text (enables
longer explanations of the selections), UVALUE is the
associated uvalue of the button. Multi-level pulldown menus
are possible with the use of the FLAGS field -- see CW_PDMENU.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : INITIAL : The index of the initial selection to be
displayed.
IDS : A named variable into which the button IDs will
be stored as a longword vector.
Calls : ***
CW_PDMENU, CW_PSELECT_EVENT, CW_PSELECT_SETV, DATATYPE [1], DATATYPE [2]
DATATYPE [3], DEFAULT, PARCHECK, SINCE_VERSION [1], SINCE_VERSION [2]
TAG_EXIST [1], TAG_EXIST [2], TYP
CALLED BY:
CWQ_WINSEL [1], CW_MOUSE, DSPWAV, DSP_WAV, NDSPSPEC, PQLPROFILE, XCDS_COSMIC
XCFIT_BLOCK, XTVSCALE, ch_ss, cwq_winsel [2]
Common : None.
Restrictions: UVALUES must be strings.
Side effects: None...
Category : Compound widget.
Prev. Hist. : None.
Written : Stein Vidar Hagfors Haugan, 11-December 1994
Modified : Version 2, SVHH, 31 May 1996
Added SET_VALUE possibilities and IDS keyword
Version 3, SVHH, 16 October 1996
Minor space-saving change.
Version 4, SVHH, 23 October 1996
Added /DYNAMIC_RESIZE for IDL v 4.0.1 and later.
Version : 4, 23 October 1996
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_PZOOM()
Purpose : One-window compound widget image zoom.
Explanation : CW_PZOOM is a general purpose image display widget that lets
the user zoom in and out on an (alterable) image.
The widget is crated in much the same way as a standard
widget_draw window, although a number of extra keywords are
used in order to control the appearance of the display (draw
window size, display window size, title, subtitle, etc.).
SETTING THE IMAGE TO BE DISPLAYED
can be done through the VALUE keyword of CW_PZOOM or through
the WIDGET_CONTROL SET_VALUE mechanism. The latter should only
be done after the widget hierarchy has been /realized. Setting
the value is done by:
widget_control,CW_ID,set_value=image
where image is a two-dimensional array.
The display is automatically refreshed each time the image is
changed.
CONTROLLING THE COMPOUND WIDGET BEHAVIOUR
The appearance and behaviour of this compound widget is
controlled by numerous status variables. The status variables
can be set either through the use of keywords in the
CW_PZOOM() call, or by using e.g.:
WIDGET_CONTROL,CW_ID,SET_VALUE = STRUCT
where CW_ID is the compound widget ID and STRUCT is a
structure with one or more tags corresponding to display
attributes to be altered. To set e.g., the plot TITLE to be
used:
WIDGET_CONTROL,CW_ID,SET_VALUE = {TITLE:'Zoomable image'}
See the "KEYWORD DEFAULTS/EXPLANATIONS" section in the main
procedure for an updated list of all the status variables that
may be set through the use of keywords. If a keyword is not
marked with a "*" in the comment section, then it is also
possible to set this status variable through the SET_VALUE
mechanism.
In addition to the status variables which may be set through
keywords when creating the widget, there are a few special
status variables that can ONLY be specified through the
SET_VALUE mechanism:
XFOCUS : The X index of the focus pixel
YFOCUS : The Y index of the focus pixel
ZOOM : The zoom factor. Zoom=1 means all data visible.
REPLOT : Setting this to 1 causes the display to
be refreshed, after which it will be cleared.
RESCALE : Setting this to 1 causes the color scaling to be
performed and the display to be refreshed, after
which it will be cleared. Should be set when
acknowledging an XTVSCALE event.
REPLOT_CROSS : Setting this to 1 causes the crosshair to
be redrawn, without redisplaying the image.
NO REFRESH IS PERFORMED by set_value when altering
attributes WITHOUT setting THE REPLOT ATTRIBUTE
EVENT HANDLING
CW_PZOOM can be used in a "dumb" mode through the use of the
/AUTONOMOUS keyword when creating the widget. This causes the
widget to acknowledge and gobble up all zooming/refocusing
events, refreshing the display without passing on events to
the parent base.
Unless the /AUTONOMOUS keyword is set, all WIDGET_DRAW event
are processed in the event handler into an "action string", by
default:
"ZOOM-" for ev.press eq 1 (left button)
"ZOOMP" for ev.press eq 2 (middle button)
"ZOOM+" for ev.press eq 4 (right button)
and
"IGNORE" for any other widget_draw event.
The status variable IGNORE_ACTION contains a string with
a list of action texts to ignore, in the format:
"(IGNORE)(MOTION)(RELEASE1)(RELEASE2)(RELEASE3)"
If an event is translated into an action string that appears
in the IGNORE_ACTION list, the event is gobbled up and
ignored.
If you'd like the user to be in control of what buttons to
use, you can use a CW_MOUSE widget (see keyword CW_MOUSE, and
the documentation of CW_MOUSE()). The CW_MOUSE actions should
be:
"ZOOM+" for zooming in (no repointing)
"ZOOM-" for zooming out (no repointing)
"ZOOMP" for repointing (or anything else not on the
IGNORE_ACTION list)
For ZOOM+/ZOOM- actions, the new ZOOM factor is calculated,
but the pixel coordinates of the button press is ignored. For
any other action not to be ignored, the event coordinates are
converted into image pixel coordinates (new XFOCUS/ YFOCUS).
After this, a {CW_PZOOM_EVENT} or {CW_PZOOM_XTVSCALE_EVENT}
structure is created, and passed on to the owner of the
compound widget. Note that NO SCREEN OR STATUS UPDATES have
been done at this stage (see "acknowledging events" below).
The two possible event structures generated by CW_PZOOM
consist of the following tags:
ID : Widget ID of cw_pzoom
TOP : Top widget ID.
HANDLER : Handler widget ID
XTVSCALE : Signals an XTVSCALE event when nonzero (i.e.,
the event originates from XTVSCALE, not from the
widget_draw window).
SET : A structure with new information generated
by the user pressing a mouse button. The
tags of this structure {CW_PZOOM_SET} are:
XFOCUS : X index of new/current selected pixel.
YFOCUS : Y index of new/current selected pixel.
ZOOM : The new/current zoom factor.
RESCALE : Set to one when an XTVSCALE event occurred
REPLOT : Always has a value of 1
OLD : Contains the same tags as SET, but with
the old (currently displayed) values.
PLOTREG : The Plot Region that has been used to
display the image. Useful for overplotting
after executing PRESTORE,EVENT.PLOTREG
EVENT : The original WIDGET_DRAW event (for
{CW_PZOOM_EVENT}) or an XTVSCALE_EVENT (for
{CW_PZOOM_XTVSCALE_EVENT}.
ACKNOWLEDGING EVENTS
In order to acknowledge the event to make the user changes
effective, all that has to be done is to use:
WIDGET_CONTROL,EV.ID,SET_VALUE=EV.SET
this is in fact all that is done when the autonomous mode is
used.
OVERPLOTTING THE DISPLAY
Since the acknowledgement of a zoom/repointing event, or
changing the displayed data causes the display to be updated,
overplotting should be done AFTER setting the focus and/or
zoom values with REPLOT set to 1. Replotting changes the
current data coordinate system so overplotting may be done in
data coordinates.
Useful entities for overplotting can be retrieved through a
call to WIDGET_CONTROL,CW_ID,GET_VALUE=STATUS, where CW_ID is
the CW_PZOOM widget ID, and STATUS will be returned as a
structure with the following tags {CW_PZOOM_VALUE}:
VALUE : HANDLE that points to the data (image)
Note that the data must not be removed or
altered directly!
CLIP : 4-element array with the indices of the lower
left and upper right pixels that are
displayed. Note that the display may cover
pixels outside the actual data array.
XFOCUS : The X index of the focus pixel
YFOCUS : The Y index of the focus pixel
PLOTREG: The plot region used to display the image.
A note on XTICKS:
The use of XTICKS is somewhat tricky. The standard IDL way of
interpreting this keyword normally gives nonsensical results,
so CW_PZOOM tries to make the tickmarks fall on the center of
the pixels (which looks good for _some_ types of data). It is
also possible to use the function TICK_VEC by setting XTICKS
to a negative value. TICK_VEC tries to do a decent job of
placing UP TO the given number of tickmarks on the
display. Try it.
Use : PZOOM = CW_PZOOM(BASE [,KEYWORDS])
Inputs : BASE : The base to put the draw window on.
Opt. Inputs : None.
Outputs : Returns the widget ID of the compound widget.
Opt. Outputs: None.
Keywords : Too many to justify updating a separate list. See the KEYWORD
DEFAULTS section inside the routine.
Calls : ***
CDSCONGRID, CLIPBOX, COPY_TAG_VALUES, CW_PZOOM_EVENT, CW_PZOOM_GETV, CW_PZOOM_PLOT
CW_PZOOM_REALIZE, CW_PZOOM_SCALEVAL, CW_PZOOM_SETV, CW_TMOUSE, DATATYPE [1]
DATATYPE [2], DATATYPE [3], DEFAULT, HANDLE_KILLER_HOOKUP, PARCHECK, PCONVERT, PFIND
PRESTORE, PSTORE, TICK_VEC, TYP, XTVSCALE
CALLED BY:
CWQ_IMAGE [1], CW_CUBEVEIW, XCR_REMOVE, cwq_image [2]
Common : None.
Restrictions: Probably too many to specify.
Side effects: Updating the !P,!X,!Y system variables when refreshing the
display.
Category : Utility, Image.
Prev. Hist. : Long.
Written : Stein Vidar Hagfors Haugan, UiO, 13 June 1996
Modified : Version 2, 16 June 1996
Clarified the problem with having two different
event structures, and specified this explicitly
in the explanation section.
Version 3, SVHH, 1 July 1996
Added /CLEAN switch to PSTORE(), to delete any
previous use of the same window number.
Version 4, SVHH, 29 May 1997
Modified grabbing procedure to save time when zoom<1,
and removed common block as cache. Using
handle_killer_hookup instead of cleanup routine.
Version 5, SVHH, 15 September 1997
Modified automatic handling of max-zoom limit to make
more sense.
Version : 5, 15 September 1997
[Previous]
[Next]
KEYWORD DEFAULTS/EXPLANATIONS
All keywords not marked with * may be altered after widget creation
through the
WIDGET_CONTROL,CW_ID,SET_VALUE={<KEYWORD_NAME>:<keyword_value>}
mechanism.
Widgety things
default,xwsize,200 ;* Widget_draw xsize
default,ywsize,200 ;* Widget_draw ysize
default,xdsize,140 ;* Display area xsize
default,ydsize,140 ;* Display area ysize
default,origo,[50,40] ; Origin of display area (pixels)
default,uvalue,'CW_PZOOM' ;*
default,no_copy,0 ;* For setting uvalue of this Compound widget
default,CW_MOUSE,-1L ;* Compound widget mouse control box.
default,motion_events,0 ;* Make the WIDGET_DRAW return motion events
Standard PLOT keywords
blank = STRING(255b)
default,background,-1L ; Use !P.background
default,charsize,-1.0 ; Use !P.charsize
default,xcharsize,-1.0 ; Use !X.charsize
default,ycharsize,-1.0 ; Use !Y.charsize
default,charthick,-1.0 ; Use !P.charthick
default,color,-1L ; Use !P.color
default,font,-2L ; Use !P.font
default,xgridstyle,-1L ; Use !X.gridstyle
default,ygridstyle,-1L ; Use !Y.gridstyle
default,xstyle,-1L ; Use !X.style
default,ystyle,-1L ; Use !Y.style
default,subtitle,blank ; Use !P.subtitle
default,xthick,-1.0 ; Use !X.thick
default,ythick,-1.0 ; Use !Y.thick
default,xtickformat,blank ; Use !X.tickformat
default,ytickformat,blank ; Use !Y.tickformat
default,xticks,0 ; Use !X.ticks
default,yticks,0 ; Use !Y.ticks
default,ticklen,-0.05 ; 0.0 Means use !P.ticklen
default,xticklen,0.0 ; Use !X.ticklen
default,yticklen,0.0 ; Use !Y.ticklen
default,title,blank ; Use !P.title
default,xtitle,blank ; Use !X.title
default,ytitle,blank ; Use !Y.title
Data coordinate system
default,origin,[0.0,0.0] ; x,y coordinates of pixel [0,0]
default,scale,[1.0,1.0] ; x,y size of pixels, physical units
default,squarepix,0 ; Ignore phys. pixel size (treat them square)
default,stretch,0 ; Ign. phys. pix. size, stretch to fit display
Color scaling
default,xtvscale,-1L ; Color scaling.
default,missing,-1.0D ; Missing value.
default,color_missing,0B ; Color used for missing valued pixels
Limitations
default,maxzoom,0 ; Max. zoom, 0 means the sensible limit.
default,minzoom,0.5 ; Min. zoom -how much overwiew could you want!
Crosshair
default,cross,30 ; Crosshair size, pixels
default,cross_color,!P.color ; Crosshair color
default,cross_graph,3 ; Crosshair graphics function
Miscellaneous
default,autonomous,0 ;* Auto-redisplay.
Ignore these ACTIONs:
default,ignore_action,'(IGNORE)(MOTION)(RELEASE1)(RELEASE2)(RELEASE3)'
CALLS:
CALLED BY
CWQ_IMAGE [1], CW_CUBEVEIW, XCR_REMOVE, cwq_image [2]
[Previous]
[Next]
PROJECT: HESSI
NAME: cw_range
PURPOSE: Create a compound widget consisting of two editable droplist
widgets. Useful for inputting a range or x,y values or any pair of
values. The widgets are laid out in a row with a label followed by a
editable droplist widget followed by another label followed by another
editable droplist. For example:
Energy range Low: xxxxxx^ High: xxxxxx^
Widget_control can be called with set_value and get_value, just as with simple
widgets.
Generates an event (described below) that the calling program can respond to.
CATEGORY: WIDGETS
CALLING SEQUENCE:
widget_id = cw_range ( parent, $
uvalue=uvalue, $
label1=label1, $
label2=label2, $
value=value, $
dropvals1=dropvals1, $
dropvals2=dropvals2, $
xsize=xsize, $
frame=frame, $
_extra=_extra, $
help=help )
INPUTS:
parent - widget id of widget calling cw_range
OPTIONAL INPUTS (KEYWORDS):
uvalue - user value to assign to compound widget
label1 - Text that will be placed to left of first editable text field
label2 - Text that will be placed to left of second editable text field
value - 2-element array of initial values
dropvals1 - values to put in first droplist
dropvals2 - values to put in second droplist
CALLED BY:
cw_energy_range, hsi_corr_widget, hsi_cw_energy_range, hsi_imagesize_widget
hsi_range_widget, hsi_ui_mon, hsi_ui_obs, plotman_imageoptions
Note: if dropvals1 or dropvals2 is not present, then that widget won't have
a droplist, will be just a text widget.
xsize - xsize of editable text field
frame - if set, draw frame around compound widget
_extra - any other keywords - will get passed to widget_base of compound widget
and to cw_edroplist
help - if set, just lists this header documentation
OUTPUTS:
Function value returned is widget id of compound widget.
OPTIONAL OUTPUTS: None
Calls: ***
CHECKVAR [1], CW_RANGE_EVENT, CW_RANGE_GET_VALUE, CW_RANGE_SET_VALUE, DOC_MENU
checkvar [2], cw_edroplist
COMMON BLOCKS: None
PROCEDURE:
RESTRICTIONS: None
SIDE EFFECTS: Generates an event with the following structure:
{ id: 0L, top: 0L, handler: 0L, value:fltarr(2) or intarr(2) }
EXAMPLES:
HISTORY:
Kim Tolbert, Nov 1999
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_TEXT
Purpose : compound text widget that switches itself to a label when non-editable
Category : Widgets
Explanation : Used for making TEXT widgets appear as LABELS when
not editable.
Syntax : IDL> id=cw_text(parent,value=value)
CALLED BY:
MK_CDS_DBASE, MK_CDS_PLAN, MK_PLAN_SBASE, MK_STUDY
Examples : To initially create an editable text widget,
IDL> id=cw_text(parent,value='test message')
Then, to convert it to a label,
IDL> widget_control,id,set_value='noedit'
Then, to convert it back,
IDL> widget_control,id,set_value='edit'
Inputs : parent = parent widget id
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : All keywords inherited from WIDGET_TEXT. VALUE keyword is special.
To make TEXT widget editable, use value='EDIT'. This
is the default.
To make widget non-editable and appear as a LABEL,
use value='NOEDIT'.
CALLS: ***
CW_TEXT_EVENT, CW_TEXT_GET, CW_TEXT_SET
Common : None
Restrictions: Although this is a self-contained widget such as WIDGET_TEXT,
it still needs a parent base.
Side effects: None.
History : Version 1, 26-Jun-1995, D M Zarro. Written
Contact : DMZARRO
[Previous]
[Next]
Project : SOHO - CDS
Name : CW_TMOUSE()
Purpose : Convert a draw-event into an action string.
Explanation : See CW_MOUSE. This routine takes the ID of a CW_MOUSE
compound widget and translates the supplied widget-draw
event into an "action string" according to the current
status of the CW_MOUSE.
Use : action = CW_TMOUSE(CW_ID,EVENT)
Inputs : CW_ID : The compound widget id returned by CW_MOUSE.
EVENT : A widget_draw event.
Opt. Inputs : None.
Outputs : Returns an "action string".
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
CW_PLOTZ [1], CW_PZOOM [1], XCR_REMOVE, cw_plotz [2], cw_pzoom [2]
Common : None.
Restrictions: None.
Side effects: None.
Category : Utility, Display
Prev. Hist. : Based on cmouse_action
Written : Stein Vidar H. Haugan, UiO, 13 June 1996
Modified : Not yet.
Version : 1, 13 June 1996
[Previous]
[Next]
Project : SOHO - CDS
Name :
CW_TVZOOM
Purpose :
Compound widget for displaying zoomed images. (cf CW_ZOOM).
Explanation :
This compound widget displays an original image in one window
and another window in which a portion of the original window
is displayed. The user may select the center of the zoom
region, the zoom scale, the interpolation style, and the method
of indicating the zoom center.
Use :
widget = CW_TVZOOM(parent)
WIDGET_CONTROL, id, SET_VALUE=value can be used to change the
original, unzoomed image displayed by the widget.
The value may not be set until the widget has been
realized.
WIDGET_CONTROL, id, GET_VALUE=var can be used to obtain the current
zoomed image displayed by the widget.
Inputs :
PARENT - The ID of the parent widget.
Opt. Inputs :
Outputs :
The ID of the created widget is returned.
Opt. Outputs:
None.
Keywords :
FRAME - Nonzero to have a frame drawn around the widget. The
default is FRAME=0.
MAX - The maximum zoom scale. The default is 20. The scale
must be greater than or equal to 1.
MIN - The minimum zoom scale. The default is 1. The scale
must be greater than or equal to 1.
RETAIN - Controls the setting for backing store for the original
image window and zoom window. If backing store is provided,
a window which was obscured will be repaired when it becomes
exposed. Set RETAIN=0 for no backing store. Set RETAIN=1
for "request backing store from server". This is the default.
Set RETAIN=2 for IDL to provide backing store.
SAMPLE - Zero for bilinear interpolation, non-zero for nearest
neighber interpolation. Bilinear interpolation gives
higher quality results, but requires more time. The
default is SAMPLE=0.
SCALE - The initial integer scale factor to use for the zoomed image.
The default is SCALE=4. The scale must be greater than or
equal to 1.
TRACK - Zero if the zoom window should be updated only when the mouse
is pressed. Non-zero if the zoom window should be updated
continuously as the cursor is moved across the original
image. Note: On slow systems, /TRACK performance can be
inadequate. The default is TRACK=0.
UVALUE - Supplies the user value for the widget.
XSIZE - The width of the window for the original image.
The default is 500.
YSIZE - The height of the window for the original image.
The default is 500.
REDUCTION - An amount to reduce the resolution when displaying the
original image. The zoomed image is taken from the full
resolution original image. Must be greater than or equal to 1.
The default is 1.
X_SCROLL_SIZE - The width of the visible part of the original image.
This may be smaller than the actual width controlled by
the XSIZE keyword. The default is 0, for no scroll bar.
Y_SCROLL_SIZE - The height of the visible part of the original image.
This may be smaller than the actual height controlled by
the YSIZE keyword. The default is 0, for no scroll bar.
X_ZSIZE - The width of the window for the zoomed image.
The default is 250.
Y_ZSIZE - The height of the window for the zoomed image.
The default is 250.
Calls : ***
CONGRID [1], CONGRID [2], CONGRID [3], CW_BGROUP, CW_LOADSTATE, CW_SAVESTATE
DRAW_ZOOM, ZOOM_EVENT, ZOOM_GET_VALUE, ZOOM_SET_VALUE
CALLED BY:
TVZOOM, TVZOOM2
Common :
CW_TVZOOM_BLK: Private to this module.
Restrictions:
Must have widget capability.
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:
When the "Report Zoom to Parent" button is pressed, this widget
will generate an event structures containing several data fields.
x_zsize, y_zsize: size of the zoomed image
x0, y0: lower left corner in original image
x1, y1: upper right corner in original image
This event is a report to the parent that allows retrieval of the
zoomed image using WIDGET_CONTROL.
Category :
Utilities, Image_display.
Prev. Hist. :
June 30, 1992, ACY
May 18, 1993, William Thompson, GSFC, added keyword REDUCTION, changed
call to TVSCL to call TV instead. Renamed tto CW_TVZOOM.
Written :
ACY, RSI, 30 June 1993.
Modified :
Version 1, William Thompson, GSFC, 25 October 1993.
Incorporated into CDS library.
Version :
Version 1, 25 October 1993.
[Previous]
[Next]
PROJECT: HESSI
NAME: cw_ut_range
PURPOSE: Create a compound widget that allows users to set a start and end time.
Widget consists of buttons for entering a date/time selection widget, text fields
for entering start/end times directly, and a duration text field. Changing the
duration will change the end time
only.
Widget_control can be called with set_value and get_value, just as with simple
widgets.
Generates an event (described below) that the calling program can respond to.
CATEGORY: HESSI WIDGETS
CALLING SEQUENCE:
widget_id = cw_ut_range ( parent, $
value=time_range, $
uvalue='time_range', $
label='Time Range: ', $
_extra=_extra, $
help=help )
INPUTS:
parent - widget id of widget calling cw_ut_range
OPTIONAL INPUTS (KEYWORDS):
value - initial start/end times as 2-element array of r*8 seconds since 79/1/1
uvalue - user value to assign to compound widget
label - Label that is displayed to left of buttons and text widgets
oneline - if set, put start and end across in one line instead in a column
narrow - if set, make widget narrower (put duration under times instead of beside)
nodur - if set, don't show duration widget
noreset - if set, don't show reset buttons for start and end times
nomsec - if set, show times without the msec part
_extra - any other keywords - will get passed to widget_base of compound widget
help - if set, just lists this header documentation
OUTPUTS:
Function value returned is widget id of compound widget.
OPTIONAL OUTPUTS: None
Calls: ***
CHECKVAR [1], CW_UT_RANGE_EVENT, CW_UT_RANGE_GET_VALUE, CW_UT_RANGE_SET_VALUE
DOC_MENU, EXIST, TRIM, TWIDGET, XALIVE, XMESSAGE, anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5], checkvar [2]
CALLED BY:
hsi_ui_qlimage
COMMON BLOCKS: None
PROCEDURE:
RESTRICTIONS: None
SIDE EFFECTS: Generates an event with the following structure:
{ id: 0L, top: 0L, handler: 0L, value:dblarr(2) }
EXAMPLES:
HISTORY:
Kim Tolbert, 2-Mar-03 (extracted from hsi_cw_ut_range and made general
by removing the rotation stuff specific to hessi)
Kim, 28-May-2004. Protected against input value being -1 (no original
intervals). If so, or value not passed, set to [0.,1.]
Kim, 14-Apr-2005, Don't use format for dur string, just use trim.
Kim, 6-May-2005, In twidget (dial-a-date) allow years 1980-2020 instead of 1990-2020
Kim, 9-Jan-2006, Added nextprev keyword, and if set, then add Next and Previous
buttons to jump to next or previous duration period.
[Previous]
[Next]
Project : SOHO - CDS
Name : CWF_COMPONENT
Purpose : Compound widget showing one fit component
Explanation : Used by XCFIT (CWF_FIT) to display/edit a Component Fit
structure. This widget instantiates one Component.
Use : ID = CWF_COMPONENT(BASE,COMPONENT)
Inputs : BASE : Have a guess
COMPONENT : The component to be displayed.
Opt. Inputs : None.
Outputs : Returns ID of compound
Opt. Outputs: None.
Keywords : FRAME : set to the desired width (or zero) of the frame around
the component display. Default width is 5
UVALUE : The uvalue of the compound.
COLOR : The color that is used to represent this component.
Calls : ***
CWF_COMPONENT_EVENT, CWF_COMPONENT_GETV, CWF_COMPONENT_REALIZE_COLOR
CWF_COMPONENT_SETV, CW_ENTERB, CW_FLIPSWITCH, DATATYPE [1], DATATYPE [2]
DATATYPE [3], DEFAULT, SINCE_VERSION [1], SINCE_VERSION [2], STR_SEP, TRIM
WIDGET_CONTTROL, XACK, XINPUT, XUPDATE
CALLED BY:
CWF_FIT
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis/Compound widget
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO, 21 January 1997
Modified : Version 2, SVHH, 5 February 1997
Made values and trans_b DOUBLE before trim()'ing them,
to have more significant figures visible.
Version 3, SVHH, 10 February 1997
Added a print statement that seems to fix most of
the "Xlib: sequence lost.." errors. Don't ask why.
Version 4, SVHH, 2 April 1997
Added since_version test in last update=1 statement.
Version 5, SVHH, 25 June 1997
Tried to fix widget problems in IDL v 5.0
Version 6, SVHH, 15 September 1997
Tried (again!) to fix IDL v 5.0 widgets...
Version 7, SVHH, 1 April 2003
Fixed IDL 5.6 problems causing the notify-realize
routine cwf_component_realize_color to crash. Also
fixed a problem that became apparent in 5.3. More
stuff (related to modal bases) should be fixed, but
going with a modal base the way RSI thinks appropriate
is *not* necessarily a good solution!
Version : 7, 1 April 2003
[Previous]
[Next]
Project : SOHO - CDS
Name : CWF_FIT
Purpose : Comp. widget for showing/editing Component Fit structures
Explanation : Used by XCFIT to display/manipulate a component fit
structure.
Use : ID = CWF_FIT(BASE,CFIT)
Inputs : BASE : To put it on.
CFIT : Component Fit structure.
Opt. Inputs : None.
Outputs : Returns compound widget id
Opt. Outputs: None.
Keywords : UVALUE : of the compound
Calls : ***
CWF_COMPONENT, CWF_FIT_EVENT, CWF_FIT_GETV, CWF_FIT_SETV, DEFAULT
HANDLE_KILLER_HOOKUP, SINCE_VERSION [1], SINCE_VERSION [2], XUPDATE
CALLED BY:
XCFIT
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, 15 September 1997
Fixed most of the stupid IDL v 5.0 mess.
Version : 2, 15 September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : CWF_STATUS
Purpose : Comp. widget showing a CFIT structure's CONST/INCLUDE status.
Explanation : Creates a compound widget reflecting the CONST/INCLUDE status
of a component fitting system structure (as in XCFIT_BLOCK).
Each component's status is shown inside a base with a frame
around it, with one checkbox displaying the INCLUDE status,
and one checkbox (displaying a cross when CONST=1) for each
parameter.
To set the widget to reflect another status, use
WIDGET_CONTROL,STATUS_ID,SET_VALUE=FIT
where FIT is the compound fit structure. It is, however, also
possible to set the HILIT status (the number of the parameter
to be highlighted) the following way:
WIDGET_CONTROL,STATUS_ID,SET_VALUE={SET_HILIT,HILIT:HILIT}
To read the status, use:
WIDGET_CONTROL,STATUS_ID,GET_VALUE=FIT
Now FIT will contain a fit structure with the current status.
Events are generated when the user flicks the status of one of
the CONST/INCLUDE checkboxes, generating event structures
containing the following tags:
ID,TOP,HANDLER : As usual.
INCLUDE : A byte array reflecting the current INCLUDE status
CONST : A byte array reflecting the current CONST status of
Use : STATUS_ID = CWF_STATUS(BASE, VALUE=FIT), all components.
of all components.
Inputs : BASE : The base to put it on.
VALUE : The initial value FIT structure (mandatory).
Opt. Inputs : None.
Outputs : Returns the ID of the compound widget.
Opt. Outputs: None.
Keywords : COLUMN : Set to make it a column instead of a row.
UVALUE : Of the compound widget.
NO_COPY : Whether to set the UVALUE with NO_COPY or not.
FGCOLOR : The foreground color of the checkboxes
BGCOLOR : The background color of the checkboxes
HILIT : The number of a parameter to highlight.
Calls : ***
ADD_TAG [1], ADD_TAG [2], CWF_STATUS_EVENT, CWF_STATUS_GETV, CWF_STATUS_MAKESTAT
CWF_STATUS_REALIZE, CWF_STATUS_SETV, CWF_STATUS_SHOWSTAT, CW_CHECKBOX, DEFAULT
EXIST, HANDLE_KILLER_HOOKUP, SINCE_VERSION [1], SINCE_VERSION [2], STR_SEP, TRIM
CALLED BY:
XCFIT_BLOCK
Common : None
Restrictions: ...
Side effects: ...
Category : Line fitting.
Prev. Hist. : None
Written : SVH Haugan, UiO, 25 September 1997
Modified : Not yet.
Version : 1, 25 September 1997