[Previous]
[Next]
NAME:
VACTOAIR
PURPOSE:
Convert vacuum wavelengths to air wavelengths
EXPLANATION:
Corrects for the index of refraction of air under standard conditions.
Wavelength values below 2000 A will not be altered. Accurate to
about 0.005 A
CALLING SEQUENCE:
VACTOAIR, WAVE
INPUT/OUTPUT:
WAVE - Wavelength in Angstroms, scalar or vector
WAVE should be input as vacuum wavelength(s), it will be
returned as air wavelength(s). WAVE is always converted to
double precision
EXAMPLE:
If the vacuum wavelength is W = 2000, then
IDL> VACTOAIR, W
yields an air wavelength of W = 1999.353 Angstroms
METHOD:
An approximation to the 4th power of inverse wavenumber is used
See IUE Image Processing Manual Page 6-15.
REVISION HISTORY
Written, D. Lindler 1982
Documentation W. Landsman Feb. 1989
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
PROJECT:
HESSI
NAME:
VAL2STRING()
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
result = val2string(value)
INPUTS:
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORDS:
None.
CALLED BY:
FRAMEWORK_TAG2COMMAND, SPEX__DEFINE, hsi_params2script
COMMON BLOCKS:
None.
PROCEDURE:
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
EXAMPLES:
CALLS: ***
EXIST, REPCHAR
SEE ALSO:
HISTORY:
Version 1, October 30, 2002,
A Csillaghy, csillag@ssl.berkeley.edu
MODIFICATIONS:
1-Jan-2004, Kim Tolbert as follows:
1. Previously handled arrays wrong - e.g. for 9,3 array, it returned 3,9. Added
recurse arg. On first call, if value is an array, it will be transposed. On
recursive calls the recurse arg is passed, so it won't be transposed.
2. Changed name of first argument so if we transpose it, the changed value doesn't
get back to user.
3. For Double values, previously returned e.g. 1.e001D, so check for e and
substitute d instead of appending
4. Return 'BAD' as value (or array of 'BAD's) if couldn't convert to string
[Previous]
[Next]
Project : HESSI
Name : VALID_CLASS
Purpose : check if input name is a valid object class name
Category : utility objects
Explanation : checks for a valid class by trying to create an
object from it.
Syntax : IDL> valid=valid_class(class)
CALLED BY:
ADD_METHOD, GET_METHODS, OBJ_DISSECT
Examples : valid=valid_class('sxt')
Inputs : CLASS = class name
Outputs : 1/0 if valid or invalid
: INDEX = indicies of valid class names
History : Written 20 May 1999, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO/CDS
Name : VALID_FITS
Purpose : check if file is a valid FITS file
Category : FITS, utility
Syntax : IDL> valid=valid_fits(file)
Inputs : FILE = FITS file name
Opt. Inputs : None.
Outputs : VALID = 1/0 if valid or not
CALLS: ***
CLOSE_LUN, FXHREAD [1], FXHREAD [2], IS_BLANK, SINCE_VERSION [1]
SINCE_VERSION [2]
CALLED BY:
CH_READ_FITS, FITS CLASS DEFINITION, HXRS__DEFINE, ITOOL_RD_FITS
History : 28-Oct-98, Zarro (SMA/GSFC) - written
24-Feb-03, Zarro (EER/GSFC) - vectorized and added
support for compressed files
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
VALID_GIF()
PURPOSE:
To detect if the given file is in GIF format
CATEGORY:
Utility
EXPLANATION:
SYNTAX:
Result = valid_gif(filename)
INPUTS:
FILENAME - Name of the file to be detected
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - 1/0 indicating whether the given file is or is not
a GIF file
DIMENSIONS - image dimensions
;
OPTIONAL OUTPUTS:
None.
KEYWORDS:
ERROR - A named variable containing any error message. If no
error occurs, a null string is returned.
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], HAVE_PROC, LOC_FILE [1], LOC_FILE [2]
LOC_FILE [3], READ_GIF, data_chk [1], data_chk [2]
CALLED BY:
GET_NOAA, GIF2PICT, ITOOL_LOAD_IMAGE, ITOOL_RD_GIF, JSMOVIE, JSMOVIE2, REBIN_FID
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
HISTORY:
Version 1, November 1, 1995, Liyun Wang, GSFC/ARC. Written
Version 2, 30-Jan-1999, Zarro (SM&A) - introduced QUERY_GIF
CONTACT:
Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
VALID_JPEG()
PURPOSE:
To detect if the given file is in JEPG format
CATEGORY:
Utility
EXPLANATION:
SYNTAX:
Result = valid_jpeg(filename)
INPUTS:
FILENAME - Name of the file to be detected
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - 1/0 indicating whether the given file is or is not
a JPEG file
DIMENSIONS - image dimensions
;
OPTIONAL OUTPUTS:
None.
KEYWORDS:
ERROR - A named variable containing any error message. If no
error occurs, a null string is returned.
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], HAVE_PROC, LOC_FILE [1], LOC_FILE [2]
LOC_FILE [3], TRIM
CALLED BY:
ITOOL_LOAD_IMAGE, ITOOL_RD_GIF, JSMOVIE, JSMOVIE2
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
HISTORY:
Version 1, 30-Jan-1999, Zarro (SM&A)
CONTACT:
dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO-CDS
Name : VALID_MAP
Purpose : check if input image map is of valid type
Category : imaging
Syntax : valid=valid_map(map)
Inputs : MAP = image map structure
Outputs : VALID = 1/0 if valid/invalid
Keywords : OLD_FORMAT = 1/0 if using old .xp, .yp format or not
CALLS: ***
TAG_EXIST [1], TAG_EXIST [2]
CALLED BY:
ADD_PROP, BLINK_MAP, BREAK_MAP, COREG_MAP, DIFF_MAP, DROT_COORD, DROT_MAP
DROT_MAP_FAST, DROT_RASTER, FLIP_MAP, GET_DROT_DUR, GET_MAP_DRANGE, GET_MAP_FOV
GET_MAP_PROP, GET_MAP_SPACE [1], GET_MAP_SPACE [2], GET_MAP_SUB, GET_MAP_TIME
GET_MAP_XP, GET_MAP_XRANGE, GET_MAP_YP, GET_MAP_YRANGE, GRID_MAP, GT_VMAP, INTER_MAP
LATEST_IMAGE, LTC_MAP, MAP2FITS, MAP2GIF, MAP2JPEG, MAP2L1, MAP2MPEG, MAP2WCS
MAP__DEFINE, MDI__DEFINE, MEAN_MAP, MERGE_MAP, MK_CDS_MAP, MK_NEW_MAP, MK_OLD_MAP
MOVIE_MAP, PATCH_MAP, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], PLOT_MAP
PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support, REBIN_MAP
REDUCE_MAP, REM_MAP_LIMB, REPACK_MAP, REP_PROP, RESPACE_MAP, ROT_MAP, SHIFT_MAP
SUB_MAP, SXT__DEFINE, UNPACK_MAP, WHERE_MAP, map2index, ssw_track_fov
History : Written 22 October 1997, D. Zarro, SAC/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : VALID_NUM()
Purpose : Check if a string is a valid number representation.
Explanation : The input string is parsed for characters that may possibly
form a valid number. It is more robust than simply checking
for an IDL conversion error because that allows strings such
as '22.3qwert' to be returned as the valid number 22.3
See also the original NUM_CHK which returns the status in
the opposite sense.
Use : IDL> status = valid_num(string [,value] [,/integer])
Inputs : string - the string to be tested
Opt. Inputs : None
Outputs : The function returns 1 for valid, 0 for invalid number
Opt. Outputs: value - The value the string decodes to. This will be
returned as a double precision number unless /INTEGER
is present, in which case a long integer is returned.
Keywords : Integer - if present code checks specfically for an integer.
Calls : None
CALLED BY:
ANYNAME2STD, CDS_IMAGE, CH_SYNTHETIC, CONVERT_TERMS, CONVERT_TERMS_ALL
EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], FIND_CDS_STUDIES
FITSHEAD2WCS, FXPAR [1], FXPAR [2], HEX2DEC, IMAGE_TOOL_EVENT, ITOOL_RD_FITS
KAP_VERS, MAKE_CHIANTI_SPEC, MK_IMG, MK_RASTER, MK_SYNOPTIC, MK_WAVECAL, MRDFITS [1]
MRDFITS [2], QL_RD_LLIST, RATIO_PLOTTER [1], RD_IMAGE_FITS, STR2UTC [1]
STR2UTC [2], STR2UTC [3], TP_READ_TEXTW, WCS_FIND_PIXEL_LIST, WCS_HCLEAN
XSET_COLOR, XSET_VALUE, YYMMDD, ch_ss, fits2rm, ratio_plotter [2]
Restrictions: None
Side effects: None
Category : Utilities, Numerical
Prev. Hist. : Small changes from NUM_CHK by Andrew Bowen,
Tessella Support Services, 8/3/93
Written : CDS version by C D Pike, RAL, 24-May-93
Modified : Version 1, C D Pike, RAL, 24-May-93
Version 2, William Thompson, GSFC, 14 October 1994
Added optional output parameter VALUE to allow
VALID_NUM to replace STRNUMBER in FITS routines.
Version : Version 1 24-May-93
[Previous]
[Next]
NAME:
VALID_NUM
PURPOSE:
Check if a string is a valid number representation.
EXPLANATION:
The input string is parsed for characters that may possibly
form a valid number. It is more robust than simply checking
for an IDL conversion error because that allows strings such
as '22.3qwert' to be returned as the valid number 22.3
See also the original NUM_CHK which returns the status in
the opposite sense.
CALLING SEQUENCE:
IDL> status = valid_num(string [,value] [,/integer])
Inputs : string - the string to be tested
Opt. Inputs : None
Outputs : The function returns 1 for valid, 0 for invalid number
Opt. Outputs: value - The value the string decodes to. This will be
returned as a double precision number unless /INTEGER
is present, in which case a long integer is returned.
Keywords : Integer - if present code checks specifically for an integer.
Calls : None
CALLED BY:
ANYNAME2STD, CDS_IMAGE, CH_SYNTHETIC, CONVERT_TERMS, CONVERT_TERMS_ALL
EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], FIND_CDS_STUDIES
FITSHEAD2WCS, FXPAR [1], FXPAR [2], HEX2DEC, IMAGE_TOOL_EVENT, ITOOL_RD_FITS
KAP_VERS, MAKE_CHIANTI_SPEC, MK_IMG, MK_RASTER, MK_SYNOPTIC, MK_WAVECAL, MRDFITS [1]
MRDFITS [2], QL_RD_LLIST, RATIO_PLOTTER [1], RD_IMAGE_FITS, STR2UTC [1]
STR2UTC [2], STR2UTC [3], TP_READ_TEXTW, WCS_FIND_PIXEL_LIST, WCS_HCLEAN
XSET_COLOR, XSET_VALUE, YYMMDD, ch_ss, fits2rm, ratio_plotter [2]
Restrictions: None
Category : Utilities, Numerical
Prev. Hist. : Small changes from NUM_CHK by Andrew Bowen,
Tessella Support Services, 8/3/93
Written : CDS version by C D Pike, RAL, 24-May-93
Modified : Version 1, C D Pike, RAL, 24-May-93
Version 2, William Thompson, GSFC, 14 October 1994
Added optional output parameter VALUE to allow
VALID_NUM to replace STRNUMBER in FITS routines.
Version : Version 1 24-May-93
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : HESSI
Name : VALID_OMAP
Purpose : check if input objects is a valid object map
Category : utility objects
Syntax : IDL> valid=valid_omap(object)
Inputs : OBJECT = object variable
Outputs : 1/0 if valid or invalid
CALLS: ***
OBJ_PARENTS
CALLED BY:
INDEX2OMAP, MAP_LIST__DEFINE, MAP__DEFINE
History : Written 1 May 2000, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
PROJECT:
SOHO - LASCO
NAME:
VALID_PNG()
PURPOSE:
To detect if the given file is in PNG format
CATEGORY: Utility Image Display Graphics
EXPLANATION:
SYNTAX:
Result = valid_png(filename)
INPUTS:
FILENAME - Name of the file to be detected
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - 1/0 indicating whether the given file is or is not
a PNG file
DIMENSIONS - image dimensions
;
OPTIONAL OUTPUTS:
None.
KEYWORDS:
ERROR - A named variable containing any error message. If no
error occurs, a null string is returned.
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], HAVE_PROC, LOC_FILE [1], LOC_FILE [2]
LOC_FILE [3], TRIM
CALLED BY:
JSMOVIE
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
HISTORY:
Version 1, 15 Apr 2005 - create from valid_jpeg.pro by D.Zarro
CONTACT:
dzarro@solar.stanford.edu
nathan.rich@nrl.navy.mil
[Previous]
[Next]
Project : SOHO - CDS
Name : VALID_POINTER
Purpose : check if input pointer is a valid pointer
Category : Help
Explanation : Prior to version 3.6, unrealized widget IDs could be
used as pointer variables. From 3.6 to version 4, handles
could be used as pointers. Version 5 now supports true
pointers.
Syntax : IDL> valid=valid_pointer(pointer,type)
Inputs : POINTER = pointer variable
Opt. Inputs : None
Outputs : VALID = 1/0 if valid/invalid pointer
Opt. Outputs: TYPE = 0 if unrealized widget
= 1 if handle
= 2 if true pointer
Keywords : None
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, XALIVE
CALLED BY:
CDS_STACK, CHILD_POINTER, EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2]
FREE_POINTER, GET_POINTER, HSI_LIVET_LATCH, HSI_PTR_LISTCONCAT, HSI_PTR_LISTSORT
IMAGE_TOOL_EVENT, ITOOL_DRAW_ICON, MAKE_POINTER, SET_POINTER, VALID_QL, XMATRIX
Common : None
Restrictions: None
Side effects: None
History : Version 1, 17-Jul-1997, D.M. Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : VALID_RANGE
Purpose : determine if input range is non-zero 2-element vector
Category : utility
Syntax : IDL> valid=valid_range(range)
Inputs : RANGE: 2-element vector (e.g. [10,20]
Input Keywords: /ALLOW_ZEROS - if set, [0.,0.] or ['',''] is a valid range
/TIME - if set, check that both inputs are valid times
Output Keyword: ZEROS - 1 if range is [0.,0] or ['','']
Outputs : VALID = 1/0 if valid/invalid
CALLS: ***
VALID_TIME
CALLED BY:
DROT_MAP, DSCALE, GOES__DEFINE, HESSI EVENTLIST SIMULATION CLASS DEFINITION
HESSI FASTRATE CLASS DEFINITION, HESSI IMAGE STRATEGY CLASS DEFINITION
HESSI PACKET CLASS DEFINITION, HESSI PACKET FILE ABSTRACT CLASS
HESSI ROLL_DB CLASS DEFINITION, HESSI SOHDATA CLASS DEFINITION, PLOT_MAP
READCOL [3], SPECPLOT__DEFINE, SUB_MAP, UTPLOT__DEFINE, XYPLOT__DEFINE
axis_get_expanded_range, axis_get_limits, binning__define
hsi_image__getaxis [2], hsi_image_raw__define, plotman, spectro_plot
spectro_plot2, spectrogram__define, valid_time_range
History : 12-July-2000, D M Zarro (EIT/GSFC) Written
13-Nov-2000 Kim Tolbert - added all_zeros keyword
6-Sept-2001, Zarro (EITI/GSFC) - allow string input
14-Jan-2004, Zarro (L-3Com/GSFC) - allow range input
with equal min/max
29-Jan-2004, Zarro (L-3Com/GSFC) - added /TIME
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
VALID_TIME()
PURPOSE:
To test if the given time has the valid format
EXPLANATION:
CALLING SEQUENCE:
Result = valid_time(time [, err, /zero])
INPUTS:
time - Any date/time format
INPUT KEYWORDS:
zero - if set, 0 is a valid time.
OUTPUTS:
Result - 1 if the time format is valid, 0 otherwise
OPTIONAL OUTPUTS:
ERR - A string scalar containing err message. If the time format
is correct, ERR will be a null string
CATEGORY: time
PREVIOUS HISTORY:
Written May 5, 1995, Liyun Wang, GSFC/ARC
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], ARR2STR [1], Arr2Str [2], IS_STRING, TRIM, TRIM2
is_number [1], is_number [2]
CALLED BY:
BBSO__DEFINE, CACHE_LIST, CAT_DIRECTORY, CRONTAB, EIS_DROT_FOV [1]
EIS_DROT_FOV [2], EIS_FITS_URL [1], EIS_FITS_URL [2], EIS_FOV [1], EIS_FOV [2]
EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], EIS_LIST_EXPER [1], EIS_LIST_EXPER [2]
EIS_LIST_MAIN [1], EIS_LIST_MAIN [2], EIT__DEFINE, FILE_SINCE, GET_FID
GET_SOHO_ROLL, GOES__DEFINE, HFITS__DEFINE, ITOOL_PICKFILE, ITOOL_RD_GIF
LATEST_IMAGE, LIST_GEV, LIST_NAR, MDI_GBO, MK_SOHO, NEAREST_GEV, NEAR_TIME, PLOT_MAP
RD_GOES_SDAC, RD_IMAGE_GIF, SHOW_SYNOP__DEFINE, SOCK_MAP, TIME_CHECK, UPDATE_MM
UTPLOT__DEFINE, VALID_RANGE, WHERE_TIMES, XCRON, XGET_SYNOPTIC, db_gbo
eis_datetime_gui [1], eis_datetime_gui [2], hsi_gbo, ihy_db
MODIFICATION HISTORY:
Version 1, created, Liyun Wang, GSFC/ARC, May 5, 1995
Version 2, vectorized, Zarro (SM&A/GSFC), April 9, 2000
Version 3, added check for non-string input, Zarro (LAC/GSFC), August 1, 2002
Version 4, added zero keyword, Kim, June 15, 2005
Modified, 28-Dec-2005, Zarro (L-3Com/GSFC) - improved
[Previous]
[Next]
Name: valid_time_range
Purpose: Function to determine if time range is a valid absolute time range
Calling sequence:
valid = valid_time_range(timerange)
Inputs:
timerange - 2 element vector of times
Outputs :
valid = 1/0 if valid/invalid
Keywords:
None
CALLS: ***
VALID_RANGE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
CALLED BY:
HESSI, hsi_chk_obj, hsi_show_flare_on_image, hsi_ui_mon, hsi_ui_obs
hsi_ui_qlimage
Restrictions: Only usable for times after 12 Jan 1979 (checks if time is greater than
1.e6 to make sure it's an absolute time)
Written: 2-Nov-2000, Kim Tolbert
[Previous]
[Next]
Project : STEREO
Name : VALID_WCS()
Purpose : Tests validity of WCS structure.
Category : FITS, Coordinates, WCS
Explanation : This procedure examines an input structure to determine whether
or not it's a valid FITS World Coordinate System structure,
e.g. from the routine FITSHEAD2WCS.
Syntax : Result = VALID_WCS( WCS )
CALLED BY:
WCS2FITSHEAD, WCS2MAP, WCS_DECOMP_ANGLE, WCS_GET_COORD, WCS_GET_PIXEL
WCS_GET_TIME, WCS_RECTIFY, WCS_SIMPLE, WCS_SIMPLIFY
Examples : IF NOT VALID_WCS( WCS ) THEN MESSAGE, 'Not a valid WCS'
Inputs : WCS = The variable to be examined.
Opt. Inputs : None.
Outputs : The result of the function is 1 if the input is recognized as a
WCS structure, 0 otherwise.
Opt. Outputs: None.
Keywords : None.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2], is_struct
Common : None.
Restrictions: Currently, only one WCS can be examined at a time.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 15-Apr-2005, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
NAME:
vax2ieee
PURPOSE:
To convert VAX floating point to Sun IEEE floating point
CALLING SEQUENCE:
vax2ieee, variable
INPUTS:
variable - The data variable to be converted. This may be a scalar
or an array. Valid datatypes are floating point, and
double precision.
OUTPUTS:
variable - The result of the conversion is passed back in the
original variable.
CALLED BY:
vax2sun [1], vax2sun [2], word_conv [1], word_conv [2], yoh_vax2ieee [1]
yoh_vax2ieee [2]
COMMON BLOCKS:
none
SIDE EFFECTS:
none
RESTRICTIONS:
Only floating point arrays or scalars are converted, others are
unchanged.
MODIFICATION HISTORY:
Version 1 By John Hoegy 13-Jun-88
21-Oct-88 - JAH: Fixed problem where it wouldn't convert float
and double scalars.
24-Oct-88 - JAH: Fixed problem with converting integer arrays.
21-May-91 - T. Metcalf: Cannibalized vax_to_sun to get IEEE conversions
See also vax2sun.pro
[Previous]
[Next]
NAME:
vax2sun
PURPOSE:
Converts data written on a DEC machine to SUN format by swapping
bytes appropriately for the type of the input data.
CATEGORY:
Byte-swapping
CALLING SEQUENCE:
vax2sun,a
INPUTS:
a = input variable which is to have its bytes swapped
OPTIONAL INPUT PARAMETERS:
none
KEYWORD PARAMETERS
none
OUTPUTS:
a = reformatted variable is passed back in the original variable
CALLS: ***
vax2ieee [1], vax2ieee [2]
CALLED BY:
BFITS, MLSO_SYN_READER
COMMON BLOCKS:
None
SIDE EFFECTS:
None
RESTRICTIONS:
None.
PROCEDURE:
Determines the type of the variable and swaps the bytes depending
on the type. If the variable is a structure, the tags are
recursively searched so that the bytes are swapped throughout
the structure.
MODIFICATION HISTORY:
T. Metcalf 5/20/91 Version 1.0
T. Metcalf Aug 1991: Added complex floating point Version 1.1
[Previous]
[Next]
Project : SOHO - CDS
Name : VCHECK()
Purpose : Check if variable exists and return optional default if not.
Explanation : Two parameters can be supplied. If the first is defined, its
value is returned. If the first is not defined the function
returns the value of the second (if it is defined) or zero if
it is not. If the first parameter is not defined and the
second is not supplied, a zero value is returned.
Use : IDL> a = vcheck(x,x_default)
Inputs : x - variable to be checked
Opt. Inputs : x_default - the value to assign to function value if first
parameter does not exist.
Outputs : Function returns value as explained above.
Opt. Outputs: None
Keywords : None
Calls : None
CALLED BY:
CDS_OUTPLOT, CDS_UTPLOT, CDS_UTSTRING, DEF_CDS_UTPLOT
Common : None
Restrictions: None
Side effects: None
Category : Utilities
Prev. Hist. : From anonymous Yohkoh idea.
Written : C D Pike, RAL, 20-Apr-94
Modified :
Version : Version 1, 20-Apr-94
[Previous]
[Next]
NAME:
VECT
PURPOSE:
Print a set of numbers as a string with delimiters included
EXPLANATION:
This function returns the given vector in parenthesized coordinates
as in the form (X,Y). No limit on the number of dimensions. Also
note that the vector does not need to be numbers. It may also be a
string vector. e.g. ['X','Y']
CALLING SEQEUNCE:
tmp = VECT( vctr, [ form, FORMAT = , DELIM = ] )
INPUT:
VCTR The vector to be displayed e.g. [56,44]
CALLS: ***
STRN [1], STRN [2], STRN [3]
OPTIONAL KEYWORD INPUT:
FORMAT This KEYWORD allows the specification of a format for the
elements. e.g.: VECT([2,3],format='(f7.1)') gives '(2.0,3.0)'
DELIM This KEYWORD specifies the delimeter. The default is ',' but
other useful examples might be ', ' or ':'
OPTIONAL INPUT
FORM This parameter may be used instead of the keyword FORMAT
OUTPUT:
tmp A returned string of the parenthesized vector
Other Procedures/Functions Called:
STRN
HISTORY:
03-JUL-90 Version 1 written by Eric W. Deutsch
24-AUG-91 Format='' keyword added (E. Deutsch)
29-AUG-91 FORM parameter added (E. Deutsch)
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
VEL_STRETCH
Purpose :
Stretch velocity color tables, either alone or combined.
Explanation :
Stretches velocity color tables so that zero velocities stay grey, and
positive and negative velocities scale together.
New red, green, and blue vectors are created by linearly interpolating
the vectors in the COLORS or COMBINE_COLORS common block from -HIGH to
HIGH. The original vectors in the COMBINE_COLORS common block are not
changed.
If NO parameters are supplied, the original color tables are restored.
Use :
VEL_STRETCH, HIGH [, GAMMA ]
The following example shows how to put an intensity image I using color
table #3 next to a velocity image V using the velocity color table, and
then stretch the two color tables independently.
LOADCT,3 ;Select intensity color table
COMBINE_VEL ;Combine with velocity table
PUT,I,1,2,/COMBINED ;Display intensity image on left
PUT,V,2,2,/VELOCITY,/COMBINED ;And velocity image on right
INT_STRETCH,10,150 ;Stretch intensity table
VEL_STRETCH,0.8,/COMBINED ;Stretch velocity table
Inputs :
HIGH = The highest scaled velocity value to use. Can be a number
between 0 and 1. If omitted, then 1 is assumed.
Opt. Inputs :
GAMMA = Gamma correction factor. If this value is omitted, 1.0 is
assumed. Gamma correction works by raising the color indices
to the GAMMA power, assuming they are scaled into the range 0
to 1.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
COMBINED= If set, then the lower part of a combined color table is
stretched, rather than the entire color table.
DISABLE = If set, then TVSELECT is not called.
Calls : ***
IM_KEYWORD_SET, TVSELECT, TVUNSELECT
CALLED BY:
XLOAD
Common :
COLORS = The common block that contains R, G, and B color tables
loaded by LOADCT, HSV, HLS and others.
COMBINE_COL = The common block containing the upper and lower color
tables, as loaded by COMBINE_COLORS.
Restrictions:
The velocity color tables must be loaded by LOAD_VEL or COMBINE_VEL
before calling VEL_STRETCH.
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 values of the current color tables in common block COLORS is
changed.
Category :
Utilities, Image_display.
Prev. Hist. :
William Thompson, Oct. 1992, from STRETCH by David M. Stern.
Written :
William Thompson, GSFC, October 1992.
Modified :
Version 1, William Thompson, GSFC, 4 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]
NAME:
VERT_LINE
PURPOSE:
Plot a vertical line at the position in the x argument.
CATEGORY:
HXRBS
CALLING SEQUENCE:
VERT_LINE,X,Linestyle[,COLOR=COLOR]
INPUTS:
X: x argument where the vertical line is to be plotted.
Linestyle: line style of vertical line (see 2-5R for table of
linestyles).
KEYWORDS:
COLOR: Color assigned to the vertical line
CALLS: ***
FCOLOR [1], fcolor [2]
CALLED BY:
BACKG_MARK, FLARE_MARK, FS_ARCHIVE_DRAW, FS_GRAPH, HXARCHIVE, HXFITS, QL_DAY_PLOT
QL_ORBIT_PLOT
MODIFICATION HISTORY:
Written by Shelby Kennard, February 1991.
Mod. 05/04/94 by AKT. Added color keyword
Mod. 05/06/96 by RCJ. Added documentation.
[Previous]
[Next]
Project: YOHKOH-BCS
Name: VOIGT_FIT
Purpose: Single voigt function fit to line profile
Syntax: v=voigt_fit(x,y,a,sigmaa,damp=damp)
Category: Fitting
Inputs:
y = data to fit
x = bin or wavelength
Outputs:
background=a(0)+a(1)*x+a(2)*x^2
a(3) = total intensity (1)
a(4) = center (1)
a(5) = doppler width (1)
a(6) = damping width (1)
Opt. Outputs:
sigmaa = sigma errors
Keywords:
damp = damping width
fixp = vector of parameters to keep fixed
(e.g. fixp=[0,1,3] to fix parameters 1,2 and 4)
last = use latest parameter values as new first guesses.
weights = data weights
nfree = number of free parameters
chi2 = chi^2
corr = link matrix
CALLS: ***
FUNCT_FIT, GAUSS_FIT
CALLED BY:
FIT_SPEC
Common: None.
Restrictions: None.
Side effects: None.
History: Version 1, 17-July-1993, D M Zarro. Written
Contact: DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
NAME:
VOIGTFIT
PURPOSE:
Fits a 5 parameter Voigt function to a vector, presumably representing
a spectral line):
y(x) = C - B * H(a,(x-x0)/x_D)
CATEGORY:
CALLING SEQUENCE:
fit = voigtfit(x,y,a,guess=guess)
INPUTS:
x = vector of x values
y = vector of y values
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
guess = vector of initial guesses (same format as a ... see output).
Computed and returned in guess if not specified (see
restrictions).
/plot = plot the fit over the data in the current window
/verbose = print diagnostics
/quiet = do print anything
sigma = returns with the standard deviations for each parameter
weight = vector with same dimension as x,y. Gives the weights for
each point in the fit. Default = uniform weighting.
/derivative = return the derivative, dI(x)/dx, in the vector "fit" rather
than the fit to Voigt function
/emission = Assume and emission line when computing initial guess. The
default is to assume an absorption line. This does not
affect the fit, only the initial guess when one is not
supplied.
vpguess = initial guess for the damping paramter. Only used if
voigtfit computes the initial guess. Default=0.1
/nofitvp = do not fit to the voigt parameter ... use initial guess
doppguess = initial guess for the doppler width (x units). Only used if
voigtfit computes the initial guess. Default=computed value.
/nofitdopp = do not fit to the doppler width ... use initial guess
goodfit = returns with a flag: true = the fit was good, false = the
fit was bad.
chi2 = the chi**2 for the fit. Assumes that the errors on y are sqrt(y)
OUTPUTS:
a = vector of fit values:
a(0) = C (continuum in y units)
a(1) = B (line strength in y units)
a(2) = a (damping parameter)
a(3) = x_D (doppler width in x units)
a(4) = x0 (x-value of line center)
fit = vector of computed values (same dimension as x and y)
CALLS: ***
CHI_SQR, CURVEFIT, VOIGT_FUNCT, voigt
CALLED BY:
STOKESFIT
COMMON BLOCKS:
voigt_fit_private for internal use only
SIDE EFFECTS:
o If /verbose is set, plots in the current window.
RESTRICTIONS:
o If the initial guess is not supplied, it is computed under the
assumption that the line is an absorption line, not an emission line,
unless /emission is set.
o If you call voigtfit repeatedly and both want voigtfit to compute a new
initial guess each time and return the guess in guess, you must reset
guess to 0 before each call. If you don't, the guess for the first
dataset will be used repeatedly.
EXAMPLES:
deriv1 = voigtfit(x,data1,guess=guess) ; guess returns with initial guess
deriv2 = voigtfit(x,data2,guess=guess) ; uses guess for data1
guess=0
deriv3 = voigtfit(x,data3,guess=guess) ; computes a new guess for data3
PROCEDURE:
Calls voigt.pro to compute the Voigt function and derivatives.
Calls curvefit.pro to compute the fit.
MODIFICATION HISTORY:
T. Metcalf January, 1994
[Previous]
[Next]
Project : VSO
Name : VSO__DEFINE
Purpose : Define a VSO class
Explanation : Defines a VSO class to provide a client to connect to the
Virtual Solar Observatory <http://virtualsolar.org>
Category : Utility, Class4, VSO
Syntax : IDL> a=obj_new('vso')
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], IS_BLANK, IS_STRING, UNIQ [1], UNIQ [2], UNIQ [3]
VSO::BUILDQUERY, VSO::CLEANUP, VSO::ELEMENT_NAME, VSO::FORMATTIME
VSO::GENERATEGETDATA, VSO::GETDATA, VSO::INIT, VSO::IS_ARRAY_NAME
VSO::MERGE_GETDATA, VSO::PARSEFLATRECORD, VSO::PARSEGETDATARECORD
VSO::PARSERECORD, VSO::PARSE_DATE, VSO::PARSE_DATERANGE, VSO::PARSE_WAVE
VSO::QUERY, VSO_SERVER, strsplit, vso_format
Examples :
IDL> a = obj_new('vso') ; create a VSO object
IDL> q = a->buildQuery( date='2005-JAN-1 - 2005-JAN-1 01:00', $
IDL> instrument='eit' ) ; build a VSO query
IDL> stack = a->query(q) ; send a VSO query
IDL> meta = stack->contents() ; extract the metadata
IDL> records = a->getdata(meta) ; order the products
IDL> urls = records.url ; extract the product URLs
See also vso_search() and vso_get()
History : Ver 0.1, 07-Oct-2005, J A Hourcle. written
Ver 0.2, 14-Oct-2005, J A Hourcle. changed how 'nulls' get passed
Ver 0.3, 21-Oct-2005, J A Hourcle. return metadata as array of struct
Ver 0.4, 24-Oct-2005, J A Hourcle. more liberal 'getdata' input
Ver 1, 08-Nov-2005, J A Hourcle. documentation; released
12-Nov-2005, Zarro (L-3Com/GSFC)
-added TSTART/TEND for compatability with SSW usage
-added CLEANUP and call to VSO_FORMAT
Ver 1.2, 18-Nov-2005, Hourcle. fixed memory leaks
Ver 1.3, 1-Dec-2005, Zarro (L-3Com/GSFC) - added VSO_SERVER call;
Ver 1.4, 1-Dec-2005, Hourcle. more consistent date handling
Modified 1-Jan-2006, Zarro - removed add_method,'gen' since
already inherited from SOAP class
Contact : oneiros@grace.nascom.nasa.gov
Limitations : Not fully tested against problem providers (ie, errors thrown)
[Previous]
[Next]
Project : VSO
Name : vso_format
Purpose : return time in VSO format [yyyymmddhhmmss]
Category : VSO, utility, time
Syntax : IDL> vso_time=vso_format(time,err=err)
Inputs : TIME = any time
Outputs : VSO_TIME = VSO time
Keywords : ERR = error string
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], ARR2STR [1], Arr2Str [2], IS_STRING, STR_FORMAT
CALLED BY:
VSO__DEFINE, get_def_times
History : 12-Nov-2005, Zarro (L-3Com/GSFC) - written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : VSO
Name : VSO_GET()
Purpose : Send a GetData request to VSO
Explanation : Attempts to download data products corresponding to the
metadata from a previous VSO search. Also returns
metadata about the files to be downloaded
Category : Utility, Class2, VSO
Syntax : IDL> a = vso_get( vso_search( date='2004.1.1', inst='eit' ) )
Examples : IDL> meta = vso_search( date='2004.6.5', inst='eit', /FLAT )
IDL> wanted = where( meta.wave_min eq 171.0 )
IDL> results = vso_get( meta[wanted] )
IDL> print_struct, results
History : Ver 0.1, 27-Oct-2005, J A Hourcle. split this out from vso__define
Ver 1, 08-Nov-2005, J A Hourcle. Released
Ver 1.1, 21-Nov-2005, Hourcle. Added /DOWNLOAD flag
Ver 1.2, 22-Nov-2005, Hourcle. Replaced /DOWNLOAD flag w/ /NODOWNLOAD
Ver 1.3 18-May-2006, Zarro. Added /NOWAIT and removed VSO_GET
procedure because it confused the compiler.
Contact : oneiros@grace.nascom.nasa.gov
http://virtualsolar.org/
Inputs:
ARGS : Can be one of:
struct[n] : vsoRecord (returned from vso::query())
struct[n] : vsoFlatRecord (returned from vso::query(/FLAT))
struct[n] : datarequest (you probably don't want this)
Opt. Input:
METHODS : string[n] : acceptable transfer methods
MERGE : flag : if input is vsoRecord or vsoFlatRecord,
will insert URLs into the input structures
OUT_DIR : string : directory to download files to
FORCE : flag : don't prompt for seemingly excessive requests
QUIET : flag : work silently (implies /FORCE, as well)
?? : : any other input allowed by sock_copy
NODOWNLOAD : flag : don't attempt to download files
URLS : flag : override METHODS to only use URL-type transfer methods.
NOWAIT : flag : download in background without waiting
Output:
struct[n] : getDataRecord
CALLS: ***
IS_BLANK, PRINT_STRUCT, SOCK_COPY, UNIQ [1], UNIQ [2], UNIQ [3]
See Also:
and sock_copy.pro, for more documentation
see also vso_search.pro (w. /URLS flag), see vso__define.pro
[Previous]
[Next]
Project : VSO
Name : VSO_SEARCH()
Purpose : Send a search request to VSO
Explanation : Sends a query to VSO, to obtain metadata records corresponding
to the records that match the query parameters.
Category : Utility, Class2, VSO
Syntax : IDL> a = vso_search('2005-JAN-01', instrument='eit')
CALLS: ***
EXIST
CALLED BY:
BBSO__DEFINE, EIT__DEFINE
Examples : IDL> a = vso_search(date='2004-01-01', provider='sdac')
IDL> a = vso_search(date='2002-1-4 - 2002-1-4T07:05', inst='mdi')
IDL> a = vso_search(date='2004/1/4T07:40-2004/1/4T07:45', inst='trace')
IDL> a = vso_search(date='2004-1-1', extent='CORONA', /FLAT)
IDL> a = vso_search(date='2001-1-1', physobs='los_magnetic_field')
IDL> a = vso_search(date='2004/1/1', inst='eit', /DEBUG)
IDL> a = vso_search('2004/1/1','2004/12/31', wave='171 Angstrom', inst='eit')
IDL> a = vso_search('2004/6/1','2004/6/15', wave='284-305 Angstrom', inst='eit')
IDL> a = vso_search('2005-JAN-1', inst='eit', /FLAT, /URL)
IDL> print_struct, a
IDL> print_struct, a.time ; if not called w/ /FLATTEN
IDL> sock_copy, a.url ; if called w/ /URLS
IDL> vso_get, a ; attempt to download products
History : Ver 0.1, 27-Oct-2005, J A Hourcle. split this out from vso__define
Ver 1, 08-Nov-2005, J A Hourcle. Released
12-Nov-2005, Zarro (L-3Com/GSFC)
- added TSTART/TEND for compatability with SSW usage.
- added _REF_EXTRA to communicate useful keywords
such as error messages.
Ver 1.1, 01-Dec-2005, Hourcle. Updated documentation
Ver 1.2, 02-Dec-2005, Zarro. Added call to VSO_GET_C
Ver 1.3, 18-May-2006, Zarro. Removed call to VSO_GET_C
because it confused the compiler
Contact : oneiros@grace.nascom.nasa.gov
http://virtualsolar.org/
Input:
(note -- you must either specify DATE, START_DATE or TSTART)
Optional Input:
(positional query parameters))
TSTART : string ; the start date
TEND : string ; the end date
(named query parameters)
DATE : string ; (start date) - (end date)
START_DATE : string ; the start date
END_DATE : string ; the end date
WAVE : string ; (min) - (max) (unit)
MIN_WAVE : string ; minimum spectral range
MAX_WAVE ; string ; maximum spectral range
UNIT_WAVE ; string ; spectral range units (Angstrom, GHz, keV)
EXTENT ; string ; VSO 'extent type' ... (FULLDISK, CORONA, LIMB, etc)
PHYSOBS ; string ; VSO 'physical observable;
PROVIDER ; string ; VSO ID for the data provider (SDAC, NSO, SHA, MSU, etc)
SOURCE ; string ; spacecraft or observatory (SOHO, YOHKOH, BBSO, etc)
INSTRUMENT ; string ; instrument ID (EIT, SXI-0, SXT, etc)
(placeholders for the future)
DETECTOR ; string ; detector ID (not supported by all providers; use inst also)
FILTER ; string ; filter name (same problems as detector)
(other flags)
URLS ; flag ; attempt to get URLs, also
QUIET ; flag ; don't print informational messages
DEBUG ; flag ; print xml soap messages
FLATTEN ; flag ; return vsoFlat Record (no sub-structures)
Outputs:
a null pointer -> no matches were found
(or)
struct[n] : (vsoRecord or vsoFlatRecord) the metadata from the results
Limitations : if using /URLS, you may wish to examine output.getinfo for messages
note -- resolution of date parameters: order of precidence
DATE (named parameter)
TSTART/TEND (positional parameters)
START_DATE/END_DATE (named parameters)
it is possible to mix TSTART/END_DATE, or DATE(only a start)/END_DATE
but it is not recommended, and may not be supported in the future.
if no end date is specified, the system will use the start of the
next day
[Previous]
[Next]
Project : VSO
Name : VSO_SERVER
Purpose : check and return available VSO proxy server and URI
Category : vso sockets
Inputs : None
Outputs : SERVER = VSO proxy server name
Optional
Outputs : URI = URI name
Keywords : NETWORK = 1 if network is up
NO_CHECK = return server and URI names without checking network status,
CALLS: ***
HAVE_NETWORK
CALLED BY:
VSO__DEFINE
History : 1-Dec-2005, D.M. Zarro (L-3Com/GSFC), Written
22-Dec-2005, J.Hourcle (L-3Com/GSC). changed server; URI need not resolve
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
NAME:
VSYM
PURPOSE:
Create "Mongo"-like polygonal plot symbols
EXPLANATION:
This procedure generates a subset of Mongo-like plot symbols.
The symbols are the rotationally symmetric ones that have
a specified number of vertices and are either open or filled.
(The half-filled symbols are not included.) After defining the
plot symbol with VSYM, make the call to PLOT (or PLOTS or OPLOT) with
PSYM=8.
CATEGORY:
Graphics
CALLING SEQUENCE:
VSYM, Nvert
INPUT POSITIONAL PARAMETERS:
Nvert: Number of vertices in plot symbol. Maximum value
used is 24.
INPUT KEYWORD PARAMETERS:
STAR: Set this flag to get a star. E.g.,
vsym, 5,/star gets you a pentagram.
SKELETON: Set this flag to get an asterisk-like symbol, where
the center is connected to each vertex. E.g.,
vsym, 4, /skel gets you an X.
POLYGON: Set this flag to get a regular polygon. This is
the default symbol type.
FILL: Set this flag to get filled symbol. Default=open
ROT: Rotation of symbol about center, in degrees.
E.g., vsym, 4, rot=45 gets you a diamond, whereas
vsym, 4 gets you a square.
THICK: Line thickness of symbol. Default=!P.thick
MODIFICATION HISTORY:
Written by: R. S. Hill, RITSS, 2 Oct 98