[Previous]
[Next]
NAME:
S2C
PURPOSE:
Returns Cartesian coordinates (X,Y,Z) of a position vector
or array of position vectors whose spherical coordinates are
specified by V0.
CALLING SEQUENCE:
V1 = S2C(V0,YOFF=YOFF,ZOFF=ZOFF,ROLL=ROLL,B0=B0)
INPUTS:
V0 = Spherical coordinates (r,theta,phi) of a 3-vector or
array of 3-vectors, with theta and phi in degrees.
OPTIONAL INPUTS:
YOFF, ZOFF = Y AND Z TRANSLATIONS
ROLL
B0
OUTPUTS:
V1 = 3-vector containing Cartesian coordinates (x,y,z)
corresponding to spherical coordinates specified in V0. It is
a 3xn array if v0 is.
CALLS: ***
MAKARR, MAKVEC
CALLED BY:
DRAW_GRID [1], DRAW_GRID [2], DRAW_GRID [3], GET_TRACUBE, MK_GRID_COORDS2
PLOT_CLON, mk_strip_file, mplot_nar, plot_ar_pfi, plot_nar [1], plot_nar [2]
rot_pix2
MODIFICATION HISTORY:
Written, Jan, 1991, G. L. Slater, LPARL
GLS - Modified to allow translation, roll, and b0 corrections
[Previous]
[Next]
Project : SOHO - CDS
Name : SAFE_EXP()
Purpose : Safe version of EXP() -- no floating underflows
Category : Class4, Numerical
Explanation : Prior to IDL version 4, taking the exponential of a large
negative number, for example when calculating a Gaussian far
out from line center, would give a result of 0. With the
advent of version 4, the same calculation would give floating
underflow error messages.
This routine allows one to calculate exponentials without
worrying about generating floating underflow errors. Any
numbers smaller than -87 (which gives an exponential of
1.6E-38) return a result of 0.
Syntax : Same as the EXP() function.
CALLED BY:
VDS_BURNIN_NEW, VDS_BURNIN_ORIG
Examples : Y = SAFE_EXP(-X^2)
Inputs : X = The value or array to take the exponential of.
Complex numbers are also supported.
Opt. Inputs : None.
Outputs : The result of the function is the exponential.
Opt. Outputs: None.
Keywords : None.
Calls : None.
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 13-Jun-1997, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Name: safe_log10
Purpose: apply 'safe' log10 via alog10((data+1.)>1.), optionally bytscl
Input Parameters:
index - if structure, append history record including alorithm/values
data - data array to scale
Calling Sequence:
result=safe_log10(data [,/bytescale, min=xx, max=yy , backg=zz])
-OR-
result=safe_log10(index, data [,/bytescale, min=xx, max=yy , backg=zz])
Calling Examples:
sdata=safe_alog10(data,/bytescale) ; log/bytescale
sdata=safe_alog10(index, data, maximum=3.0 ) ; bytscale log to
-- note: is index structures supplied, history is updated ---
IDL> out=safe_log10(index,data,back=865.,max=2.5)
IDL> print,index.history
safe_log10 result=bytscl(alog10( ((indata-865.0)+1.)>1.),min=0.0,max=2.5)
Keyword Parameters:
bytescale - if set, bytscale (after alog10 applied)
minimum - if set, minimum used in bytscl (implies BYTESCALE)
maximum - if set, maximum used in bytscl (implies BYTESCALE)
clobber - if set, clobber input data (for memory management)
background - if set, subtract this "pedastal" from data prior to
applying algorithim
CALLS: ***
BOX_MESSAGE, GET_TAG_INDEX, SLFMT, data_chk [1], data_chk [2], str_replace [1]
str_replace [2], update_history
CALLED BY:
eit_proton_summary, mk_sxh, ssc_scan2, ssw_fov_context, sxt_clean [1]
sxt_clean [2], sxt_composite [1], sxt_composite [2], sxt_composite [3]
sxt_ssc2sss, sxt_ssc_rationalize, sxt_ssn2fits [1], sxt_xsaa
History:
22-March-1999 - S.L.Freeland - generic version of sxt/ypop/eit routine
[Previous]
[Next]
Project : SOHO - CDS
Name : SAFE_STRING()
Purpose : Safe version of STRING
Category :
Explanation : STRING has a limitation of 1024 strings when used with an
explicit FORMAT specification. Using this routine gets around
that limitation.
Syntax : Result = SAFE_STRING( EXPRESSION )
CALLED BY:
ANYTIM2CAL
Examples : dd = strmid(safe_string(ext.day+100,format='(i3)'),1,2)
Inputs : EXPRESSION = The expression to be converted to string type.
Opt. Inputs : None.
Outputs : The result of the function is the converted string.
Opt. Outputs: None.
Keywords : Any keywords allowed by the STRING function.
Calls : STRING
Common : None.
Restrictions: At the moment, only one expression can be passed to
SAFE_STRING, whereas the built-in STRING function can take
multiple inputs.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 18-Mar-1998, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Name: safe_unlog10
Purpose: ~undo the 'safe_log10' function algorithm
Input Parameters:
log10data - assumed output from safe_log10(data)
Calling Sequence:
original=safe_unlog10(log10data)
History:
25-March-1999 - S.L.Freeland
[Previous]
[Next]
Project : SOHO - CDS
Name : SAME_DATA()
Purpose : Check if two variables are identical.
Explanation : Checks if the values contained in the 2 inputs are the same.
Works on any type of data input.
Use : IDL> if same_data(a,b) then print,'a and b are identical'
Inputs : a - first input
b - second input
Opt. Inputs : None
Outputs : Function returns 1 for identity, 0 otherwise.
Opt. Outputs: None
Keywords : None
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], MATCH_STRUCT, SAME_DATA2
SINCE_VERSION [1], SINCE_VERSION [2]
CALLED BY:
ADD_GSET, AXIS__DEFINE [2], Array_Despike, Energy_res [2], GEN__DEFINE
GT_CDS_TIME, HESSI BACK PROJECTION STRATEGY ABSTRACT CLASS
HESSI BINNED EVENTLIST CLASS DEFINITION
HESSI FRAMEWORK TEMPLATE CLASS [2], HESSI FRAMEWORK TEMPLATE CLASS [3]
HESSI IMAGE STRATEGY CLASS DEFINITION
HESSI MODULATION PATTERN STRATEGY CLASS DEFINITION
HESSI PACKET FILE ABSTRACT CLASS, HESSI ROLL_DB CLASS DEFINITION
HSI_DRM_MOD CLASS, HSI_DRM_MOD_CONTROL__DEFINE, HSI_IMAGE_TEST [2]
HSI_SPECTROGRAMACCBIN [5], HSI_SPECTRUM__DEFINE, LINE_COMPLEX, MONO_SPEC
PARAPEAK, SAME_DATA2, SPECTRUM CLASS DEFINITION, SPEX_DRM__DEFINE
SPEX_FITINT__DEFINE, SPEX_FIT__DEFINE, SPEX_GEN__DEFINE, SPEX__DEFINE
STRUCTURE MANAGER CLASS, TP_DRAW_VWIN, TP_RECALC_DEW, XSTRUCT, cw_edroplist
hsi_image__getaxis [2], hsi_obs_summary__define [1]
hsi_obs_summary__define [2], hsi_params2script, hsi_shutter_transmission
hsi_spectrum__filewrite, hsi_ui_img, hsi_ui_lc, hsi_ui_setlabels, hsi_ui_spec
plotman, plotman_imageoptions, plotman_zoom, spex_image__define
Common : None
Restrictions: None
Side effects: None
Category : Util, numerical
Prev. Hist. : None
Written : C D Pike, RAL, 22-Feb-95
Modified : Accept string arrays. CDP, 9-Nov-95
Modified, 22-Nov-02, Zarro (EER/GSFC)
- added call to more efficient same_data2 for IDL > 5.3
[Previous]
[Next]
Project : SOHO - CDS
Name : SAME_DATA2()
Purpose : Check if two variables are identical.
Explanation : Checks if the values contained in the 2 inputs are the same.
Works on any type of data input. This is called by same_data for
IDL versions 5.4 and greater because it's much faster.
Use : IDL> if same_data2(a,b) then print,'a and b are identical'
Inputs : a - first input
b - second input
Opt. Inputs : None
Outputs : Function returns 1 for identity, 0 otherwise.
Opt. Outputs: None
Keywords : None
Calls : ***
MATCH_STRUCT, SAME_DATA [1], SAME_DATA [2], SAME_DATA2_TEST
CALLED BY:
SAME_DATA [1]
Common : None
Restrictions: None
Side effects: None
Category : Util, numerical
Prev. Hist. : None
Written : Andre Csillaghy, Dominic Zarro 2005
Modified : This version replaces the online version 3-Nov-2005. Eliminates a lot
of checking and relies on catch to trap some cases. Much faster.
16-nov-2005, Andre. Removed check for error_code eq -203. The number
changed in newer versions of IDL, plus not necessary anyway.
[Previous]
[Next]
Project : SOHO - CDS
Name : SAVE_ANALYSIS
Purpose : Save a CFIT ANALYSIS structure with data
Explanation : Saves all the data associated with a CFIT ANALYSIS structure,
retrievable by RESTORE_ANALYSIS.
Use : SAVE_ANALYSIS,ANALYSIS
Inputs : ANALYSIS : Component fitting system (CFIT) analysis structure,
containing the data to be saved, and the file name
to be used when saving. If no file name is given,
pickfile will be used to prompt for one.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : VERBOSE : Propagated to the SAVE command.
Calls : ***
BIGPICKFILE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1]
DATATYPE [2], DATATYPE [3], DEFAULT, break_file [4]
CALLED BY:
XCFIT_BLOCK
Common : None.
Restrictions: Must have widgets to use pickfile.
Side effects: None.
Category : Line fitting.
Prev. Hist. : None.
Written : SVH Haugan, UiO, 25 September 1997
Modified : Not yet.
Version : 1, 25 September 1997
[Previous]
[Next]
Name: save_idl_routines
Purpose: save selected subset of IDL routines to binary file (pre-compiled)
Input Parameters:
routines - optional list of routines - default=ALL or via PATTERN match)
Output Parameters:
NONE:
CALLS: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], FILE_EXIST [2]
SINCE_VERSION [1], SINCE_VERSION [2], TIME2FILE, anytim [1], anytim [2]
anytim [3], anytim [4], anytim [5], concat_dir [4], data_chk [1], data_chk [2]
delvarx [5], file_exist [1], file_exist [3], get_logenv [1], get_logenv [2]
get_user [1], get_user [2], id_esc, prstr [1], prstr [2], reltime [1], reltime [2]
ssw_strsplit, str_replace [1], str_replace [2], strarrcompress, strspecial [1]
strspecial [2], wc_where [1], wc_where [2]
CALLED BY:
restore_idl_routines
Side Effects: writes a binary file containing desired IDL routines
[restore via 'restore_idl_routines' with same settings
of optional PATTERN='*xxx', /NODATE, and OUTDIR='dir' ]
Keyword Parameters:
pattern - string pattern to match (wild cards ok)
loud - if set, be more verbose
date - if (switch set) include todays date YYYYMMDD in default file name
if (otherwise defined), anytim.pro compat; use that YYYYMMDD
if (undefined or /NODATE) date not included in filename
file - save file name -
Default: 'idl_routines_Rx[xx]_USER_[PATTERN][_YYYYMMDD].save'
|Release
outdir - output directory - Default> $HOME
name_only - if set, just form filname FILE and return
(for example, for use by restore_idl_routines.pro)
functions_only - if set and PATTERN set, just consider Functions
pros_only - if set and PATTERN set, just consider Procedures
Calling Sequence:
IDL> save_idl_routines,pattern='xxx*' ; save routines with prefix xxx
IDL> save_idl_routines,pattern='*xxx' ;
History:
18-October-1999 - S.L.Freeland; simplify/control call to save,/routine
09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
Restrictions:
Version > 4.
Notes:
If PATTERN includes wild cards (* or ?), the default file name
will include an escaped versions for valid file name construction
The original pattern used (inc wild cards) can be seen via
ORIG=id_unesc(file)
Suggestions: suggest you take the default name for traceability
and compatibility use with 'restore_idl_routines.pro'
(use /NODATE or /DATE and OUTDIR='xxx' for some flexibility)
[Previous]
[Next]
Name: saveenv
Purpose: save current environment (UNIX environmentals/VMS logicals)
(for temporary change and later restoration via restenv.pro)
History:
9-Jan-1994 (SLF)
Method:
calls get_logenv.pro to return envrionment
CALLS: ***
get_logenv [1], get_logenv [2]
Common Blocks:
saveenv_blk (store environmentals and translation)
Assumptions/Restrictions
[Previous]
[Next]
NAME: savegen
Purpose: save user specified parameters (idl variables) in a generic file
[front end to wrt_genx - files are restored via savegen.pro]
Input Parameters:
p1, p2, p3... p15 - idl variables to save
Optional Keyword Parameters
file - file name for save - default is 'save.genx' in current direct
if name is supplied and notype keyword is not set, the
actual file name used will have .genx appended
names - strarr or delimited string containg saved variable names -
number elements in array (or expanded array) should equal
the number of input parameters - Use to document saved names
text - string or string array describing file (for user internal
documentation)
notype - if set, inhibits default file type assignment
by default, filename=file+'.gen' for non xdr and
filename=file+'.genx' for xdr format
replace - [note: version 1.0 replace is default]
xdr - [note: version 1.0 and greater is always xdr]
Calling Sequence:
savegen,v1 [,v2, v3..., v15, name=name, file=file, text=text]
Calling Examples: [file name]
savegen, spectra , times, file='spec_01' 'spec_01.genx'
savegen, temp, EM, index(3:4), text=info_array(3:4), $ 'save.genx'
names=['temp', 'EM']
savegen, pimage,infil,ss, file='sxt_kp', $ 'sxt_kp.genx'
text=['SXT:KP Mag Overlay',info_array(4:5)], $
CALLS: ***
BUILDGEN, STR2ARR [1], STR2ARR [2], WRT_GENX [1], WRT_GENX [2]
CALLED BY:
CH_SYNTHETIC, EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], EIS_LIST_MAIN [1]
EIS_LIST_MAIN [2], GE_WINDOW [1], GOES_TF, GOES_TF_COEFF
HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [1]
HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [2]
MAKE_GOES_RESP, MK_MER_CONT, MK_SUMER_DBASE, RATIO_PLOTTER [1], UPDATE_KAP
UPDATE_TERM, XCDS_BOOK, XCPT, atr2hxa_dbase, av_dt_genx, ccd_sunc [1], ccd_sunc [2]
ch_ss, eit_genx_cat, eit_proton_summary, fl_goesplot [1], fl_goesplot [2]
fl_goesplot [3], fl_suntoday [1], fl_suntoday [2], fl_suntoday [3]
fl_sxtobsnar [1], fl_sxtobsnar [2], genx_newver [1], genx_newver [2]
hsi_spectrum__filewrite, hsi_spectrum__genxwrite, jitter_gif_xyimg
make_goes_chianti_response [1], make_goes_chianti_response [2]
make_goes_chianti_response [3], make_goes_chianti_response [4]
mk_mapfile [1], mk_mapfile [2], mk_mo_log, mk_pix [1], mk_pix [2], mk_sdmi
mk_soup_hcat, msok_poi_copy [1], msok_poi_copy [2], ratio_plotter [2]
rd_dpc_table, res_freq, search_obs, sun_today [1], sun_today [2], sun_today [3]
sxt2file, sxt_etemp, sxt_mornint, sxt_summary, synop_movie, timeline, topsdb [1]
topsdb [2], trace_last_movie [1], trace_last_movie [3]
trace_special_movie [1], trace_special_movie2, video_title, web_seq
write_genxcat, xr_mk_abun_file, xsearch_obs, xset_chain [1], xset_chain [2]
History:
30-oct-91 - SLF (originally for Calibration files)
8-Nov-91 - MDM Expanded from 10 to 15 parameters
15-Apr-93 - SLF file name updates (dont clobber input)
16-Mar-93 - SLF - add struct input keyword
24-Mar-93 - SLF - update documentation and 'unclutter'
30-Mar-93 - SLF - error check positional paramter(0)
31-Mar-93 - SLF - allow names keyword to be delimited string
some documentation upgrades
Hints - if you intend on keeping a file around, it pays to include
internal documentation which will jog your memory later. The simplest
method is to supply a string or string array via the TEXT keyword.
You could save additional documentation via additional input paramters.
For example, if you journal your idl session while creating a final
data product, you could pass that in as internal documentation.
For this, you could use the generic text reader <rd_tfile.pro> to
transform the journal file to a string array - this could then
be passed in as a positional parameter (or via keyword TEXT)
For example, the following call might save an image, an index record,
reformated file info, and the journal file used during image creation:
savegen, fltimage, index, fileid, rd_tfile('idlsave.pro'), $
text='Nobel Candidate', file='apj_fig1'
An additional level of internal documentation is available through
the use of the NAMES keyword - you should use this if you desire to
retain the actual names used in the call to savegen.
EX: (may use X-cut and paste of call sequence)
savegen,index,data,info_array,names='index,data,info_array'
|-------cut---------| |----- paste -------|
Use of savegen/restgen pair (simple example):
savegen,v1,v2,v3 ; saves user variables v1,v2,v3 in 'save.genx'
restgen,a,b,c ; restores them (now named a,b,c)
To verify your file after writing, use restgen inquire option:
restgen,/inquire [,/nodata] ; displays summary of 'save.genx' contents
[Previous]
[Next]
Name: savegenx
Purpose: update of 'savegen' to handle pointers, objects, etc.
Input Parameters:
p0,p1...pn - variables to save - any IDL type,variety
Keyword Parameters:
file - output file name; default 'save.geny'
notype/noextension (synonyms) - dont include default extention '.geny'
overwrite - if set, OK to clobber existing version of FILE
_extra - all other keywords passed to RSI 'save' via inheritance
Calling Sequence:
IDL> savegenx, v1 [,v2,v3...vN] [,file='filename'] [,/noexten] [,/over]
CALLED BY:
hessi_save_settings, hsi_pixon_smooth_patterns, mk_synsfc_coeff [1]
mk_synsfc_coeff [2], obj_save, plotman_widget, sxt_prep [1], sxt_prep [2]
sxt_prep [3], trace_make_vignette, trace_special_movie [2]
trace_special_movie [3], write_genxcat
History:
4-November-1999 - S.L.Freeland - permit saving "modern" RSI data
Method:
setup and call 'save' via execute statement
Retrieve contents via: 'restgenx'
CALLS: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, FILE_EXIST [2], data_chk [1], data_chk [2]
file_exist [1], file_exist [3], str_replace [1], str_replace [2]
Restrictions:
Need to consider integration with 'savegen/restgen' a little more...
[Previous]
[Next]
NAME:
SAVEIMAGE
PURPOSE:
Save the current graphics window to an output file (GIF by default).
The output formats supported are:
GIF 8-bit with color table,
BMP 8-bit with color table,
PNG 8-bit with color table,
PICT 8-bit with color table,
JPEG 24-bit true color,
TIFF 24-bit true-color.
Any conversions necessary to convert 8-bit or 24-bit images onscreen to
8-bit or 24-bit output files are done automatically.
CATEGORY:
Input/Output.
CALLING SEQUENCE:
SAVEIMAGE, FILE
INPUTS:
FILE Name of the output file (GIF format by default).
OPTIONAL INPUTS:
None.
KEYWORD PARAMETERS:
BMP Set this keyword to create BMP format (8-bit with color table).
PNG Set this keyword to create PNG format (8-bit with color table).
PICT Set this keyword to create PICT format (8-bit with color table).
JPEG Set this keyword to create JPEG format (24-bit true color).
TIFF Set this keyword to create TIFF format (24-bit true color).
QUALITY If set to a named variable, specifies the quality for
JPEG output (default 75). Ranges from 0 ("terrible") to
100 ("excellent"). Smaller quality values yield higher
compression ratios and smaller output files.
DITHER If set, dither the output image when creating 8-bit output
which is read from a 24-bit display (default is no dithering).
CUBE If set, use the color cube method to quantize colors when
creating 8-bit output which is read from a 24-bit display
(default is to use the statistical method). This may improve
the accuracy of colors in the output image, especially white.
QUIET Set this keyword to suppress the information message
(default is to print an information message).
OUTSIZE Size of output image file in pixels
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None
CALLS: ***
CONGRID [1], CONGRID [2], CONGRID [3], REDUCE_COLORS, REVERSE, SSW_WRITE_GIF
WRITE_BMP, WRITE_PICT
CALLED BY:
EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT, TIFF2GIF
COMMON BLOCKS:
None
SIDE EFFECTS:
The output file is overwritten if it exists.
RESTRICTIONS:
Requires IDL 5.0 or higher (square bracket array syntax).
EXAMPLE:
openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun
image = bytarr(440, 330)
readu, lun, image
free_lun, lun
loadct, 13
tvscl, image
saveimage, 'hurric.gif'
MODIFICATION HISTORY:
Liam.Gumley@ssec.wisc.edu
http://cimss.ssec.wisc.edu/~gumley
$Id: saveimage.pro,v 1.17 2000/02/08 19:39:38 gumley Exp $
Modified: 29-Oct-2000, zarro@smmdac.nascom.nasa.gov - added outsize keyword
Version 3, 13-Aug-2003, William Thompson
Use SSW_WRITE_GIF instead of WRITE_GIF
Version 4, 28-June-2006, Zarro - set DECOMPOSED=0 if undefined, and
reset to original value when completed.
Copyright (C) 1999 Liam E. Gumley
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
[Previous]
[Next]
Name: savesys
Purpose: save idl system variables for later restoration via restsys
(variables saved in yohkoh system variable: !ys_idlsys_temp)
Input Keyword Parameters:
all - if set, save all (writeable) idl system variables
aplot - if set, save all plot related variables (!x,!y,!z,!p)
x,y,z - if set, save specified axis variable (!x, !y, and/or !z)
c,order,map,more - save associated system variable(s)
Calling Examples:
savesys,/x,/y ; save !x, !y
savesys,/p ; save !p
savesys,/aplot ; save !x,!y,!z,!p
savesys,/all ; save above plus some others (!c, !map..)
Generally, a routine would use this routine paired with restsys.pro
pro junk,a,b,c
savesys,/aplot ; save plot variables
<change !x,!y,!p> ; routine plays with global variables
restsys,/aplot ; restore plot values
return
CALLED BY:
DRAW_GRID [1], DRAW_GRID [2], HSI_CWTOOLS_LINESET, HSI_FORWARDFIT, NORH_GRID [1]
NORH_GRID [2], PLOT_CLON, POLAR_GRID, SXT_GRID [1], SXT_GRID [2], SXT_GRID [3]
TV_SYNOP, event_movie [1], event_movie [2], goes_summary, goes_widget, last_lc
lcur_image, plot_nar [1], plot_nar [2], sun_grid
Side Effects:
def_yssysv.pro is called if it has not been done already to define
Yohkoh system variables
CALLS: ***
def_yssysv [1], def_yssysv [2]
Common Blocks:
def_yssysv_blk - determine if Yohkoh system variables are defined
History:
21-Apr-1993 (SLF)
22-apr-1993 (SLF) ; remove !more references
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCALE_TV
Purpose :
Scales an image to best fit the image display screen.
Explanation :
Scales the size of an image to best fit the size of an available area
on the image display screen. Called from EXPTV and other routines.
Use :
SCALE_TV, ARRAY, MX, MY, JX, JY
Inputs :
ARRAY = Image to be scaled.
Opt. Inputs :
None.
Outputs :
MX, MY = The size to use in displaying the image.
JX, JY = The position of the lower left-hand corner of the image to
use in displaying the image.
Opt. Outputs:
None.
Keywords :
NOSQUARE = If passed, then pixels are not forced to be square.
SIZE = If passed and positive, then used to determine the scale of
the image. Returned as the value of the image scale. May
not be compatible with /NOSQUARE.
NOBOX = If set, then no space is reserved for a border around the
image. Generally used with the EXPAND_TV switch of the same
name.
DISABLE = If set, then TVSELECT not used.
NOEXACT = If set, then exact scaling is not imposed. Otherwise, the
image scale will be either an integer, or one over an
integer. Ignored if SIZE is passed with a positive value.
XALIGN = Alignment within the image display area. Ranges between 0
(left) to 1 (right). Default is 0.5 (centered).
YALIGN = Alignment within the image display area. Ranges between 0
(bottom) to 1 (top). Default is 0.5 (centered).
RELATIVE = Size of area to be used for displaying the image, relative
to the total size available. Must be between 0 and 1.
Default is 1. Passing SIZE explicitly will override this
keyword.
SCALE = Pixel scale in physical units. Can have either one or two
elements. If not passed, then 1 is assumed in both
directions. Only used if the /ADJUST keyword is also used.
ADJUST = If set, then adjust the pixel size separately in the two
dimensions, so that the physical scale given by the SCALE
parameter is the same along both axes. For example, if a
100x100 image is displayed with
EXPTV, A, SCALE=[2,1], /ADJUST
then it will be shown twice as wide as it is high. Use of
this keyword forces NOEXACT to also be set. Also, NOSQUARE
is ignored.
TRUE = If passed, then contains the dimension containing the color
dimension. For example, if the input array has the
dimensions (3,Nx,Ny), then one would set TRUE=1. If not
passed, then TRUE=3 is assumed. Ignored if the image only
has two dimensions.
Calls : ***
GET_IM_KEYWORD, HAVE_WINDOWS [1], HAVE_WINDOWS [2], IM_KEYWORD_SET, TVSELECT
TVUNSELECT
CALLED BY:
EXPTV, PUT
Common :
IMAGE_AREA = Contains switch IMAGE_SET and position IX, NX, IY, NY.
Restrictions:
ARRAY must be two-dimensional or an array of three 2-D images (Nx,Ny,3)
to be used for true color. (See also the TRUE keyword.)
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.
W.T.T., Feb. 1991, modified to use TVSELECT, TVUNSELECT.
W.T.T., Feb. 1991, modified to use common block IMAGE_AREA.
W.T.T., Feb. 1991, added SIZE keyword.
W.T.T., Mar. 1991, added NOEXACT keyword.
W.T.T., Oct. 1991, added !ASPECT system variable.
Written :
William Thompson, GSFC, October 1987.
Modified :
Version 1, William Thompson, GSFC, 12 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 15 November 1995
Added check to make sure that window exists.
Version 3, William Thompson, GSFC, 25 July 1996
Added keywords SCALE and ADJUST
Version 4, William Thompson, GSFC, 13 November 2001
Added capability for true-color images.
Version :
Version 4, 16 November 2001
[Previous]
[Next]
Project:
SDAC
NAME:
SCALECOM
PURPOSE:
This is an include block to be used with CH_SCALE and PL_SCALE.
CATEGORY:
GRAPHICS
CALLING SEQUENCE:
@scalecom
CALLS:
none
INPUTS:
none explicit, only through commons;
OPTIONAL INPUTS:
none
OUTPUTS:
none explicit, only through commons;
OPTIONAL OUTPUTS:
none
KEYWORDS:
none
COMMON BLOCKS:
scalecom
SIDE EFFECTS:
none
RESTRICTIONS:
none
PROCEDURE:
none
MODIFICATION HISTORY:
richard.schwartz@gsfc.nasa.gov, 10-June-1996 documented
[Previous]
[Next]
Project : SDAC
Name : SCANPATH
Purpose : Widget prog. for reading documentation within IDL procedures
Explanation :
Widget-based routine to read in the documentation from IDL procedures
in the search path. Optionally, reads in the entire procedure.
Use :
SCANPATH [, NAME ]
Inputs : None required.
Opt. Inputs : NAME - Name of procedure to search and document
Outputs :
None.
Opt. Outputs:
PROC: String array with the text of the latest saved procedure
Keywords :
RESET: Clear out previous procedures from memory
PC: If set, then put directory list widget in separate column
LAST: Restore last procedure in memory
NOKILL: Set to not do a global widget reset
FONT : Set personal FONT
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHKARG, CHKLOG [1], CHKLOG [2]
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST
FREE_POINTER, GET_DFONT [1], GET_DFONT [2], GET_HANDLER_ID, GET_LIB, GET_MOD
GET_PROC, HAVE_WIDGETS [1], HAVE_WIDGETS [2], IDL_RELEASE, MK_DFONT, OS_FAMILY
REVERSE, RM_FILE, SCANPATH_CLEAN, SCANPATH_EVENT, SCANPATH_HISTORY, SCANPATH_PROC
SCANPATH_RECOVER, SCANPATH_TXT, STR2FILE, STRIP_DOC, STRPAD, TIMER_VERSION, TRIM, XACK
XALIVE, XHOUR, XINPUT, XKILL, XMANAGER_RESET, XMENU2, XPRINT [1], XPRINT [2], XPRINT [3]
XPRINT [4], XPRINT [5], XREGISTERED, XSHOW, XTEXT, XTEXT_RESET, break_file [4]
concat_dir [4], delvarx [5]
CALLED BY:
XDOC
Common :
Uses the common blocks defined in SCANPATH_COM.
Restrictions:
Needs X-windows and widgets support (MOTIF or OPENLOOK).
Side effects:
If "ALL" is selected to read in the entire file, then memory problems
may arise when reading very large procedure files.
Category :
Documentation, Online_help.
Prev. Hist. :
Written May'91 by DMZ (ARC).
Modified Dec 91 by WTT (ARC) to support UNIX, and add the following
features:
- Search current directory, as well as !PATH
- Allow for files "aaareadme.txt" containing more
general information to also be searched.
- Only save last five procedures in memory.
- Add "documentation only" button.
- Use environment variable IDL_PRINT_TEXT
- Change extensions ".SCL", ".MOD" to "._SCL", "._MOD".
Modified Jan'92 by DMZ (ARC) to sense screen size and autosize widgets
Modified Feb'92 by WTT (ARC) to use SCANPATH_FONT environment variable.
Modified Feb'92 by DMZ (ARC) to include a message window
Modified Mar'92 by DMZ (ARC) to enable remote printing of files
Modified Jul'92 by DMZ (ARC) to improve DOC_ONLY switch and add EXTRACT button
Modified Oct'92 by DMZ (ARC) to accept procedure name as input
Modified Dec'92 by EEE (HSTX) to accept search strings
Modified Mar'93 by DMZ (ARC) to handle "~" in UNIX directory names
and print modules from VMS text libraries
Written :
D. Zarro, GSFC/SDAC, May 1991.
Modified :
Version 1, William Thompson, GSFC, 23 April 1993.
Renamed SCANPATH_COM to SCANPATH_COM for DOS compatibility,
changed line defining YSZ, and incorporated into CDS library.
Version 2, William Thompson, GSFC, 18 June 1993.
Added IDL for Windows compatibility.
Changed size of widgets to better fit in IDL for Windows.
Split columns into two widget windows to make better use of
space.
Version 2.1 Dominic Zarro, GSFC, 21 July 1993.
Made procedure and search text widgets independent bases.
Version 3, Dominic Zarro, GSFC, 1 August 1994.
Cleaned up and added check for XDOC_ONLY environment variable.
Changed SCANPATH_FONT to XDOC_FONT for procedure text widget
Version 3.1, Dominic Zarro, GSFC, 16 August 1994.
Added /NOSPLIT keyword.
Fixed /FONT so that original font is restored on exit.
(This keyword overrides the value of XDOC_FONT)
Version 3.2, Zarro, GSFC, 24 August 1994.
Fixed bug where XMANAGER was being called twice.
Excised PC keyword
Version 3.3, Zarro, GSFC, 3 September 1994.
Fixed another potential bug when XMANAGER was being
called twice during search.
Version 4, Zarro, GSFC, 18 September 1994.
Put back /PC. If set, then the directory list widget appears
in a second column (rather than in a third row, where
it usually falls off the screen).
Version 4.1, Zarro, GSFC, 19 September 1994.
Removed forcing of procedure names to lowercase.
Converted PROC keyword to argument to enable transfer
back to XDOC
Version 5, Zarro, GSFC, 10 October 1994.
Changed search text function to search file function.
Added STRIP_DOC function.
Version 5.1, Zarro, GSFC, 22 October 1994.
Added LAST keyword to restore last save procedure
Version 5.2, Zarro, GSFC, 12 December 1994.
Fixed potential bug in FIND logic -- should only arise
in 1 in 22 million cases.
Version 6.0, Zarro, GSFC, 1 September 1996.
Optimized with new widget routines
Version 7.0, Zarro, GSFC, 1 December 1996.
Optimized with better search routines
Version 8.0, Zarro, GSFC, 1 August 1997.
Added history option
Version 9.0, Zarro, GSFC, 1 December 1997.
Added detach option
Version 10.0, Zarro, GSFC, 1 March 1998
Added /NO_BLOCK (IDL version 5 only)
Version 11.0, Zarro, GSFC, 20 May 1998
Added more control for FONT and TEXT size
Version 12.0, Kim. GSFC, 6 June 2005
If dfont is a blank string, set to (get_dfont())(0)
Modified 23-Aug-05, Zarro (L-3Com/GSFC) - added XHOUR
[Previous]
[Next]
NAME:
SCATTER3D
PURPOSE:
Show a scatterplot of two arrays with color coding to
indicate density of points.
AUTHOR:
Thomas Berger
Lockheed Martin Solar and Astrophysics Laboratory
berger@lmsal.com
CATEGORY:
Data analysis, graphics.
CALLING SEQUENCE:
SCATTER3D,array1,array2
INPUTS:
ARRAY1: data array of any dimension > 0
ARRAY2: data array of the same dimension as ARRAY1
OUTPUTS:
BINS: The binsize actually used in HIST2D (determined from
data ranges and NBIN parameter.
R: The HIST2D "image" used to display the scatterplot
CENTER: The center of the principle moment ellipse. Only if
keyword ELLIPSE is set.
SEMI_AIXS: FLTARR[2] containing the semi-axes of the principle
moment ellipse in data units. Only if keyword ELLIPSE
is set.
ROTANG: Rotation angle of the principle moment ellipse in
degrees counterclockwise from x-axis. Only if
keyword ELLIPSE is set.
KEYWORD PARAMETERS:
NBIN: The number of bins for HIST2D - effectively the
number of "pixels" in the scatterplot image.
Default is 100.
ELLIPSE: If set, routine calculates and plots the principle moment
ellipse fit to the scatterplot "image".
XTITLE: Passed directly to PLOT.PRO for axis labelling.
YTITLE
PLOT45: If set, plots the 45-degree, slope=1, line for comparison
to the scatterplot data.
CALLS: ***
COLORBAR [1], COLORBAR [2], CONGRID [1], CONGRID [2], CONGRID [3], HIST_2D, LOADCT
SCATTER3D_ELLIPSE, WINX
COMMON BLOCKS:
None.
SIDE EFFECTS:
720x540 pixel direct graphics window is opened in upper right of display.
RESTRICTIONS:
Requires HIST2D.PRO (built-in IDL function) and
COLORBAR.PRO (Fanning Software IDL procedure, also found in SolarSoft).
EXAMPLE:
To make a scatterplot of two images IMAGE1 and IMAGE2 with
the priniciple moment ellipse and a 45-degree line
SCATTER3D, image1, image2, bins, r, center, semi, rotang,$
/ELLIPSE,/PLOT45,XTITLE='Image 1', YTITLE='Image 2'
MODIFICATION HISTORY:
Written by: Thomas Berger, LMSAL, 10/2001.
2-November-2001 - S.L.Freeland;
change 'ellipse' to scatter3d_ellipse
'diagonal' to scatter3d_diagonal
to avoid current (and future) naming conflicts
[Previous]
[Next]
Project : SOHO-CDS
Name : SCOPE
Purpose : zoom in on an image
Category : imaging
Explanation : Calls SCOPE_CURSOR to draw a fixed size box in which to zoom.
User presses left mouse button to effect zoom
Syntax : scope,mag
Opt. Inputs : MAG = zoom magnification factor [def=3]
Outputs : None
Keywords : SIZE = initial box size [def=100]
NOSCALE = set to not bytescale image when zooming
PERCENT = box size in % of window units
CALLS: ***
EXIST, SCOPE_CURSOR
CALLED BY:
plotman
History : Written: D. Zarro, 28-Dec-98 (SMA/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO-CDS
Name : SCOPE_CURSOR
Purpose : Draw a rubber-band box (or circle)
Category : imaging
Explanation : This function draws a rubberband box (or circle) in the
window specified by the positional parameter
(or the current graphics window, by default).
The coordinates of the final box are returned by the
function. Move the cursor to draw, press the left button
to drag, and press the right button to exit.
Syntax : scope_cursor,coord
Outputs : CORDS= [xstart,ystart,xend,yend] or
[xcenter,ycenter,radius]
Opt. Outputs:
Keywords : WID = window where box is drawn. (!D.Window by default.)
DATA = set for box coordinates returned as DATA coordinates.
NORMAL = set for box coordinates returned as NORMAL coordinates.
BOX = set to draw box instead of circle
SIZE = initial box width and height
INITIALXY = initial circle center
FIXED = set to inhibit resizing, but permit dragging
RADIUS = initial input radius of circle
WIDTH,HEIGHT = output box width and height
MAG = magnification factor if zooming with /BOX
NOSCALE = set to not bytescale image when zooming
KEEP = keep last cursor position
CALLED BY:
SCOPE
Restrictions: None
CALLS: ***
BOX_DRAW, CIRCLE_DRAW, EXIST, IDL_RELEASE, LAST_DRAW, NINT [1], NINT [2]
Side effects: None
History : Written: D. Fanning (Coyote Software) -- originally DRAWBOX
Modified: D. Zarro, 28-Oct-98 (SMA/GSFC) - added circle option
Modified: K. Tolbert 29-Oct-98 (RSTX) - added initial location option
Modified: K. Tolbert 29-Oct-98 (RSTX) - for circle option, return center and radius
Modified: D. Zarro 20-Jan-99 (SMA/GSFC) - added magnify option
Modified: K. Tolbert 10-Jul-01 (Raytheon) - correct magnify for 16- or 24-bit color
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
SCR_ATTRIB
PURPOSE:
To set the screen attribute to those given, in the given order.
CALLING SEQUENCE:
scr_attrib [, a1, a2, a3, a4, a5]
INPUTS:
a1 - a5 -- The attribute codes. The attributes are set in the
command string in the given order. Thus, if a1 turns
the attributes off and a2 sets reverse video, the final
attribute will reset and then set to reverse video. If
the order were reversed, then the current attribute
would have reverse video added to it, and then would be
reset, leaving the terminal with all attributes off. Up
to five attribute codes may be specified. The codes are:
0 : all attributes off (default)
1 : bold on
2 : underscore on
3 : blink on
4 : reverse video on
OUTPUTS:
None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
NAME:
SCR_ATTRIB
PURPOSE:
To set the screen attribute to those given, in the given order.
CALLING SEQUENCE:
scr_attrib [, a1, a2, a3, a4, a5]
INPUTS:
a1 - a5 -- The attribute codes. The attributes are set in the
command string in the given order. Thus, if a1 turns
the attributes off and a2 sets reverse video, the final
attribute will reset and then set to reverse video. If
the order were reversed, then the current attribute
would have reverse video added to it, and then would be
reset, leaving the terminal with all attributes off. Up
to five attribute codes may be specified. The codes are:
0 : all attributes off (default)
1 : bold on
2 : underscore on
3 : blink on
4 : reverse video on
OUTPUTS:
None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCR_CHARSET
Purpose :
To change the character sets.
Explanation :
To change the character sets.
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
Use :
scr_charset [, g, cset]
Inputs :
g -- The terminal character set to change (either 0, for the
G0 designator, or 1, for the G1 designator). 0 = default.
cset -- The character set to use:
0 : United Kingdom.
1 : United States (USASCII) -- default.
2 : Special graphics characters and line drawing set.
3 : Alternate character ROM.
4 : Alternate character ROM special graphics chars.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : None.
Common : None.
Restrictions:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
Side effects: None.
Category : Utilities, User_interface
Prev. Hist. :
Written by Michael R. Greason, STX, May 1990.
Written : Michael R. Greason, GSFC/UIT (STX), May 1990
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version : Version 1, 29 March 1994
[Previous]
[Next]
NAME:
SCR_CHARSET
PURPOSE:
To change the character sets.
CALLING SEQUENCE:
scr_charset [, g, cset]
INPUTS:
g -- The terminal character set to change (either 0, for the
G0 designator, or 1, for the G1 designator). 0 = default.
cset -- The character set to use:
0 : United Kingdom.
1 : United States (USASCII) -- default.
2 : Special graphics characters and line drawing set.
3 : Alternate character ROM.
4 : Alternate character ROM special graphics chars.
OUTPUTS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCR_CURMOV
Purpose :
Moves the cursor relative to its original position.
Explanation :
To move the cursor around the screen relative to its original position.
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
Use :
scr_curmov [, cmd, n]
Inputs :
cmd -- An integer indicating the direction in which to move the curs.
0 : Up
1 : Down (Default)
2 : Left
3 : Right
n -- The number of spaces to move the cursor. If not specified
(or if less than or equal to zero), this is set to one.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
CURS
Common : None.
Restrictions:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
Side effects: None.
Category : Utilities, User_interface
Prev. Hist. :
Written by Michael R. Greason, STX, May 1990.
Written : Michael R. Greason, GSFC/UIT (STX), May 1990
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library.
Version : Version 1, 29 March 1994
[Previous]
[Next]
NAME:
SCR_CURMOV
PURPOSE:
To mov the cursor around the screen relative to its original position.
CALLING SEQUENCE:
scr_curmov [, cmd, n]
INPUTS:
cmd -- An integer indicating the direction in which to move the curs.
0 : Up
1 : Down (Default)
2 : Left
3 : Right
n -- The number of spaces to move the cursor. If not specified
(or if less than or equal to zero), this is set to one.
OUTPUTS:
None.
CALLED BY:
CURS
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCR_CURPOS
Purpose :
Positions the cursor at the specified screen location.
Explanation :
To position the cursor at the specified screen location. Unspecified
coordinates are set to one. Please note that the ESCAPE sequence
expects the coordinates to be counted from (1,1).
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
Use :
scr_curpos [, lin, col]
Inputs :
lin -- The screen line coordinate.
col -- The screen column coordinate.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
Common : None.
Restrictions:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
Side effects: None.
Category : Utilities, User_interface
Prev. Hist. :
Written by Michael R. Greason, STX, May 1990.
Written : Michael R. Greason, GSFC/UIT (STX), May 1990
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version : Version 1, 29 March 1994
[Previous]
[Next]
NAME:
SCR_CURPOS
PURPOSE:
To position the cursor at the specified screen location.
EXPLANATION:
Unspecified coordinates are set to one. Please note that the ESCAPE
sequence expects the coordinates to be counted from (1,1).
CALLING SEQUENCE:
scr_curpos [, lin, col]
INPUTS:
lin -- The screen line coordinate.
col -- The screen column coordinate.
OUTPUTS:
None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCR_ERASE
Purpose :
To erase portions of the terminal screen.
Explanation :
To erase portions of the terminal screen.
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
Use :
scr_erase [, cmd]
Inputs : None.
Opt. Inputs :
cmd -- An integer telling the procedure what part of the screen to
erase. If not specified, it is set to 5. Key:
0 : From cursor to end-of-line.
1 : From beginning-of-line to cursor.
2 : Entire line containing cursor.
3 : From cursor to end-of-screen.
4 : from beginning-of-screen to cursor.
ELSE : Entire screen.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
Common : None.
Restrictions:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
Side effects: None.
Category : Utilities, User_interface
Prev. Hist. :
Written by Michael R. Greason, STX, May 1990.
Written : Michael R. Greason, GSFC/UIT (STX), May 1990
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version : Version 1, 29 March 1994
[Previous]
[Next]
NAME:
SCR_ERASE
PURPOSE:
To erase portions of the terminal screen.
CALLING SEQUENCE:
scr_erase [, cmd]
INPUTS:
cmd -- An integer telling the procedure what part of the screen to
erase. If not specified, it is set to 5. Key:
0 : From cursor to end-of-line.
1 : From beginning-of-line to cursor.
2 : Entire line containing cursor.
3 : From cursor to end-of-screen.
4 : from beginning-of-screen to cursor.
ELSE : Entire screen.
OUTPUTS:
None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCR_OTHER
Purpose :
To allow the user to issue any ESCAPE sequence.
Explanation :
To allow the user to issue any ESCAPE sequence.
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
Use :
scr_other, str
Inputs :
str -- A string containing the escape sequence. The initial ESCAPE
should not be included; this will be added by this procedure.
This parameter is NOT optional; if not available, the
procedure will return without doing anything.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
Common : None.
Restrictions:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
Side effects: None.
Category : Utilities, User_interface
Prev. Hist. :
Written by Michael R. Greason, STX, May 1990.
Written : Michael R. Greason, GSFC/UIT (STX), May 1990
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version : Version 1, 29 March 1994
[Previous]
[Next]
NAME:
SCR_OTHER
PURPOSE:
To allow the user to issue any ESCAPE sequence.
CALLING SEQUENCE:
scr_other, str
INPUTS:
str -- A string containing the escape sequence. The initial ESCAPE
should not be included; this will be added by this procedure.
This parameter is NOT optional; if not available, the
procedure will return without doing anything.
OUTPUTS:
None.
CALLED BY:
SELECT_O [1], SELECT_O [2], SELECT_O [3]
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCR_RESET
Purpose :
To reset the terminal.
Explanation :
To reset the terminal.
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
Use :
scr_reset
Inputs : None.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : None.
Common : None.
Restrictions:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
Side effects: None.
Category : Utilities, User_interface
Prev. Hist. :
Written by Michael R. Greason, STX, May 1990.
Written : Michael R. Greason, GSFC/UIT (STX), May 1990
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version : Version 1, 29 March 1994
[Previous]
[Next]
NAME:
SCR_RESET
PURPOSE:
To reset the terminal.
CALLING SEQUENCE:
scr_reset
INPUTS:
None.
OUTPUTS:
None.
SIDE EFFECTS:
None.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name :
SCR_SCROLL
Purpose :
Defines the scrolling area on the screen.
Explanation :
To define the scrolling area on the screen. Please note that the
line coordinates should be counted from 1.
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
Use :
scr_scroll [, top, bot]
Inputs :
top -- The line to be the top of the scrolling area.
The default value is 1 and the maximum value is 23.
bot -- The line to be the bottom of the scrolling area.
The default value is 24 and the minimum value is 2.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : None.
Common : None.
Restrictions:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
Side effects:
NOTE: The screen coordinate system is NOT effected. (1,1) is not
the top of the scrolling area but the top of the screen.
Category : Utilities, User_interface
Prev. Hist. :
Written by Michael R. Greason, STX, May 1990.
Written : Michael R. Greason, GSFC/UIT (STX), May 1990
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version : Version 1, 29 March 1994
[Previous]
[Next]
NAME:
SCR_SCROLL
PURPOSE:
Define the scrolling area on the screen.
EXPLANATION:
Please note that the line coordinates should be counted from 1.
CALLING SEQUENCE:
scr_scroll [, top, bot]
INPUTS:
top -- The line to be the top of the scrolling area.
The default value is 1 and the maximum value is 23.
bot -- The line to be the bottom of the scrolling area.
The default value is 24 and the minimum value is 2.
OUTPUTS:
None.
SIDE EFFECTS:
NOTE: The screen coordinate system is NOT effected. (1,1) is not
the top of the scrolling area but the top of the screen.
RESTRICTIONS:
This procedure will only work with DEC compatible equipment (or
terminal emulators).
PROCEDURE:
A string containing the appropriate DEC terminal command is put
together and printed. NOTE: In general, the DEC commands correspond
to the ANSI escape sequences.
MODIFICATION HISTORY:
Written by Michael R. Greason, STX, May 1990.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Name: scratch
Purpose: manage scratch files (names, auto-delete, units,...)
(compatible with VMS/Unix)
Input Parameters:
u0, u1, ... u9 ;if defined on input, log units to close and delete
Output Parameters:
u0, u1, ... u9 ;if undefined, logical units assigned during open
Keyword Parameters:
nodelete - (input) dont delete on close (default is to delete)
cleanup - (input) deletes all scratch generated files (even old stuff)
open - (input) force open mode (default if u0 present and undefined)
close - (input) force close mode (default if u0 present and defined)
names - (output) scratch file names acted upon (open/close/delete)
file - (input) use this name, not system derived
landscape - (Input) pass to 'sprint' if /print selected
Calling Sequence:
scratch,u1,u2,u3 ; if parameters undefined, open 3 scratch files
; if parameters defined, close/delete files
Calling Examples:
scratch, u1, u2, u3, /open ; open 3 files, return luns in u1, u2, u3
scratch, u1, u2, /close ; close and delete files open w/luns u1/u2
scratch, u2, /print ; same, but print before deleting
scratch, u1, /nodelete ; close, dont delete
scratch, u1, u2 ; if u1 is undfined: open 2 files
(same as scratch, u1, u2 ,/open)
if u1 is defined, close/delete 2 files
(same as scratch, u1, u2, /close)
scratch, u1, name=name ; return system derived file name used
scratch ; close/delete all open scratch files
scratch,/cleanup ; same plus any old scratch files from
scratch,/clean,/nodel,name=name ; new and old scratch file names
scratch,u1,file='fname',/open ; opens fname
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DPRINT, LPRINT, concat_dir [4]
CALLED BY:
F0READ, RICE, prstr [1], prstr [2], teambb [1], teambb [2]
Restrictions:
uses execute statement, so no recursion allowed
if user supplies file names (with file= keyword), then some
auto-mangagement functions are lost (ex: /cleanup function)
History: slf, 3-March-1993
slf, 1-jun-93 ; dont force file in home directory
slf, 3-jun-93 ; openw not openu
slf, 7-oct-97 ; add /CONTINUE,
[Previous]
[Next]
NAME:
SCREEN_SELECT
PURPOSE:
Allow a user to make an interactive screen selection from a list
EXPLANATION:
This procedure determines whether to use the dumb terminal version,
or the widget version by examining the !D.NAME system variable.
CALLING SEQUENCE:
screen_select, selections, iselected, comments, command_line, only_one
INPUTS:
selections - string array giving list of items that can be
selected.
OPTIONAL INPUTS:
comments - comments which can be requested for each item in
array selections. It can be:
string array - same length as array selections.
null string - no comments available
scalar string - name of a procedure which will
return comments. It will take selections
as its first argument and return comments
as its second argument.
command_line - optional command line to be placed at the bottom
of the screen. It is usually used to specify what the
user is selecting.
only_one - integer flag. If set to 1 then the user can only select
one item. The routine returns immediately after the first
selection is made.
OUTPUTS:
iselected - list of indices in selections giving the selected
items.
OPTIONAL OUTPUT KEYWORD:
COUNT - Integer scalar giving the number of selections made
CALLS: ***
SELECT_O [1], SELECT_O [2], SELECT_O [3], SELECT_W [1], SELECT_W [2], SELECT_W [3]
SELECT_X
CALLED BY:
DBOPEN [1], DBOPEN [2], DBOPEN [3], DB_ITEM [1], DB_ITEM [2], DB_ITEM [3]
SIDE EFFECTS:
The obsolete system variable !err is set to the number of selections
PROCEDURE:
The actual processing is farmed out to different procedures depending
on the terminal type.
Widget Terminal ==> SELECT_W.PRO
VT100 Terminal ==> SELECT_O.PRO
HISTORY:
Written by M. Greason, STX, May 1990.
Added widget support W. Landsman January, 1992
Remove X window but no widget option November, 1994
Converted to IDL V5.0 W. Landsman September 1997
Added COUNT keyword, deprecate !ERR W. Landsman March 2000
[Previous]
[Next]
NAME:
SCREEN_SELECT
PURPOSE:
Allow a user to make an interactive screen selection from a list
EXPLANATION:
This procedure determines whether to use the dumb terminal version,
or the widget version by examining the !D.NAME system variable.
CALLING SEQUENCE:
screen_select, selections, iselected, comments, command_line, only_one
INPUTS:
selections - string array giving list of items that can be
selected.
OPTIONAL INPUTS:
comments - comments which can be requested for each item in
array selections. It can be:
string array - same length as array selections.
null string - no comments available
scalar string - name of a procedure which will
return comments. It will take selections
as its first argument and return comments
as its second argument.
command_line - optional command line to be placed at the bottom
of the screen. It is usually used to specify what the
user is selecting.
only_one - integer flag. If set to 1 then the user can only select
one item. The routine returns immediately after the first
selection is made.
OUTPUTS:
iselected - list of indices in selections giving the selected
items.
OPTIONAL OUTPUT KEYWORD:
COUNT - Integer scalar giving the number of selections made
CALLS: ***
SELECT_O [1], SELECT_O [2], SELECT_O [3], SELECT_W [1], SELECT_W [2], SELECT_W [3]
SELECT_X
CALLED BY:
DBOPEN [1], DBOPEN [2], DBOPEN [3], DB_ITEM [1], DB_ITEM [2], DB_ITEM [3]
SIDE EFFECTS:
The obsolete system variable !err is set to the number of selections
PROCEDURE:
The actual processing is farmed out to different procedures depending
on the terminal type.
Widget Terminal ==> SELECT_W.PRO
VT100 Terminal ==> SELECT_O.PRO
HISTORY:
Written by M. Greason, STX, May 1990.
Added widget support W. Landsman January, 1992
Remove X window but no widget option November, 1994
Converted to IDL V5.0 W. Landsman September 1997
Added COUNT keyword, deprecate !ERR W. Landsman March 2000
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
SEC2DHMS()
PURPOSE:
Convert time in sec to string in 'xxDxxHxxMxxS' (DHMS) format
CATEGORY:
Utility
SYNTAX:
Result = sec2dhms(seconds)
INPUTS:
SECONDS - Integer scalar, time in seconds
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - String scalar, time string in DHMS format (if an
error occurs, a null string is returned)
OPTIONAL OUTPUTS:
None.
KEYWORDS:
UPPER - Uppercase the returned time string
ERROR - Error message returned; a null string if no error
CALLED BY:
CDS_PLAN_BRIEF, EIS_CAT [1], EIS_CAT [2], EIS_CPT_DATA_RATE [1]
EIS_CPT_DATA_RATE [2], MK_CDS_PLAN, MK_SOHO_TARGET, SHOW_RES_STC
SOHO_ITEMS_HTML, XCAT, XSTUDY, eis_ct_summary_gui [1], eis_ct_summary_gui [2]
eis_format_duration [1], eis_format_duration [2]
eis_mk_raster_gui__define [1], eis_mk_raster_gui__define [2]
eis_mk_study_gui [1], eis_mk_study_gui [2], eis_raster_gui [1]
eis_raster_gui [2], eis_study_gui [1], eis_study_gui [2]
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
HISTORY:
Version 1, March 25, 1996, Liyun Wang, GSFC/ARC. Written
CONTACT:
Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
Project : SOHO - CDS
Name : SEC2UTC()
Purpose : Converts seconds since MJD=0 to CDS UTC time format.
Explanation : Used in the UTPLOT programs, this function converts elapsed
seconds since the zero time of MJD to CDS internal UTC format.
It takes no account of leap seconds. For more information on
various time formats, see file aaareadme.txt.
Use : IDL> str = sec2utc(tsec)
Inputs : tsec - variable with number of elapsed seconds
Opt. Inputs : None
Outputs : Function returns structure with .mjd and .time tags.
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 = ''
UTC = SEC2UTC( TSEC, ERRMSG=ERRMSG )
IF ERRMSG NE '' THEN ...
Calls : None
CALLED BY:
CDS_UTPLOT, DEF_CDS_UTPLOT, MK_GISPLOT_LBL, MK_GIS_PLT, eis_cpt_gui [1]
eis_cpt_gui [2], eis_dr_obj__DEFINE [1], eis_dr_obj__DEFINE [2]
eis_mk_plan_gui [1], eis_mk_plan_gui [2]
Common : None
Restrictions: No account of leap seconds.
Side effects: If an error is encountered and the ERRMSG keyword is set,
SEC2UTC returns a structure of value {mjd:0L,time:0L}.
Category : Util, time
Prev. Hist. : None
Written : C D Pike, RAL, 20-Apr-94
Modified : Version 1, C.D. Pike, RAL, 20 April 1994
Version 2, Donald G. Luttermoser, GSFC/ARC, 28 December 1994
Added the keyword ERRMSG. Added IDL ON_ERROR utility.
Note that there are no internally called procedures
that use the ERRMSG keyword.
Version 3, Donald G. Luttermoser, GSFC/ARC, 30 January 1995
Made error handling procedure more robust. Note that
this routine can handle both vectors and scalars as
input.
Version 4, CDP, 5-Dec-95 Made output structure of type
CDS_INT_TIME
Version : Version 4, 05-Dec-95
[Previous]
[Next]
Name: secchi_time2files
Purpose: return secchi files for user time/timerange
Input Paramters:
time0 - time or start time of range
time1 - stop time of range
Keyword Parameters:
level - processing level - default= Zero aka 0
pb - switch - if set, playback data is considered
rt - switch - if set, real time data is considered
pattern - optional file pattern - default = *fts
euvi, cor1, cor2, hi1, hi2 - mutually exclusive instrument - def = euvi
a,b - probably obvious - default = /a
dtype - "type" of data returned, def='img' - tbd...
parent - top level directory - if not supplied, use '$SSW_SECCHI_DATA'
Calling Sequence:
IDL> secfiles=secchi_time2files(t0,t1 [,level=#] $
[,/a] -or [,/b] [,/rt] -or- [,/pb] $
[,/corN] -or- [,/hiN] -or- [,/euvi]
Calling Examples:
IDL> euvi=secchi_time2files('4-dec-2006','5-dec-2006',/pb) ; def=euvi/a - fits
IDL> cor1=secchi_time2files('4-dec-2006','5-dec-2006',/rt,/b,/cor1)
History:
4-dec-2006 - S.L.Freeland - celebrate SECCHI first light
in the mold of xxx_time2files.pro suite
Method:
set up call to 'ssw_time2filelist' based on user time+keywords
(which calls 'ssw_time2paths')
CALLS: ***
ARR2STR [1], Arr2Str [2], FILE_EXIST [2], GET_DELIM, data_chk [1], data_chk [2]
file_exist [1], file_exist [3], get_logenv [1], get_logenv [2]
ssw_time2filelist
Restrictions:
dtype and pattern not yet explored; assume FITS images are desired for today
[Previous]
[Next]
NAME:
SECHMS
PURPOSE:
Seconds after midnight to h, m, s, numbers and strings.
CATEGORY:
CALLING SEQUENCE:
sechms, sec, h, [m, s, sh, sm, ss]
INPUTS:
sec = seconds after midnight. in
KEYWORD PARAMETERS:
OUTPUTS:
h, m, s = Hrs, Min, Sec as numbers. out
sh, sm, ss = Hrs, Min, Sec as strings out
(with leading 0s where needed).
CALLED BY:
DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3]
COMMON BLOCKS:
NOTES:
MODIFICATION HISTORY:
Written by R. Sterner, 17 Nov, 1988.
Johns Hopkins University Applied Physics Laboratory.
R. Sterner, 27 Sep, 1993 --- modified to handle arrays.
Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
[Previous]
[Next]
NAME:
sel_filetimes
PURPOSE:
To select the files within a time range (assuming the file
date/time is in the filename in YYMMDD.HHMM format
SAMPLE CALLING SEQUENCE:
files = sel_filetimes('1-jun','1-jul',files)
dirs = file_list('/data14/mdi_summary/daily/maglc', '*')
files = sel_filetimes('1-jun','1-jul',dir=dirs, filter='*.fts')
files = sel_filetimes(closest='1-jul',dir=dirs, filter='*maglc_re*')
INPUTS:
sttim - the starting date/time
entim - the ending date/time
INPUT/OUTPUT:
files - The full list of files to search through. It is output
if it is not defined coming in
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], anytim2ints [1], anytim2ints [2]
break_file [4], fid2ex [1], fid2ex [2], file_list [1], file_list [2]
sel_timrange [1], sel_timrange [2]
CALLED BY:
QUICKSTRAY [2], TR_DARK_SUB, TR_FLAT_SUB, edac_summary, get1hk_info [1]
get1hk_info [2], get_epoch_sfcs [1], get_epoch_sfcs [2], hxt_impulsivness
new_edac_summary, rd_fdss, rd_raw_station_plan, ssc_files [1], ssc_files [2]
ssc_files [3], sxt_files, tr_rd_index, tr_rd_inventory, yohkoh_files
OPTIONAL KEYWORD INPUT:
dir - The director(ies) to search
filter - The wildcard filter to use to select files in the
directories
one_before- If set, then get the file which immediately PRECEDES
the input time (used when file times are the START time
of a block of data).
append - If set, append that string to the end of the file
name (ie: '_0000' to get FILE2TIME to work)
strrep - If set, it must be a two element string array. A string
substitution is done to trick FILE2TIME
position- The starting position of the YYMMDD.HHMM string. It is
derived by looking for the charcter "9" otherwise.
** OBSOLETE since 14-Oct-97 **
RESTRICTION:
All file names must be of the same form
HISTORY:
Written 30-Aug-96 by M.Morrison
14-Oct-97 (MDM) - Modified to use Freeland FILE2TIME
- Added option CLOSEST and DELTA
11-Nov-97 (MDM) - Added /ONE_BEFORE
[Previous]
[Next]
NAME:
sel_timrange
PURPOSE:
Given a range of times (or a single time) and a time array, return the
subscripts of the times between the selected time range. If /BOOLEAN,
then return a bytarr the length of the input marking where within range.
SAMPLE CALLING SEQUENCE:
ss = sel_timrange(timarr, st_tarr, en_tarr)
ss = sel_timrange(timarr, st_tarr, en_tarr, /between)
ss = sel_timrange(roadmap, '1-nov-91 22:00', '1-nov-91 22:30')
ist = sel_timrange(neworb_p, st_tarr, st_before1st=st_before1st)
ien = sel_timrange(neworb_p, en_tarr, en_afterlast=en_afterlast, /after)
INPUT:
timarr - An array of times
st_tarr - The specified start time
OPTIONAL INPUT:
en_tarr - The specified end time. If it is not passed, then the
start time is used (time range of 0 seconds)
CALLS: ***
anytim2ints [1], anytim2ints [2], int2secarr [1], int2secarr [2]
CALLED BY:
GET_SUNCENTER [1], GET_SUNCENTER [2], IRUHXA2SXT, IRUHXASCAN2SXT [1]
IRUHXASCAN2SXT [2], IRU_S2Y, SXT_BAKEOUT_IN, SXT_OBSRPT, Sxt_goes_teem
ads_into_att, atr2hxa_dbase, cdrom_files [2], choose_interval, contact_num [1]
contact_num [2], eit_files, eit_proton_summary, get_acedata, get_selsis
get_utevent [1], get_utevent [2], goes3sec_copy, goes_widget, gtab_summary
hkplot_info, lapalma_cat, lapalma_files, lasco_time2file, les_archive_info
mdi_cat, mdi_files, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sfc [1], mk_sfc [2]
mk_sft [1], mk_sft [2], pr_pnt_hist, pr_visible, rd_fdss, rd_goes_fits
rd_goesp_ascii, rd_goesx_ascii, rd_guf_ascii, rd_old_obs, rd_raw_station_plan
rd_sxa, rd_sxc, rd_sxl, rd_sxtgoes, rd_therm_rs232, rd_week_file [1]
rd_week_file [2], rd_week_file [3], rd_week_file [4], read_genxcat, ref_term [2]
res_freq, search_obs, sel_dc_image [1], sel_dc_image [2], sel_dc_image [3]
sel_filetimes [1], sel_filetimes [2], sel_leak_image [1], sel_leak_image [3]
sel_leak_image [4], show_contacts, sooncat_cadence, ssw_getdst, sswdb_files
sxi_files, sxt_imgtypes, term_times, timeline2html, tr_rd_index, weekid [2]
wrt_fits_bin_exten [2], ydb_exist [2], yohkoh_legacy_files [1]
yohkoh_legacy_files [2]
OPTIONAL KEYWORD INPUT:
between - The default is to give the last entry before the start time.
This is because the input time is usually a pointer (or file name)
with the time of the start of the orbit. So the selection
desired is needs to back up one element in the timarr. This
is only done when the input start time does not exactly match the
"timarr" value.
after - If set, get the first dataset after the input time range
boolean - If set, then return an array the same length as the input, and
set all values within the range to 1.
OPTIONAL KEYWORD OUTPUT:
st_before1st - If set, then the input start time is before the first time
in "timarr"
en_afterlast - If set, then the input end time is after the last time
in "timarr"
HISTORY:
Written Oct-92 by M.Morrison
29-Oct-92 (MDM) - Corrected an error in "en_afterlast" determination
30-Oct-92 (MDM) - Added /AFTER which corrected for a problem
with the RD_PNT logic
[Previous]
[Next]
Project : SOHO - CDS
Name :
SELECT_BOX
Purpose :
Interactive selection of a box on the graphics display.
Explanation :
If the graphics device is windows based, then BOX_CURSOR is used.
Otherwise, the user is prompted to enter two corners of the box.
Note that the parameter list for SELECT_BOX is in a different order
than BOX_CURSOR. However, it was decided to order the parameters this
way to be compatible with the SERTS image display routines.
Use :
SELECT_BOX, MX, MY, IX, IY
Inputs :
None.
Opt. Inputs :
None.
Outputs :
MX, MY = Size of selected box, in device coordinates.
IX, IY = Coordinates of lower left-hand corner of selected box.
Opt. Outputs:
None.
Keywords :
DATA = If this keyword is set, then the values are in returned in
data coordinates instead of device coordinates.
The following keywords are only relevant when used on a graphics device
that supports windows:
INIT = If this keyword is set, MX, MY, and IX, IY contain the
initial parameters for the box.
FIXED_SIZE = If this keyword is set, MX and MY contain the initial size
of the box. This size may not be changed by the user.
Calls : ***
BOX_CRS, BOX_CURSOR, HAVE_WINDOWS [1], HAVE_WINDOWS [2]
CALLED BY:
COLOR_BAR, TVBOXCRS, XTV
Common :
None.
Restrictions:
None.
Side effects:
None.
Category :
Utilities, User_interface.
Prev. Hist. :
William Thompson, May 1992.
William Thompson, Nov 1992, added DATA keyword.
Written :
William Thompson, GSFC, May 1992.
Modified :
Version 1, William Thompson, GSFC, 30 April 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 25 June 1993.
Changed to call BOX_CRS for MSWindows, BOX_CURSOR otherwise.
Added INIT and FIXED_SIZE keywords.
Version :
Version 2, 25 June 1993.
[Previous]
[Next]
NAME:
SELECT_O
PURPOSE:
Dumb-terminal routine to let a user interactively select from a list
EXPLANATION:
This is the non-widget version of SCREEN_SELECT
CALLING SEQUENCE:
select_o, selections, iselected, comments, command_line, only_one, $
[ COUNT = ]
INPUTS:
selections - string array giving list of items that can be
selected.
OPTIONAL INPUTS:
comments - comments which can be requested for each item in
array selections. It can be:
string array - same length as array selections.
null string - no comments available
scalar string - name of a procedure which will
return comments. It will take selections
as its first argument and return comments
as its second argument.
command_line - optional command line to be placed at the bottom
of the screen. It is usually used to specify what the
user is selecting.
only_one - integer flag. If set to 1 then the user can only select
one item. The routine returns immediately after the first
selection is made.
OUTPUTS:
iselected - list of indices in selections giving the selected
items.
OPTIONAL OUTPUT KEYWORD:
COUNT - Integer scalar giving the number of selections
CALLS: ***
READ_KEY [1], READ_KEY [2], READ_KEY [3], SCR_ATTRIB [1], SCR_ATTRIB [2]
SCR_ATTRIB [3], SCR_CURPOS [1], SCR_CURPOS [2], SCR_CURPOS [3], SCR_ERASE [1]
SCR_ERASE [2], SCR_ERASE [3], SCR_OTHER [1], SCR_OTHER [2], SCR_OTHER [3]
CALLED BY:
SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
SIDE EFFECTS:
The obsolete system variable !err is set to the number of selections
HISTORY:
version 1, D. Lindler April 88.
modified to IDL V2 (from screen_select). M. Greason, May 1990.
changed name from screen_select_o W. Landsman January 1993
Converted to IDL V5.0 W. Landsman September 1997
Added COUNT keyword, deprecate !ERR W. Landsman March 2000
[Previous]
[Next]
NAME:
SELECT_O
PURPOSE:
Dumb-terminal routine to let a user interactively select from a list
EXPLANATION:
This is the non-widget version of SCREEN_SELECT
CALLING SEQUENCE:
select_o, selections, iselected, comments, command_line, only_one, $
[ COUNT = ]
INPUTS:
selections - string array giving list of items that can be
selected.
OPTIONAL INPUTS:
comments - comments which can be requested for each item in
array selections. It can be:
string array - same length as array selections.
null string - no comments available
scalar string - name of a procedure which will
return comments. It will take selections
as its first argument and return comments
as its second argument.
command_line - optional command line to be placed at the bottom
of the screen. It is usually used to specify what the
user is selecting.
only_one - integer flag. If set to 1 then the user can only select
one item. The routine returns immediately after the first
selection is made.
OUTPUTS:
iselected - list of indices in selections giving the selected
items.
OPTIONAL OUTPUT KEYWORD:
COUNT - Integer scalar giving the number of selections
CALLS: ***
READ_KEY [1], READ_KEY [2], READ_KEY [3], SCR_ATTRIB [1], SCR_ATTRIB [2]
SCR_ATTRIB [3], SCR_CURPOS [1], SCR_CURPOS [2], SCR_CURPOS [3], SCR_ERASE [1]
SCR_ERASE [2], SCR_ERASE [3], SCR_OTHER [1], SCR_OTHER [2], SCR_OTHER [3]
CALLED BY:
SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
SIDE EFFECTS:
The obsolete system variable !err is set to the number of selections
HISTORY:
version 1, D. Lindler April 88.
changed name from screen_select_o W. Landsman January 1993
Added COUNT keyword, deprecate !ERR W. Landsman March 2000
Remove VMS code W. Landsman September 2006
[Previous]
[Next]
NAME:
SELECT_W
PURPOSE:
Create a non-exclusive widget menu of items
EXPLANATION:
More than one item may be selected or 'de-selected'.
Normally called by SCREEN_SELECT
CALLING SEQUENCE:
SELECT_W, items ,iselected, [ comments, command_line, only_one ]
INPUTS:
items - string array giving list of items that can be
selected.
OPTIONAL INPUTS:
comments - comments which can be requested for each item in
array selections. NOT YET IMPLEMENTED
command_line - optional command line to be placed at the bottom
of the screen. It is usually used to specify what the
user is selecting.
only_one - integer flag. If set to 1 then the user can only select
one item. The routine returns immediately after the first
selection is made.
OPTIONAL KEYWORD INPUT
SELECTIN - vector of items to be pre-selected upon input (not used for
only_one option)
OUTPUT:
iselected - list of indices in selections giving the selected
items.
OPTIONAL OUTPUT KEYWORD:
COUNT - Integer scalar giving the number of items selected
CALLS: ***
SELECT_W_EVENT, XMANAGER, XMENU [1], XMENU [2]
CALLED BY:
SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
COMMON BLOCKS:
SELECT_W - Used to communicate with the SELECT_W_EVENT procedure
MODIFICATION HISTORY:
Written, K. Venkatakrishna & W. Landsman, Hughes/STX January, 1992
Widgets made MODAL. M. Greason, Hughes STX, 15 July 1992.
Changed handling of MODAL keyword for V5.0 W.Thompson September 1997
Converted to IDL V5.0 W. Landsman September 1997
Added selectin keyword D. Lindler 01/12/99
[Previous]
[Next]
NAME:
SELECT_W
PURPOSE:
Create a non-exclusive widget menu of items
EXPLANATION:
More than one item may be selected or 'de-selected'.
Normally called by SCREEN_SELECT
CALLING SEQUENCE:
SELECT_W, items ,iselected, [ comments, command_line, only_one ]
INPUTS:
items - string array giving list of items that can be
selected.
OPTIONAL INPUTS:
comments - comments which can be requested for each item in
array selections. NOT YET IMPLEMENTED
command_line - optional command line to be placed at the bottom
of the screen. It is usually used to specify what the
user is selecting.
only_one - integer flag. If set to 1 then the user can only select
one item. The routine returns immediately after the first
selection is made.
OPTIONAL KEYWORD INPUT
SELECTIN - vector of items to be pre-selected upon input (not used for
only_one option)
OUTPUT:
iselected - list of indices in selections giving the selected
items.
OPTIONAL OUTPUT KEYWORD:
COUNT - Integer scalar giving the number of items selected
CALLS: ***
SELECT_W_EVENT, XMANAGER, XMENU [1], XMENU [2]
CALLED BY:
SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
COMMON BLOCKS:
SELECT_W - Used to communicate with the SELECT_W_EVENT procedure
MODIFICATION HISTORY:
Written, K. Venkatakrishna & W. Landsman, Hughes/STX January, 1992
Widgets made MODAL. M. Greason, Hughes STX, 15 July 1992.
Changed handling of MODAL keyword for V5.0 W.Thompson September 1997
Converted to IDL V5.0 W. Landsman September 1997
Added selectin keyword D. Lindler 01/12/99
[Previous]
[Next]
Project:
SDAC
NAME:
select_widg
PURPOSE:
Display an ASCII list using widgets and the widget manager.
Select a line of the text.
CATEGORY:
Widgets.
CALLING SEQUENCE:
line = select_widg(list)
or
index= select_widg(list, /index)
INPUTS:
LIST A string array to be displayed in the widget.
KEYWORD PARAMETERS:
INDEX: If set, the index of the selected line is returned.
FONT: The name of the font to use. If omitted use the default
font.
GROUP: The widget ID of the group leader of the widget. If this
keyword is specified, the death of the group leader results in
the death of SELECT_WIDG.
HEIGHT: The number of text lines that the widget should display at one
time. If this keyword is not specified, 24 lines is the
default.
TITLE: A string to use as the widget title rather than the file name
or "select_widg".
WIDTH: The number of characters wide the widget should be. If this
keyword is not specified, 80 characters is the default.
OUTPUTS:
Returns the selected line from the display, unless the keyword index is set.
Returns null string if nothing selected or -1 for the index.
KEYWORD PARAMETERS:
INDEX: The index of the selected line from the string array.
CALLS: ***
CHECKVAR [1], FCHECK, SELECT_WIDG_EVT, XMANAGER, checkvar [2]
CALLED BY:
CAL_SHER, SPEX_SAVE_DATA [1], SPEX_SAVE_DATA [2]
SIDE EFFECTS:
Triggers the XMANAGER if it is not already in use.
RESTRICTIONS:
None.
PROCEDURE:
Create a list widget and select from its contents.
MODIFICATION HISTORY:
modified from xdisplayfile by richard.schwartz@gsfc.nasa.gov, 5-jul-94
[Previous]
[Next]
Project : SOHO - CDS
Name : SELECT_WINDOWS
Purpose : Select the windows display depending on OS
Category : Class4, Display, OS
Explanation : Select the appropriate windows display depending on the
operating system, for example before running a widgets program
such as XDOC. If the current graphics display already supports
windows, then do nothing. Use SETPLOT to retain information
about the current graphics device.
Syntax : SELECT_WINDOWS
CALLED BY:
DAT2GIF, FIT2GIF, HESSI, MK_CDS_PLAN, MK_STUDY, X2GIF, X2JPEG, X2PS, XCAMP, XCAT, XCPT, XDOC
XLIST, XPORT, XSTRUCT, XSTUDY, plotman
Examples : DSAVE = !D.NAME
SELECT_WINDOWS
... widget software ...
IF !D.NAME NE DSAVE THEN SETPLOT, DSAVE
Inputs : None.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : ***
HAVE_WINDOWS [1], HAVE_WINDOWS [2], OS_FAMILY, SETPLOT [1], SETPLOT [2]
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 23-Oct-1997, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Project : SOHO - CDS
Name :
SELECT_X
Purpose :
Allos interactive screen selection from X-windows device.
Explanation :
Routine to allow a user to make an interactive screen selection
from a list (array) of strings. This assumes an x-windows device.
Use :
select_x, selections, iselected, comments, command_line, only_one
Inputs :
selections - string array giving list of items that can be
selected.
Opt. Inputs :
comments - comments which can be requested for each item in
array selections. It can be:
string array - same length as array selections.
null string - no comments available
scalar string - name of a procedure which will
return comments. It will take selections
as its first argument and return comments
as its second argument.
command_line - optional command line to be placed at the bottom
of the screen. It is usually used to specify what the
user is selecting.
only_one - integer flag. If set to 1 then the user can only select
one item. The routine returns immediately after the first
selection is made.
Outputs :
iselected - list of indices in selections giving the selected
items.
Opt. Outputs: None.
Keywords : None.
Calls : ***
FILEPATH, READ_KEY [1], READ_KEY [2], READ_KEY [3], REVERSE
CALLED BY:
SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
Common : None.
Restrictions:
The screen must be X-windows compatible.
As of Mar 91, the comments option does not appear to be working
Side effects:
!err is set to the number of selections made
A window is opened and closed.
Category : Utilities, User_interface
Prev. Hist. :
version 1, D. Lindler April 88.
modified to IDL V2 (from screen_select). M. Greason, May 1990.
Changed name from screen_select_x W. Landsman January 1993
Removed RETAIN = 2, not needed W. Landsman May 1993
Written : D. Lindler, GSFC/HRS, April 1988
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version : Version 1, 29 March 1994
[Previous]
[Next]
Project : SOHO - CDS
Name : SEND_MAIL
Purpose : to e-mail a file or array
Category : Device
Explanation : checks operating system and spawns the appropriate
command.
Syntax : IDL> send_mail,file,address,array=array
Inputs : FILE = filename to mail
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : ERR - error message
ADDRESS = address to send to (e.g., zarro@smmdac)
ARRAY - alternative string array to print
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], ESPAWN, FILE_OR_STRING, OS_FAMILY, RM_FILE
STR2FILE
CALLED BY:
CHECK_KAP, FTP_SYNOP, GET_NOAA, UPDATE_SOHO_TARGETS, XMAIL
Common : None
Restrictions: None
Side effects: File deleted when /DEL set
History : Version 1, 4-Sep-1995, D.M. Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name : SEND_PRINT
Purpose : to print a file or array in a device independent way
Category : Device
Explanation : checks operating system and spawns the appropriate
command.
Syntax : IDL> send_print,file,queue=queue,qual=qual,array=array
CALLED BY:
FIND_DURATION, LIST_DURATION, MK_CDS_PLAN, XPRINT [2], XPRINT [5], text_output
Example: : send_print,'test.doc',queue='soho-laser1',qualifier='h'
Inputs : FILE = filename to print
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : QUEUE = Printer queue name [default = '']
QUALIFIER = Qualifier to the print statement [default = '']
DELETE = Set to delete file when done.
ERR = Error message.
ARRAY = Alternative string array to print
DEVICE = set to use DEVICE,/CLOSE for .ps files
CALLS: ***
CHKLOG [1], CHKLOG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, ESPAWN
FILE_OR_STRING, OS_FAMILY, RM_FILE, STR2FILE, TRIM, is_open, is_ps
Common : None
Restrictions: Print queues must exist
Side effects: File deleted when /DELETE set
History : Version 1, 4-Sep-1995, D.M. Zarro. Written
Version 2, 17-May-1996, William Thompson, GSFC
Changed QUE and QUAL keywords to their full names. The
abbreviations can still be used
Modified, 1-May-2000, Zarro (SM&A/GSFC) - added check
for Postscript file
1-Aug-2000, Kim Tolbert. Didn't quite work for Windows OS.
For Windows, use 'copy /b filename queue' command. If queue not
passed in, use PSLASER env var.
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
SEP_FILENAME
PURPOSE:
Separates a filename into its component parts.
EXPLANATION:
Given a file name, break the filename into the parts of disk/logical,
the directory, the filename, the extension, and the file version
(for VMS). The difference of this routine from break_file are:
1) It handles only one filename (instead of an array); 2) file
extention will not include the "." character, and it may be a
string array if the file extension can be further broken into more
parts (separated by the "." character).
CALLING SEQUENCE:
SEP_FILENAME, file, disk_log, dir, filnam, ext, fversion, node
INPUTS:
FILE - The file name
OPTIONAL INPUTS:
None.
OUTPUTS:
DISK_LOG- The disk or logical (looks for a ":")
This is generally only valid on VMS machines
DIR - The directory
FILNAM - The filename (excluding the ".")
EXT - The filename extension (NOT including the ".")
FVERSION- The file version (only VMS)
NODE - The Node name (only VMS)
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
None.
CALLS: ***
STR_SEP
CALLED BY:
ITOOL_RD_FITS, RD_IMAGE_FITS
COMMON BLOCKS:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written December 12, 1994, Liyun Wang, NASA/GSFC
MODIFICATION HISTORY:
VERSION:
Version 1, December 12, 1994
[Previous]
[Next]
PROJECT:
SOHO - CDS
NAME:
SET_CURSOR_SHAPE
PURPOSE:
Widget interface to set cursor size interactively
EXPLANATION:
CALLING SEQUENCE:
set_cursor_shape, xx, yy [, unit] [, csi=csi] [,status=status]
INPUTS:
None required.
OPTIONAL INPUTS:
XX - Cursor width in device pixels
YY - Cursor height in device pixels
CURSOR_UNIT - Unit to be used for the cursor size: 1 for device pixels,
2 for image pixels, and 3 for arc seconds. If this
parameter is not passed in, device pixels will be assumed
CSI - Coordinate system info structure, used to detect if the unit
of arc seconds can be used
OUTPUTS:
XX - New cursor width
YY - new cursor height
CURSOR_UNIT - New unit to be used for the cursor size
OPTIONAL OUTPUTS:
STATUS - Operation indicator: 1 for accept, 0 for cancel
KEYWORD PARAMETERS:
None.
CALLS: ***
CW_FIELD, GET_DFONT [1], GET_DFONT [2], NUM_CHK, SETTING_SIZE_EVENT
SET_CURSOR_SIZE, XACK, XKILL, XMANAGER, XMENU [1], XMENU [2]
COMMON BLOCKS:
CURSOR_SIZE - Internal common block
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
CATEGORY:
PREVIOUS HISTORY:
Written May 4, 1995, Liyun Wang, NASA/GSFC
MODIFICATION HISTORY:
Version 1, created, Liyun Wang, NASA/GSFC, May 4, 1995
Version 2, February 26, 1996, Liyun Wang, NASA/GSFC
Allowed min value of slider widget to be 1 (previous was 10)
VERSION:
Version 2, February 26, 1996
[Previous]
[Next]
Name: set_fastpath
Purpose: use ys environmentals and path file to do fast path setup
Output:
function returns string in !path format
Optional Keyword Parameters:
arr - switch, if set, return as array, not delimited string
Calling Examples:
!path=set_fastpath() ; update IDL !path
parr =set_fastpath(/arr) ; array version
History:
21-Apr-93 (SLF) - to hide temp variables during IDL_STARTUP
10-oct-93 (slf) - allow '/ys/' <==> getenv('ys') for uniq check
29-Jun-94 (SLF) - dont eliminate astronomy library during fast start
30-Jun-94 (SLF) - dont add non-existant paths
CALLS: ***
ARR2STR [1], Arr2Str [2], STR2ARR [1], STR2ARR [2], rem_elem [1], rem_elem [2]
uniqo [1], uniqo [2]
Restrictions:
This routine must be in path already! UNIX only for today
[Previous]
[Next]
NAME:
set_font
PURPOSE:
To change the font size for X windows and widgets
SAMPLE CALLING SEQUENCE:
set_font
set_font, 12
set_font, 12, /xonly
OPTIONAL INPUT:
size - The font size to find the closest match to
OPTIONAL KEYWORD:
x_only - If set, only change X device
widget_only - If set, only change widget
CALLS: ***
get_xfont [1], get_xfont [2]
CALLED BY:
favviewer
HISTORY:
Written 6-Nov-96 by M.Morrison
[Previous]
[Next]
Project:
SDAC
NAME:
SET_GRAPHICS
PURPOSE:
This procedure sets screen and hardcopy output graphic devices for use with the
TEK_INIT, TEK_PRINT, and TEK_END procedures (which now
handle both Tektronix and PostScript format).
CATEGORY:
GRAPHICS
CALLING SEQUENCE:
SET_GRAPHICS[,SCREEN=SCREEN,PRINTER=PRINTER,ERROR=ERROR,QUERY=QUERY, $
HELP=HELP]
CALLS: ***
CHECKVAR [1], CHKLOG [1], CHKLOG [2], STR_SEP, XDEVICE, checkvar [2]
INPUTS:
None.
KEYWORDS:
SCREEN: Screen device type. Options are 'TEK', 'REGIS', 'X',
and 'Z', 'NULL'. On return, SCREEN contains the screen
device type selected. Default is X in X-windows, MAC for
MacOS, Win for WINDOWS
machines, TEK otherwise.
PRINTER: Printer device type. Options are 'TEK' and 'PS'.
On return PRINTER contains the printer device type
selected. Default is PS.
ERROR: 0/1 means no error / error
QUERY: 0/1 means prompt/don't prompt user for device types
(only for device not selected via SCREEN or PRINTER
keyword)
HELP: =1 means print current selection of device types on
screen.
CALLED BY:
DO_ARCHIVEPLOTS, DO_PSPLOTS, DRAW_FLARE, FLDISPLAY, FS_ARCHIVE_DRAW, FS_AUTO_LOG
FS_GRAPH, FS_OVERLAY, HXARCHIVE, HXFITS, HXRBS, PLOTBATSE, PLOTBATSE_QL, QLDISPLAY
QL_DAY_PLOT, QL_ORBIT_PLOT, SELECT_DEV, TEK_INIT [1], TEK_INIT [2], batse_menu
COMMON BLOCKS:
TEK_COMMON.
PROCEDURE:
To make hardcopies of plots on Talaris 800, use IDL commands:
tek_init
plot commands ...
tek_end
tek_print
(tek_init calls set_graphics if you haven't called it explicitly)
Screen and printer device types are saved in sc_device and hard_device
in common tek_common.
MODIFICATION HISTORY:
Mod. 09/02/92 by AKT. Made PS the default for hard_device.
Mod. 05/06/96 by RCJ . Added documentation.
Version 3, richard.schwartz@gsfc.nasa.gov, 2-feb-1998.
Version 4, richard.schwartz@gsfc.nasa.gov, 5-apr-1998.; CONTACT:
Version 5, richard.schwartz@gsfc.nasa.gov, 10-nov-1999. set
screen device in common to WIN under Windows.
richard.schwartz@gsfc.nasa.gov
[Previous]
[Next]
NAME:
set_hard
PURPOSE:
set hard copy page parameters
CALLING SEQUENCE:
set_hard,orig,/port,/land,/send
INPUTS:
plabels = optional additional plot labels
OUTPUTS:
none
KEYWORDS:
/port = portrait mode
/land = landscape mode
/send = close existing file and send to printer
CALLS: ***
LZPLOT, MK_TEMP_FILE
CALLED BY:
BCS, FCS, FSDEF, PLOTFIT, WBDA [1], WBDA [2], WBSC [1], WBSC [2], WBSC_FPAR_EV [1]
WBSC_FPAR_EV [2], plot_bda, plotbrr, plotfda, plotfis
PROCEDURE:
set
MODIFICATION HISTORY:
May'94, written by DMZ (ARC)
[Previous]
[Next]
PROJECT:
SOHO - SUMER
NAME:
SET_LINE_COLOR
PURPOSE:
Define 11 different colors for the first 11 color indices
EXPLANATION:
This routine assigns 11 different colors to the first 11 color
indices. These color indices correspond to the following colors:
'black', 'white', 'yellow', 'red', 'green',
'blue', 'orange', 'purple', 'magenta', 'brown',
'turquoise'
The appearance of the actual color will depends on how many
colors are available in your display device. Generally
speaking, it will appear pretty close if more than 200 colors
are available.
CALLING SEQUENCE:
SET_LINE_COLOR
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORD PARAMETERS:
LIST - List (on the screen) numbers and names of line color defined
PREVIOUS HISTORY:
Written April 18, 1995, Liyun Wang, GSFC/ARC
CALLS: ***
LINECOLOR
CALLED BY:
MK_CDS_PLAN, MK_PLAN_FORM, MK_PLAN_PLOT, MK_SOHO, TKI_DISPLAY_DET, TKI_DRAW_POS
TKI_INIT_DISP, TKI_INIT_MEM, TKI_RESGRAPH, XSPECT, db_gbo, hsi_obs_times
MODIFICATION HISTORY:
Version 1, Liyun Wang, GSFC/ARC, April 18, 1995
Version 2, September 1, 1995, Liyun Wang, GSFC/ARC
Added LIST keyword
VERSION:
Version 2, September 1, 1995
[Previous]
[Next]
Name: set_logenv
Purpose: set environmental variable (unix) and logicals (vms)
(allow dynamic updates of Yohkoh environment)
Input Paramters:
logenv - string or string vector - unix environ or vms logical names
value - string or string vector - values to assign to logenv
Calling Examples:
set_logenv,'DIR_GEN_PNT',curdir() ; redefine PNT to current
set_logenv,file=concat_dir('$DIR_SITE_SETUP','setup_dirs')
Calls: ***
SETLOG, data_chk [1], data_chk [2], rd_tfile [1], rd_tfile [2]
CALLED BY:
CHANPHZCHEK, FS_OPEN [1], F_TH_NT, HESI_MENU, HESSI_DEV, HSI_MODEL_TO_SCORE
HSI_VCFILE_PACKET_RATE, Hsi_contact2fits [1], Hsi_contact2fits [2], choose_sfc
configure_http, get_pix, get_sirius [1], get_sirius [2], hessi_version
hsi_clk_delta_calc, hsi_do_qlook_image [1], hsi_do_qlook_image [2]
hsi_monthly_average, hsi_qlook_call_ospex [1], hsi_qlook_call_ospex [2]
hsi_switch, mo_patch, pref_super, printing [1], printing [2], rd_goesp_ascii
rd_goesx_ascii, read_trace, restenv [1], restenv [2], setssw_windows
ssw_instr_info, ssw_set_instr, ssw_setsswdb_gen, ssw_setup_windows
ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup, sswdb_upgrade
sxt_patch_att, sxt_prep [1], sxt_prep [2], sxt_prep [3], trace_last_movie [1]
trace_last_movie [2], trace_last_movie [3], trace_movie_index [1]
trace_movie_index [2], trace_special_movie [1], trace_special_movie [2]
trace_special_movie [3], trace_special_movie2, trace_write_genxcat, ydb_use
History:
27-Apr-1993 (SLF) - For dynamic relocation/additon of pointers
30-Apr-1993 (SLF) - improved file option / parameter validation
16-May-1994 (SLF) - fixed type in vms code
20-jun-1996 (SLF) - permit multi-valued environmentals in file mode
08-jul-1996 (RAS) - handles vms through set_logvms
14-jul-1998 (SLF) - add /envlist (simulate search list under unix)
allow nested environmentals (one level
28-May-1999 (RDB) - reordered code to case statement so could
handle windows through set_logwindows
09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
Restrictions:
Can't specify both array and file
Not all VMS setlog options are available
Nesting environmentals only 1 level deep - should recurse till done
[Previous]
[Next]
Name: set_logvms
Purpose: set logicals (vms)
(allow dynamic updates of Yohkoh environment)
Input Paramters:
logenv - string or string vector - unix environ or vms logical names
value - string or string vector - values to assign to logenv
Calling Examples:
set_logvms,'DIR_GEN_PNT',curdir() ; redefine PNT to current
set_logvms,file=concat_dir('$DIR_SITE_SETUP','setup_dirs')
Calls: ***
EXTRACT_VMS_DEFS, SETLOG, STR_SEP, data_chk [1], data_chk [2], rd_tfile [1]
rd_tfile [2], ssw_strsplit, uniqo [1], uniqo [2]
Restrictions:
VMS only
History:
08-jul-1996 (RAS) - Adapted from <set_logenv>
handles vms logical definitions, vms keywords to setlog
multi-valued logicals
15-Aug-1996 (RAS) - debug keyword implemented
3-march-1996 ras, eliminate unix comment lines
09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
Restrictions:
Can't specify both array and file
Not all VMS setlog options are available
[Previous]
[Next]
Name: set_logwindows
Purpose: set logicals (windows)
(allow dynamic updates of Yohkoh environment)
Input Paramters:
logenv - string or string vector - windows, unix environ or vms logical names
value - string or string vector - values to assign to logenv
Calling Examples:
set_logwindows,'DIR_GEN_PNT',curdir() ; redefine PNT to current
set_logwindows,file=concat_dir('$DIR_SITE_SETUP','setup_dirs')
Calls: ***
ARR2STR [1], Arr2Str [2], BOX_MESSAGE, RESOLVE_VARIABLE, STR2ARR [1], STR2ARR [2]
get_logenv [1], get_logenv [2], rd_tfile [1], rd_tfile [2], str2cols [1]
str2cols [2], str_replace [1], str_replace [2]
Restrictions:
WINDOWS only
Can't specify both array and file
??
History:
30-May-1999 - R.D.Bentley - Adapted from code by H. Warren
18-Mar-2000 - R.D.Bentley - mod within resolve_vars in case not defined
27-Jul-2000 - R.D.Bentley - trap null env. var. definition files
- save defined vars. in common
28-Mar-2006 - Kim Tolbert - rd_tfile didn't handle columns correctly, use
str2cols to handle column-finding instead
[Previous]
[Next]
Purpose: incorporate idl version specific directorys in !path
History: slf, 23-feb-1993
slf, 30-mar-1993 return to caller on error
rdb, 16-Aug-94 modified to also run under VMS
rdb, 26-Aug-94 moved printe statement inside conditional
CALLS: ***
ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
concat_dir [4]
Side Effects:
If IDL version is older than ys master, !path may be modified
[Previous]
[Next]
Project : SOHO - CDS
Name : SET_POINTER
Purpose : to set a pointer value to a pointer variable
Category : Pointers
Explanation : assign a pointer value to a pointer variable.
Syntax : IDL> set_pointer,pointer,value
Inputs : POINTER = pointer variable
: VALUE = value to assign
Keywords : NOCOPY - do not make internal copy of value
INDEX - index of pointer array to set value to
CALLED BY:
BREAK_MAP, CACHE_DATA, CDS_STACK, COPY_VAR, EIS_IMAGE_TOOL_EVENT [1]
EIS_IMAGE_TOOL_EVENT [2], GET_CDS_STUDY, IMAGE_TOOL_EVENT, ITOOL_LOAD_IMAGE
MK_PLAN_CUSTOM, MK_SOHO_CUSTOM, XANSWER, XCALENDAR, XCAMP, XCAT, XCHOICE, XCLONE_PLAN
XGET_UTC, XIAP, XINPUT, XLIST, XPROGRAM, XPROGRAM_ADD, XPS_SETUP, XREPORT, XREPORT_EDIT
XSEL_ITEM, XSEL_LIST [1], XSEL_LIST [2], XSET_COLOR, XSET_VALUE, XTEXT, XZOOM_PLAN
ethz_XCHOICE
Restrictions: POINTER must be defined via MAKE_POINTER
CALLS: ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, EXIST, PTR_ALLOC, VALID_POINTER
Side effects: external value of POINTER is removed when /NO_COPY set
History : Version 1, 1-Sep-1995, D.M. Zarro. Written
Version 2, 17-Jul-1997, D.M. Zarro. Modified
-- Updated to version 5 pointers
Version 3, 18-May-2002, Zarro (L-3Com/GSFC)
-- Added check for invalid input pointer
24-Jan-2007, Zarro (ADNET/GSFC)
- removed EXECUTE
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
NAME:
set_printer
PURPOSE:
To allow the user to set the printer queue where the output will
come out
CALLS: ***
input [1], input [2], tbeep [1], tbeep [2], tbeep [3], wmenu_sel [1], wmenu_sel [2]
CALLED BY:
xanal_emi, xdisp_fits, xdisp_trace [1], xdisp_trace2, xdisp_trace3, xhkplot
HISTORY:
Written 25-Apr-94 by M.Morrison
27-Apr-94 (MDM) - Various changes
20-Jan-95 (MDM) - Changed "lp -dlaser" to "lp -c -dlaser"
28-Feb-95 (MDM) - Added option to send to QUAKE qms printer remotely
30-Nov-95 (MDM) - Changed "To redirect to LPARL lps20 from outside LPARL"
option to point to umbra and que saglps20ps
30-Apr-96 (MDM) - Added option to print to SAG
27-Jan-97 (MDM) - Added option to print to DIAPASON
------------ Big variation ----------------
15-Apr-97 (MDM) - Modified to work with SPRINT instead of PPRINT
- Also modified to use a /ssw/site/setup/set_printer.tab
file to define the options
[Previous]
[Next]
PROJECT:
SDAC
NAME:
SET_UTAXIS
PURPOSE:
This function returns the system variable x=axis structure as though it were
set by a call to UTPLOT. Used with IDL's AXIS routine.
CATEGORY:
Plotting, UTIL, UTPLOT
CALLING SEQUENCE:
xaxis_structure = set_utaxis(ut)
CALLS: ***
DEFAULT, GET_UTAXIS, RESTORE_PLOTVAR, STORE_PLOTVAR, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim [1], anytim [2], anytim [3]
anytim [4], anytim [5]
INPUTS:
UT - Time array. All formats acceptable to UTPLOT.
Utbase - base time for inputs in seconds format (time in seconds from 1-jan-1979).
not used for fully referenced times understood by anytim
OPTIONAL INPUTS:
none
OUTPUTS:
The function returns the X axis structure needed for subsequent calls to axis.
OPTIONAL OUTPUTS:
none
KEYWORDS INPUTS:
All KEYWORDS AVAILABLE TO UTPLOT notably:
TIMERANGE - This can be a two element time range to be
plotted. It can be a string representation or structure.
LABEL - a 2 element vector selecting substring from publication format
of ASCII time (YY/MM/DD, HH:MM:SS.XXX). For example,
LBL=[11,18] would select the HH:MM:SS part of the string.
SAV - If set, UTPLOT labels, tick positions, etc. in !X... system
variables will remain set so that they can be used by
subsequent plots (normally !x... structure is saved in
temporary location before plot and restored after plot).
To clear !x... structure, call CLEAR_UTPLOT.
TICK_UNIT - Time (in seconds) between Major tick marks is forced to TICK_UNIT
Has no effect for axis longer than 62 days.
MINORS - Number of minor tick marks is forced to MINORS
NOLABEL If set then UTLABEL isn't printed on plot
XTITLE - text string for x-axis label - If the string contains
4 asterisks ('****'), the UT time will be substituted
for that substring
YEAR - Force the year in the x axis labels
YOHKOH - Use Yohkoh style labels, e.g. '03-May-93 18:11:30.732'
CALLED BY:
Show Image [1], Show Image [2], Show Image [3]
COMMON BLOCKS:
none
SIDE EFFECTS:
The saved system variables in the Utplot common area are left unchanged
as well as the system variables. Therefore calls must be self-contained since the
memory of these actions is erased.
RESTRICTIONS:
Same as for Utplot as applies to x axis.
How to use it with a call to AXIS
this sets the axis label on the top
Using Utbase
x=findgen(1000)
utplot, x,x, '3-jan-2003', xstyle=4
ax = set_utaxis(x,'3-jan-2003')
axis, xaxis=1, xtitle=''
xtickname = !x.tickname
axis, xaxis=0, xtickname= strarr(n_elements(xtickname))+' '
; For a fully referenced time
x=findgen(1000)
t= anytim( x + anytim('3-jan-2003'), /ex)
utplot, t,x, xstyle=4
ax = set_utaxis(t)
!x=ax
axis, xaxis=1, xtitle=''
xtickname = !x.tickname
axis, xaxis=0, xtickname= strarr(n_elements(xtickname))+' '
MODIFICATION HISTORY:
Version 1, richard.schwartz@gsfc.nasa.gov, 5-jun-1998, on a suggestion
from AC to better support calls to AXIS.
08-Oct-2002, Kim. Added !x = xold, etc lines to make it work right.
2-nov-2005, richard.schwartz@gsfc.nasa.gov
No longer setting null device, plotting to current device instead
15-nov-2005, ras, added title='' and subtitle='' to inhibit
writing these if !p.title or !p.subtile are set
[Previous]
[Next]
Project : SDAC
Name : SET_UTLABEL
Purpose : This procedure controls the default for a date
label under UTPLOT.PRO.
Category : UTPLOT, GRAPHICS
Explanation : A logical in a common block is set or reset.
Use : SET_UTLABEL, 0 ;Disables labeling.
SET_UTLABEL, 1 ;Enables labeling.
Inputs : Option- 1 to set, 0 to reset. Default is reset.
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords :
Calls : ***
CHECKVAR [1], checkvar [2]
CALLED BY:
BCS, HXARCHIVE, HXFITS, QL_DAY_PLOT, QL_ORBIT_PLOT, WBDA [1], WBDA [2], WBSC [1]
WBSC [2], WBSC_FPAR_EV [1], WBSC_FPAR_EV [2], plot_bda, plotbrr, setup_spex [1]
setup_spex [2]
Common : UTSTART_TIME
Restrictions: Utplot directory in !path.
Side effects: None.
Prev. Hist : Written about 1988 by RAS
Modified : Documentation header, 5-Feb-1997.
[Previous]
[Next]
NAME:
SET_UTPLOT
PURPOSE:
Allows user flexibility in setting up time axis labelling.
Prepares IDL system variables (!X.RANGE, !X.TICKV, !X.TICKNAME,
and !X.TICKNAME) for plotting X vs Y with Universal time labels
on bottom X axis. After calling SET_UTPLOT, user calls the
standard IDL PLOT routine to draw the plot.
SET_UTPLOT is normally called by UTPLOT, and is transparent to
the user.
Default style is controlled by atime_format which is set by
a call to YOHKOH( HXRBS )_FORMAT, Yohkoh style uses
dd-mon-yr hh:mm:ss.xxx and for HXRBS
yy/mm/dd, hh:mm:ss.xxx
CATEGORY:
CALLING SEQUENCE:
SET_UTPLOT,XRANGE=X,LABELPAR=LBL,UTBASE=BASE,ERROR_RANGE=ERROR_RANGE,
ERR_FORMAT=ERR_FORMAT, EFLAG=EFLAG, TICK_UNIT=TICK_UNIT, NTICKS=NTICKS, MINORS=MINORS,
XSTYLE=XSTYLE, yohkoh=yohkoh, year=year
INPUT PARAMETERS:
X - X array to plot (seconds relative to base time).
LBL - 2 element vector selecting substring from publication format
of ASCII time (YY/MM/DD, HH:MM:SS.XXX). For example,
LBL=[11,18] would select the HH:MM:SS part of the string.
BASE - ASCII string containing base time for X axis. Format for
time is YY/MM/DD,HHMM:SS.XXX. If this parameter isn't present
and hasn't been set yet (by a previous call to UTPLOT, via
routine SETUTBASE, or directly), user is prompted for base time.
ERROR_RANGE - = 0/1. If set to 1, the X array is outside of the
limits defined by start and end times selected by user.
ERR_FORMAT - =0/1. If set to 1, there was an error in the ASCII time
format for the base time.
TICK_UNIT - Time between Major tick marks is forced to TICK_UNIT
Has no effect for axis longer than 62 days.
If TICK_UNIT is negative, then a standard value for TICK_UNIT is used
that is closest to abs(TICK_UNIT). Returned as new value.
NTICKS- Similar to standard XTICKS in plot. The default tick_unit is adjusted such
that the number of intervals is as close to XTICKS as possible. If two
values are consistent, the longer interval is used. Using NTICKS to avoid
problems with users not completely specifying TICK_UNIT.
MINORS - Number of minor tick marks is forced to MINORS.
XSTYLE - Same meaning as in PLOT, if SET xaxis is exact to UTSTART
and UTEND.
/yohkoh - force yohkoh time formats, e.g. '03-May-93 18:14:23.732'
instead of '93/05/03, 18:14:23.732'
/year - forces the year to be included in the date string
EFLAG - Error flag, if set then not normal return
CALLS: ***
ATIME [1], ATIME [2], CHECKVAR [1], DUMMYPLOTS, FCHECK, SETUT [1], SETUT [2]
SETUTBASE [1], SETUTBASE [2], YMD2SEC [1], YMD2SEC [2], checkvar [2]
CALLED BY:
DEF_UTPLOT, HXISXPLOT, SETUT [1], SETUT [2], UTPLOT [1], UTPLOT [2], UTPLOT [3]
UTPLOT [4], UTPLOT [5], plotbft [1], plotbft [2]
COMMON BLOCKS:
COMMON UTCOMMON, UTBASE, UTSTART, UTEND, XST = base, start, and
end time for X axis in double precision variables containing
seconds since 79/1/1, 00:00.
COMMON CLEARCOMMON,XOLD,YOLD,CLEARSET = holding area for previous
!x and !y structures if clearset=1
COMMON UTSTART_TIME, PRINT_START_TIME, ATIME_FORMAT
RESTRICTIONS:
Cannot be used for times before 79/1/1 or after 2049/12/31.
MODIFICATION HISTORY:
Written by Richard Schwartz 91/02/17
Modified 91/03/27, RAS
Clears all !x vectors which will be set.
Modified 91/05/02, RAS
New Keywords Tick_unit, and Minors
Modified 92/5/11, Kim Tolbert. If lower and upper limits for x axis
are passed in xrange (rather than entire x array to plot),
then those limits take precedence over any utstart and
utend that might be set by user. Before utstart/end always
defined limits if they were set.
Modified 92/07/10, RAS
Uses new version of ATIME which accepts arrays of times
and is valid from 1950-2049
Modified 93/01/18, RAS
no longer uses ymd2sec to find first day of years or months
uses jdcnv and daycnv
Modified 93/05/03, RAS
switch for Yohkoh format
Modified 93/06/07, RAS
accepts Yohkoh database structure for X
26-Aug-92 (MDM) - Added keyword YEAR - put year on tick labels
18-Mar-93 (MDM) - Removed the modification made 91/10/18 since it was
causing problems on subsequent plots (giving a
error_range error)
1-Nove-93 ras - reconcile Yohkoh and SDAC software
14-Dec-93 (MDM) - Various changes - allow plotting reverse time order
- Allow plotting of a single point
5-jan-94 ras - use t_utplot to resolve problems with
multiple formats for x, i.e, sec+utbase and
fully referenced time formats
28-jan-94 ras - allows degenerate time range without crashing
7-Feb-94 (MDM) - Patch for plotting single point case
17-dec-98, richard.schwartz@gsfc.nasa.gov
Now, NTICKS can be used to help control the number of intervals.
Default minor selection held to 12 or less.
Approximate selection of TICK_UNIT enabled through negative values.
[Previous]
[Next]
Project : SDAC
Name : SET_X
Purpose : Set the device to 'X' with vector fonts.
Category : graphics
Explanation : Uses "set_plot"
Use : SET_X
Inputs : None
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : None
CALLS: ***
HAVE_WINDOWS [1], HAVE_WINDOWS [2], OS_FAMILY
CALLED BY:
CHIANTI_NE, CHIANTI_TE, HESSI_ATTENUATOR_SPECTRA, PLOT_ANGC [1], PLOT_ANGC [2]
PLOT_GD, PLOT_HESSI_FILTERS, QLDISPLAY, X [1], X [2], XPRINT [2], XPRINT [5]
Common : None
Restrictions:
Side effects: !p.font set to -1
Prev. Hist :
Mod. :
version 1, richard.schwartz@gsfc.nasa.gov 2-Mar-1996
version 2, amy@aloha.nascom.nasa.gov 5-Mar-1998
changed setplot,'x' to set_plot,'x'
[Previous]
[Next]
Name: set_xcolors
Purpose: part of idl setup - avoid order dependent X call effects
History: slf, 3-Apr-1992
slf, 9-Aug-1992 - verify DISPLAY is defined
slf, 1-nov-96 - 24 bit support check SSW_X_DEPTH,X_COLORS,X_RETAIN
use device,decompose=0
slf, 7-nov-96 - no action if remote DISPLAY
MDM, 11-Nov-96 - Removed 7-Nov modification
- Moved pseudo code to before window call
- Various other changes
DMZ, 24-Jan-97 - added check for when called as UNIX
CRON job, in which case setting X colors
produces errors
MDM, 1-May-97 - Modified to print warning statement if
using 8 bit pseudo color
- Modified to set pseudo flag if ncolors is set
- Changed spawn,'tty' to be /noshell which
sped up the execution considerably.
Zarro, 12-Jan-02- added ALLOW_WINDOWS to catch device open
errors
[Previous]
[Next]
Name: setdisp
Purpose: set X windows display to remote node while in idl
Input Parameters:
node - string node name or string node number
History: slf, 3-nov-1992
Restrictions:
o does not handle local machine security issues
o probably a lot of others
Side Effects:
redirects X output to specified node
may generate warning messages when 1st window is created (but works)
[Previous]
[Next]
Project : SOHO - CDS
Name : SETENV
Purpose : Emulates the SETENV routine in VMS.
Explanation : Converts the SETENV syntax used in Unix and Microsoft Windows
to the equivalent SETLOG statement in VMS.
Use : SETENV, EXPRESSION
SETENV, 'ZDBASE=SYS$USER1:[CDS.DATA.PLAN.DATABASE]'
Inputs : EXPRESSION = A scalar string containing the name of the
environment variable to be defined, followed by
the equals "=" character, and the value to set
this environment variable to.
Note that this string must not contain any blanks
before or after the "=" character. For example,
SETENV, 'ZDBASE = SYS$USER1:[THOMPSON]'
would not work correctly, because of the embedded
blanks. This behavior is the same in the internal
SETENV procedure in Unix.
Opt. Inputs : None.
Outputs : None.
Opt. Outputs: None.
Keywords : None.
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], SETLOG
Common : None.
Restrictions: VMS-only. In Unix and Microsoft Windows, the built-in SETENV
routine is used instead.
Side effects: None.
Category : Utilities, Operating_system.
Prev. Hist. : None.
Written : William Thompson, GSFC, 27 March 1995
Modified : Version 1, William Thompson, 27 March 1995
Version : Version 1, 27 March 1995
[Previous]
[Next]
NAME:
SetFitParm.pro
AUTHOR:
F.Bringezu, denet - Internetservice, Halle Germany,
bringezu@denet.de
PURPOSE:
Provide a widget interface for creating a parinfo structure.
This parinfo structure can by used by mpfit routines of Craig B. Markwardt.
MAJOR TOPICS:
Widget, mpfit.
CALLING SEQUENCE:
parinfo=SetFitParm(used_parinfo)
DESCRIPTION:
SetFitParm creates PARINFO using a widget interface.
PARINFO provides constraints for paramters used by the mpfit routines.
PARINFO is an array of structures, one for each parameter.
A detailed description can be found in the documentation of mpcurvefit.pro
This routine creates an array that contains a structure for each element.
The structure has the following entries.
- VALUE (DOUBLE): The starting parameter
- FIXED (BOOLEAN): 1 fix the parameter, 0 don't fix it at the
point given in VALUE.
- LIMITS (DBLARRAY(2)): Set upper and lower limit.
- LIMITED (BOOLEAN ARRAY 2): Fix the limit.
The parameter OLDPARINFO is optional. OLDPARINFO is used to set
the default values in the widget.
You can simply run:
test=SetFitParm() to create the array for the first time.
Once the array is created it can be used to set the default values
in the widget by calling
test2=SetFitParm(test)
INPUTS:
OPTIONAL INPUTS:
OLDFITPARM - The default values of the new array
INPUT KEYWORD PARAMETERS:
PARENT - if this widget is to be a child, set this keyword to the
parent widget ID.
OUTPUT KEYWORD PARAMETERS:
CANCEL - if the user selected the cancel button on the SETFITPARM
widget, then this keyword will be set upon exit.
OUTPUTS:
PARINFO array of structures
CALLS: ***
SETFITPARM_EVENTS, XMANAGER
SEE ALSO:
MPCURVEFIT
MODIFICATION HISTORY:
Written, FB, 12/1999
Documented, FB, Jan 2000
Generalized positioning code, CM 01 Feb 2000
[Previous]
[Next]
Project : SOHO - CDS
Name :
SETFLAG
Purpose :
Sets flags to control behavior of image display routines.
Explanation :
Sets one of the flag fields in the !IMAGE structure. One can use this
routine to set the default value of one of the SERTS keyword parameters
once rather than passing the relevant keyword to each and every
routine. Passing the keyword to any individual routine takes
precedence over SETFLAG.
Use UNSETFLAG to disable any keyword set with SETFLAG.
Use ENABLEFLAG instead of SETFLAG to reenable one of the keyword that
takes a value, such as MISSING or SIZE, without disturbing the value
of that keyword.
Use SHOWFLAGS to show what flags are set, and what values they have.
Use :
SETFLAG, Keyword=Value or /Keyword, ...
Inputs :
None. Only keyword parameters are used by this routine.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
NOSQUARE = If set, then pixels are not forced to be square.
SMOOTH = If set, then image is expanded with interpolation.
Optionally, this can be set to the amount of smoothing to be
done for PostScript output. See EXPAND_TV for more
information.
NOBOX = If set, then box is not drawn, and no space is reserved
for a border around the image.
NOSCALE = If set, then the command TV is used instead of TVSCL to
display the image.
MISSING = Value flagging missing pixels. These points are scaled to
zero. Ignored if NOSCALE is set.
SIZE = If passed and positive, then used to determine the scale of
the image.
NOEXACT = If set, then exact scaling is not imposed. Otherwise, the
image scale will be either an integer, or one over an
integer. Ignored if SIZE is passed with a positive value.
XALIGN = Alignment within the image display area. Ranges between 0
(left) to 1 (right). Default is 0.5 (centered).
YALIGN = Alignment within the image display area. Ranges between 0
(bottom) to 1 (top). Default is 0.5 (centered).
RELATIVE = Size of area to be used for displaying the image, relative
to the total size available. Must be between 0 and 1.
Default is 1. Passing SIZE explicitly will override this
keyword.
MAX = The maximum value to be considered in scaling images, as
used by BYTSCL.
MIN = The minimum value to be considered in scaling images, as
used by BYTSCL.
VELOCITY = If set then the MIN and MAX values pertain to velocity
images rather than intensity images. (An alternate way to
do the same thing is to use the keywords VMIN and VMAX.)
TOP = The maximum value of the scaled image array, as used by
BYTSCL.
BOTTOM = The minimum value of the scaled image array, as used by
BYTSCL.
COMBINED = Signal to FORM_VEL to scale velocity images so that they can
be displayed together with intensity images.
Calls : ***
TAG_EXIST [1], TAG_EXIST [2]
CALLED BY:
BP_SEEK_POS, SETPLOT [1], SETPLOT [2], SLIT45_IMAGE_DEMO, XCOR_CDS
Common :
None.
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:
None.
Category :
Utilities, Image_display.
Prev. Hist. :
William Thompson, June 1991.
W.T.T., Nov. 1991, added keywords MIN, MAX, VMIN, VMAX, TOP and
COMBINED.
W.T.T., May 1992, added VELOCITY keyword, and made VMIN, VMAX alternate
format.
William Thompson, August 1992, renamed BADPIXEL to MISSING.
Written :
William Thompson, GSFC, June 1991.
Modified :
Version 1, William Thompson, GSFC, 12 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 4 March 1998
Allow SMOOTH to take a value other than zero. This allows
control over smoothing in PostScript files.
Version 3, William Thompson, GSFC, 3-Jan-2006
Added keyword BOTTOM
Version :
Version 3, 3-Jan-2006
[Previous]
[Next]
Project : SOHO - CDS
Name :
SETIMAGE
Purpose :
Allow several images in one window.
Explanation :
Allows several images in one window, arranged horizontally and/or
vertically.
If the /NORMAL keyword is set, then the equivalent values of IX, NX,
and IY, NY (which may be fractional) are calculated and substituted in
the common block.
If no parameters are passed, or the full screen is selected, then
the behavior is reset to the default.
Normally, PUT is used to actually display an image using only part of
the screen, although SETIMAGE and EXPTV,/NORESET could be used to
generate the same output.
SETIMAGE can be used to reselect an image that was previously displayed
(e.g. with PUT).
Use :
SETIMAGE ;Reset to default
SETIMAGE, IX, NX [, IY, NY ] ;Divide screen into
;NX x NY boxes
SETIMAGE, /NORMAL, X1, X2 [, Y1, Y2 ] ;Arbitrary box in
;normalized coordinates
CALLED BY:
EXPAND_TV, EXPTV, FF_DEMO, MK_SYNOPTIC, PUT, SHOW_SCATTER, TVAXIS, TVPRINT, WDISPLAY
WRUNMOVIE [2], XCOR_CDS
Example: Display an image as the third of five from the left, and the
second of three from the top.
SETIMAGE, 3, 5, 2, 3
EXPTV, image, /NORESET
Example: Display an image in a box using the top 80% of the screen,
with 5% margins on either side.
SETIMAGE, 0.05, 0.95, 0.2, 1, /NORMAL
EXPTV, image, /NORESET
Example: Select a previously displayed image and retrieve the data
coordinates associated with it.
SETIMAGE, 2, 5, 1, 3, /DATA
Inputs :
None required.
Opt. Inputs :
IX, NX = Relative position along X axis, expressed as position IX
out of a possible NX, from left to right. If not passed,
then 1,1 is assumed.
IY, NY = Relative position along Y axis, from top to bottom. If
not passed, then 1,1 is assumed.
or
X1, X2 = Coordinates along the X axis of an arbitrary box in
normalized coordinates. Can have values between 0 and 1.
Y1, Y2 = Coordinates along the Y axis of an arbitrary box in
normalized coordinates. Can have values between 0 and 1. If
not passed, then 0,1 is assumed.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
NORMAL = If set, then the input parameters are in normalized
coordinates. Otherwise, they refer to the relative position
of the image on the screen in a regular array of images.
DATA = Retrieve the data coordinates associated with an already
displayed image.
DISABLE = If set, then TVSELECT is not called. Only relevant in
conjunction with the DATA keyword.
CURRENT = If set, then the currently stored settings are used. Used in
conjunction with the DATA keyword to allow calling without
parameters.
Calls : ***
GET_TV_SCALE, GET_VIEWPORT [1], GET_VIEWPORT [2], TRIM, TVSELECT, TVUNSELECT
Common :
IMAGE_AREA = Contains switch IMAGE_SET and position IX, NX, IY, NY.
Restrictions:
If /NORMAL is set, then X1, X2, Y1, Y2 must be between 0 and 1.
Otherwise, IX must be between 1 and NX, and (if passed) IY must be
between 1 and NY.
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 Applied Research Corporation
February, 1991 8201 Corporate Drive
Landover, MD 20785
William Thompson, November 1992, added /NORMAL keyword.
Written :
William Thompson, GSFC, February 1991.
Modified :
Version 1, William Thompson, GSFC, 12 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 24 June 1993.
Added call to ON_ERROR.
Version 3, William Thompson, GSFC, 2 September 1993.
Added DATA and DISABLE keywords.
Added CURRENT keyword.
Version :
Version 3, 2 September 1993.
[Previous]
[Next]
Project : SOHO - CDS
Name :
SETPLOT
Purpose :
Switch between plotting devices with memory about each.
Explanation :
Switches among the various available plotting devices. The plotting
variables for each device are saved in a common block so that the user
retains the ability to reset to a previously used device and do over-
plots, even if plots were produced on another device in the meantime.
Calling SETPLOT with the name of the currently selected device resets
the system variables to either default values, or those from the last
time SETPLOT was called.
The !BCOLOR and !ASPECT system variables are also saved.
Use :
SETPLOT, DEVICE
Inputs :
DEVICE - Name of the plotting device one is changing to.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
COPY = If set, then the current color table is copied to the new
graphics device. Also, the SETFLAG routine is called to set TOP
equal to the number of colors. Also makes sure that !P.COLOR
does not exceed the TOP color. Requires the SERTS image display
software.
Calls : ***
ADD_DEVICE, SETFLAG, SETSCALE [1], SETSCALE [2], STORE_INTO_SV
CALLED BY:
ASK, CDS_THUMBNAIL, PCL [1], PCL [2], PCLCLOSE [1], PCLCLOSE [2], PCLPLOT [1]
PCLPLOT [2], PS [1], PS [2], PSCLOSE [1], PSCLOSE [2], PSPLOT [1], PSPLOT [2]
QMCLOSE [1], QMCLOSE [2], QMPLOT [1], QMPLOT [2], QMS [1], QMS [2], REGIS [1]
REGIS [2], RESET [2], RESET [3], SELECT_WINDOWS, SUNVIEW [1], SUNVIEW [2], TEK [1]
TEK [2], TEK [3], TEK4105 [1], TEK4105 [2], TEK4211 [1], TEK4211 [2], TEKMONO [1]
TEKMONO [2], TVSELECT, TVUNSELECT, WIN [1], WIN [2], XDOC, XWIN [1], XWIN [2], xwin [3]
Common :
PLOTFILE - Saves system variables for later retrieval. Not to be used
by other routines.
Restrictions:
The procedure will not work correctly unless it is used exclusively to
change the plotting device.
In general, the SERTS graphics devices routines use the special system
variables !BCOLOR and !ASPECT. These system variables are defined in
the procedure DEVICELIB. It is suggested that the command DEVICELIB be
placed in the user's IDL_STARTUP file.
Side effects:
Many system variables are manipulated by this routine--in particular
!P.CHARSIZE and !P.FONT.
The first time the routine is called for a particular graphics device,
certain plot parameters may be set to default values.
Any SETSCALE settings will be lost.
Category :
Utilities, Devices.
Prev. Hist. :
W.T.T., Sept. 1987.
William Thompson, February, 1990.
William Thompson, October, 1991, added !ASPECT system variable.
William Thompson, November 1992, changed to save !P.NOERASE and
!Z.THICK.
Written :
William Thompson, GSFC, September 1987.
Modified :
Version 1, William Thompson, GSFC, 27 April 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 14 September 1994
Added COPY keyword.
Version 3, William Thompson, GSFC, 21 June 1995
Added INTERPOLATE keyword.
Version 4, William Thompson, GSFC, 8 April 1998
Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
Version :
Version 4, 8 April 1998
[Previous]
[Next]
NAME:
SETPTS
PURPOSE:
Interactively define reference points in two images.
These points can be used to calculate a linear transform which maps
image ima onto the comparison image imb.
After the points have been entered, image ima is transformed and
displayed with contours on top of image imb.
CATEGORY:
Image processing.
CALLING SEQUENCE:
setpts, p, ima, imr
INPUTS:
ima = image to be transformed.
imr = reference image.
Usually, the lower resolution image is selected to be image ima.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
plotonly = flag. If this keyword parameter is present, no new points
are added to p, but the result of the linear transform is
displayed.
noscale = flag. If present, the images are displayed unscaled.
append = flag. If present, new points are appended to p if p exists
and contains points. The default is to discard old points.
trima = transformed image ima.
key = transformation type. See "transtype" keyword in CALTRANS for
details. Default is a general linear transform.
OUTPUTS:
p = array(2,2,*). p(0,0,*) and p(1,0,*) are the x and y coordinates
of the points in the reference image imb. p(0,1,*) and p(1,1,*)
are the x and y cordinates of the same points in the image ima.
OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
trima = transformed version of ima
CALLS: ***
CALTRANS, CONGRID [1], CONGRID [2], CONGRID [3]
CALLED BY:
SET_MWLT, setpts_roi
COMMON BLOCKS:
None.
SIDE EFFECTS:
The program creates a new BIG graphics window.
After entering the procedure, follow the instructions printed
on the terminal.
RESTRICTIONS:
The images have to be 2-dimensional.
MODIFICATION HISTORY:
JPW, Nov, 1989.
JPW, Aug, 1992 most changes from version 1.1 (GLS) adopted
JPW, Sep, 1992 added the noscale and append flags.
JPW, Jun, 1994 points plotted also with /plotonly option
added key option
JPW, Nov, 1994 fixed some minor glitches
T. Metcalf, 2002 Apr 8, Remove the max 512 image size restriction.
Should now work with any image size.
[Previous]
[Next]
function setpts_roi,image_trans,image_ref, $
plotonly=plotonly, $
noscale=noscale, $
append=append, $
trima=trima, $
key=key, $
xvi=xvi,yvi=yvi,xvr=xvr,yvr=yvr, $
restrict_fov=restrict_fov
NAME:
setpts_roi
PURPOSE:
A front end to the setpts routine which allows a ROI selection on
each image.
CATEGORY:
CALLING SEQUENCE:
pp=setpts_roi(image,ref_image)
INPUTS:
image = image to be transformed
ref_image = reference image
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
Same as setpts.pro
OUTPUTS:
pp vector from setpts
CALLS: ***
SETPTS [1], SETPTS [2], wdefroi [1], wdefroi [2], wdefroi [3], wdefroi [4]
CALLED BY:
TRACE_MDI_ALIGN
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf 1996 August 29
[Previous]
[Next]
Project : SOHO - CDS
Name :
SETSCALE
Purpose :
Sets plot scale so it is the same in X and Y directions.
Explanation :
The data limits in the X and Y directions (plus 5%) are calculated and
compared against the the physical size of the plotting area in device
coordinates. Whichever scale is larger is then used for both axes, and
the plot limits are set to center the data in both directions. The
parameters !X.STYLE and !Y.STYLE are then set to 1 for exact spacing.
Use :
SETSCALE - Resets to previous state.
SETSCALE, ARRAY - Calculates scale for CONTOUR.
SETSCALE, XARRAY, YARRAY - Calculates scale from arrays.
SETSCALE, XMIN, XMAX, YMIN, YMAX - Calculates scale from limits.
Inputs :
None required. Calling SETSCALE without any parameters resets to the
default behavior.
Opt. Inputs :
ARRAY - Two dimensional array to be used in a simple
contour plot. The minima are set to zero,
and the maxima are set to one less than the
dimensions of the array.
XARRAY, YARRAY - Arrays from which the minimum and maximum
values are calculated.
XMIN, XMAX, YMIN, YMAX - The limits in the X and Y directions from
which the scale is calculated. The actual
X and Y ranges must include these values.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
NOBORDER = If set, then the 5% border is not applied.
NOADJUST = If set, then the edges of the plot (!P.POSITION) are
not modified.
CHARSIZE = Character size to take into account when calculating plot
size.
Calls : ***
GET_VIEWPORT [1], GET_VIEWPORT [2], REVERSE
CALLED BY:
PLOT_IMAGE, SETPLOT [1], SETPLOT [2], SETVIEW [1], SETVIEW [2], SETWINDOW [1]
SETWINDOW [2]
Common :
SETSCALE = Keeps track of the system variables changed by this routine.
Restrictions:
Unpredictable results may occur if SETSCALE is in effect when WINDOW,
WSET or SET_PLOT are called. It is recommended that SETSCALE be called
without parameters to reset to the ordinary behavior before the
graphics device or window is changed.
In general, the SERTS graphics devices routines use the special system
variables !BCOLOR and !ASPECT. These system variables are defined in
the procedure DEVICELIB. It is suggested that the command DEVICELIB be
placed in the user's IDL_STARTUP file.
Side effects:
The system variables !X.STYLE, !Y.STYLE, !X.S, !Y.S, !X.RANGE (!XMIN
and !XMAX) and !Y.RANGE (!YMIN and !YMAX) are modified.
Unless NOADJUST is set, the edges of the plot (!P.POSITION) are
adjusted to fit the data. Then, when SETSCALE is called without any
parameters, these parameters are returned to their original settings.
System variables may be changed even if the routine exits with an error
message.
If SETSCALE is called without any parameters, then the modified system
variables are restored to their original values. Additional graphics
functions such as OPLOT will still be possible.
Category :
Utilities, Devices.
Prev. Hist. :
William Thompson, Feb. 1991.
William Thompson, Oct. 1991, added !ASPECT system variable.
William Thompson, May 1992, added common block and changing viewport.
William Thompson, Nov. 1992, changed structure of common block, and
removed support for changing viewport.
William Thompson, Nov. 1992, changed to use GET_VIEWPORT instead of
INIT_SC1_SC4, and to restore original !P.POSITION when called
with no parameters.
William Thompson, December 1992, changed common block to keep better
track of the state of the system variables.
Written :
William Thompson, GSFC, February 1991.
Modified :
Version 1, William Thompson, 27 April 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 8 October 1996
Added keyword CHARSIZE
Version 3, 14-May-2001, William Thompson, GSFC
Use modern system variables.
Version :
Version 3, 14-May-2001
[Previous]
[Next]
Name: setssw_windows
Purpose: Emulate script SETSSW for window
Executes any _paths or _env files, then creates path.
Input Parameters:
required instruments selected by keyword....
Calling Examples:
setssw_windows,/trace,/sxt
Calls: ***
ADD_TAG [1], ADD_TAG [2], ARR2STR [1], Arr2Str [2], BOX_MESSAGE, STR2ARR [1]
STR2ARR [2], STR_SEP, UNIQ [1], UNIQ [2], UNIQ [3], get_logenv [1], get_logenv [2]
main_execute [1], main_execute [2], set_logenv [1], set_logenv [2], ssw_path
CALLED BY:
ssw_setup_windows
Restrictions:
WINDOWS only
History:
1-Jun-1999 (RDB) - Created
3-Jun-1999 (SLF) - renamed setssw.pro->setssw_windows.pro
29-Mar-2000 (RDB) - do site env. after instrument at instrument level
8-May-2000 (RDB) - add ucon dirs to path if yohkoh included
execute instrument and personal IDL_STARTUP files
12-May-2000 (rdb) - moved setup.ssw_paths into ssw_seup_windows
forther refinements on startups
16-May-2000 (rdb) - use env. var. SSW_INSTR if keyword set
30-Jun-2000 (rdb) - check if common block variables defined - error if not
27-Jul-2000 (rdb) - also execute setup.xxx; use $SSW_SITE for $SSW/site
15-Jan-2004 (WTT) - Allow files ending in "_win" to replace standard
files in Windows.
[Previous]
[Next]
NAME:
SETUT
PURPOSE:
Set base,start, or end time in common UTCOMMON.
SETUTBASE, SETUTSTART, and SETUTEND are all implemented through
SETUT as in SETUTBASE,'UTSTRING'.
When using UTPLOT, UTPLOT_IO, or OUTPLOT command, X array is
assumed to be in seconds relative to the base time.
CALLED BY:
BATSE_ONTIMES, DCFREAD, EDITOC, FIND_DBFILE, FLISTOC, FSOC, FSPLOT, FS_ARCHIVE_RW
FS_GRAPH, GFITS_R, PLOT_FLARE, QLDISPLAY, RATESDUMPOC, RAWDUMPOC, SETUTBASE [1]
SETUTBASE [2], SETUTEND [1], SETUTEND [2], SETUTSTART [1], SETUTSTART [2]
SET_UTPLOT [1], SET_UTPLOT [2], SPEX_COMMONS [2], SPEX_COMMONS [4]
SPEX_PROC [1], SPEX_PROC [2], plotman, t_utplot [1], t_utplot [2]
Note: UTBASE, UTSTART, and UTEND are in common UTCOMMON and can
also be set directly (double precision seconds relative to
79/1/1, 00:00).
Can also be used to call SET_UTPLOT which creates !x.tickv and
!x.tickname.
CATEGORY:
CALLING SEQUENCE:
SETUT, UTBASE=BASE, UTSTART=START, UTEND=END, ERROR=ERROR, $
SET_UTPLOT=SET
INPUT PARAMETERS:
BASE, START, or END - ASCII string in format YY/MM/DD,HHMM:SS.XXX.
Sets UTBASE, UTSTART, or UTEND variables in common UTCOMMON to the
number of seconds since 79/1/1, 0000.
Partial strings are allowed. If the date is omitted, the last date
passed (for base, start, or end time) is used.
For example, if the string '88/3/4,1230' had already been passed:
'1200' means 88/3/4,1200
'01' means 88/3/4,0001 (1 minute into the day)
'01:2' means 88/3/4,0001:02.000 (1 min., 2 sec into day)
'1200:20.1' means 88/3/4,1200:20.100 (20.100 sec. after 12)
ERROR - 0/1 indicates no error/error in converting ASCII time to
double precision seconds.
SET_UTPLOT - if 1 and START and END are set then SET_UTPLOT is called
for those values, remembered in subsequent calls.
- if 0 then SET_UTPLOT is not called or subsequently.
OUTPUTS:
None.
OPTIONAL OUTPUT PARAMETERS:
None.
CALLS: ***
ATIME [1], ATIME [2], CHECKVAR [1], SET_UTPLOT [1], SET_UTPLOT [2], checkvar [2]
utplot_UTIME [1], utplot_UTIME [2]
COMMON BLOCKS:
COMMON UTCOMMON, UTBASE, UTSTART, UTEND = base, start, and
end time for X axis in double precision variables containing
seconds since 79/1/1, 00:00.
COMMON LASTDATECOM, LASTDATE = YY/MM/DD string for last entry
into SETUT
COMMON SETCOMMON, SETPLOT
SIDE EFFECTS:
UTXXXX in common UTCOMMON is set to time passed in string translated
into a double precision floating point value representing the time
in seconds since 79/1/1, 00:00. Function ATIME can be used to
display this time as an ASCII string. If switch SET_UTPLOT is used
then the procedure SET_UTPLOT is called with the new values of
UTBASE, UTSTART, and UTEND.
RESTRICTIONS:
Times must be between 79/1/1 and 99/1/1. A base time must be set before
plotting with UTPLOT (or UTPLOT_IO), however the easiest ways to set it
are either in the calling arguments to UTPLOT (or UTPLOT_IO) or by
letting UTPLOT (or UTPLOT_IO) prompt for it.
PROCEDURE:
Keyword parameters are used to route the input string(s) to their
proper variable in UTCOMMON.
UTIME is called to translate UTSTRING to epoch day and msec,
UTBASE is epoch day * 86400 + msec/1000 from 79/1/1
MODIFICATION HISTORY:
Written by Kim Tolbert, 4/88
Modified for IDL Version 2 by Richard Schwartz, 2/91
Keyword SET_UTPLOT added 9/91
Corrections and new comments added 10/91 by RS.
Modified to accept Yohkoh time format, 6/93 by ras.
Modified by Kim, 12/3/99. Init utstring1 to '' before reading into it.
[Previous]
[Next]
Project:
SDAC
NAME:
SETUTBASE
Category:
UTPLOT, TIME
Calls: ***
CHECKVAR [1], SETUT [1], SETUT [2], checkvar [2]
PURPOSE:
Set UTBASE variable in common UTCOMMON to the number of seconds
since 79/1/1, 0000 represented by the ASCII string passed as an
argument.
CALLING SEQUENCE:
SETUTBASE,UTSTRING,ERROR=ERROR
INPUT PARAMETERS:
UTSTRING - string in YY/MM/DD, HHMM:SS.XXX format to be converted
to internal representation and stored in UTCOMMON variable UTBASE.
KEYWORDS:
ERROR - 0/1 indicates no error/error in converting UTSTRING
CALLED BY:
CONT_READ, DISCSP_READ, EVAL_SHERB, FDBREAD, FS_ACC_CONT, FS_ACC_DISCSP, FS_GEN_ARR
FS_GRAPH, HXARCHIVE, HXFITS, PLOTBATSE_QL, PLOTFIT, PLOT_OCCS, PLOT_OCC_ONDAY
QL_DAY_PLOT, QL_ORBIT_PLOT, READ_DISCLA, SC4TREAD, SET_UTPLOT [1], SET_UTPLOT [2]
SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PLOT_SAVED [1], SPEX_PLOT_SAVED [2]
SPEX_PROC [1], SPEX_PROC [2], Show Image [1], Show Image [2], Show Image [3]
plotfda, read_batse_4_spex [1], read_batse_4_spex [2], t_utplot [1]
t_utplot [2]
PROCEDURE:
Calls SETUT. See SETUT.PRO program description.
MODIFICATION HISTORY:
Written by Richard Schwartz, Feb. 1991
[Previous]
[Next]
NAME:
SETUTEND
PURPOSE:
Set UTEND variable in common UTCOMMON to the number of seconds
since 79/1/1, 0000 represented by the ASCII string passed as an
argument.
CALLING SEQUENCE:
SETUTEND,UTSTRING,ERROR=ERROR
INPUT PARAMETERS:
UTSTRING - string in YY/MM/DD, HHMM:SS.XXX format to be converted
to internal representation and stored in UTCOMMON variable UTEND.
ERROR - 0/1 indicates no error/error in converting UTSTRING
CALLS: ***
CHECKVAR [1], SETUT [1], SETUT [2], checkvar [2]
CALLED BY:
CONT_READ, DISCSP_READ, FDBREAD, QL_DAY_PLOT, QL_ORBIT_PLOT, READ_DISCLA
PROCEDURE:
Calls SETUT. See SETUT.PRO program description.
MODIFICATION HISTORY:
Written by Richard Schwartz, Feb. 1991
[Previous]
[Next]
NAME:
SETUTSTART
PURPOSE:
Set UTSTART variable in common UTCOMMON to the number of seconds
since 79/1/1, 0000 represented by the ASCII string passed as an
argument.
CALLING SEQUENCE:
SETUTSTART,UTSTRING,ERROR=ERROR
INPUT PARAMETERS:
UTSTRING - string in YY/MM/DD, HHMM:SS.XXX format to be converted
to internal representation and stored in UTCOMMON variable UTSTART.
ERROR - 0/1 indicates no error/error in converting UTSTRING
CALLS: ***
CHECKVAR [1], SETUT [1], SETUT [2], checkvar [2]
CALLED BY:
CONT_READ, DISCSP_READ, FDBREAD, QL_DAY_PLOT, QL_ORBIT_PLOT, READ_DISCLA
PROCEDURE:
Calls SETUT. See SETUT.PRO program description.
MODIFICATION HISTORY:
Written by Richard Schwartz, Feb. 1991
[Previous]
[Next]
Project : SOHO - CDS
Name :
SETVIEW
Purpose :
Switch between several plots on one page.
Explanation :
SETVIEW modifies the viewport parameters !P.POSITION to allow several
plots on one page, arranged horizontally and/or vertically.
Calling SETVIEW with nontrivial parameters also sets !P.NOERASE to 1.
New plots must be started with an explicit ERASE command.
Calling SETVIEW without any parameters, or IX,NX and IY,NY all equal
to 1 resets the viewport, and sets !P.NOERASE to 0.
Recalling SETVIEW with the same parameters as before will restore the
system variables associated with that setting. This allows the user to
switch between several plots without losing the scaling information
associated with each. Note that when switching between windows that
both WSET and SETVIEW must be called each time for this to work.
Alternatively, SETWINDOW can be used to switch between windows.
Use :
SETVIEW [, IX, NX [, IY, NY [, SX [, SY ]]]]
Inputs :
None required. Calling SETVIEW without any parameters resets to the
default behavior.
Opt. Inputs :
IX, NX = Relative position along X axis, expressed as position IX
out of a possible NX, from left to right. If not passed,
then 1,1 is assumed.
IY, NY = Relative position along Y axis, from top to bottom. If
not passed, then 1,1 is assumed.
SX = Multiplication factor for space between plots in X
direction. A value of SX between 0 and 1 decreases the
amount of space between plots, a value greater than 1
increases the amount of space. If not passed, then 1 is
assumed.
SY = Multiplication factor for space between plots in Y
direction. If not passed, then 1 is assumed.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
None.
Calls : ***
ADD_VIEWPORT, SETSCALE [1], SETSCALE [2], TRIM
CALLED BY:
AN_NIMCP, AN_NIMCP_1_2, AN_NIMCP_AVG, CDS_SNAPSHOT, NIS_AVG_SPECT_DEMO
SHOW_SYNOPTIC
Common :
VIEWPORT = Contains data to maintain information about the viewports
as a function of graphics device and window.
Restrictions:
IX must be between 1 and NX. IY must be between 1 and NY.
SX and SY must not be negative.
This routine must be called separately for each graphics device.
In general, the SERTS graphics devices routines use the special system
variables !BCOLOR and !ASPECT. These system variables are defined in
the procedure DEVICELIB. It is suggested that the command DEVICELIB be
placed in the user's IDL_STARTUP file.
Side effects:
The system variable !P.NOERASE is changed.
Any SETSCALE settings will be lost.
Category :
Utilities, Devices.
Prev. Hist. :
William Thompson Applied Research Corporation
September, 1988 8201 Corporate Drive
Landover, MD 20785
William Thompson, Nov 1992, changed common block to allow system
variables to be saved between multiple
plots. Also added call to disable
possible SETSCALE settings.
Written :
William Thompson, GSFC, September 1988.
Modified :
Version 1, William Thompson, GSFC, 27 April 1993
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 4 January 1994
Fixed bug where original state was not being completely
restored.
Version 3, William Thompson, GSFC, 19 August 1996
Removed requirement that IX, NX, IY, NY be integer.
Version 4, William Thompson, GSFC, 30 January 1997
Fixed bug involving resizing windows.
Version 5, 05-Apr-1999, William Thompson, GSFC
Modified to properly manipulate !P.POSITION
Version :
Version 5, 05-Apr-1999
[Previous]
[Next]
Project : SOHO - CDS
Name : SETWINDOW
Purpose : Switch between windows, retaining parameters for each.
Explanation : SETWINDOW stores the plot parameters for the current window in
a common block, switches to the desired window, and restores
the plot parameters from the last time that window was used.
Use : SETWINDOW [, WINDOW ]
Inputs : None required.
Opt. Inputs : WINDOW = Number of window to switch to. If not passed, then
the parameters for the current window are saved.
Outputs : None.
Opt. Outputs: None.
Keywords : SHOW = If set, then call WSHOW.
RESTORE = If set, then restore the saved parameters for the
target window without saving the parameters for the
current window.
Calls : ***
ADD_WINDOW, SETSCALE [1], SETSCALE [2], TRIM
CALLED BY:
CDS_ENG_N1_VW, DSPEXP, DSPWAV, 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], EIS_ITOOL_ZOOMINOUT [1], EIS_ITOOL_ZOOMINOUT [2]
EIS_LOAD_IMAGE [1], EIS_LOAD_IMAGE [2], GDSPSPEC, IMAGE_TOOL, IMAGE_TOOL_EVENT
ITOOL_DISP_ROT, ITOOL_DRAW, ITOOL_DRAW_ICON, ITOOL_LIMBFITTER, ITOOL_LOAD_IMAGE
ITOOL_OVERLAYER, ITOOL_PTOOL, ITOOL_ZOOMINOUT, ITOOL_ZOOMMER, LOCATE_FFCAL
MAKE_AUTO_FIT, MAKE_MANUAL_FIT, MK_LIMBFIT_BS, MK_POINT_BASE, MK_SOHO, NDSPSPEC
PQLPROFILE, PQLZOOM, PRESTORE, PTEST, SET_SERTSW, TLB_PLACE, TVPROFILE, TVSELECT
TVUNSELECT, UPDATE_FITLIMB, WDISPLAY, XCDS_SNAPSHOT, XCOR_CDS
Common : SETWINDOW = Contains WINDOWS, and the structure SAVE which
contains the graphics system variables.
Restrictions: WINDOW must be a valid, existing window.
Creating a new window with the WINDOW command will also switch
to that window. To save the settings for the current window,
call SETWINDOW before calling WINDOW.
In general, the SERTS graphics devices routines use the special
system variables !BCOLOR and !ASPECT. These system variables
are defined in the procedure DEVICELIB. It is suggested that
the command DEVICELIB be placed in the user's IDL_STARTUP file.
Side effects: Certain system variables from the previous time the window was
used are recalled.
Any SETSCALE settings will be lost.
Category : Utilities, Devices.
Prev. Hist. : William Thompson Applied Research Corporation
November, 1992 8201 Corporate Drive
Landover, MD 20785
Written : William Thompson, GSFC, November 1992.
Modified : Version 1, William Thompson, GSFC, 27 April 1993.
Incorporated into CDS library.
Version 1.1, Dominic Zarro, (ARC/GFSC), 15 December 1994.
Added WSHOW
Version 2, Zarro, GSFC, 24 Feb 1997
Added check for whether target window is open
Version 3, 04-Oct-1999, William Thompson, GSFC
Added keyword RESTORE.
Version : Version 3, 04-Oct-1999
[Previous]
[Next]
NAME:
SFIT_XY
PURPOSE:
Polynomial fit to a surface on non-uniform grids.
CATEGORY:
Curve and surface fitting.
CALLING SEQUENCE:
Result = SFIT_XY(Data, Degree_X [ , Degree_Y, X=X, Y=Y, KX=Kx ] )
INPUTS:
Data: The array of data to fit. The sizes of the dimensions may
be unequal.
Degree_x: The degree of fit in the X dimension
Degree_y: The degree of fit in the Y dimension (def.: Degree_x)
OUTPUT:
This function returns a fitted array.
OUTPUT KEYWORDS:
X,Y: array of coordinates
OUTPUT KEYWORDS:
Kx: The array of coefficients for a polynomial function
of x and y to fit data.
This parameter is returned as a (Degree+1) by (Degree+1)
element array.
PROCEDURE:
Fit a 2D array Z as a polynomial function of x and y.
The function fitted is:
F(x,y) = Sum over i and j of kx(j,i) * x^i * y^j
where kx is returned as a keyword.
MODIFICATION HISTORY:
July, 1998, V. Andretta: Modified from SFIT
[Previous]
[Next]
NAME: sgn
PURPOSE: Return the sign of the argument.
If the argument is zero, return zero.
CALLING SEQUENCE: out=sgn(in)
PARAMETERS:
in input number
out -/0/+
RETURN TYPE: INTEGER
CALLED BY:
XCROP_CUBE, bcs_spec, fovc2corn_cmd, mdipdist, mk_sfd [1], mk_sfd [2], mk_sfd [3]
mk_sfd [4]
HISTORY: Drafted by A.McAllister, Feb. 1993.
[Previous]
[Next]
function shift_img,data,shifts,missing=missing, $
xscale=xscalein,yscale=yscalein, $
rot12=rot12in,anchor=anchorin
NAME:
SHIFT_IMG
PURPOSE:
Shift images in a data cube with optional scale and rotation.
CATEGORY:
CALLING SEQUENCE:
outdata = shift_img(data,shifts)
INPUTS:
data = image data cube (or a single image)
shifts = array of x and y pixel shifts: fltarr(2,nimages). A
positive value for the shifts moves the image up and
right.
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
missing = value for array for areas that shift out of the FOV
(def = 0)
xscale, yscale = scale change for images: fltarr(nimages). (def = 1.0)
rot = rotation for images, CCW in degrees: fltarr(nimages). (def = 0.0)
anchor = center of rotation [x,y]: fltarr(2,nimages).
(def = center of image)
OUTPUTS:
outdata = array of shifted images, same size as data
CALLS: ***
RSS2PQ
CALLED BY:
TRACE_ALIGN_CUBE, TR_GET_DISP [1]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
Uses rss2pq to define the transformation and poly_2d to do the
shifting.
EXAMPLE:
Here is an example of making a dejittered TRACE movie:
itref = 0
itrace = trace_cube_pointing(tindex,tdata,itref) ; correct pointing
xscale = tindex[itref].cdelt1/tindex.cdelt1
yscale = tindex[itref].cdelt2/tindex.cdelt2
xshift0 = ((tindex.naxis1-1)-(tindex[itref].naxis1-1)*xscale)/2.
yshift0 = ((tindex.naxis2-1)-(tindex[itref].naxis2-1)*yscale)/2.
xshift = -xshift0 - (tindex[itref].xcen-tindex.xcen)/tindex.cdelt1
yshift = -yshift0 - (tindex[itref].ycen-tindex.ycen)/tindex.cdelt2
shifts = transpose([[xshift],[yshift]])
dnew = shift_img(tdata,shifts) ; dejittered data cube
This example does not correct for solar rotation and the
pointing in the index structure will not apply to the shifted data.
MODIFICATION HISTORY:
T. Metcalf 2003-07-29
[Previous]
[Next]
Project : SOHO-CDS
Name : SHIFT_MAP
Purpose : shift an image map
Category : imaging
Explanation : translate a map in x- and y-directions by moving
it's centroid
Syntax : smap=shift_map(map,sx,sy)
;
Inputs : MAP = image map structure
SX,SY = shift values in x- and y- directions (+W, +N)
Outputs : SMAP = shifted map
Opt. Outputs: None
Keywords : XC = new X-center (ignored if SX entered)
YC = new Y-center (ignored if SY entered)
CALLS: ***
COPY_VAR, EXIST, GET_MAP_PROP, HAVE_TAG, PR_SYNTAX, VALID_MAP
CALLED BY:
DROT_MAP_FAST
History : Written 12 May 1998, D. Zarro, SAC/GSFC
Modified 22 March 2000, Zarro (SM&A/GSFC) -- added
check for ROLL_CENTER
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
SHOW3
PURPOSE:
Show a 2D array three ways in a display that combines SURFACE,
CONTOUR, and an image (color/gray scale pixels).
CATEGORY:
Display, graphics.
CALLING SEQUENCE:
SHOW3, Image [, INTERP = Interp, SSCALE = Sscale]
INPUTS:
Image: The 2-dimensional array to display.
OPTIONAL INPUTS:
X = a vector containing the X values of each column of Image.
If omitted, columns have X values 0, 1, ..., Ncolumns-1.
Y = a vector containing the Y values of each row of Image.
If omitted, columns have Y values 0, 1, ..., Nrows-1.
KEYWORD PARAMETERS:
INTERP: Set this keyword to use bilinear interpolation on the pixel
display. This technique is slightly slower, but for small
images, it makes a better display.
SSCALE: Reduction scale for surface. The default is 1. If this
keyword is set to a value other than 1, the array size
is reduced by this factor for the surface display. That is,
the number of points used to draw the wire-mesh surface is
reduced. If the array dimensions are not an integral multiple
of SSCALE, the image is reduced to the next smaller multiple.
E_CONTOUR: a structure containing additional keyword parameters
that are passed to the CONTOUR procedure. See the example
below.
E_SURFACE: a structure containing additional keyword parameters
that are passed to the SURFACE procedure. See the example
below.
BOTTOM: lowermost color index to use (default=0)
TOP: highest color index to use (default=!d.table_size-1)
OUTPUTS:
No explicit outputs.
CALLS: ***
EXIST, POLYWARP
CALLED BY:
PLOT_MAP
COMMON BLOCKS:
None.
SIDE EFFECTS:
A new plot is generated.
RESTRICTIONS:
The display gets too "busy" when displaying larger (say 50 by 50),
images, especially if they are noisy. It can be helpful to use
the SSCALE keyword or the SMOOTH and/or REBIN functions to smooth the
surface plot.
You might want to modify the calls to CONTOUR and SURFACE slightly
to customize the display to your tastes, i.e., with different colors,
skirts, linestyles, contour levels, etc.
PROCEDURE:
First, do a SURFACE with no data to establish the 3D to 2D scaling.
Then convert the coordinates of the corner pixels of the array to
2D. Use POLYWARP to get the warping polynomial to warp the
2D image into the area underneath the SURFACE plot. Output the image,
output the surface (with data) and then output the contour plot at
the top (z=1).
EXAMPLES:
A = BESELJ(SHIFT(DIST(30,20), 15, 10)/2.,0) ;Array for example
SHOW3, A ;Show it with default display.
SHOW3, A, SQRT(FINDGEN(30)) ;Make X axis proportional to sqrt
SHOW3, A, E_CONTOUR={C_CHARSIZE:2, DONW:1} ;Label CONTOUR lines with
double size characters, and include downhill tick marks.
SHOW3, A, E_SURFACE={SKIRT:-1, ZRANGE:[-2,2]} ;Draw a surface with
a skirt and scale Z axis from -2 to 2.
MODIFICATION HISTORY:
DMS. Jan, 1988.
Added fudges for PostScript, April, 1988.
Fixed bug where contour plot was occasionally clipped. Dec, 1990.
Added optional axis variables, and _EXTRA keywords for CONTOUR,
and SURFACE. Jan, 1996.
DD. Added code to ignore !ORDER for the TV of the image. Mar 1997.
SJL Fixed bug from scaling with polywarp. July, 1998.
Kim Tolbert, 1-Oct-2000. Added bottom and top keywords for colors
[Previous]
[Next]
Project : SOHO - CDS
Name :
SHOW_COLORS
Purpose :
Displays the current color table.
Explanation :
The color tables are read using TVLCT,/GET. Each color table (red,
green and blue) is plotted with a different value of !P.COLOR, and then
the color tables are modified so that the red color table is plotted in
red, etc. The background (color 0) is changed to black, and the axes
(color 4) are changed to white.
Use :
SHOW_COLORS
Inputs :
None.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
DISABLE = If set, then TVSELECT not used.
Calls : ***
LINECOLOR, TVSELECT, TVUNSELECT
Common :
None.
Restrictions:
The plotting device must have at least five available colors, and be
able to load color tables.
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 first five colors (0-4) in the color table are changed after
plotting, so that the red color table is plotted in red, etc.
Category :
Utilities, Image_display.
Prev. Hist. :
William Thompson, April 1992, changed to use TVLCT,/GET instead of
common block, and added DISABLE keyword.
Written :
William Thompson, GSFC.
Modified :
Version 1, William Thompson, GSFC, 12 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 27 July 1994
Rewrote not to use PLOTC or OPLOTC.
Version 3, William Thompson, GSFC, 18 December 2002
Changed !COLOR to !P.COLOR
Version :
Version 3, 18 December 2002
[Previous]
[Next]
Project : SOHO - CDS
Name : SHOW_FITS_HDR
Purpose : Display a CDS FITS file header.
Explanation : Reads header from a CDS FITS file and copies to the screen
and/or hardcopy
Use : IDL> show_fits_hdr,filename [,parameter,header=header,$
extension=extension,$
/hardcopy,/keep,
/outfile,/quiet]
Inputs : filename - name of FITS file to read, can be an array as
returned by eg. FINDFILE.
Opt. Inputs : parameter - if given then show only that parameter, can be
a string array of parameter names.
outfile - file(s) to which to send output. If given, must
same dimension as input filenames
Outputs : Listing is sent to screen and/or hardcopy file.
Opt. Outputs: header - returns a string array with the header contents
Keywords : HARDCOPY - listing is sent to printer
KEEP - listing is sent to disk file and not deleted.
Default name is filename.hdr in home directory
unless output file is specified.
QUIET - output to screen is suppressed.
EXTEN - specify the FITS extension to read
Calls : ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], DELETE_FILE [1], DELETE_FILE [2], FILEPATH, FILE_EXIST [2]
HEADFITS [1], HEADFITS [2], HEADFITS [3], PRINT_STR, REM_DUP [1], REM_DUP [2]
REM_DUP [3], STR_PICK, break_file [4], concat_dir [4], file_exist [1]
file_exist [3]
Common : None
Restrictions: None
Side effects: None
Category : FITS
Prev. Hist. : None
Written : C D Pike, RAL, 6-Jul-95
Modified :
Version : Version 1, 6-Jul-95
[Previous]
[Next]
Project : SOHO - CDS
Name : SHOW_MOVIE
Purpose : Uses XINTERANIMATE to show a movie.
Category : Class1, Animation
Explanation : This is a simple routine to display a movie using
XINTERANIMATE. It's meant to stand alone, without the need of
any other routines except those in the standard IDL
distribution.
Syntax : SHOW_MOVIE, IMAGES [, RATE ]
Examples :
Inputs : IMAGES = Three dimensional array of images, with the
dimensions (NX, NY, N_FRAMES)
Opt. Inputs : RATE = Optional rate of display. The rate is a value
between 0 and 100 that gives the speed that the
animation is displayed. The fastest animation is
with a value of 100 and the slowest is with a value
of 0. The default value is 100 if not specified.
Outputs : None.
Opt. Outputs: None.
Keywords : NOSCALE = If set, then the images are not scaled before
displaying.
Calls : ***
XINTERANIMATE
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : None.
History : Version 1, 02-May-1997, William Thompson, GSFC
Contact : WTHOMPSON
[Previous]
[Next]
Name: show_pix
Purpose: dipslay processed images saved with mk_pix.pro
Calling Sequence:
show_pix
Widget version - file selection is intuitive now (?)
show_pix, lastfile=lastfile ; return last path/filename selected
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], EVENT_NAME, FILE_EXIST [2], GET_WUVALUE, GET_WVALUE, POPD, PUSHD
STR_LASTPOS [1], WDEF [1], WDEF [2], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER
XMENU [1], XMENU [2], XMOVIE [1], XMOVIE [2], break_file [4], concat_dir [4]
curdir [1], curdir [2], data_chk [1], data_chk [2], deriv_arr [1], deriv_arr [2]
file_exist [1], file_exist [3], file_list [1], file_list [2], get_infox
get_logenv [1], get_logenv [2], get_subdirs [1], get_subdirs [2], get_xfont [1]
get_xfont [2], mapx [1], mapx [2], restgen [1], restgen [2], show_pix_event [1]
show_pix_event [2], show_pix_event [3], str_lastpos [2], str_replace [1]
str_replace [2], uniqo [1], uniqo [2], ut_time [1], ut_time [2], wc_where [1]
wc_where [2]
CALLED BY:
get_pix
History:
7-Nov-1993 (SLF) Written for mercury picture display
10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
20-Dec-1993 (SLF) widgitized, some new features
4-Jan-1993 (GAL) replaced call to concat_dir with get_subdirs
to correct a noted bug when run on the SGI.
17-Mar-1994 (SLF) use DIR_GEN_SHOWPIX if site not defined
(forward/backward compatibility?)
13-Apr-1994 (SLF) eliminate subdirectory keywords from documentation
31-May-1994 (DMZ) added VMS patch
8-Jun-1994 (SLF) limit number files displayed (scroll function)
22-Jul-1994 (SLF) add LASTFILE keyword, common block show_pix_blk
14-sep-1994 (SLF) minor mods / protect against environmental naming ...
9-Nov-1994 (SLF) list files in reverse chronological order (UNIX)
20-dec-1994 (SLF) fix for unix shortcoming under sgi (arg list too long)
26-mar-1995 (slf) call get_xfont to get fixed font (allow tables)
12-mar-1996 (slf) combine merge show_pix_event->show_pix
[Previous]
[Next]
Name: show_pix
Purpose: dipslay processed images saved with mk_pix.pro
Calling Sequence:
show_pix [/merc, /moon, /misc]
Widget version - file selection is intuitive now (?)
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], EVENT_NAME, FILE_EXIST [2], GET_WUVALUE, GET_WVALUE, POPD, PUSHD
STR_LASTPOS [1], WDEF [1], WDEF [2], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER
XMENU [1], XMENU [2], XMOVIE [1], XMOVIE [2], break_file [4], concat_dir [4]
curdir [1], curdir [2], data_chk [1], data_chk [2], deriv_arr [1], deriv_arr [2]
file_exist [1], file_exist [3], file_list [1], file_list [2], get_infox
get_logenv [1], get_logenv [2], get_subdirs [1], get_subdirs [2], get_xfont [1]
get_xfont [2], mapx [1], mapx [2], restgen [1], restgen [2], show_pix_event [1]
show_pix_event [2], show_pix_event [3], str_lastpos [2], str_replace [1]
str_replace [2], uniqo [1], uniqo [2], ut_time [1], ut_time [2], wc_where [1]
wc_where [2]
CALLED BY:
get_pix
History:
7-Nov-1993 (SLF) Written for mercury picture display
10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
20-Dec-1993 (SLF) widgitized, some new features
[Previous]
[Next]
Name: show_pix_event
Purpose: event driver for xshow_pix
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], EVENT_NAME, GET_WUVALUE
GET_WVALUE, WDEF [1], WDEF [2], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMOVIE [1]
XMOVIE [2], break_file [4], data_chk [1], data_chk [2], get_info [1], get_info [2]
get_info [3], get_info [4], get_logenv [1], get_logenv [2], mapx [1], mapx [2]
restgen [1], restgen [2], ut_time [1], ut_time [2], wc_where [1], wc_where [2]
CALLED BY:
show_pix [1], show_pix [2]
History:
20-Dec-1993 (SLF) (guts of show_pix.pro, 10-Nov)
[Previous]
[Next]
Project : SOHO - CDS
Name :
SHOW_QUEUE
Purpose :
Show the contents of a print queue.
Explanation :
Spawns the proper command to the operating system to display the
contents of print queues.
Use :
SHOW_QUEUE [, QUEUE ]
Inputs :
None required.
Opt. Inputs :
QUEUE = Name of queue to be listed. If not passed, then the
environment variable PSLASER (or PSCOLOR) is checked for the
name of the print queue.
Outputs :
The information about the print queue is printed to the terminal
screen.
Opt. Outputs:
None.
Keywords :
COLOR = If set, then the environment variable PSCOLOR is checked for
the name of the print queue rather then PSLASER. Ignored if
QUEUE is passed.
Calls : ***
TRIM
Common :
None.
Restrictions:
In general, the SERTS graphics devices routines use the special system
variables !BCOLOR and !ASPECT. These system variables are defined in
the procedure DEVICELIB. It is suggested that the command DEVICELIB be
placed in the user's IDL_STARTUP file.
Side effects:
None.
Category :
Utilities, Devices.
Prev. Hist. :
William Thompson, July 1992.
Written :
William Thompson, GSFC, July 1992.
Modified :
Version 1, William Thompson, GSFC, 27 April 1993.
Incorporated into CDS library.
Version :
Version 1, 27 April 1993.
[Previous]
[Next]
Project : SOHO - CDS
Name : SHOW_STRUCT
Purpose : Display contents and breakdown of an IDL structure.
Explanation : Displays in a widget the contents of a structure. Embedded
structures are unpacked.
Use : IDL> show_struct, str_name
Inputs : str_name - name of structure to be viewed.
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords : None
Calls : ***
DATATYPE [1], DATATYPE [2], DATATYPE [3], DSP_STRUCT
CALLED BY:
MK_RASTER, ST_SUMER, XTKI
Common : None
Restrictions: None
Side effects: None
Category : Util, structure
Prev. Hist. : Just a packaged version of S V Haugan's DSP_STRUCT with the
/alone keyword.
Written : C D Pike, RAL, 21-Apr-94
Modified :
Version : Version 1, 21-Apr-94
[Previous]
[Next]
Project : HESSI
Name : SHOW_SYNOP
Purpose : widget interface to Synoptic data archive
Category : HESSI, Synoptic, Database, widgets, objects
Syntax : IDL> show_synop
Keywords : See SHOW_SYNOP::INIT
CALLS: ***
GET_HANDLER_ID, XALIVE
CALLED BY:
EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], HESSI
History : 12-May-2000, D.M. Zarro (SM&A/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SHOW_SYNOP__DEFINE
Purpose : widget interface to Synoptic data archive
Category : HESSI, Synoptic, Database, widgets, objects
Syntax : IDL> obj=obj_new('show_synop',group=group)
Keywords : GROUP = widget ID of any calling widget
PTR = pointer to last displayed object
CALLS: ***
ADD_TAG [1], ADD_TAG [2], ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR
BSORT [1], BSORT [2], BSORT [3], BSORT [4], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], CW_FIELD, DPRINT, EXIST, FILE_BREAK, FIX_DIR_NAME, FREE_VAR
GET_TEMP_DIR, GET_UTC, HAVE_METHOD, HAVE_TAG, HAVE_WIDGETS [1], HAVE_WIDGETS [2]
IS_BLANK, IS_CLASS, IS_COMPRESSED, IS_DIR, IS_STRING, LOC_FILE [1], LOC_FILE [2]
LOC_FILE [3], MATCH [1], MATCH [2], MATCH [3], MK_DFONT, OGOES, PLOT_GOES_EH
REM_TAG [1], REM_TAG [2], REP_TAG_VALUE, REVERSE, SHOW_SYNOP::CHECK_BACKGROUND
SHOW_SYNOP::CHECK_FLIST, SHOW_SYNOP::CHECK_TIMES, SHOW_SYNOP::CLEANUP
SHOW_SYNOP::CREATE_WIDGETS, SHOW_SYNOP::EVENT, SHOW_SYNOP::FILE_DESC
SHOW_SYNOP::FILE_INFO, SHOW_SYNOP::FILE_SITE, SHOW_SYNOP::FLIST
SHOW_SYNOP::GET_INFO, SHOW_SYNOP::INIT, SHOW_SYNOP::IS_LOG
SHOW_SYNOP::PLOT_DATA, SHOW_SYNOP::RHEAD, SHOW_SYNOP::SETPROP
SHOW_SYNOP::SETUP, SHOW_SYNOP::SLIST, SHOW_SYNOP_CLEANUP, SHOW_SYNOP_EVENT
STR_MATCH, TRIM, UTC2TAI, VALID_TIME, WIDGET_MBASE, WIDGET_SELECTED, WRITE_DIR, XACK
XALIVE, XANSWER, XHOUR, XKILL, XMANAGER, XMENU2, XPOPUP, XREGISTERED, XTEXT, XTEXT_RESET
concat_dir [4], get_uniq, is_number [1], is_number [2], is_struct, str_cut
History : 12-May-2000, D.M. Zarro (SM&A/GSFC) - written
11-Nov-2005, Zarro (L-3Com/GSI) - tidied up
20-Dec-2005, Kim Tolbert - changed dealing with goes object
4-Jan-2006, Zarro - removed old GOES references
13-Jan-2006, Zarro - added GROUP and NO_PLOTMAN keywords
24-Sep-2006, Zarro (ADNET/GSFC)
- moved directory selection from config to main widget
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name :
SHOWFLAGS
Purpose :
Show the settings controlled by SET/UNSET/ENABLEFLAG.
Explanation :
Shows the flag fields in the !IMAGE structure as set by the routines
SETFLAG, UNSETFLAG, and ENABLEFLAG.
Use :
SHOWFLAGS
Inputs :
None.
Opt. Inputs :
None.
Outputs :
None.
Opt. Outputs:
None.
Keywords :
None.
Calls : ***
TRIM
Common :
None.
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:
None.
Category :
Utilities, Image_display.
Prev. Hist. :
William Thompson, June 1991.
W.T.T., Nov. 1991, added support for MIN, MAX, VMIN, VMAX, TOP and
COMBINED.
William Thompson, August 1992, renamed BADPIXEL to MISSING.
Written :
William Thompson, GSFC, June 1991.
Modified :
Version 1, William Thompson, GSFC, 12 May 1993.
Incorporated into CDS library.
Version :
Version 1, 12 May 1993.
[Previous]
[Next]
NAME:
SHOWIMAGE
PURPOSE:
Show the contents of a graphics file in the current window.
The input formats supported are:
GIF 8-bit with color table,
BMP 8-bit with color table or 24-bit true-color,
PICT 8-bit with color table,
TIFF 8-bit with color table or 24-bit true-color,
JPEG 24-bit true color,
Any conversions necessary to translate 8-bit or 24-bit files
to 8-bit or 24-bit images on-screen are done automatically.
CATEGORY:
Input/Output.
CALLING SEQUENCE:
SHOWIMAGE, FILE
INPUTS:
FILE Name of the output file (format is identified automatically).
OPTIONAL INPUTS:
None.
KEYWORD PARAMETERS:
DITHER Set this keyword to dither the input image when displaying
24-bit images on an 8-bit display (default is no dithering).
CURRENT Set this keyword to display the image in the current window
(default is to create a new window sized to fit the image).
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None
CALLS: ***
QUERY_BMP, QUERY_GIF, QUERY_PICT, READ_BMP, READ_GIF, READ_PICT, REDUCE_COLORS
REVERSE
COMMON BLOCKS:
None
SIDE EFFECTS:
The color table is modified.
RESTRICTIONS:
Requires IDL 5.2 or higher (image QUERY functions).
EXAMPLE:
showimage, filepath('rose.jpg', subdir='examples/data')
MODIFICATION HISTORY:
Liam.Gumley@ssec.wisc.edu
http://cimss.ssec.wisc.edu/~gumley
$Id: showimage.pro,v 1.15 1999/11/19 21:20:50 gumley Exp $
Copyright (C) 1999 Liam E. Gumley
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
[Previous]
[Next]
NAME:
SHOWPROGRESS__DEFINE
PURPOSE:
An object for creating a progress bar.
AUTHOR:
FANNING SOFTWARE CONSULTING
David Fanning, Ph.D.
2642 Bradbury Court
Fort Collins, CO 80521 USA
Phone: 970-221-0438
E-mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
CATEGORY:
Utilities
CALLING SEQUENCE:
progressBar = Obj_New("SHOWPROGRESS")
INPUTS:
parent: A widget identifier of the widget that will be the
group leader for this program. It is *required* for modal
operation. If missing, you are on your own. :-(
KEYWORDS:
CANCELBUTTON: Set this keyword if a Cancel button is desired.
DELAY: The total time the widget should be on the display in AutoUpDate
mode. The keyword applies only to AutoUpDate mode. Default is 5 seconds.
STEPS: The number of steps to take in AutoUpDate mode. The keyword applies only
to AutoUpDate mode.
MESSAGE: The text of the label above the progress bar. Default is "Operation
in Progress...".
TITLE: ; The text of the top-level base title bar. Default is ""
COLOR: The color to draw the progress bar.
XSIZE: The XSize of the progress bar in Device coordinates. Default is 150.
YSIZE: The YSize of the progress bar in Device coordinates. Default is 10.
AUTOUPDATE: Set this keyword to be in AutoUpDate mode.
PROCEDURE:
There are two modes. In AutoUpDate mode, a delay and number of steps is
required. The modal widget stays on the display until the total time
exceeds the DELAY or the requested number of steps is taken. A TIMER
widget is used to generate update events. Nothing can be going on
concurrently in AutoUpDate mode. To enter AutoUpDate mode, type this:
progressBar = Obj_New("SHOWPROGRESS", /AutoUpDate, Delay=2, Steps=10)
progressBar->Start
Obj_Destroy, progressBar
The program will update and destroy itself automatically. (The object
itself is not destroyed. You must do this explicitly, as in the example
above.)
In normal mode, the user is responsible for starting, updating, and
destroying the progress indicator. The sequence of commands might look
like this:
progressBar = Obj_New("SHOWPROGRESS")
progressBar->Start
FOR j=0,9 DO BEGIN
Wait, 0.5 ; Would probably be doing something ELSE here!
progressBar->Update, (j+1)*10
ENDFOR
progressBar->Destroy
Obj_Destroy, progressBar
Normal mode gives you the opportunity to update the Progress Bar
in a loop while something else is going on. See the example program
at the end of this file.
Note that the object itself is not destroyed when calling the DESTROY
method. You must explicitly destroy the object, as in the example above.
METHODS:
CHECKCANCEL: This function method returns a 1 if the user has clicked
the CANCEL button. Otherwise, it returns a 0.
cancelled = progressBar->CheckCancel()
IF cancelled THEN progressBar->Destroy
DESTROY: Destroys the ShowProgress widgets. It does NOT destroy the object.
progressBar->Destroy
GETPROPERTY: Gets the properties that can be set in the INIT method, including
the parent widget ID.
progressBar->GetProperty, Steps=currentNSteps, Delay=currentDelay
SETCOLOR: Changes the color of the progress bar.
progressBar->SetColor, !P.Color
SETLABEL: Changes the text on the widget label.
progressBar->SetLabel, 'This text instead'
SETPROPERTY: Allows the user to set the INIT parameter via keywords.
progressBar->SetProperty, Color=244, XSize=200, Message='Please Wait...'
START: Puts the ShowProgress bar on the display. In AutoUpDate mode, the
widget starts to automatically update.
progressBar->Start
UPDATE: Updates the progress bar. Requires on argument, a number between 0
and 100 that indicates the percent of progress bar that should be filled
with a color.
progressBar->Update, 50
EXAMPLE:
See the example program at the bottom of this file.
CALLS: ***
SHOWPROGRESS::CHECKCANCEL, SHOWPROGRESS::CLEANUP, SHOWPROGRESS::DESTROY
SHOWPROGRESS::GETPROPERTY, SHOWPROGRESS::INIT, SHOWPROGRESS::REINITIALIZE
SHOWPROGRESS::SETCANCEL, SHOWPROGRESS::SETCOLOR, SHOWPROGRESS::SETLABEL
SHOWPROGRESS::SETPROPERTY, SHOWPROGRESS::START, SHOWPROGRESS::TIMER_EVENTS
SHOWPROGRESS::UPDATE, SHOWPROGRESS_CLEANUP, SHOWPROGRESS_EVENT, XMANAGER
RESTRICTIONS:
In contradiction to the IDL documentation, making the parent widget
insensitive in normal mode does NOT prevent the parent widgets from
receiving events on my Windows NT 4.0, SP 4 system running IDL 5.2,
IDL 5.2.1, or IDL 5.3 (beta).
Note that if you specify a CANCEL button the Show Progress program CANNOT
run as a MODAL widget program. Thus, user *may* be able to generate events
in the calling program while this program is running.
MODIFICATION HISTORY:
Written by: David Fanning, 26 July 1999.
Added code so that the current graphics window doesn't change. 1 September 1999. DWF.
Added yet more code for the same purpose. 3 September 1999. DWF.
Added a CANCEL button and made other minor modifications. 12 Oct 1999. DWF.
Added a third mode - 'In Progress Mode' - for when you want to show that
a routine is working, and provide a 'Cancel' button, but you have no
way of estimating what percentage is done. To use, set up just like
normal mode, but don't pass percent argument in Update method. Progress bar
will flipflop to show progress. 18-Mar-2001, Kim Tolbert, GSFC
Fixed two minor bugs - changed self.cancel to self.cancelbutton in the
Reinitialize method, and changed selfwindow to self.wid in TimerEvents method
(selfwindow not defined at that point). 18-Mar-2001, Kim Tolbert, GSFC
Added message_text keyword to Update method - changes text shown above
progress bar so can show #iterations completed or something. 18-Mar-2001, Kim Tolbert, GSFC
Added position keyword to init method. Enabled multi-line (max=3) message above progress bar.
Added 'Elapsed Time' information. Made progress bar 90% of size of widget (if message text
causes widget to grow bigger, bar will grow too). 22-Mar-2001, Kim Tolbert, GSFC
Changed integer type from fix to long in elapsed time calculation. 28-Mar-2001, Kim Tolbert, GSFC
Call widget_control,/show on every update call to bring progress bar to front. 18-May-2001, Kim, GSFC
Added cancelid to properties GetProperty can return. 21-Jun-2004, Kim Tolbert
[Previous]
[Next]
Project : HESSI
Name : SID__DEFINE
Purpose : Define a Session ID (SID) class for tracking users CGI forms
Category : HTML, Objects
Inputs : None
Outputs : SID = a SID class
Keywords : None
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, FREE_POINTER, GET_SID
SID::BORN, SID::CLEANUP, SID::GET, SID::ID, SID::INIT, SID::SET, SID::VALUE
delvarx [5]
History : 13-Sept-1999, D.M. Zarro. Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO - CDS
Name : SIG_ARRAY
Purpose : Returns the standard deviation of an array.
Category : Class3, Numerical, Error-analysis, Statistics
Explanation : Calculate the standard deviation value of an array, or over one
dimension of an array as a function of all the other
dimensions.
Syntax : Result = SIG_ARRAY( ARRAY [, DIMENSION] )
CALLED BY:
AVG_WO_CR, constbacksub [1], constbacksub [2]
Examples :
Inputs : ARRAY = The array to determine the standard deviation from.
Opt. Inputs : DIMENSION = The dimension to calculate the standard deviation
over.
Outputs : The result of the function is the standard deviation value of
the array when called with one parameter.
If DIMENSION is passed, then the result is an array with all
the dimensions of the input array except for the dimension
specified, each element of which is the standard deviation of
the corresponding vector in the input array.
For example, if A is an array with dimensions of (3,4,5), then
the command:
B = SIG_ARRAY(A,2)
is equivalent to
B = FLTARR(3,5)
FOR J = 0,4 DO BEGIN
FOR I = 0,2 DO BEGIN
B(I,J) = SIG_ARRAY(A(I,*,J), N)
ENDFOR
ENDFOR
Opt. Outputs: None.
Keywords : MISSING = Value signifying missing pixels. Any pixels with
this value are not included in the calculation. If
there are no non-missing pixels, then MISSING is
returned.
N_PAR = The number of fitted parameters to take into account
when determining the standard deviation. The default
value is one. The number of degrees of freedom is
N_ELEMENTS(ARRAY) - N_PAR. The value of SIG_ARRAY
varies as one over the square root of the number of
degrees of freedom.
Calls : ***
AVERAGE, DATATYPE [1], DATATYPE [2], DATATYPE [3]
Common : None.
Restrictions: None.
Side effects: None.
Prev. Hist. : Based on an earlier routine called SIGMA by W. Thompson, 1986.
History : Version 1, 26-Mar-1996, William Thompson, GSFC
Version 2, 26-Feb-1997, William Thompson, GSFC
Corrected problem with roundoff error when the
distribution width is small compared to the data.
Version 3, 25-Feb-1997, William Thompson, GSFC
Make sure that one doesn't try to take square root of a
negative number due to roundoff error.
Version 4, 11-Apr-1998, William Thompson, GSFC
Corrected bug involving incorrect application of NPAR
adjustment.
Version 5, 25-Sep-1998, William Thompson, GSFC
Improved way that round-off error is handled when the
DIMENSION parameter is used. Rather than normalizing
to a single average over the array, a separate average
is calculated for each pixel of the reduced array.
Version 6, 20-Sep-2005, William Thompson, GSFC
Fixed bug with calculation for integer arrays
Contact : WTHOMPSON
[Previous]
[Next]
NAME:
SIGMA_FILTER
PURPOSE:
Replace pixels more than a specified pixels deviant from its neighbors
EXPLANATION:
Computes the mean and standard deviation of pixels in a box centered at
each pixel of the image, but excluding the center pixel. If the center
pixel value exceeds some # of standard deviations from the mean, it is
replaced by the mean in box. Note option to process pixels on the edges.
CALLING SEQUENCE:
Result = sigma_filter( image, box_width, N_sigma=(#), /ALL,/MON )
INPUTS:
image = 2-D image (matrix)
box_width = width of square filter box, in # pixels (default = 3)
KEYWORDS:
N_sigma = # standard deviations to define outliers, floating point,
recommend > 2, default = 3. For gaussian statistics:
N_sigma = 1 smooths 35% of pixels, 2 = 5%, 3 = 1%.
RADIUS = alternative to specify box radius, so box_width = 2*radius+1.
/ALL_PIXELS causes computation to include edges of image,
/KEEP causes opposite effect: pixels with values outside of specified
deviation are not changed, pixels within deviation are smoothed.
/ITERATE causes sigma_filter to be applied recursively (max = 20 times)
until no more pixels change (only allowed when N_sigma >= 2).
/MONITOR prints information about % pixels replaced.
Optional Outputs:
N_CHANGE = # of pixels changed (replaced with neighborhood mean).
VARIANCE = image of pixel neighborhood variances * (N_sigma)^2,
DEVIATION = image of pixel deviations from neighborhood means, squared.
CALLS: ***
FILTER_IMAGE
CALLED BY:
fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], get_newsoon, poly_diffim
sun_today [1], sun_today [2], sun_today [3]
PROCEDURE:
Compute mean over moving box-cars using smooth, subtract center values,
compute variance using smooth on deviations from mean,
check where pixel deviation from mean is within variance of box,
replace those pixels in smoothed image (mean) with orignal values,
return the resulting partial mean image.
MODIFICATION HISTORY:
Written, 1991, Frank Varosi and Dan Gezari NASA/GSFC
F.V.1992, added optional keywords /ITER,/MON,VAR=,DEV=,N_CHANGE=.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
PROJECT:
SDAC
NAME:
SIGN
PURPOSE:
This function takes two numbers X1,X2 and returns sign(X2)*abs(X1)
(by assumption sign(0)=1)
CATEGORY:
NUMERICAL MATH UTILITY
CALLING SEQUENCE:
A = SIGN(X1,X2)
INPUTS:
X1 the absolute value of X1 is used
X2 the sign of X2 is used
OUTPUTS:
SIGN sign(X2)*abs(X1)
CALLED BY:
EPHEMERIS [1], EPHEMERIS [2], PB_INVERTER, SIMPLEX_BOUND, SIMPLEX_INSIDE
WCS_DECOMP_ANGLE, WCS_PROJ_PCO, WCS_PROJ_QSC, get_helio_dist
PROCEDURE:
(Equivalent to FORTRAN SIGN function)
If X1 and X2 have the same number of elements the result is calculated
from corresponding elements in X1 and X2. If X2 is a scalar the sign
of X2 is used in combination with all elements of X1.
MODIFICATION HISTORY:
APR-1991, Paul Hick (ARC)
[Previous]
[Next]
Project : SOHO - CDS
Name :
SIGRANGE()
Purpose :
Selects the most significant data range in an image.
Explanation :
Selects out the most significant range in the data to be used in
displaying images. The histogram of ARRAY is used to select the most
significant range.
Use :
OUTPUT = SIGRANGE( ARRAY )
Inputs :
ARRAY = Array to take most significant range of.
Opt. Inputs :
None.
Outputs :
The function returns an array where values above and below the
selected range are set equal to the maximum and minimum of the
range respectively.
Opt. Outputs:
None.
Keywords :
FRACTION = Fraction of data to consider most significant.
Defaults to 0.99
MISSING = Value used to flag missing points. Data points with this
value are not considered or changed.
RANGE = Return the range used
Calls :
GET_IM_KEYWORD
CALLED BY:
BP_SEEK_POS, CDS_SNAPSHOT, CDS_THUMBNAIL, EIS_IMAGE_TOOL_EVENT [1]
EIS_IMAGE_TOOL_EVENT [2], FF_DEMO, FIT2GIF, IMAGE_TOOL_EVENT, LOCATE_FFCAL, MK_GIF
MK_SYNOPTIC, POLY_SPEC, SHOW_SCATTER, SHOW_SYNOPTIC, SLIT45_IMAGE_DEMO, SNAP_MOVIE
XCOR_CDS, XTVSCALE, todays_targets, trace_scale
Common :
None.
Restrictions:
ARRAY must have more than two points. Fraction must be greater than 0
and less than 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 :
None.
Prev. Hist. :
W.T.T., Oct. 1987.
W.T.T., Jan. 1991. Changed FRACTION to keyword, and added keyword
BADPIXEL.
W.T.T., Mar. 1992. Rewrote to apply histograms to only a fraction of
the array to speed up the process.
William Thompson, August 1992, renamed BADPIXEL to MISSING.
Written :
William Thompson, GSFC, October 1987.
Modified :
Version 1, William Thompson, GSFC, 12 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 25 May 1993.
Changed call to HISTOGRAM to be compatible with OpenVMS/ALPHA
Version 3, CDP, RAL, Add RANGE keyword. 16-Apr-96
Version 4, William Thompson, GSFC, 17 April 1996
Corrected some problems when range is too high.
Version 5, 13-Jan-1998, William Thompson, GSFC
Use random numbers to improve statistics when only using a
fraction of the array.
Version 6, 06-Mar-1998, William Thompson, GSFC
Change default to 0.99
Version 7, 28-Mar-2006, William Thompson, GSFC
Made more robust
Version :
Version 6, 06-Mar-1998
[Previous]
[Next]
NAME:
SIGRANGE()
PURPOSE:
Selects the most significant data range in an image.
EXPLANATION:
Selects out the most significant range in the data to be used in
displaying images. The histogram of ARRAY is used to select the most
significant range. Useful for scaling an image display.
CALLING SEQUENCE:
OUTPUT = SIGRANGE( ARRAY )
INPUTS:
ARRAY = Array to take most significant range of.
OPTIONAL INPUTS:
None.
OUTPUTS:
The function returns an array where values above and below the
selected range are set equal to the maximum and minimum of the
range respectively.
OPTIONAL INPUT KEYWORDS:
FRACTION = Fraction of data to consider most significant.
Defaults to 0.99
MISSING = Value used to flag missing points. Data points with this
value are not considered or changed.
OPTIONAL OUTPUT KEYWORD
RANGE = 2 element vector, giving the range (minimum and maxmimum)
used
NOTES:
If the image array contains more than 10,000 points then SIGRANGE()
uses random indexing of a subset of the points to determine the range
(for speed). Thus identical calls to SIGRANGE() might not yield
identical results (although they should be very close).
CALLED BY:
BP_SEEK_POS, CDS_SNAPSHOT, CDS_THUMBNAIL, EIS_IMAGE_TOOL_EVENT [1]
EIS_IMAGE_TOOL_EVENT [2], FF_DEMO, FIT2GIF, IMAGE_TOOL_EVENT, LOCATE_FFCAL, MK_GIF
MK_SYNOPTIC, POLY_SPEC, SHOW_SCATTER, SHOW_SYNOPTIC, SLIT45_IMAGE_DEMO, SNAP_MOVIE
XCOR_CDS, XTVSCALE, todays_targets, trace_scale
RESTRICTIONS:
ARRAY must have more than two points. Fraction must be greater than 0
and less than 1.
SIGRANGE was originally part of the SERTS image display package.
Other routines from this package are available at
http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/image/
Note that this version of SIGRANGE does not include the non-standard
system variables used in the SERTS package.
REVISION HISTORY:
Version 1, William Thompson, GSFC, 12 May 1993.
Incorporated into CDS library.
Version 2, William Thompson, GSFC, 25 May 1993.
Changed call to HISTOGRAM to be compatible with OpenVMS/ALPHA
Version 3, CDP, RAL, Add RANGE keyword. 16-Apr-96
Version 4, William Thompson, GSFC, 17 April 1996
Corrected some problems when range is too high.
Version 5, 13-Jan-1998, William Thompson, GSFC
Use random numbers to improve statistics when only using a
fraction of the array.
Version 6, 06-Mar-1998, William Thompson, GSFC
Change default to 0.99
[Previous]
[Next]
function simplex_bound,datain,volume,verbose=verbose
NAME:
SIMPLEX_BOUND
PURPOSE:
Find a simplex that bounds a set of coordinates
CATEGORY:
CALLING SEQUENCE:
simplex = simplex_bound(coordinates[,volume])
INPUTS:
data = fltarr(ndim,ndata) where ndim is the dimension of the data and
ndata is the number of coordinate points.
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
simplex = fltarr(ndim,ndim+1) give the ndim+1 simplex vertices
volume = the volume of the final simplex, scaled so that it should
be around 1.0 or so if all went well. (typically 0.2 -- 5.0)
CALLS: ***
AMOEBA, SIGN, SIMPLEX_BOUND_AMOEBA, SIMPLEX_INSIDE, SIMPLEX_VOLUME
CALLED BY:
mk_synsfc_coeff [1], mk_synsfc_coeff [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
There is some randomness here. If getting the smallest simplex is
really important, run this program a few times and take the simplex
with the smallest volume.
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf 2001-Jul-17
T. Metcalf 2001-Dec-19 Added amoeba minimization
[Previous]
[Next]
function simplex_inside,simplex,data,origin=origin
NAME:
SIMPLEX_INSIDE
PURPOSE:
Determine whether a coordinate or vector of coordinates is
inside a simplex
CATEGORY:
CALLING SEQUENCE:
inside = simplex_inside(simplex,coordiantes)
INPUTS:
simplex = fltarr(ndim,ndim+1) is the simplex
coordinates = coordinates to check fltarr(ndin,npoints)
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
inside = boolean array (npoints), 1=inside, 0 = outside the simplex
CALLS: ***
KILL_INDEX [1], KILL_INDEX [2], SIGN, SIMPLEX_PVECTOR
CALLED BY:
SIMPLEX_BOUND, mk_syn_sfc [1], mk_syn_sfc [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf 2001-July-17
[Previous]
[Next]
function simplex_pvector,simplex,ssface
NAME:
SIMPLEX_PVECTOR
PURPOSE:
Compute a unit vector normal to a face of a simplex
CATEGORY:
CALLING SEQUENCE:
pvector = simplex_pvector(simplex,ssface)
INPUTS:
simplex = the simplex fltarr(ndimensions,ndimensions+1)
ssface = the indices into the second dimension of simplex giving
the vertices of the face. lonarr(ndimension).
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
pvector = unit vector normal to the face.
CALLS: ***
SIMPLEX_GET_PERPENDICULAR
CALLED BY:
SIMPLEX_INSIDE
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf 2001-July-18
[Previous]
[Next]
function simplex_volume,simplex,scale
NAME:
SIMPLEX_VOLUME
PURPOSE:
Calculates the volume enclosed by a simplex
CATEGORY:
CALLING SEQUENCE:
volume = simplex_volume(simplex)
INPUTS:
simplex = fltarr(ndim,ndim+1) fives the ndim+1 simplex vertices
OPTIONAL INPUT PARAMETERS:
scale = scale parameter for each dimension fltarr(ndim)
KEYWORD PARAMETERS
OUTPUTS:
volume = the volume enclosed by the simplex
CALLS: ***
DETERM, FACTORIAL
CALLED BY:
SIMPLEX_BOUND
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf 2001-July-17
[Previous]
[Next]
Project : SOHO - CDS
Name :
SINCE_VERSION
Purpose :
Determine if current release is later than specified.
Explanation :
Determine if the current release of IDL (as given in the
!VERSION.RELEASE system variable) comes after the user specified
release.
Use :
test = SINCE_VERSION( release )
Use the /FTOXDR keyword to the BYTEORDER procedure if the current
release of IDL is 2.2.2 or later
IDL> if since_version('2.2.2') then byteorder, a, /FTOXDR
Inputs :
release - scalar string, must be formatted exactly like the
!VERSION.RELEASE system variable (e.g. '3.0.0')
Opt. Inputs :
None.
Outputs :
test - 1 if current release is identical or later than the specified
'release' else 0
Opt. Outputs: None.
Keywords : None.
Calls : None.
CALLED BY:
ADD_TAG [1], ALLOW_WINDOWS, ASSIGN_NOCOPY, Array_Despike, BIGPICKFILE, Brm_GauLeg
CHMOD, CLEANPLOT [1], CLEANPLOT [2], CLEANPLOT [3], CLEAN_PATH, CLOSE_LUN
COMBINE_STRUCT, COMPILE_SFIT, CONCAT_STRUCT, CREATE_PARAM [1], CREATE_PARAM [2]
CWF_COMPONENT, CWF_FIT, CWF_STATUS, CWQ_CUBE, CWQ_DSPWAV [1], CWQ_IMAGE [1]
CWQ_SPECTR [1], CWQ_WINSEL [1], CW_CUBEVEIW, CW_ENTERB, CW_FLIPSWITCH, CW_MOUSE
CW_PSELECT, DSP_INFO, DSP_WAV, EIS_GET_HDR [1], EIS_GET_HDR [2]
EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], EIT__DEFINE, FILE_COPY2, FITS__DEFINE
FRAMEWORK ABSTRACT CLASS DEFINITION, GEN__DEFINE, HOST_TO_IEEE [1]
HOST_TO_IEEE [2], HOST_TO_IEEE [3], HOST_TO_IEEE [4], HSI_SIM11
HSI_SPECTRUM__DEFINE, IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3]
IEEE_TO_HOST [4], IMAGE_TOOL, IS_DIR, ITOOL_PICKFILE, JOIN_STRUCT [1]
LIGHTCURVE CLASS DEFINITION, LOC_FILE_NEW, MERGE_STRUCT, MK_DIR, MK_PLAN_PLOT
MRD_HEAD, OBJ_STRUCT, PICKFILE, PLOT_MAP, PQLPROFILE, PQLZOOM, REM_TAG [1], REPLICATE2
RM_FILE, SAME_DATA [1], SOAP__DEFINE, SOCK_DOWNLOAD, SPECTRUM CLASS DEFINITION
SPEX_SAVE_DATA [1], SPEX_SAVE_DATA [2], SPEX_SUMMARY [1], SPEX_SUMMARY [2]
SPEX__DEFINE, TEST_OPEN, VALID_FITS, WHERE2, WIDGET_MBASE, WRITE_DIR, XCDS_ANALYSIS
XCDS_COSMIC, XCFIT, XCFIT_BLOCK, XCR_REMOVE, XDIFF, XINPUT, XPLOTSCALE, XRECORDER
XUPDATE, cw_edroplist, cwq_dspwav [2], cwq_image [2], cwq_spectr [2]
cwq_winsel [2], dsp_menu, get_gevloc_data, is_number [1], les_archive_info
mark_intervals, mreadfits_urls, nospike, obj_restore, obj_save, plotman
plotman_create_files_event, pmtras_analysis, save_idl_routines, spectro_plot2
spex_energy_ranges [1], spex_energy_ranges [2], spex_preview [1]
spex_preview [2], ssw_getdst, ssw_post_query, ssw_time2filelist, str_subset
strwhere, sxi_files, sxt2file, update_history, yopos [1], yopos [2]
Common : None.
Restrictions: None.
Side effects: None.
Category : Utilities, Miscellaneous
Prev. Hist. :
Written Wayne Landsman Hughes/STX January, 1992
Corrected algorithm W. Landsman April, 1992
Written : Wayne Landsman, Hughes/STX, January 1992
Modified : Version 1, William Thompson, GSFC, 14 December 1994
Incorporated into CDS library
Version : Version 1, 14 December 1994
[Previous]
[Next]
Project : HESSI
Name : SITE__DEFINE
Purpose : Define a site object
Category : Ancillary GBO Synoptic Objects
Syntax : IDL> c=obj_new('site')
CALLS: ***
ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR, ARR2STR [1], Arr2Str [2]
COMDIM2, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1]
DATATYPE [2], DATATYPE [3], DPRINT, EXIST, FILE_BREAK, FILT_EVENTS, GET_CALLER
GET_DELIM, GET_FID, IS_BLANK, IS_STRING, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3]
MK_FID, NINT [1], NINT [2], OBJ_STRUCT, PARSE_TIME, ROUND_TIME, SITE::CLEANUP
SITE::COPY, SITE::COPY_FILE, SITE::FILTER_EVENTS, SITE::FILTER_EXT
SITE::FILTER_TIME, SITE::FSEARCH, SITE::GET_CACHE_ID, SITE::GET_CATS
SITE::GET_FILES, SITE::GET_FTYPE, SITE::GET_SDIR, SITE::GET_TOPDIR
SITE::GZIP_FILE, SITE::HGET, SITE::HSEARCH, SITE::INIT, SITE::LIST, SITE::LIST
SITE::LIST_CACHE, SITE::LOC_FILE, SITE::OUTPUT, SITE::PARSE_TIME, SITE::SEARCH
SITE::SETPROP, SITE::SET_RDIR, SITE::SHOW, SITE::VALID, SITE::VALID_ORG
STR2ARR [1], STR2ARR [2], STR_FORMAT, STR_MATCH, TRIM, TRIM2, WRITE_DIR, XKILL
anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], concat_dir [4], gzip
is_number [1], is_number [2], is_struct, str_replace [1], str_replace [2]
History : Written 4 Jan 2000, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
SIXLIN
PURPOSE:
Compute linear regression coefficients by six different methods.
EXPLANATION:
Adapted from the FORTRAN program (Rev. 1.1) supplied by Isobe,
Feigelson, Akritas, and Babu Ap. J. Vol. 364, p. 104 (1990).
Suggested when there is no understanding about the nature of the
scatter about a linear relation, and NOT when the errors in the
variable are calculable.
CALLING SEQUENCE:
SIXLIN, xx, yy, a, siga, b, sigb
INPUTS:
XX - vector of X values
YY - vector of Y values, same number of elements as XX
OUTPUTS:
A - Vector of 6 Y intercept coefficients
SIGA - Vector of standard deviations of 6 Y intercepts
B - Vector of 6 slope coefficients
SIGB - Vector of standard deviations of slope coefficients
The output variables are computed using linear regression for each of
the following 6 cases:
(0) Ordinary Least Squares (OLS) Y vs. X
(1) Ordinary Least Squares X vs. Y
(2) Ordinary Least Squares Bisector
(3) Orthogonal Reduced Major Axis
(4) Reduced Major-Axis
(5) Mean ordinary Least Squares
NOTES:
Isobe et al. make the following recommendations
(1) If the different linear regression methods yield similar results
then quoting OLS(Y|X) is probably the most familiar.
(2) If the linear relation is to be used to predict Y vs. X then
OLS(Y|X) should be used.
(3) If the goal is to determine the functional relationship between
X and Y then the OLS bisector is recommended.
REVISION HISTORY:
Written Wayne Landsman February, 1991
Corrected sigma calculations February, 1992
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
NAME:
SIXTY()
PURPOSE:
Converts a decimal number to sexigesimal.
EXPLANATION:
Reverse of the TEN() function.
CALLING SEQUENCE:
X = SIXTY( SCALAR, [ /TrailSign ] )
INPUTS:
SCALAR -- Decimal quantity.
OUTPUTS:
Function value returned = real vector of three elements,
sexigesimal equivalent of input decimal quantity. Double
precision if the input is double, otherwise floating point.
By default, a negative number is signified by making the first non-zero
element of the output vection negative, but this can be modfied with
the /TrailSign keyword.
OPTIONAL INPUT KEYWORD:
/TrailSign - By default, SIXTY() returns a negative sign in the first
nonzero element. If /TrailSign is set, then SIXTY() will return
always return a negative sign in the first element, even if it is
zero
CALLED BY:
ADSTRING, EQPOLE_GRID, QDCB_GRID, WUPTIME
PROCEDURE:
Mostly involves checking arguments and setting the sign.
EXAMPLE:
If x = -0.345d then sixty(x) = [0.0, -20.0, 42.0]
and sixty(x,/trail) = [-0.0, 20.0, 42.0]
MODIFICATION HISTORY:
Written by R. S. Hill, STX, 19-OCT-87
Output changed to single precision. RSH, STX, 1/26/88
Accept single element vector W. Landsman Sep. 1996
Converted to IDL V5.0 W. Landsman September 1997
Added /TrailSign keyword, preserve data type
B. Stecklum/ W. Landsman March 2006
[Previous]
[Next]
NAME:
SIZE_STRUCT
PURPOSE:
Obtain the size in bytes of an IDL structure definition.
EXPLANATION:
For most applications this function is superceded by use
of the /LENGTH keyword to the intrinsic N_TAGS function
introduced in IDL V2.3.0
CALLING SEQUENCE:
bytes = size_struct( structure )
CALLED BY:
ASCII_RAW, BAT_MERGE, EDITOC, FIND_PACKET, FS_OPEN [1], FS_READ_DD, HSI_LOAD_STRUCT
HSI_MODUL_PATTERN_CLOSE, HXRBS_ESC, QL_READBDB, READ_BATSE_DD, READ_OCC_DISCSP
READ_SHER, WRITE_DD, WRITE_FDB, WRITE_LOG, batse_write_log, read_dd, xzchange
examples:
print, size_struct( "fdq_sdf" )
INPUTS:
structure = a structure variable or
a string giving the structure name
as known by IDL (help,/struct,variable).
/PRINT = to print all sub structure sizes.
inputs/outputs used recursively:
struct = the structure VARIABLE currently analyzed.
Max_Field_Size = size of the largest field found in structure.
RESULT:
Function returns the total size in bytes of a structure element.
PROCEDURE:
Strategy is to call size_struct recursively if
structure contains sub-structures.
Otherwise just add up the field sizes.
MODIFICATION HISTORY:
written 1990 Frank Varosi STX @ NASA/GSFC (using align_struct).
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Project : SOHO - CDS
Name : SIZEOF()
Purpose : Calculates the size of an IDL variable
Explanation : Calculates the size of an IDL variable. In the current
Ultrix IDL release (2.3.0 ), size of structures cannot be
obtained since recursive calls are not supported. String
variables are countedas one byte each (??)
Use : x= sizeof( input )
Inputs : input - any IDL variable
Opt. Inputs : None
Outputs : Function returns size of input variable
Opt. Outputs: None
Keywords : None
Calls : None
Restrictions: None
Side effects: None
Category : Util, misc
Prev. Hist. : Arnulf, Oct-93
Written : For FM sci_ana program, C D Pike, RAL, 22-Oct-93
Modified :
Version : Version 1, 22-Oct-93
[Previous]
[Next]
Project : SOHO - CDS
Name : SKIPF
Purpose : Emulates the VMS SKIPF function on UNIX machines.
Explanation : Emulates the VMS SKIPF function on UNIX machines.
Use : SKIPF, UNIT, NSKIP
SKIPF, UNIT, NSKIP, RECORDS
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.
NSKIP = Number of files or records to skip.
Opt. Inputs : RECORDS = If present, then records are skipped instead of
files.
Outputs : None. However, !ERR is set to ABS(NSKIP)
Opt. Outputs: None.
Keywords : None.
Calls : ***
CHECK_TAPE_DRV [1], CHECK_TAPE_DRV [2]
CALLED BY:
FITSTAPE, FXTAPEREAD, FXTPIO_WRITE, RD_EXB, TCOPY, mt
Common : None.
Restrictions: This routine may not act exactly the same as the VMS
equivalent, particularly in regards to the behavior of the !ERR
system variable.
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: The device file is opened. !ERR is set to ABS(NSKIP).
Category : Utilities, I/O, Tape.
Prev. Hist. : VERSION 1, R. W. Thompson 12/4/89
William Thompson, Apr 1991, rewrote to better emulate VMS
version.
Written : R. W. Thompson, GSFC/IUE, 4 December 1989.
Modified : Version 1, William Thompson, GSFC, 21 December 1993.
Rewrote to use IOCTL.
Version : Version 1, 21 December 1993.
[Previous]
[Next]
NAME:
SKY
PURPOSE:
Determine the sky level in an image
EXPLANATION:
Approximately 10000 uniformly spaced pixels are selected for the
computation. Adapted from the DAOPHOT routine of the same name.
The sky is computed either by using the procedure mmm.pro (defualt)
or by sigma clipping (if /MEANBACK is set)
CALLING SEQUENCE:
SKY, image, [ skymode, skysig ,/SILENT, /MEANBACK, /NAN, CIRCLERAD= ]
Keywords available when MEANBACK is not set (passed to mmm.pro):
HIGHBAD=, /INTEGER, READNOISE=
Keywords available when /MEANBACK is set:
CLIPSIG=, /DOUBLE, CONVERGE_NUM=, MAXITER=
INPUTS:
IMAGE - One or two dimensional array
OPTIONAL OUTPUT ARRAYS:
SKYMODE - Scalar, giving the mode of the sky pixel values of the
array IMAGE, as determined by the procedure MMM.
SKYSIG - Scalar, giving standard deviation of sky brightness
INPUT KEYWORD PARAMETERS:
CIRCLERAD - Use this keyword to have SKY only select pixels within
specified pixel radius of the center of the image. If
CIRCLERAD =1, then the radius is set equal to half the image
width. Can only be used with square images.
/MEANBACK - if set, then the background is computed using the 3 sigma
clipped mean (using meanclip.pro) rather than using the mode
computed with mmm.pro. This keyword is useful for the Poisson
count regime or where contamination is known to be minimal.
/NAN - This keyword must be set to ignore NaN values when computing
the sky.
/SILENT - If this keyword is supplied and non-zero, then SKY will not
display the sky value and sigma at the terminal
The _EXTRA facility can is used to pass optional keywords to the programs
that actually perform the sky computation: either mmm.pro
(default) or meanclip.pro (if /MEANBACK) is set. The following
keywords are available with the mmm.pro (default) setting
HIGHBAD - scalar value of the (lowest) "bad" pixel level (e.g. cosmic
rays or saturated pixels) If not supplied, then there is
assumed to be no high bad pixels.
READNOISE - Scalar giving the read noise (or minimum noise for any
pixel). Normally, MMM determines the (robust) median by
averaging the central 20% of the sky values. In some cases
where the noise is low, and pixel values are quantized a
larger fraction may be needed. By supplying the optional
read noise parameter, MMM is better able to adjust the
fraction of pixels used to determine the median.
/INTEGER - Set this keyword if the input SKY image only contains
discrete integer values. This keyword is only needed if the
SKY image is of type float or double precision, but contains
only discrete integer values.
If the /MEANBACK keyword is set then the following keywords are available
CLIPSIG: Number of sigma at which to clip. Default=3
MAXITER: Ceiling on number of clipping iterations. Default=5
CONVERGE_NUM: If the proportion of rejected pixels is less
than this fraction, the iterations stop. Default=0.02, i.e.,
iteration stops if fewer than 2% of pixels excluded.
/DOUBLE - if set then perform all computations in double precision.
Otherwise double precision is used only if the input
data is double
CALLS: ***
DIST_CIRCLE, MEANCLIP, MMM
CALLED BY:
EXTRAP, SKYADJ_CUBE
PROCEDURE:
A grid of points, not exceeding 10000 in number, is extracted
from the image array. The mode of these pixel values is determined
by the procedure mmm.pro or meanclip.pro. In a 2-d array the grid is
staggered in each row to avoid emphasizing possible bad columns
PROCEDURE CALLS:
MEANCLIP, MMM, DIST_CIRCLE
REVISION HISTORY:
Written, W. Landsman STX Co. September, 1987
Changed INDGEN to LINDGEN January, 1994
Fixed display of # of points used March, 1994
Stagger beginning pixel in each row, added NSKY, READNOISE, HIGHBAD
W. Landsman June 2004
Adjustments for unbiased sampling W. Landsman June 2004
Added /NAN keyword, put back CIRCLERAD keyword W. Landsman July 2004
Added MEANBACK keyword, _EXTRA kewyord ,preserve data type in
calculations W. Landsman November 2005
[Previous]
[Next]
NAME:
SKYADJ_CUBE
PURPOSE:
Sky adjust the planes of a datacube.
EXPLANATION:
When removing cosmic rays from a set of images, it is desirable that
all images have the same sky level. This procedure (called by
CR_REJECT) removes the sky from each image in a data cube.
CALLING SEQUENCE:
SKYADJ_CUBE,Datacube,Skyvals,Totsky
MODIFIED ARGUMENT:
Datacube: 3-D array with one image of same field in each plane.
Returned with sky in each plane adjusted to zero.
OUTPUT ARGUMENTS:
Skyvals: Array of sky values used on each plane of datacube.
For a scalar sky, this parameter is a vector
containing the sky value for each image plane. For a
vector sky, this parameter is a 2-D array where each
line corresponds to one image plane.
INPUT KEYWORD PARAMETERS:
REGION - [X0,X1,Y0,Y1] to restrict area used for computation
of sky. Default is 0.1*Xdim, 0.9*Xdim, 0.1*Ydim,
0.9*Ydim. If INPUT_MASK is specified, the two
specs are combined, i.e., the intersection of the
areas is used.
VERBOSE - Flag. If set, print information on skyvals.
NOEDIT - Flag. If set, return sky values without changing
datacube.
XMEDSKY - Flag. If set, return vector sky as a function of X.
SELECT - Array of subscripts of planes of the cube to process.
(Default=all)
EXTRAPR - Applies only in XMEDSKY mode.
Subregion to use for polynomial extrapolation of sky
vector into portions excluded by REGION parameter.
(Default=first and last 10% of pixels; set to zero
to defeat extrapolation)
EDEGREE - Applies only in XMEDSKY mode.
Degree of polynomial for extrapolation (Default=1)
INPUT_MASK - Cube of flags corresponding to data cube. If used,
the sky computation is restricted to the smallest
contiguous rectangle containing all the pixels flagged
valid (with 1 rather than 0).
CALLS: ***
AVG [1], AVG [2], EXTRAP, MEANCLIP, POLY, POLY_FIT, SKY, STRN [1], STRN [2], STRN [3]
XMEDSKY
CALLED BY:
CR_REJECT, EXTRAP
PROCEDURE:
Uses astronomy library "sky" routine for scalar sky and
column-by-column median for vector sky.
MODIFICATION HISTORY:
10 Jul. 1997 - Written. R. S. Hill, Hughes STX
20 Oct. 1997 - 1-D sky option. RSH
7 Aug. 1998 - SELECT keyword. RSH
6 Oct. 1998 - Extrapolation. RSH
7 Oct. 1998 - INPUT_MASK added. RSH
21 Oct. 1998 - Fallback to 3-sigma clipped mean if mode fails. RSH
22 Mar. 2000 - Combine mask with region rather having mask
override region. Improve comments. RSH
16 June 2000 - On_error and message used. Square brackets for array
subscripts. EXTRAP included in this file.
WBL & RSH, 16 June 2000
[Previous]
[Next]
Project : SOHO-CDS
Name : SMART_FTP
Purpose : A wrapper around FTP
Category : planning
Explanation :
Syntax : smart_ftp,server,get_file,get_dir
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], ESPAWN, EXIST
GET_USER_ID, GREP, KILL_JOB, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], MK_TEMP_FILE
NINT [1], NINT [2], PR_SYNTAX, RD_ASCII [1], RD_ASCII [2], RM_FILE, TEST_DIR, TRIM
break_file [4], curdir [1], curdir [2], delvarx [5], is_alive [1], is_alive [2]
is_number [1], is_number [2]
CALLED BY:
FTP_BBSO, FTP_KISF, FTP_MLSO_IMAGES, FTP_MWSO, FTP_NOBE, ssw_url2data
Examples :
Inputs : SERVER = server to retrieve from
GET_FILE = filenames to retrieve
Opt. Inputs : GET_DIR = directory to retrieve from
Outputs : See keywords
Keywords : OUT_DIR = output directory for file [def = current]
FILES = found filenames
ERR = error string
COUNT = no of files copied
RETRY = # times to retry if server is down
KILL = kill any zombie processes
QUIET = turn off output messages
USER = usename (default is anonymous)
PASS = password (default is user@hostname)
PORT = port number
PING = ping before copying
ASCII = ftp as ASCII (def is binary)
LIST_ONLY = just do remote LS
History : Written 14 May 1998 D. Zarro, SAC/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : SOHO - CDS
Name : SMART_WINDOW
Purpose : a smarter way to set/restore plot window parameters
Category : utility
Syntax : IDL> smart_window,window
Inputs : WINDOW = window ID number to set to
Keywords : SET = set current system variables to saved values
REMOVE = remove input window from common
DRAW = informs that window is a DRAW widget
STATUS = 1/0 if success/fail
NOSHOW = set to not call WSHOW
CALLS: ***
ALLOW_WINDOWS, DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], EXIST, MERGE_STRUCT, WSHOW2, delvarx [5]
CALLED BY:
MK_CDS_PLAN, OPLOT_SPLAN, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], PLOT_MAP
PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support, PLOT_SPLAN
Side effects: If WINDOW is valid, subsequent plots are directed to it
History : Version 1, 24-Jan-1998, Zarro (SAC/GSFC)
24-Jun-2000, Zarro (EIT/GSFC) - changed IS_WIN call to SUPP_WIN
18-Jun-2001, Zarro (EITI/GSFC) - added Z-buffer support
13 Dec 2001, Zarro (EITI/GSFC) - added ALLOW_WINDOWS call
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME:
smooft
PURPOSE:
Implements the smooft routine from Numerical Recipes (Sec. 13.9).
Essentially a low-pass filter for a 1-D array of noisy data.
SAMPLE CALLING SEQUENCE:
smoothed_data = SMOOFT(noisy_data,wfwhm)
where the smoothing window applied to 'noisy_data' is on
the order of 'wfwhm'.
INPUT:
Y = 1-D data vector, any type; length = NPTS.
WFWHM = approximate width of smoothing window in abcissa points.
RETURNS:
YFT = 1-D floating point array of smoothed data; length = NPTS.
HISTORY:
12-Dec-96: Transcribed from Numerical Recipes by T. Berger.
12-Sep-97: Removed factor of 2 error on inverse transformed data. T.Berger.
[Previous]
[Next]
PROJECT:
SDAC
NAME:
SNU
PURPOSE:
This function returns a number selected from a widget interface.
CATEGORY:
WIDGET, UTILITY
ROUTINES CALLED:
HAVE_WINDOWS, XDEVICE
CALLED BY:
option_changer [1], option_changer [2]
EXAMPLE:
Result = SNU( DIGITS, [MESSASGE=MESSAGE, ERROR=ERROR, GROUP_LEADER=GROUP])
var = snu(digits)
EXPLANATION:
Creates a widget for the user to click on value to construct a number
of length DIGITS. Previous value is saved and number of digits
may vary
INPUTS :
DIGITS : the number of digits in the number to be contructed
KEYWORDS :
MESSAGE : string or string array which will appear in widget
GROUP_LEADER : optional widget id of calling widget
INITIAL : initial string of number, sets common and overrides digits if
it is too large
OUTPUT :
ERROR : 0 for successful completion
1 for user cancelled
Function returns a string value constructed from the widget entries
CALLS: ***
FCHECK, HAVE_WINDOWS [1], HAVE_WINDOWS [2], REVERSE, SNU_EVENT, XDEVICE, XMANAGER
XREGISTERED
COMMON :
SNU_WIDGET : remembers last number and interacts with event handler
MODIFICATION HISTORY
NOV 1992 - Elaine Einfalt (HSTX)
Jul 1994 - richard.schwartz@gsfc.nasa.gov, added initial keyword
27-may-1998 - richard.schwartz@gsfc.nasa.gov, support all windowing os.
[Previous]
[Next]
Project : VSO
Name : SOAP__DEFINE
Purpose : Define a SOAP class
Explanation : Defines a SOAP class to connect to web services
Category : Utility, Class4, VSO
Syntax : IDL> a=obj_new('soap')
CALLS: ***
IS_BLANK, IS_STRING, SINCE_VERSION [1], SINCE_VERSION [2], SOAP::CLEANUP
SOAP::CLOSE, SOAP::DESERIALIZE, SOAP::DOM2STRUCT, SOAP::ELEMENT_NAME
SOAP::ENVELOPE, SOAP::GET, SOAP::HEADER, SOAP::HTTP, SOAP::INIT, SOAP::IS_ARRAY
SOAP::IS_ARRAY_NAME, SOAP::OPEN, SOAP::PARSER, SOAP::POST, SOAP::SEND
SOAP::SERIALIZE, SOAP::SERIALIZEOBJECT, SOAP::SERIALIZESTRUCT
Examples : a=obj_new('soap') ; create a SOAP object
a->open(proxy, uri) ; connect to a SOAP service
results = a->send(method, args) ; call a remote method
History : Version 0, 06-Oct-2005, J A Hourcle. prototype written
Version 0.1, 12-Oct-2005, J A Hourcle. returns XML-DOM
Version 0.2, 24-Oct-2005, J A Hourcle. hack for arrays of strings/structs
Version 1, 08-Nov-2005, J A Hourcle. documentation
Version 1.1, 10-Nov-2005, J A Hourcle. passing SOAPAction
12-Nov-2005, Zarro (L-3Com/GSFC)
-added GET method
-modified handling SOAPAction header
Version 1.2, 18-Nov-2005, Hourcle. Fixed memory leaks
Version 1.3, 08-Dec-2005, Hourcle. added HTTP timeout, /DEBUG mod
Limitations : This implementation only understands HTTP transports, currently.
IDL has no concept of 'null' other than a null pointer, so if you
need something serialize as xsi:null, assign ptr_new() to it
This was written for use against SOAP::Lite, and as such, is
not very robust. (ie, RPC wrapped document/literal)
See vso__define.pro for an example in deserializing a known
return structure.
Contact : oneiros@grace.nascom.nasa.gov
[Previous]
[Next]
Name: sobel_scale
Purpose: auto scale image with edge enhancment
Input Parameters:
index, data - the usual - floating , long or integer
Keyword Parameters:
sobel_weight - weight applied to sobel portion ( default=.05)
minpercent - scale low cutoff (reject this % of low end pixels)
maxpercent - scale hight cutoff (reject this % of high end pixels)
deriv_hist - if set, use derivitive of histogram for low/high cut
hicut - absolute hi data cutoff (ignore pixels > in scaling)
lowcut - absolute low data value cutoff (ignore pixels < in scaling)
Calling Sequence:
sdata=sobel_scale(index,data,sobel_weight=xx, deriv_hist=nn)
sdata=sobel_scale(index,data,sobel_weight=xx, minper=yy, maxper=zz)
sdata=sobel_scale(index,data,sobel_weight=xx, low=nn, high=mm)
Calling Example:
sdata=sobel_scale(index,data,sobel=.1, deriv_hist=3)
; this example:
add a sobel component
determine low and high data range from derivitive of histogram
CALLS: ***
BOX_MESSAGE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], REVERSE
data_chk [1], data_chk [2], delvarx [5], deriv_arr [1], deriv_arr [2], last_nelem
totvect
CALLED BY:
lasteit, ssw_fov_context, ssw_track_demo, ssw_track_fov, trace_movie_context
History:
19-October-1998 - S.L.Freeland - eit/trace/sxt - auto scale/enhance->WWW
25-October-1998 - S.L.Freeland - allow 3D input
28-October-1998 - S.L.Freeland - add MAXPERCENT, add DERIV_HIST
12-November-1998 - S.L.Freeland - assume MAX is really HICUT if
number > 100. (to make it agree w/doc)
8-march-1999 - S.L.Freeland - histogram subscript range protection
[Previous]
[Next]
Project : HESSI
Name : SOCK_COPY
Purpose : copy file via HTTP sockets
Category : utility system sockets
Syntax : IDL> sock_copy,url_file,outdir=outdir
Inputs : URL_FILE = remote file name to copy with URL path
Outputs : None
Keywords : OUT_DIR = output directory to copy file
ERR = string error message
NOWAIT = set to execute copy in background (>= IDL 6.3)
CALLS: ***
DPRINT, IS_BLANK, IS_STRING, PR_SYNTAX, SOCK_DOWNLOAD, UNIQ_KEY, curdir [1]
curdir [2]
CALLED BY:
EIS_CAT [1], EIS_CAT [2], EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], HSI_SOCK_FILE
IHY_READ, SOCK_RUN, SOCK_SSW, SYNOP_DEFINE, TRACE_JSMOVIE, VSO_GET, get_gevloc_data
phoenix_spg_get, rd_week_file [2], ssw_jsulr2data, ssw_url2data, weekid [2]
ydb_exist [2]
History : 27-Dec-2001, D.M. Zarro (EITI/GSFC) - Written
23-Dec-2005, Zarro (L-3Com/GSFC) - removed COMMON
26-Dec-2005, Zarro (L-3Com/GSFC)
- added /HEAD_FIRST to HTTP->COPY to ensure checking for
file before copying
18-May-2006, Zarro (L-3Com/GSFC)
- added IDL-IDL bridge capability for background copying
10-Nov-2006, Zarro (ADNET/GSFC)
- replaced read_ftp call by ftp object
1-Feb-2007, Zarro (ADNET/GSFC)
- allowed for vector OUT_DIR
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_DOWNLOAD
Purpose : Download files using IDL-IDL bridge to
copy files in a background thread and, thus, avoid blocking.
Category : utility system sockets
Syntax : IDL> sock_download,files,out_dir=out_dir
Inputs : FILES = scalar or array of filenames
Outputs : None
Keywords : OUT_DIR = output directory to copy files
ERR = string error message
CALLS: ***
GET_TEMP_DIR, IS_BLANK, IS_STRING, SINCE_VERSION [1], SINCE_VERSION [2]
SOCK_DOWNLOAD_CALLBACK, WRITE_DIR, curdir [1], curdir [2]
CALLED BY:
SOCK_COPY
History : 6-May-2006, D.M. Zarro (L-3Com/GSFC) - Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_FILES
Purpose : List files on remote server
Category : utility sockets
Syntax : IDL> files=sock_files(server,tstart,tend)
Inputs : SERVER = server to search
TSTART, TEND = start/end times to search [inclusive]
Outputs : FILES = files found, with full path
Keywords : PATH = directory to search
COUNT = # of files found
: ERR = error string input
CALLS: ***
COMDIM2, EXIST, GET_FID, HAVE_NETWORK, IS_BLANK, PR_SYNTAX, SOCK_FIND, TRIM
Restrictions: Files on remote server must be organized by year/mon/day
subdirectories, e.g. /2002/12/10
History : Written 7 Jan 2003, D. Zarro (EER/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : SOCK_FIND
Purpose : socket version of FINDFILE
Category : utility system sockets
Syntax : IDL> files=sock_find(server,file,path=path)
Inputs : server = remote WWW server name
FILE = remote file name or pattern to search
Outputs : Matched results
Keywords : COUNT = # of matches
PATH = remote path to search
ERR = string error message
NO_CACHE = do not check cached results
CALLS: ***
EXIST, FILE_BREAK, IS_BLANK, IS_STRING, STR_FIND, TRIM, str_replace [1]
str_replace [2]
CALLED BY:
HSI_SOCK_FIND, HSI_SOCK_LIST, SOCK_FILES, rd_week_file [2], weekid [2]
ydb_exist [2]
Example : IDL> a=sock_find('smmdac.nascom.nasa.gov','*.fts',$
path='/synop_data/bbso')
History : 27-Dec-2001, D.M. Zarro (EITI/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_FITS
Purpose : read a FITS file via HTTP sockets
Category : utility sockets fits
Syntax : IDL> sock_fits,file,data,header,extension=extension
Inputs : FILE = remote file name with URL path attached
Outputs : DATA = FITS data
HEADER = FITS header
Keywords : ERR = string error message
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], IS_BLANK, delvarx [5]
CALLED BY:
SOCK_MAP
Example :
IDL> f='smmdac.nascom.nasa.gov/synop_data/kanz/kanz_halph_fd_20000114_1016.fts
IDL> sock_fits,f,data,header
History : 27-Dec-2001, D.M. Zarro (EITI/GSFC) Written
23-Dec-2005, Zarro (L-3Com/GSFC) - removed COMMON;
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_LIST
Purpose : list remote WWW page via sockets
Category : utility system sockets
Syntax : IDL> sock_list,url,page
Inputs : URL = URL path to list [e.g. www.cnn.com]
Opt. Outputs: PAGE= captured HTML
Keywords : ERR = string error message
CGI_BIN = set this if URL is a CGI_BIN command (faster)
CALLS: ***
DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], IS_BLANK, IS_STRING, PR_SYNTAX
delvarx [5], read_ftp
CALLED BY:
EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], GET_SC_POINT, GET_SOHO_ROLL, SOCK_RPC
ftp_list_since, hsi_obs_times, lasco_time2file, lasco_time2nrlwww
les_archive_info, ssw_getcme_cactus, ssw_getcme_cdaw, ssw_jsurl2imagelist
ssw_kyoto2dst, ssw_sec_aktxt2struct, yohkoh_legacy_files [1]
yohkoh_legacy_files [2]
History : 27-Dec-2001, D.M. Zarro (EITI/GSFC) Written
26-Dec-2003, Zarro (L-3Com/GSFC) - added FTP capability
23-Dec-2005, Zarro (L-3Com/GSFC) - removed COMMON
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_MAP
Purpose : return nearest map for specified data type
Category : utility system sockets
Syntax : IDL> sock_map,map,time,/type (e.g. sxi)
Inputs : TIME = nearest time to search for [def = current UT]
Outputs : MAP = map structure
Keywords : TYPE = /sxi, /eit
: FILTER = 'p_thn_b' , or '195' , etc
/p_thn_b
TIME = time to search
CALLS: ***
INDEX2MAP, IS_STRING, PR_SYNTAX, SOCK_FITS, VALID_TIME, is_struct
Examples : IDL> sock_map,map,/sxi,filter='p_med_b'
IDL> sock_map,map,/sxi,/p_med_b,time='1-may-03'
History : 12-Feb-2004 D.M. Zarro (L-3Com/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_OPEN
Purpose : Open a socket with some error checking
Category : system utility sockets
Syntax : IDL> sock_open,host,port,err=err
Inputs : HOST = address of host
Outputs : LUN = unit number of open socket
Keywords : ERR = error string (if any)
PORT = host port [def=80]
CALLS: ***
ALLOW_SOCKETS, CLOSE_LUN, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
IS_BLANK, XACK, delvarx [5], is_number [1], is_number [2]
CALLED BY:
HESSI IMAGE RAW CLASS DEFINITION [2]
History : 14 April 2002, Zarro (L-3Com/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Project : HESSI
Name : SOCK_PING
Purpose : ping a remote Web server
Category : utility system sockets
Inputs : SERVER = server name
Outputs : STATUS = 1/0 if up/down
Opt. Outputs: PAGE= server output
Keywords : TIME = response time (seconds)
CALLS: ***
IS_STRING
CALLED BY:
SOCK_SERVER
History : 7-Jan-2002, D.M. Zarro (EITI/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : EIS
Name : SOCK_RPC
Purpose : Send RPC command via socket
Category : utility sockets
Syntax : IDL> sock_rpc,command,output
Inputs : COMMAND = RPC input command
Outputs : OUTPUT = RPC output results
Keywords : ERR = error string
CALLS: ***
HAVE_NETWORK, IS_BLANK, PR_SYNTAX, RPC_SERVER, SOCK_LIST
CALLED BY:
EIS_LIST_MAIN [1], EIS_LIST_MAIN [2]
History : 1-Oct-2002, D.M. Zarro (LAC/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_RUN
Purpose : run (compile) a socket version of an SSW routine
Category : utility system sockets
Syntax : IDL> sock_run,file
Inputs : FILE = remote file name to run
Outputs : None
Keywords : ERR = string error message
CALLS: ***
FILE_BREAK, GET_TEMP_DIR, IS_BLANK, IS_STRING, PR_SYNTAX, SOCK_COPY, SOCK_SSW
Example : IDL> sock_run,'xdoc'
History : 10-Feb-2004 D.M. Zarro (L-3Com/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_SAME
Purpose : Check if local and remote copies of files
are the same (in size)
Category : utility system sockets
Syntax : IDL> same=sock_same(rfile,lfile,lsize=lsize, rsize=rsize)
CALLS: ***
IS_BLANK, file_size [1], file_size [2]
Example : IDL> same=sock_same('http://server.domain/filename','filename' )
Inputs : RFILE, LFILE = remote and local file names
Outputs : SAME = 1/0 if same or different
Keywords : LSIZE, RSIZE = local and remote sizes of files
History : 6-Mar-2006, D.M. Zarro (L-3Com/GSFC) - Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_SERVER
Purpose : return host name of nearest server by shortest ping time
Category : sockets
Inputs : SERVERS = string array of server names to ping
Outputs : SERVER = server name
Opt. Output : INDEX = index of server in SERVERS
Keywords : ERR = error string
CALLS: ***
HAVE_NETWORK, IS_BLANK, SOCK_PING, TRIM
History : Written 22-Oct-2002, Zarro (EER/GSFC)
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_SIZE
Purpose : get sizes of remote files in bytes
Category : utility system sockets
Syntax : IDL> rsize=sock_size(rfile)
CALLS: ***
IS_BLANK
Example : IDL> rsize=sock_size('http://server.domain/filename' )
Inputs : RFILE = remote file names
Outputs : RSIZE = remote file sizes
Keywords : ERR = string error
History : 1-Feb-2007, D.M. Zarro (ADNET/GSFC) - Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : HESSI
Name : SOCK_SSW
Purpose : return URL of a SSW routine for retrieval by a socket
Category : utility system sockets
Syntax : IDL> url=sock_ssw(file)
Inputs : FILE = remote file name to find
Outputs : URL = URL path to file
Keywords : ERR = string error message
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EXIST, GET_TEMP_DIR, IS_BLANK
IS_STRING, PR_SYNTAX, RD_ASCII [1], RD_ASCII [2], SOCK_COPY, SSW_SERVER
concat_dir [4], str_replace [1], str_replace [2]
CALLED BY:
SOCK_RUN
Example : IDL> url=sock_ssw('xdoc')
History : 10-Feb-2004 D.M. Zarro (L-3Com/GSFC) Written
Contact : DZARRO@SOLAR.STANFORD.EDU
[Previous]
[Next]
Project : SOHO
Name : soho_fac
Purpose : return ratio of solar radius viewed from SOHO to that viewed
from Earth
Category : utility
;
Syntax : IDL> ratio=soho_fac(date)
Inputs : DATE = date to compute ratio (def=current)
Outputs : above ratio
Keywords : None
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], GET_UTC, PB0R
CALLED BY:
MAP2L1, MAP__DEFINE, MK_SOHO_MAP_EARTH, TRACE_MDI_ALIGN
History : Written 20 Sept 1999, D. Zarro, SM&A/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
SOHO_VIEW()
PURPOSE:
Check to see if SC_VIEW is set on
CATEGORY:
Utility
SYNTAX:
Result = soho_view()
INPUTS:
None.
OPTIONAL INPUTS:
None.
OUTPUTS:
None.
OPTIONAL OUTPUTS:
None.
KEYWORDS:
None.
CALLED BY:
DROT_COORD, DROT_RASTER, IMAGE_TOOL_EVENT, ITOOL_LOAD_IMAGE, PB0R
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
HISTORY:
Version 1, March 11, 1996, Liyun Wang, GSFC/ARC. Written
CONTACT:
Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
Project : SOHO-CDS
Name : SOHO_XY
Purpose : convert EARTH-view coordinates to SOHO-view
Category : imaging
Explanation : convert projected (x,y) grid on solar surface from EARTH-view
to SOHO-view, and vice-versa
Syntax : soho_xy,x,y,date,xs,ys
CALLED BY:
LVIEW_XY
Examples :
Inputs : X,Y = input coordinates (arcsec) (+W, +N)
DATE = date of observations
Opt. Inputs : None
Outputs : XS,YS = output coordinates (arcsec)
Opt. Outputs: None
Keywords : INVERSE = set to convert SOHO to EARTH-view
NO_COPY = don't make extra copies of input coordinates
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], ARCMIN2HEL, COPY_VAR, DELVARX [1], DELVARX [2]
DELVARX [3], DELVARX [4], DPRINT, EXIST, HEL2ARCMIN [1], HEL2ARCMIN [2], PR_SYNTAX
data_chk [1], data_chk [2], delvarx [5]
Common : None
Restrictions: None
Side effects: None
History : Written 15 April 1998, D. Zarro, SAC/GSFC
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
PROJECT:
SOHO - CDS/SUMER
NAME:
SOHOFILE2TIME()
PURPOSE:
Return time from a given file name conforming the SOHO standard
CATEGORY:
Image Tool
SYNTAX:
Result = sohofile2time(file)
INPUTS:
FILE - String scalar, name of image file
OPTIONAL INPUTS:
None.
OUTPUTS:
RESULT - String scalar, time (in UTC format) indicated in
filename if no error; null string if there is an error
OPTIONAL OUTPUTS:
None.
KEYWORDS:
ERROR - A named variable containing possible error message
CALLS: ***
ANYTIM2UTC [1], ANYTIM2UTC [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
DATATYPE [1], DATATYPE [2], DATATYPE [3], TRIM, break_file [4]
CALLED BY:
todays_targets
COMMON:
None.
RESTRICTIONS:
None.
SIDE EFFECTS:
None.
HISTORY:
Version 1, October 21, 1997, Liyun Wang, NASA/GSFC. Written
Version 2, June 8, 1998, Zarro, vectorized
CONTACT:
Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)
[Previous]
[Next]
NAME:
SOLEPHUT
PURPOSE:
Calculate the solar ra and dec in degrees given the
time in one of our canonical formats.
CATEGORY:
GEN
CALLING SEQUENCE:
Result = SOLEPHUT(Time)
CALLS: ***
SUNPOS, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
INPUTS:
Time: A scalar or vector in format anytim format
OUTPUTS:
Result: Right ascension and declination of the Sun in degrees
returned in an array 2xn where n is the number of elements
in the input TIME. For the equinox of Time
CALLED BY:
BATSE_POINTING, DET_POINT, OCCTIME, Pointing_Change, READ_DISCLA, SUN_EARTH_SC
MODIFICATION HISTORY:
RAS. Transposed from a formula in the astronomical almanac.
Revised 11/25/92.
Mod. 03/29/96 by RAS. Uses SUNPOS from Astro library now.
Mod. 05/08/96 by RCJ. Added documentation.
Mod. 18-sep-1996 RAS put in test for new version of sunpos
works with either the old or new output units for sunpos
[Previous]
[Next]
Project : SOHO - CDS
Name : SORT_CFIT
Purpose : Sort some of the components in a component fit structure
Explanation : Those components in the structure matching one of the strings
supplied in the FUNC_NAMES parameter will be sorted according
to the values of the parameter with index PARM
Additionally, this routine can be used to purge all components
having INCLUDE=0 from the structure.
Use : SORT_CFIT,CFIT,FUNC_NAMES,PARM
Inputs : CFIT : Component Fit structure
FUNC_NAMES : The evaluation function name(s) (e.g.,
"comp_gauss" or "comp_poly") used to distinguish
those components to be included in the sorting
process. This can be an array enabling sorting of
e.g., both gaussian and voigt profiles according
to their line position. The sort is performed "in
place", i.e., the non-sorted components do not
change their place within the structure.
PARM : The index of the parameter to sort on.
Opt. Inputs : None.
Outputs : The CFIT structure is modified
Opt. Outputs: None.
Keywords : DECREASING : Set to sort in decreasing order
PURGE : Set to purge all INCLUDE = 0 components
NOSORT : Set to avoid sorting alltogether - useful if only
purging is wanted.
Calls : None.
CALLED BY:
XCFIT
Common : None.
Restrictions: None.
Side effects: None.
Category : Analysis
Prev. Hist. : None.
Written : S.V.H.Haugan, UiO,
Modified : Not yet
Version : 1, 21 January 1997
[Previous]
[Next]
Name: sort_index
Purpose: return time sorted array of merged structures
Input Paramters:
index1, index2 - vectors of SSW times to sort
Keyword Parameters
ss - is set, return sorted indices, not sorted/merged structures
negtim - indices where time runs backwards (-1 if none)
loud - report on number of records where time is backwards
Calling Sequnce:
newindex=sort_index(index1, index2) ; return merged index records
; (structures)
sortss=sort_index(index1, index2, /ss) ; return ssvector
; (longword array)
sortindex=sort_index(index1,/loud) ; sort single vector & report
Calling Example:
info=get_info(sort_index(findex,pindex)) ; merge SXT FFI and PFI records
; (index or roadmap)
CALLS: ***
deriv_arr [1], deriv_arr [2], int2secarr [1], int2secarr [2], str_concat [1]
str_concat [2]
CALLED BY:
PATROL_ORDER, goes_widget, lasteit, mk_sff_pair [1], mk_sff_pair [2]
pro interpretfemfemfemtimefemflgfemstrfemstrverboseverbose
pro optimizedbdrfileshowparamshowparam, rd_goesx_ascii, rd_guf_ascii
ref_term [2], soon_catstat, sxt_adjacent_image, sxt_ssn2fits [1]
History:
5-Nov-1993 S.L.Freeland
10-Feb-1994 S.L.Freeland - allow single input, /loud keyword
12-Dec-1994 S.L.Freeland - add uniq switch
12-Sep-1998 S.L.Freeland - made it SSW compliant via anytim -> $SSW/gen
22-Oct-1998 S.L.Freeland - return complete strcuts,not just time parts
2-Oct-2001 S.L.Freeland - sped up a little (via anytim)
[Previous]
[Next]
Name: sparse
Purpose: treat sparse matrices as stream for memory conservation
For example, for large array which is mostly zeros, store
only the non-zero values.
Input Paramters:
input - if structure, convert sparse structure to array
if array, , convert array to sparse structure
index - (optional) only convert specified index (must be scalar)
Input Keyword Parameters:
lowcut - low value cutoff (currently,only used with data->structure)
highcut - high value cutoff (currently,only used with data->structure)
Calling Sequence:
structure=sparse(data [,lowcut=lowcut,highcut=highcut])
structure=sparse(data) ; sparse data array in, sparse structure out
structure=sparse(data,low=1) ; Save values where data ge 1
data=sparse(structure) ; sparse structure in, sparse data array out
data=sparse(structure,index) ; 3D arrays only, only specified 2D out
; Index is the index of the 3rd dimension.
CALLED BY:
SXT_PREP0, ffi_prep, sxt_satpix [1], sxt_satpix [2]
History:
slf - 24-feb-1993 -- Minor mods by JRL
CALLS: ***
FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2]
Restrictions:
proto - needs some more type/data size checking
[Previous]
[Next]
Project : SOHO - CDS
Name :
SPEC_DIR()
Purpose :
Appends a default disk or directory to a filename.
Explanation :
Provide a complete file specification by appending a default disk
or directory if necessary.
For Unix, SPEC_DIR will simply append the default directory obtained
from the CD command (if necessary). Under VMS one must also
determine if the disk and/or directory is already specified. Under
VMS, SPEC_DIR will also try to translate disk and directory logical
names.
Use :
File_spec = SPEC_DIR(filename,[extension])
Inputs :
filename - character string giving partial specification of a file
name. VMS examples include 'UIT$USER2:TEST.DAT', or
'[.SUB]TEST'. Unix examples include
'/home/idl/lib', or '$IDL_HOME/pro'.
Opt. Inputs :
exten - string giving a default file name extension to be used if
filename does not contain one. Do not include the period.
Outputs :
File_spec - Complete file specification using default disk or
directory when necessary. If the default directory
is UIT$USER1:[IDL] then, for the above VMS examples, the
output would be 'UIT$USER2:[IDL]TEST.DAT'
'UIT$USER2:[IDL.SUB]TEST'.
Opt. Outputs: None.
Keywords : None.
Calls : ***
FDECOMP [1], FDECOMP [2], FDECOMP [3]
CALLED BY:
DB_ITEM [1], DB_ITEM [2], DB_ITEM [3], DEF2C_FILL, DEF2C_FORMAT, DEF2C_INSERT
DEF2STRUCT, FITSDIR, NSTAR
Common : None.
Restrictions: None.
Side effects: None.
Category : Utilities, Operating_System
Prev. Hist. :
Written W. Landsman STX July, 1987
Revised for use on VAXes and on SUNs, W. Landsman, STX August 1991
Written : W. Landsman, GSFC/UIT (STX), July 1987
Modified : Version 1, William Thompson, GSFC, 29 March 1994
Incorporated into CDS library
Version 2, Wayne Landsman, GSFC, September 1995
Added Windows and Macintosh compatibility
Version 3, Wayne Landsman, GSFC, 31 May 1997
Work for relative Unix directory
Version 4, Wayne Landsman, GSFC, September 1997
Expand Unix tilde if necessary
Version : Version 4, September 1997
[Previous]
[Next]
NAME:
SPEC_DIR()
PURPOSE:
Complete a file specification by appending the default disk or directory
CALLING SEQUENCE:
File_spec = SPEC_DIR( filename, [ extension ] )
INPUT:
filename - character string giving partial specification of a file
name. Examples for different operating systems include the
following:
Unix: 'pro/test.dat', '$IDL_HOME/test','~/subpro'
MacOS: ':Programs:test'
Windows: '\pro\test.dat','d:\pro\test'
OPTIONAL INPUT:
exten - string giving a default file name extension to be used if
filename does not contain one. Do not include the period.
OUTPUT:
File_spec - Complete file specification using default disk or
directory when necessary.
CALLS: ***
FDECOMP [1], FDECOMP [2], FDECOMP [3]
CALLED BY:
DB_ITEM [1], DB_ITEM [2], DB_ITEM [3], DEF2C_FILL, DEF2C_FORMAT, DEF2C_INSERT
DEF2STRUCT, FITSDIR, NSTAR
EXAMPLE:
IDL> a = spec_dir('test','dat')
is equivalent to the commands
IDL> cd, current=cdir
IDL> a = cdir + delim + 'test.dat'
where delim is the OS-dependent separator
METHOD:
SPEC_DIR() decomposes the file name using FDECOMP, and appends the
default directory (obtained from the FILE_EXPAND_PATH) if necessary.
SPEC_DIR() does not check whether the constructed file name actually
exists.
PROCEDURES CALLED:
FDECOMP, EXPAND_TILDE()
REVISION HISTORY:
Written W. Landsman STX July, 1987
Expand Unix tilde if necessary W. Landsman September 1997
Assume since V5.5, use FILE_EXPAND_PATH, remove VMS support
W. Landsman September 2006
[Previous]
[Next]
Name: special_movie
Purpose: make sxt movies for WWW (just set up and call image2movie)
CALLS: ***
ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
FILE_EXIST [2], STR2ARR [1], STR2ARR [2], TIME2FILE, anytim [1], anytim [2]
anytim [3], anytim [4], anytim [5], concat_dir [4], configure_http, curdir [1]
curdir [2], data_chk [1], data_chk [2], file_append [1], file_append [2]
file_exist [1], file_exist [3], grid_data [1], grid_data [2], html_doc, http_names
image2movie, prstr [1], prstr [2], quality_filter, rd_tfile [1], rd_tfile [2]
ssw_strsplit, str2html [1], str2html [2], str2html [3], strextract, strjustify
strtab2html
CALLED BY:
eit_proton_summary, ssw_track_demo, sxt_ssn2fits [1], trace_last_movie [1]
trace_last_movie [3], trace_special_movie [1], trace_special_movie [2]
trace_special_movie [3], trace_special_movie2
EXAMPLE: REPRESENTATIVE OUTPUT FROM SPECIAL_MOVIE IS AVAILABLE AT:
http://www.lmsal.com/SXT/movies/lastsfd.html
Input Parameters:
index - time structures (any SSW format)
data - 3D array
r,g,b - optional RGB values
Keyword Parameters:
movie_name - top level movie name (XXX.html) and used as root name
for associated files for organizational purposes
movie_text - optional text description (included in html doc)
-OR- filename conatining description
grid_minutes - optional cadence for pseudo-regular sampling
(subset of index,data closest to time grid)
nolabel - if set, dont auto-label movie frames (default puts
time tags on frames
local - if set, use current directory for everything
no_htmldoc - if set, dont make the top level html doc
(useful for appending to existing doc via SW)
html (OUTPUT) - the HTML (table with thumbnail, links to movies,
statistics etc.
context - if set, name(s) of context files to include
if 1 element - inline html
if 2 element - assumed thumbnaile/full
XXX - ALL OTHER KEYWORDS USED BY IMAGE2MOVIE, including:
table - IDL color table #
reverse - reverse Color table
gamma - color table gamma
outsize - frame size for MOVIEs (data is congridded/rebinned)
thumbsize - frame size for movie icons
History:
10-July-1996 (S.L.Freeland)
25-July-1996 (S.L.Freeland) - broke html -> mk_movie_html
21-aug-1997 (S.L.Freeland) - new technol (image2movie.pro)
21-oct-1997 (S.L.Freeland) - keywords->image2movie (inheritance)
8-Apr-1998 (S.L.Freeland) - add /NONLABEL switch
14-Apr-1998 (S.L.Freeland) - add /LOCAL switch, documentation
8-May-1998 (S.L.Freeland) - fix typo in LABEL
1-Jun-1999 (S.L.Freeland) - reduced workload by ~50% - pass files back->image2movie
11-Aug-1999 (S.L.Freeland) - movie_dir pass through!, only filter data on request
11-Nov-1999 (S.L.Freeland) - improved appearence of output HTML
09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
NOTE: Movie making Brains are in <image2movie.pro> - this is just
a convenient wrapper which calls that routine once for each of
three formats (mpeg, javascript, gif-animate)
see doc header for <image2movie.pro> routine for more details/options.
[Previous]
[Next]
Project : HESSI
Name : SPECPLOT__DEFINE
Purpose : Define a general spectogram plot class
Category : objects
Syntax : IDL> new=obj_new('specplot')
Modifications: 22-May-02, Zarro (L-3Com/GSFC) - written
8-Oct-2002, Kim.
- Modified plot method to make it compatible with plotman
Added dev2data method to convert between device and data coords.
- added speed-up checks for keywords
5-Feb-03, Zarro (EER/GSFC) - fixed DRANGE bug,
added FREQUENCY, FRANGE, FUNIT keywords.
7-May-03, Zarro (EER/GSC) - removed YLOG keyword from SPECPLOT
method since already passed thru EXTRA.
21-Mar-03, Kim. Many changes to call new version of spectro_plot
10-Oct-2003, Kim. Add call to set, _extra=extra in plot, remove log
from keywords in plot method, and add (Log) or (Exp) to title if
log_scale or exp_scale is set
11-April-2005, Kim. Added call to run addplot_name routine after plotting.
(addplot_name and addplot_arg are properties of xyplot obj)
16-June-2005, Andre and Kim. Lots of new properties, major changes to plot,
set, set_plot.
12-Oct-2006, Kim. In set_plot, if set timerange to xrange, adjust for
utbase.
Contact : dzarro@solar.stanford.edu
CALLS:
[Previous]
[Next]
Project : HESSI
Name : specread__DEFINE
Purpose : Define a general SPECTROGRAM reader object
Category : Ancillary GBO Synoptic Objects
Syntax : IDL> c=obj_new('specread')
CALLS: ***
GET_UTC, SPECREAD::CLEANUP, SPECREAD::GET_SDIR, SPECREAD::INIT, SPECREAD::READ
SPECREAD::SYNOP
History : Written 18 Nov 2002, D. Zarro (EER/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
NAME: SPECTRA2FITS
PURPOSE: Create fits binary tables using BATSE and GOES spectra data.
CATEGORY: Fits Binary Table Extensions I/O
CALLING SEQUENCE:
spectra2fits,time,flux,date_obs,edges=edges, $
livetime=livetime, eflux=eflux, $
flux_unit=flux_unit, $
direction_cosines=direction_cosines, $
edge_unit=edge_unit,filename=filename, status=status,$
clockcor=clockcor, help=help, com_head=com_head, $
com_ext1=com_ext1, com_ext2=com_ext2, com_ext3=com_ext3, $
head_key=head_key, ext1_key=ext1_key, ext2_key=ext2_key, $
ext3_key=ext3_key, y2k=y2k
CALLS: ***
CONVERT_2_STREAM, FCHECK, FLIPDATE, FXADDPAR [1], FXADDPAR [2], FXBADDCOL [1]
FXBADDCOL [2], FXBCREATE [1], FXBCREATE [2], FXBFINISH [1], FXBFINISH [2]
FXBHMAKE [1], FXBHMAKE [2], FXBWRITE [1], FXBWRITE [2], FXHMAKE [1], FXHMAKE [2]
FXWRITE [1], FXWRITE [2], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
wc_where [1], wc_where [2]
INPUTS:
Time: Time in seconds from start observation time.
Flux: Flux (any size array)
Date_obs: Obs. starting time (format accepted by anytim)
OUTPUTS:
Binary fits tables with default filename 'spectra2fits.fits'
KEYWORDS:
EDGES: Energy edges (2xn format)
LIVETIME: Livetime of each interval (in sec)
EFLUX: Uncertainty on flux
FLUX_UNIT: Unit of flux (default: counts/sec)
DIRECTION_COSINES: Direction cosines for all 8 detectors
EDGE_UNIT: Unit of edges (default: keV)
FILENAME: Name for output fits file (def.: spectra2fits.fits)
STATUS: Status word (1st column must be time)
CLOCKCOR: Clock correction (YES, NO or UNKNOWN)
HELP: If =1, print help text
COM_HEAD: Comments for primary header
COM_EXT1: Comments for 1st extension
COM_EXT2: Comments for 2nd extension
COM_EXT3: Comments for 3rd extension
HEAD_KEY: Additional keywords for primary header
EXT1_KEY: Additional keywords for 1st extension
EXT2_KEY: Additional keywords for 2nd extension
EXT3_KEY: Additional keywords for 3rd extension
Y2K: Keyword for y2k compatibility, i.e. 4 digit years
CALLED BY:
FSPLOT, GFITS_W, HSI_SPECTROGRAMCHAN_OVERLAP_FIX
HSI_SPECTROGRAM_DECIM_CORRECT, HSI_SPECTROGRAM_DECIM_TABLE
HSI_SPECTRUM__DEFINE, SPECTROGRAM CLASS DEFINITION
SPECTRUM CLASS DEFINITION, hsi_spectrogramACCBIN [2]
hsi_spectrogram__define [1], hsi_spectrogram__define [2]
hsi_spectrogram__define [3], hsi_spectrogram__get_obs [1]
hsi_spectrogram__livetime [1]
RESTRICTIONS:
Time and livetime are 1-D arrays, in seconds, from observation
start time.
Date_obs is the start date of observation in any format accepted
by anytim.
First column of status array must be time.
Comments for a given header are in string array format. Example:
com_head=['line1','line2','line3']
Additional keywords are input as structures.
Comments on individual keywords are written in string array format
and then passed on as an element of the structure. Example:
comments=['Comment on instrument','Comment on telescope','']
head_key={instrume:'BATSE',telescop:'CGRO',object:'Sun', $
comments:comments}
PROCEDURE:
This routine creates fits binary tables.
The primary header is a basic header. The first extension
contains the energy edges and direction cosines.
The second extension contains time, flux, livetime and
eflux. The third extension contains status word and time.
MODIFICATION HISTORY:
Written September 1995, by RCJ.
Mod. by RCJ 04/97. Adapt routine to more general use. Please
note that it's *not* 100% general.
Version 3 Amy.Skowronek@gsfc.nasa.gov Added y2k keyword to
write years with four digits in FITS header.
[Previous]
[Next]
NAME:
spectro_plot
PROJECT:
Generic Display utilities
CATEGORY:
/ssw/gen/display
PURPOSE:
This routine displays 2d arrays as a function of
time. This program merges functionalities of the older programs
tplot, rapp_plot_spectrogram, and show_image.
It is a complete rewrite of the spectro_plot
utility that was built on show_image uniquely.
This current version just does some preparation for spectro_plot2,
which actualy does all the work. It is the non-object oriented
interface that can be uesed easily from the command line interface.
CALLING SEQUENCE:
1st form:
--------
spectro_plot, image1, xaxis1, yaxis1, $
image2, xaxis2, yaxis2, $
....
image4, xaxis4, yaxis4
2nd form:
--------
spectro_plot, struct1, struct2, .... struct12
INPUT:
image1...image4: 2d arrays
xaxis1...xaxis4: 1d array containing the time values
associated with the xaxis of the array
yaxis1...yaxis4: 1d array containing the y-values (whatever
they are) associated with the xaxis of the
array
struct1...struct12: structures of the form
{spectrogram:fltarr(nx,ny), x: fltarr(nx), y:fltarr(ny)}
KEYWORDS:
CBAR: displays a color table with the data, default: no color bar.
INVERT: shows data inverted with the color table
NO_INTERPOLATE: supresses the interpolation of the image
Note that this might lead to a wrong display,
as the pixels might not be aligned with the
y- and x-axis values.
NO_UT: suppresses the use of utplot and plots the time axis
with normal decimal values.
PERCENT: ignores the last given percent of the image when scaling the data
range to the color table.
POSTSCRIPT: Sends the output to a postscript file (same as calling ps,
/color)
XRANGE: sets the time limits of the xaxis window (2-element
array).
YLOG: plots the axis and the data with a logarithmic scale
YRANGE: a 2xn_plots element setting the range to display
ZEXP: applies exp() to the data before display
ZLOG: applies log() to the data before display
... and all the keywords acccepted by PLOT
CALLS: ***
CHECKVAR [1], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, MINMAX [1]
MINMAX [2], PS [1], PS [2], PSCLOSE [1], PSCLOSE [2], STRUCT2SPECTROGRAM
VALID_RANGE, checkvar [2], delvarx [5], is_struct, spectro_plot2
str_tagarray2scalar
HISTORY:
acs jul 2005 - revised doc, but needs more on that, cbar is not the
default for display.
acs march 2005 - many things moved to spectro_plot2, by popular
demand, spectro_plot is a wrapper that does not need
any objects any more.
acs aug 2004 - corrected a problem w/ the time passed and
utbase
acs june 2004- wrapperization, see spectro_plot_obj and spectrogram
for more interesting code.
acs july 2003: corrected way of displaying spectrograms with
only few channels
acs june 2003: now fully featured xstyle and ystyle keywords
acs may 2003: fixing the x/y range problem and refactoring session
ACS April 2003: including feedback from kim & paolo
ACS March 2003: after meeting with AOBenz, PSG and PG extended version
with YINTEGRATE, NO_INTERPOLATE, YRANGE
PS capabilities checked
ACS Feb 2003 : make sure it works with other plot routines
ETH Zurich for integration into the plotman utilities
(i.e. zooming etc )
csillag@ssl.berkeley.edu. This is basically a
merge between the functions of Pascal
Saint-Hilaire, Paolo Grigis and Peter Messmer
with the show_image
- ps option modified to be able to set the ps
option outside of the routine
- replacement of the call to utplot with the
set_utaxis and then axis
- interpolation taken from Davin (tplot)
- compatibility with tplot
- utplot is now default
- full logarithm implemented
ACS Jan 2003: merged several version of the same program into
the first prototy of this generic
routines. Contributions from all people listed above.
[Previous]
[Next]
NAME:
spectro_plot2
PROJECT:
Generic Display utilities
CATEGORY:
/ssw/gen/display
PURPOSE:
This routine is the core spectrogram display tool which is either
called by the object specplot__define, or can also be used from the
command line via spectro_plot. Please use one of those programs and
not directly thsi one (although it shoudl be quite possible)
This program merges functionalities of the programs tplot, rapp_plot_spectrogram,
and show_image. This is a complete rewrite of the spectro_plot
utility that was built on show_image uniquely.
CALLS: ***
CHECKVAR [1], CSCALE, DIST, DPRINT, EXIST, GETUTBASE [1], GETUTBASE [2], HIST_EQUAL
INTERP_IMAGE, IS_STRING, LAST_ITEM, MINMAX [1], MINMAX [2], PLOT_MAP_COLORBAR
SINCE_VERSION [1], SINCE_VERSION [2], SPECTRO_PLOT2_TEST, UTPLOT [1], UTPLOT [2]
UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], VALID_RANGE, anytim [1], anytim [2]
anytim [3], anytim [4], anytim [5], axis_get_edges, axis_get_expanded_range
checkvar [2], is_number [1], is_number [2]
CALLED BY:
SPECPLOT__DEFINE, spectro_plot
HISTORY:
acs nov 2006 - taken away (log) and (exp) automtic insertion in the
title string as it seems to generate more problems than solutions.
acs jan 2006 - made it 100x faster such that it can handle very big arrays
acs jul 2005 - just some changes in the doc and adding a test for 2d
when image passed directly. I realize that cba and
invert do not work correctly, I'll have to correct this.
acs mar 2005 - minor changes to make it work correctly with
spectrogram__define and plotman.
acs mar 2005 - removed the object dependancy and made it a standalone
routine by popular demand. renamed to spectro_plot2,
the cli user interface is spectro_plot
acs feb 2005 - activated the no_ut and xlog options, some significant
corrections on the x axis time display (in fact i throw
away the axis calls and replace with another utplot call)
acs july 2004- some changes related to the problems of
displaying correctly only a few channels
acs april 2004: release as spectro_plot_obj
acs july 2003: corrected way of displaying spectrograms with
only few channels
acs june 2003: now fully featured xstyle and ystyle keywords
acs may 2003: fixing the x/y range problem and refactoring session
ACS April 2003: including feedback from kim & paolo
ACS March 2003: after meeting with AOBenz, PSG and PG extended version
with YINTEGRATE, NO_INTERPOLATE, YRANGE
PS capabilities checked
ACS Feb 2003 : make sure it works with other plot routines
ETH Zurich for integration into the plotman utilities
(i.e. zooming etc )
csillag@ssl.berkeley.edu. This is basically a
merge between the functions of Pascal
Saint-Hilaire, Paolo Grigis and Peter Messmer
with the show_image
- ps option modified to be able to set the ps
option outside of the routine
- replacement of the call to utplot with the
set_utaxis and then axis
- interpolation taken from Davin (tplot)
- compatibility with tplot
- utplot is now default
- full logarithm implemented
ACS Jan 2003: merged several version of the same program into
the first prototy of this generic
routines. Contributions from all people listed above.
[Previous]
[Next]
PROJECT:
HESSI/PHOENIX
NAME:
SPECTROGRAM()
PURPOSE:
Constructor for the spectrogram object.
CATEGORY:
Generic utilities
CALLING SEQUENCE:
o = spectrogram( spectrogram [, time_axis, energy_axis] ) or
o = spectrogram( spectrogram_struct )
INPUTS:
spectrogram: a 2d array containing the time/energy values
time_axis: the time axis associated with the spectrogram.
a 1 d vector with same # of elements as the x-axis
of the spectrogram. the time is referenced to 1-jan-79
(anytim format)
spectrum_axis: the spectrum axis associated with the spectrogram.
a 1 d vector with same # of elements as the y-axis
of the spectrogram
spectrogram_struct: a spectrogram structure with tags:
{spectrogram, time_axis, spectrum_axis}
OUTPUTS:
o: a spectrogram object
CALLED BY:
spectrogram__define
EXAMPLES:
CALLS: ***
MAKE_SPECTROGRAM
SEE ALSO:
http://hessi.ssl.berkeley.edu/~csillag/idl/spectrogram_howto.html
more information in spectrogram__define
HISTORY:
20-jul-2004: documentation update
Version 1, August 21, 2003,
A Csillaghy, csillag@ssl.berkeley.edu
[Previous]
[Next]
PROJECT:
HESSI / PHOENIX
NAME:
spectrogram__define
PURPOSE:
This class provides the basic spectrogram object to deal with
spectral / temporal measurements.
CATEGORY:
generic utilities
INSTANCE CREATION:
o = make_spectrogram( spectrogram [, time_axis, spectrum_axis] )
o = spectrogram(spectrogram [, time_axis, spectrum_axis] )
o = spectrogram( spectrogram_struct )
INPUTS:
spectrogram: a 2d array containing the time/energy values
time_axis: the time axis associated with the spectrogram.
a 1 d vector with same # of elements as the x-axis
of the spectrogram. the time is referenced to 1-jan-79
(anytim format)
spectrum_axis: the spectrum axis associated with the spectrogram.
a 1 d vector with same # of elements as the y-axis
of the spectrogram
spectrogram_struct: a spectrogram structure with tags:
{spectrogram, time_axis, spectrum_axis}
OUTPUTS:
o: a spectrogram object
METHODS:
o->set
result = o->get()
PARAMETERS:
EXAMPLES:
CALLS: ***
ADD_TAG [1], ADD_TAG [2], DIST, ELIMWRONGCHANNELS, EXIST, IS_STRING, LOADCT
MAKE_SPECTROGRAM, MAKE_STRUCT, MINMAX [1], MINMAX [2], RADIO_SPECTRO_FITS_READ
SPECTROGRAM, SPECTROGRAM::BKG_SUBTRACT, SPECTROGRAM::CLEANUP, SPECTROGRAM::GET
SPECTROGRAM::GETPLOTMAN, SPECTROGRAM::GETPLOTOBJ, SPECTROGRAM::HELP
SPECTROGRAM::INIT, SPECTROGRAM::MAKE_STRUCT, SPECTROGRAM::PLOT
SPECTROGRAM::PLOTMAN, SPECTROGRAM::SET, SPECTROGRAM_TEST, STRUCT2SPECTROGRAM
VALID_RANGE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
constbacksub [1], constbacksub [2], plotman, str_tagarray2scalar
SEE ALSO:
http://hessi.ssl.berkeley.edu/~csillag/software/spectrogram_howto.html
HISTORY:
1-aug-2006 - acs, added paneldesc parameter
20-jul-2004 - acs, tested for use also with spectro_plot, for backward
compatibility, also reactivated the no ut option
mar-2004 --- acs, multiplot functionality
feb-2004 --- acs, association
jan-2004 --- acs, first design with axes, evolution from spectro_plot
A Csillaghy, csillag@fh-aargau.ch
[Previous]
[Next]
Name: spectrum2fits
Category: FITS, UTIL
Purpose: Write spectral rate data to a FITS file.
Calling sequence:
spectrum2fits, filename, WRITE_PRIMARY_HEADER=1,
PRIMARY_HEADER=primary_header, EXTENSION_HEADER=extension_header,
DATA=rate_data, ERROR=rate_error, TSTART=start_times, TSTOP=stop_times,
MINCHAN=1, MAXCHAN=number_of_channels,
E_MIN=min_channel_energies, E_MAX=max_channel_energies, E_UNIT='keV',
ERR_CODE=had_err, ERR_MSG=err_msg
Inputs:
filename - name of FITS file to write.
Outputs:
Input keywords:
WRITE_PRIMARY_HEADER - set this keyword to write a primary header to
the file.
PRIMARY_HEADER - primary header for the file. This contains any information
that should be in the primary header in addition to
the mandatory keywords. Only used if
WRITE_PRIMARY_HEADER is set.
EXTENSION_HEADER - header for the RATE extension, with any necessary
keywords.
EVENT_LIST - set this keyword if a list of events is being written
to the file.
_EXTRA - Any keywords set in _EXTRA will be integrated into the extension
structure array based on the number of elements. If an entry has
n_channel entries, it will be duplicated n_input spectra
times and will be stored as a vector in the structure
array. If it has n_input spectra entries, each entry will
be a scalar in the corresponding structure array element.
The spectral data are passed in via the DATA keyword.
The following keywords control writing data into the RATE
extension and are processed in wrt_rate_ext:
DATA - a [n_channel x n_input spectra / n_channel x n_detector x $
n_input_spectra] array containing the the
counts/s or counts for each spectrum in each channel.
ERROR - an array containing the uncertainties on DATA. Deafults to the
square root of DATA.
COUNTS - set if the column name for the data entry should be COUNTS
instead of the default RATE.
UNITS - units for DATA
- a [ n_channel x n_input spectra / n_input spectra ] array
containing the livetime for each [ spectrum channel / spectrum ]
TIMECEN - Full time or time from TIMEZERO for each input spectrum or
event. Stored as TIME column within RATE extension.
SPECNUM - Index to each spectrum.
TIMEDEL - The integration time for each channel of each spectrum or
each spectrum.
DEADC - Dead Time Correction for each channel of each spectra, each
spectrum, or each channel. One of DEADC / LIVETIME should
be set. If n_chan elements, this will be set in the header
for this extension.
BACKV - background counts for each channel of each spectrum - OPTIONAL.
BACKE - error on background counts for each channel of each spectrum.
OPTIONAL. Defaults to the square root of the BACKV if BACKV is set.
The following keywords control the data that are written in the ENEBAND
extension are passed to wrt_eneband_ext:
NUMBAND - number of energy bands.
MINCHAN - a numband element array containing the minimum channel number in
each band.
MAXCHAN - a numband element array containing the maximum channel number in
each band.
E_MIN - a numband element array containing the minimum energy in each band.
E_MAX - a numband element array containing the maximum energy in each band.
Output keywords:
ERR_MSG = error message. Null if no error occurred.
ERR_CODE - 0/1 if [ no error / an error ] occurred during execution.
Calls: ***
FXADDPAR [1], FXADDPAR [2], FXHMAKE [1], FXHMAKE [2], FXWRITE [1], FXWRITE [2]
wrt_eneband_ext, wrt_rate_ext
CALLED BY:
hsi_spectrum__filewrite, hsi_spectrum__fitswrite
Modification History:
18-nov-2002, Paul.Bilodeau@gsfc.nasa.gov - changed error handling to
use GOTO's for simplification, removed CATCH staement.
23-Aug-2004, Sandhia Bansal - Added SPEC_NUM and CHANNEL to ext_kw_list
so that these two fields can be added to the columns in spectrum.
03-Sep-2004, Sandhia Bansal, Added exposure to the argument list for this procedure.
Pass number of channels and exposure to the call for wrt_rate_ext..
Set prim_kw_list and prim_st_list only if the primary header is
to be created by this function. Deleted TIME-OBS and
TIME-END from prim_kw_list - these values are already
included in DATE-OBS and DATE-END.
Replaced RA--NOM and DEC--NOM with RA_NOM and DEC_NOM.
Added SPEC_NUM and CHANNEL to the keyword list for rate extension (ext_kw_list,
and ext_st_list).
06-Dec-2004, Sandhia Bansal - Deleted EXPOSURE keyword from the argument list. Deleted
EXPOSURE and NCHAN from call to wrt_rate_fits.
[Previous]
[Next]
PROJECT:
SDAC
NAME:
SPHCART
PURPOSE:
This function computes cartesion coordinates from RA and DEC
CATEGORY:
GEN, VECTOR ANALYSIS, UTILITY, GEOMETRY
CALLING SEQUENCE:
Cartesian_coordinates = SPHCART( RA, DEC)
INPUTS:
RA: right ascension in degrees, scalar or vector
DEC: declination angle in degrees, scalar or vector
CALLED BY:
BATSE_POINTING, DET_COSINES, DET_POINT, FIND_GOOD_OCCS, GET_ANGLE, GET_OCCS
GRO_POINT, HXRBS_OCC, OCCTIME, SUN_EARTH_SC
EXAMPLE:
Cartesian_coordinates = SPHCART( RA, DEC)
xc=transpose(sphcart(x_ra(*), x_dec(*))) ;3 by nx;
sunxyz=sphcart(sradec(0),sradec(1))
MODIFICATION HISTORY:
Documented richard.schwartz@gsfc.nasa.gov, Version 2 , 29-mar-1996
[Previous]
[Next]
NAME:
SPHDIST
PURPOSE:
Angular distance between points on a sphere.
CALLING SEQUENCE:
d = sphdist(long1, lat1, long2, lat2)
INPUTS:
long1 = longitude of point 1, scalar or vector
lat1 = latitude of point 1, scalar or vector
long2 = longitude of point 2, scalar or vector
lat2 = latitude of point 2, scalar or vector
OPTIONAL KEYWORD INPUT PARAMETERS:
/DEGREES - means angles are in degrees, else radians.
OUTPUTS:
d = angular distance between points (in radians unless /DEGREES
is set.)
PROCEDURES CALLED:
RECPOL, POLREC
NOTES:
(1) The procedure GCIRC is similar to SPHDIST(), but may be more
suitable for astronomical applications.
(2) If long1,lat1 are scalars, and long2,lat2 are vectors, then
SPHDIST returns a vector giving the distance of each element of
long2,lat2 to long1,lat1. Similarly, if long1,lat1 are vectors,
and long2, lat2 are scalars, then SPHDIST returns a vector giving
giving the distance of each element of long1,lat1 to to long2,lat2.
If both long1,lat1 and long2,lat2 are vectors then SPHDIST returns
vector giving the distance of each element of long1,lat1 to the
corresponding element of long2, lat2. If the input vectors are
not of equal length, then excess elements of the longer ones will
be ignored.
CALLS: ***
POLREC, RECPOL [1], RECPOL [2], RECPOL [3]
CALLED BY:
hsi_ast_seesource, hsi_ast_sourceangle
MODIFICATION HISTORY:
R. Sterner, 5 Feb, 1991
R. Sterner, 26 Feb, 1991 --- Renamed from sphere_dist.pro
Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
NAME: spike_id
PURPOSE: To locate single pixel spikes, like Cosmic Rays,
in 2-D images.
METHOD: Default uses a three point median filter as a
reference, takes the difference and compares it with the
cutoff value. The returned variable is a vector of pointers
to spikes in the input variable.
CALLING SEQUENCE:
out = spike_id(img,cutoff,[remove=remove,width=width])
PARAMETERS: img input image
cutoff comparison cutoff
KEYWORDS: remove when set return corrected
image
width median filter size (default
is 3).
CALLS: ***
coord_v2l
CALLED BY:
cosmic_stat, spikes_off
HISTORY: Drafted by A.McAllister, following a B.Labonte
algorythm, 10-jun-93.
Added code to handle borders, and keyword to
return corrected image, 2-jul-93.
trap for no spikes, 9-aug-93.
added control to filter size (default is the orginal
value of 3), also added absolute value on difference
12-Jan-94, gal
LWA, 3/8/94, made from spikes.pro to remove absolute
value feature installed by GAL.
LWA, 3/12/94, Corrected header and fixed width keyword.
[Previous]
[Next]
Project : HESSI
Name : SPIRIT__DEFINE
Purpose : Define a SPIRIT data object
Category : Ancillary GBO Synoptic Objects
Syntax : IDL> c=obj_new('spirit')
CALLS: ***
COMP_FITS_CRPIX, SPIRIT::CLEANUP, SPIRIT::INDEX2FITS, SPIRIT::INIT, SPIRIT::READ
is_struct
History : Written 11 Nov 2005, D. Zarro (L-3Com/GSFC)
Contact : dzarro@solar.stanford.edu
[Previous]
[Next]
Computes value of the spline function at offset 'd' and centre 'h'
Used by BELLS.pro
Use:
IDL> y = spl_func(d,h)
CDP Jan '92
CALLED BY
BELLS
[Previous]
[Next]
Name: split_colortab
Purpose: simplify some split-color tables manipulations
Input Paramters:
table - idl color table(s)
ncolors - number of colors for each table - (def = !d.table_size/nt)
bottom - (optional) bottom color indices - (should auto-bottom..)
Output Parameters
table (if /get) - tables currently 'dealt with'
ncolors (if /get) - ncolors for each 'table'
bottom (if /get) - bottom for each 'table'
Keyword Parameters
get (switch) - if set, RETURN [table] , ncolors, bottom
initialize (switch) - zero out existing 'split_colortab' info
restore (switch) - if set, restore previous state
noload (switch) - if set, dont load CTables (via loadct)
status (switch) - if set, print current settings
defined (output) - boolean "defined?" used with /GET
Calling Sequence:
IDL> split_colortab, tables, ncs [,bottoms] [,/get] [,/init]
Calling Context:
IDL> split_colortab,[3,1,0],[50,25,120],/init,/status ;<< SET split
---------------------------------------------- ; w/3 tables
| Too many colors requested... clipping to 101 | ; << !d.table_size
----------------------------------------------
% LOADCT: Loading table B-W LINEAR
% LOADCT: Loading table BLUE/WHITE
% LOADCT: Loading table RED TEMPERATURE
-----------------------
| Table# NColors Bottom | ; < /STATUS info
| 3 50 0 |
| 1 25 50 |
| 0 101 75 |
-----------------------
IDL> split_colortab,1,nc,bot,defined=defined, /get ; << readback scaling
IDL> if defined then print,nc,bot
25 50
CALLS: ***
BOX_MESSAGE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], LOADCT, delvarx [5]
strjustify, where_arr [1], where_arr [2]
History:
16-April-1999 - S.L.Freeland
[Previous]
[Next]
Project : SOHO - CDS
Name : SPLIT_STRUCT
Purpose : split two structures apart
Explanation :
Use : SPLIT_STRUCT,STRUCT,INDEX,S1,S2
Inputs : STRUCT = input structure to split
INDEX = index (or tag name) at which to break off structure
(all tags after and including this tag will be removed)
Opt. Inputs : None.
Outputs : S1, S2 = split structures
Version : Version 1.0, 22 January 1995
Version 2.0, 8 Oct 1998 -- modified to use CREATE_STRUCT
Version 3, 12-Dec-1998 -- improved memory management
Version 4, 23-Dec-2004 -- improved with REM_TAG
CALLS:
CALLED BY
ADD_TAG [2], DEF_CDS_STUDY, MK_PLAN_CUSTOM, MK_SOHO_CUSTOM
[Previous]
[Next]
Project : SDAC
Name : SPLIT_TAGS
Purpose : split duplicate tags from a structure
Explanation :
Use : split_tags,struct,s1,s2
Inputs : struct = input structure (array or scalar)
Opt. Inputs : None.
Outputs : s1,s2 = new structures with unique tags
Opt. Outputs: None
Keywords : None
CALLS: ***
ADD_TAG [1], ADD_TAG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1]
DELVARX [2], DELVARX [3], DELVARX [4], HAVE_TAG, delvarx [5]
CALLED BY:
BLINK_MAP
Common : None
Restrictions: None
Side effects: None
Category : Structure handling
Written : Dominic Zarro (SMA/GSFC), Jan 4, 1998
Contact : zarro@smmdac.nascom.nasa.gov
[Previous]
[Next]
PROJECT: SSW - GEN
NAME: sprint
PURPOSE: To spawn a print command
CATEGORY: PRINTER
EXPLANATION: The routine looks at the environment variables and the
switches set to figure out the print command. The
environment variables checked are:
o $SSW_QUE_PS - the queue to print PostScript file
o $SSW_QUE_ASCII - the queue to print ASCII
o $SSW_QUE_PS_COLOR - the queue to print color PostScript
o $SSW_PR_PS - the command to print PostScript file
o $SSW_PR_PS_COLOR - the command to print color PostScript
o $SSW_PR_ASCII - the command to print ASCII in portrait
o $SSW_PR_ASCII_LAND - the command to print ASCII landscape
o $SSW_FMT_ASCII - the pre-formatting for ASCII in portrait
o $SSW_FMT_ASCII_LAND- the pre-formatting for ASCII landscape
o $SSW_PR_NODE - the output node to print to
The PR* commands can have the string FILENAME where the names
of the files need to be inserted, and QUEUE_NAME where the
name of the queue needs to be inserted.
The order for the logic for generating the print command is:
1) The print command is passed in (cmd=cmd)
2) The queue name is passed in (queue=queue)
3) Use the SSW_PR* command env variables
4) Use the SSW_QUE* command env vars. These are ignored
if the SSW_PR* command env var is defined, unless it
is defined using QUEUE_NAME place holder.
5) Assume some defaults based on the operating system
6) Use the SSW_FMT* on ASCII to pre-process the file
and to pipe it into the print command
7) Check if the SSW_PR_NODE option is used and
format the command accordingly
Defaults:
o Assumes it should go to the PostScript queue
o For ASCII data, it assumes portrait
Samples:
setenv SSW_QUE_PS lps20
setenv SSW_QUE_PS_COLOR kodak
setenv SSW_QUE_ASCII lps20
setenv SSW_PR_PS "lpr -P QUEUE_NAME FILENAME"
setenv SSW_PR_ASCII "lpr -P QUEUE_NAME FILENAME"
setenv SSW_PR_ASCII_LAND "lpr -P QUEUE_NAME FILENAME"
setenv SSW_FMT_ASCII "/usr/lib/print/lptops -G -V -U -FCourier -P10pt FILENAME"
setenv SSW_FMT_ASCII_LAND "/usr/lib/print/lptops -G -H -U -FCourier -P8pt FILENAME"
setenv SSW_PR_NODE "diapason"
setenv SSW_PR_ASCII "/pslaser FILENAME type10 lm=1"
setenv SSW_PR_PS "cat FILENAME | rsh sxt3 lpr"
CALLS: ***
str_replace [1], str_replace [2]
CALLED BY:
disp_therm_rs232, high_mag_lat, lprint Obsolete see sprintpro, sysprint [1]
sysprint [2]
NOTE: If you specify QUEUE_NAME in the command then the queue
MUST be define (by QUE* env var or passed in)
SYNTAX: sprint, 'idl.ps'
INPUTS: file - The name of the file to be printed.
cmd - [KEYWORD] The print command to use
queue - [KEYWORD] The queue name to print to
ps - [KEYWORD] If set, use the PS command or queue
ascii - [KEYWORD] If set, use the ASCII command or queue
land - [KEYWORD] If set, use the ASCII_LAND command
color - [KEYWORD] If set, use the PS_COLOR command or queue
delete - [KEYWORD] If set, then delete the file afterwards
nospawn - [KEYWORD] If set, then simply display the print
command, but do not spawn the command
noprint - [KEYWORD] same as /NOSPAWN
node - [KEYWORD] If set, then format the statement to
do a "cat FILENAME | rsh node " and then the
print statement. BE AWARE: The print command
must allow inputs to be piped into it.
HISTORY: Ver 1.00 27-Jun-95 M.Morrison Written
Ver 1.01 28-Jun-95 M.Morrison
- Added /NOPRINT option
Ver 1.02 29-Jun-95 M.Morrison
- Renamed all env vars to have SSW_ preceding
Ver 1.03 14-Apr-97 M.Morrison
- Modified header slightly
- Added "IS_PS" call
- Removed MESSAGE calls, added PRINT
Ver 1.04 14-Apr-97 M.Morrison
- Added SSW_FMT_ASCII* capability
[Previous]
[Next]
Project : SDAC
Name : SPS
Purpose : Set the graphic device to Postscript and use machine fonts.
Category : SPEX, GRAPHICS
Explanation : Uses set_plot,'ps' and !p.font=0
Use : SET_PS [,/LAND] [,/PORTRAIT] [,/FULLPORTRAIT]
Inputs :
Opt. Inputs : None
Outputs : None
Opt. Outputs: None
Keywords :
/landscape - default landscape orientation
/portrait - default portrait orientation
/fullportrait - full page portrait orientation
/color - set up for color postscript
/encaps - encapsulated postscript
Calls :
CALLED BY:
BATSE_FLARES_WEEK, FS_AUTO_LOG, GE_WINDOW [1], HESSI_ATTENUATOR_SPECTRA
PLOT_ANGC [1], PLOT_ANGC [2], PLOT_GD, PLOT_HESSI_FILTERS, QLDISPLAY
Common : FCOLOR_PS, FENCAPS_PS
Restrictions:
Side effects: None.
Prev. Hist : Was PS.PRO changed because of ssw conflict.
Modified : Version 1, RAS, 12-apr-1997
[Previous]
[Next]
NAME:
SQUEEZE
PURPOSE:
Squeeze a vector down to unique elements (gets rid of values which are
in the vector more than once, leaving only one of each). The order of
the input is preserved: the first instance of a value is kept and the
following instances are dropped.
CATEGORY:
CALLING SEQUENCE:
xs = squeeze(x)
xs = squeeze(x,y)
INPUTS:
x = a vector
OPTIONAL INPUT PARAMETERS:
y = additional constraint such that x-elements and y-elements must
both match for an element to be deleted. x and y must have the
same dimension.
KEYWORD PARAMETERS
yout = y values after squeezing. If /index is set, yout is the same
indices returned in xs.
/index = return indices to x, instead of the squeezed x. The indices
are the x elements to keep, not the x elements to delete.
/nosort = do not sort the input array. This has the effect of only
dropping non-unique elements which are adjacent.
OUTPUTS:
xs = squeezed vector
CALLED BY:
HSI_GET_DATA, HSI_IMAGE_ERROR, HSI_PIXON_LOCAL_SMOOTH, HXT_AUTOIMG, HXT_ERROR
LOCAL_SMOOTH, SXT_QLOOK, hxtpix, makestr, sxt_align
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
Not guranteed to work with floating point.
Works with int, long and char arrays.
PROCEDURE:
MODIFICATION HISTORY:
T. Metcalf March 23, 1993
[Previous]
[Next]
NAME:
SRCOR
PURPOSE:
Correlate the source positions found on two lists.
CALLING SEQUENCE:
srcor,x1in,ylin,x2in,y2in,dcr,ind1,ind2
INPUTS:
x1in,y1in - First set of x and y coordinates. The program
marches through this list element by element,
looking in list 2 for the closest match. So, the program
will run faster if this is the shorter of the two lists.
Unless you use the option or magnitude keyword, there is
nothing to guarantee unique matches.
x2in,y2in - Second set of x and y coordinates. This list is
searched in its entirety every time one element of list 1
is processed.
dcr - Critical radius outside which correlations are rejected;
but see 'option' below.
CALLS: ***
GCIRC, REMOVE [1], REMOVE [2]
OPTIONAL KEYWORD INPUT:
option - Changes behavior of program and description of output
lists slightly, as follows:
OPTION=0 or left out
Same as older versions of SRCOR. The closest match from list2
is found for each element of list 1, but if the distance is
greater than DCR, the match is thrown out. Thus the index
of that element within list 1 will not appear in the IND1 output
array.
OPTION=1
Forces the output mapping to be one-to-one. OPTION=0 results,
in general, in a many-to-one mapping from list 1 to list 2.
Under OPTION=1, a further processing step is performed to
keep only the minimum-distance match, whenever an entry from
list 1 appears more than once in the initial mapping.
OPTION=2
Same as OPTION=1, except the critical distance parameter DCR
is ignored. I.e., the closest object is retrieved from list 2
for each object in list 1 WITHOUT a critical-radius criterion,
then the clean-up of duplicates is done as under OPTION=1.
magnitude
An array of stellar magnitudes corresponding to x1in and y1in.
If this is supplied, then the brightest star from list 1
within the selected distance of the star in list 2 is taken.
The option keyword is ignored in this case.
spherical
If SPHERICAL=1, it is assumed that the input arrays are in
celestial coordinates (RA and Dec), with x1in and x2in in
decimal hours and y1in and y2in in decimal degrees. If
SPHERICAL=2 then it is assumed that the input arrays are in
longitude and latitude with x1in,x2in,y1in,y2in in decimal
degrees. In both cases, the critial radius dcr is in
*arcseconds*. Calculations of spherical distances are made
with the gcirc program.
OUTPUTS:
ind1 - index of matched stars in first list
ind2 - index of matched stars in second list
COMMON BLOCKS:
none
SIDE EFFECTS:
none
METHOD:
See under keyword LEVEL above.
REVISON HISTORY:
Adapted from UIT procedure J.Wm.Parker, SwRI 29 July 1997
Converted to IDL V5.0 W. Landsman September 1997
[Previous]
[Next]
Name: ssw_addmm_gen
Purpose: add $SSW_MMM gen libraries for multi-instrument missions
Input Parameters:
mmmissions - optional vector of missions to include
Keyword Parameters:
no_startup - (switch) if set, don't execute $SSW/<MM>/setup/IDL_STARTUP(s)
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], STR2ARR [1], STR2ARR [2]
concat_dir [4], get_logenv [1], get_logenv [2], main_execute [1]
main_execute [2], ssw_path, str_replace [1], str_replace [2], where_arr [1]
where_arr [2]
History:
9-March-2005 - S.L.Freeland - long planned rationalization...
27-sep-2005 - S.L.Freeland - fix multi insstr/mission bug
reported by W.Thompson
18-oct-2005 - S.L.Freeland - add <MM>/gen/setup/IDL_STARTUP support
and /NO_STARTUP keyword
26-jun-2006 - S.L.Freeland - turn on solarb..
30-Sep-2006 - Zarro - added HINODE
[Previous]
[Next]
Name: ssw_apkpbar
Purpose: annotate utplot with ap/kp index colorbar
Input Paramters:
time0, time1 - optional time range - default is current UTPLOT
Keyword Paramters:
tickpos,ticklen,thick,labcolor,labpos - per evt_grid.pro definitions
label - if set, annotate color bars with level
labove/lbelow (implies /LABEL) - relative label positions (def=/labove)
blank - if set, blank area around annotation
History:
9-mar-2005 - S.L.Freeland - annotate some space weather/latest events
14-mar-2005 - S.L.Freeland - auto-scale label positions w/respect to bars
CALLS: ***
BOX_MESSAGE, SSW_GETAPKP, SSW_LCLIMIT_COLORS, UTPLOT [1], UTPLOT [2], UTPLOT [3]
UTPLOT [4], UTPLOT [5], UTPLOT [6], data_chk [1], data_chk [2], evt_grid
get_utevent [1], get_utevent [2], gt_tagval [1], gt_tagval [2], reltime [1]
reltime [2], ssw_deltat
Side Effects:
clobbers 1st 15 r,g,b indices
[Previous]
[Next]
Name: ssw_bin
Purpose: return system-dependent BIN directory OR executable name w/path
Input Parameters:
routine - if supplied, return executable name (with path)
Keyword Parameters:
found (output) - boolean (TRUE if found, FALSE if not found)
warning - if set and routine NOT found, print a warning message
Calling Sequence:
bindir=ssw_bin() ; default SSW bin for system
exenam=ssw_bin('name', found=found) ; form&find executable
Calling Examples (as run on an Alpha-OSF):
IDL> mpeg=ssw_bin('mpeg_encode', found=found) ; find executable
IDL> print,strrep_logenv(mpeg,'SSW') ; show answer
$SSW/bin/OSF_alpha/mpeg_encode ; <- the SSW standard
IDL> print,ssw_bin('whirlgif') ; also checks other areas
$HOME/bin/whirlgif ; found a local version
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], OS_FAMILY, STR2ARR [1], STR2ARR [2], STRREP_LOGENV
break_file [4], concat_dir [4], file_exist [1], file_exist [3], get_logenv [1]
get_logenv [2], uniqo [1], uniqo [2]
CALLED BY:
F0READ, READ_PS [1], RICE, SSW_WRITE_GIF, URL_GET, WR_MOVIE, idl_server_command
image2movie, ssw_install [2], ssw_start_rpcserver, wwwidl_server_check
History:
5-Mar-1997 - S.L.Freeland - written
15-apr-1997 - S.L.Freeland - look add SSW_XXX/bin and SSW_XXX/exe
30-apr-1997 - S.L.Freeland - check $SSW/packages/XXX/bin and exe
18-aug-1997 - S.L.Freeland - include $SSW_BIN (scripts, mirror, etc)
9-sep-1998 - S.L.Freeland - include user $path, add /SSW_ONLY
24-apr-1999 - S.L.Freeland - protect agains NULL instrument...
[Previous]
[Next]
Name: ssw_build_trace
Purpose: build a mosaic from components w/ssw std.
Input Parameters:
index, data - standard SSW 'index,data' cubes (trace,sxt,...)
Output Parameters:
mindex - the mosaic composite 'index' (index2map et al ready...)
mdata - the mosaic data
Keyword Parameters:
ref_fov - optional complete list of reference index for fov determ.
csize - (pixels) composite size (default is extremes of components)
fov - solar FOV in arcminutes (default is extremes of components)
pixmap - if set, build mosaic in off screen PIXMAP
zbuffer - if set, build mosaic in Z-buffer
composite - type of compositing to do (per plot_map)
default=3 for "TRACE-like" (auto vignette correct)
rotate - if set, diff-rot (via drot_map) components relative to reference
fast - if set, do fast diff-rot (translational) - ~ok if close in time
_extra=_extra - most others passed to plot_map
Calling Seqeunce:
[select, process, and scale your 'data' (mosaic cube) as desired, then...]
IDL> ssw_build_mosiac, index, data, mindex, mdata [options]
Method:
index2map and index2fov, $
Then apply Dominic Zarro mapping SW to position/composite
CALLS: ***
BOX_MESSAGE, DROT_MAP, INDEX2MAP, PLOT_MAP2, PMM [3], SSW_BUILD_MOSAIC, WDEF [1]
WDEF [2], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1]
data_chk [2], get_infox, gt_tagval [1], gt_tagval [2], index2fov, pmm [1], pmm [2]
rem_elem [1], rem_elem [2], tim2dset [1], tim2dset [2], time_window
update_history
Restrictions:
Need index,data with SSW standards (ex: read_trace default output)
Need at least one SOHO instrument in SSW path
History:
28-April-1998 - S.L.Freeland - apply SSW/Mapping techniques to TRACE
2-Nov-1999 - S.L.Freeland - made interface copecetic, "genericize"
derive default center and fov using
index2fov,/extreme call
22-Nov-1999 - S.L.Freeland - add PERCENTD to history info
23-Nov-1999 - S.L.Freeland - add drot_map.pro hooks (/rotate,/fast)
18-May-2000 - B.N.Handy - Change an 'endif' to 'endelse' so this
works on solaris/IDL5.3
[Previous]
[Next]
Name: ssw_check_contrib
Purpose: check local contrib area to see if routines have made it online
Keyword Parameters:
loud - if set, print some status messsages
nomail - if set, dont mail results (implies /LOUD)
testing - if set, check and mail but dont move or delete
noaction - synonym for TESTING
move - optional path to move to (default=$SSW_CONTRIB_BACKUP)
backup - synonym for MOVE
delete - if set, DELETE as well as Copy (ie, a true move)
no_delete - if set, dont delete after copy (/DELETE IS DEFAULT)
Calling Sequence:
ssw_check_contrib,/delete ; monitor $SSW_CONTRIBUTED
; move files which are identical to 1st
; $SSW match - send email
ssw_check_contrib,/testing ; just check status and send email
CALLS: ***
BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1], STR2ARR [2], STRREP_LOGENV, UTC2DOW
anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], data_chk [1]
data_chk [2], ex2fid [1], ex2fid [2], file_diff, file_exist [1], file_exist [3]
file_info2 [1], file_info2 [2], file_list [1], file_list [2], fmt_tim [1]
fmt_tim [2], get_logenv [1], get_logenv [2], int2secarr [1], int2secarr [2]
mail [1], mail [2], pr_status [1], pr_status [2], prstr [1], prstr [2], rem_elem [1]
rem_elem [2], sswloc, str_replace [1], str_replace [2], strjustify, ut_time [1]
ut_time [2]
History:
6-may-1997 - S.L.Freeland
9-may-1997 - S.L.Freeland, flag files hanging around too long
files OLDER than corresponding SSW
pretty up output messages.
made /delete the default
notify $SSW_SW_NOTIFY
9-Sep-1997 - M.D.Morrison, Send mail only on Sundays
3-Dec-1997 - S.L.Freeland, initialize a variable
[Previous]
[Next]
Name: ssw_colors
Purpose: load SSW color tables, optionally return RGB
Input Parameters:
Keyword Parameters:
Instrument - instrument prefix (eit, sxt, sumer)
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], LOADCT
concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
get_logenv [1], get_logenv [2]
CALLED BY:
eit_colors
History:
18-Feb-1996 S.L.Freeland
13-Nov-2000 S.L.Freeland - include trace CT.
[Previous]
[Next]
Name: ssw_composite
Purpose: form composite of 2 or more images
Input Parameters:
index, data - standard SSW 'index,data' - 3D, assumed pre-aligned
Output Parameters:
cindex - index - w/history record of component image times
cdata - the composite image
Keyword Parameters:
mode - type of compositing
Mode 1 -> greatest valued pixel
Mode 2 -> least valued pixel [continum images for example]
Mode 3 -> total of all images [just does total(data,3) ]
CALLS:
[Previous]
[Next]
Name: ssw_conflicts
Purpose: check input files or files matching pattern against online SSW
Input Parameters:
pattern - string pattern of files or paths to check (ex: 'yohkoh/gen' )
Keyword Parameters:
conffile - optional conflict file name
full - if set, do a full listing
conflicts - if set, only show conflicts
nomail - if set, don't mail results
/XXX (anything else) - instrument, mission, or package to check
except - optional string/path pattern to ignore (beta testing for examp
might exclude release area since conflicts expected
Calling Sequence:
ssw_conflicts,/xxx ; Routines instrument/mission/pack XXX
ssw_conflicts,'pattern' ; check SSW files matching pattern
Calling Examples:
ssw_conflicts,/cds ; conflicts under CDS branch
ssw_conflicts,/chianti ; conflicts under Chianti Package
ssw_conflicts,/gen ; conflicts under $SSW/gen/...
ssw_conflicts,'soho/gen' ; conflicts unser $SSW/soho/gen
ssw_conflicts,/sxig12_YYMMDD, except='/sxig12/' ; EXCEPT to ignore "expected" conflicts
CALLS: ***
CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], MORE [1], MORE [2]
STRPAD, STRREP_LOGENV, concat_dir [4], data_chk [1], data_chk [2], file_append [1]
file_append [2], file_diff, file_exist [1], file_exist [3], get_logenv [1]
get_logenv [2], get_user [1], get_user [2], mail [1], mail [2], pr_status [1]
pr_status [2], rem_elem [1], rem_elem [2], ssw_strsplit, sswloc, str_replace [1]
str_replace [2], strjustify
History:
31-oct-1996 - S.L.Freeland - derive from chk_conflict
12-apr-1997 - protect output in case where number conflicts eq ZERO!
(a sign that we are making progress...)
add a status line (SSWLOC search pattern used)
cleanup and document - send mail by default
09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
13-May-2003, S.L.Freeland, added EXCEPT keyword and function
Method:
Call sswloc to get matching file list
Call file_diff(/idlpro) to differentiate CODE & HEADER differences
Keyword Inheritance used for self updating actioin
(new misstions, instruments, packages added to SSW need no change)
[Previous]
[Next]
Name: ssw_contrib_info
Purpose: return info from ssw_contrib 'jobfile' in structure
Input Parameters:
jobfile - ascii ssw_contrib 'job' file (contrib summary)
Output Parameters:
pcnt - number of *.pro files included (may be zero...)
Keyword Parameters:
pros - (OUTPUT) list of *.pro files [ strarr(pcnt) ]
CALLS: ***
BOX_MESSAGE, FILE_EXIST [2], STR2ARR [1], STR2ARR [2], data_chk [1], data_chk [2]
file_exist [1], file_exist [3], gt_tagval [1], gt_tagval [2], rd_tfile [1]
rd_tfile [2], strpair2struct
CALLED BY:
ssw_contrib_monitor
History:
~1-Jan-1998 - S.L.Freeland - original
21-Sep-1999 - S.L.Freeland - match updated 'job' format
Calling Seqeunce:
jobinfo=ssw_contrib_info(jobfile [pcnt, pros=pros ])
Method:
call rd_tfile/strpair2struct/str2arr/gt_tagval
Calling Example
|INPUT |OUT |OUT
IDL> help,ssw_contrib_info(jobfile, pcnt, pros=pros),/str ; << CALL
** Structure MS_307224832001, 9 tags, length=72:
FROM STRING ' freeland@sxt1.lmsal.com'
MASTERIP STRING ' diapason.lmsal.com'
MASTER STRING ' trace'
MASTERPATH STRING ' /tsw'
JOBPATH STRING ' /pub/incoming/ssw/freeland'
JOBNAME STRING ' ssw_contrib.freeland.990921.110359'
TARFILE STRING ' ssw_contrib.freeland.990921.110359.tar'
SSWPATH STRING ' idl/util'
FILESTRANSFERED STRING ' one.pro two.pro three.pro'
IDL> more,pros ; *.pros returned in keyword <PROS>
one.pro
two.pro
three.pro
[Previous]
[Next]
Name: ssw_contrib_monitor
Purpose: monitor "ssw_contrib"uted SW, optionally online=>SSW
Input Parameters:
Keyword Parameters:
incoming_dir - local directory where ssw_contrib stuff is placed
processed_dir - local directory where processing is done
notify - if set, name of user(s) to notify when some processing is done
noremove - if set, dont remove versions from incoming_dir
Method:
Uses information in 'ssw_contrib' job description.
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], POPD
PUSHD, STR2ARR [1], STR2ARR [2], STRTAB2VECT, concat_dir [4], curdir [1], curdir [2]
data_chk [1], data_chk [2], dir_since, file_exist [1], file_exist [3]
get_logenv [1], get_logenv [2], gt_tagval [1], gt_tagval [2], pr_status [1]
pr_status [2], ssw_contrib_info, ssw_contrib_ok2online, ssw_strsplit
str2cols [1], str2cols [2], strarrcompress
Side Effects:
any ssw_contrib files under /<incoming_dir> are moved to /<processed_dir>
History:
1-Mar-1999 - S.L.Freeland
21-Sep-1999 - S.L.Freeland - mods for update format, functional
09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
[Previous]
[Next]
Name: ssw_contrib_ok2online
Purpose: boolean - true if JOBINFO passes sanity/security tests
Input Parameters:
JOBINFO - structure represtenting ssw_contrib job log
(output from ssw_contrib_info.pro)
CALLS: ***
BOX_MESAGE, BOX_MESSAGE, STR2ARR [1], STR2ARR [2], STRTAB2VECT, gt_tagval [1]
gt_tagval [2], is_member [1], is_member [2]
CALLED BY:
ssw_contrib_monitor
History:
21-Sep-1999 - S.L.Freeland
[Previous]
[Next]
Project : SDAC
Name : SSW_CROSSCORR
Purpose : This procedure computes a crosscorrelation function between two
time series.
Category : MATH
Explanation :
using the IDL function R=CORRELATE(xx,yy)
R=TOTAL(xx*yy)/SQRT(TOTAL(xx^2)*TOTAL(yy^2))
r0 and r1 are two arrays of equal length
Use : CROSSCORR, R0, R1, CC, II, NPIX
crosscorrelation function CC(R0,R1) with time delay -NPIX<II<NPIX
Inputs : R0 - first time series
R1 - second time series, same length as R0, same time bins
NPIX - half-width of crosscorrelation interval, in bin units of R0
Opt. Inputs : None
Outputs : CC - Crosscorrelation function vs lag.
II - lag in units of bins of R0 and R1
Opt. Outputs: None
Keywords :
Calls : ***
CHECKVAR [1], CORRELATE, checkvar [2]
Common : None
Restrictions:
Side effects: None.
Prev. Hist :
created by M.Aschwanden, March 1995
Modified :
Version 2, RAS, documented added to SDAC tree 6-jan-1997
Version 3, RAS, fixed bugs, 26-mar-1997
14-jun-2001, renamed from crosscorr to prevent conflict, RAS
[Previous]
[Next]
Name: ssw_ct2rgb
Purpose: return RGB for give IDL or SSW wavelength dependent color table
Input Parameters:
table - RSI color table number -OR- SSW wavelength
Output Parameters:
r,g,b
name - associated ascii color table name
Keyword Parameters:
gamma - optional gamma factor (applied to given table)
reverse - switch, if set, reverse color table
low - optional low (stretch range)
hight - optional high (stretch range)
Calling Sequence:
ssw_ct2rgb,table, r,g,b [name, /reverse, gamma=gamma, low=low, high=high]
-OR-
ssw_ct2rgb,WAVE , r,g,b [name, /reverse, gamma=gamma, low=low, high=high]
CALLED BY:
trace_last_movie [2]
History:
2-Jun-1997 - S.L.Freeland - simplify some WWW work
3-Jun-1997 - S.L.Freeland - restore incoming rgb, document
25-apr-1998 - S.L.Freeland - combine 'ssw_colors' and 'ct2rgb' functions
Method: uses Z-buffer
CALLS: ***
BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], LOADCT, STRETCH
concat_dir [4], data_chk [1], data_chk [2], get_logenv [1], get_logenv [2]
is_member [1], is_member [2]
Side Effects:
May change color table (if /loadit set OR no output RGB supplied)
[Previous]
[Next]
Name: ssw_deltat
Purpose: return deltaTime between input times in specified units
Input Parameters:
t0 - start time OR a vector of times - any SSW format
t1 - optional end time if t0 is scalar [output is d(timegrange) ]
Output:
Function returns delta-time in specified units (default seconds)
n_elements(output) = n_elements(inputtimes)-1
-OR- = n_elements(inputtimes) if REFERENCE specified
Keyword Parameters:
SECONDS,MINUTES,HOURS,DAYS - output units (default=seconds)
reference - optional reference time for compare (any SSW format)
Calling Sequence:
dt=ssw_deltat(t0,t1) ; explicit start and stop time
dt=ssw_deltat(times) ; vector of times
dt=ssw_deltat(times, reference=reftime) ; dTimes/dReference
Calling Examples:
dt=ssw_delta(index) ; dT (between elements)
dt=ssw_delta('1-feb-98', '23-mar-02', /days) ; dT (time range)
dt=ssw_deltat(index, reference='3-apr-1998') ; dT/dREFERENCE
Illustration [ timegrid and ssw_deltat ]
IDL> tgrid=timegrid('1-feb',nsamp=3,hours=48) ; make dummy time array
IDL> more,anytim(tgrid,/ecs)
1998/02/01 00:00:00.000
1998/02/03 00:00:00.000
1998/02/05 00:00:00.000
IDL> more,ssw_deltat(tgrid,ref='2-feb',/days) ; show dT/dREF
-1.0000000
1.0000000
3.0000000
CALLS: ***
anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], deriv_arr [1]
deriv_arr [2]
CALLED BY:
GOES_TEK [1], eit_proton_summary, ftp_list_since, get_goes_defsat [1]
get_goes_defsat [2], get_ssc_best, goes3sec_copy, hxt_impulsivness, image2movie
leak_sub [1], leak_sub [2], leak_sub [3], les_archive_info, plot_ace, plot_goesp
pr_his_index [1], pr_his_index [2], pr_his_index [3], rd_goesp_ascii
rd_goesx_ascii, read_genxcat, sel_leak_image [1], sel_leak_image [3]
sel_leak_image [4], soon_catstat, ssw_apkpbar, ssw_flare_locator
ssw_fov_context, ssw_getcme_cactus, ssw_getdst, ssw_in_timerange
ssw_time_compare, ssw_timestat, sxt2mpeg, sxt_is_synsfc, sxt_uvf_info [1]
sxt_uvf_info [3], time_window, trace_cosmic2filename, trace_goodobs
trace_movie_index [1], trace_movie_index [2]
History:
Circa 1-jan-1997 - S.L.Freeland
25-May-1998 - S.L.Freeland use <anytim> in place of <anytim2ints>
3-Dec-1998 - S.L.Freeland - add REFERENCE and some documentation
[Previous]
[Next]
Name: ssw_env
Purpose: add & remove SSW elements IDL !path, optionally run setup.NNN
Category: system, environment
Calling Sequence:
ssw_path,/instrument [,/instrument ,/remove]
CALLS: ***
pathfix, prstr [1], prstr [2], ssw_instruments
History:
15-Jun-1995 (SLF)
[Previous]
[Next]
Name: ssw_expand_times
Purpose: expand time vector to match sample cadence
Input Parameters:
intimes - structure vector with SSW compliant times
Output Parameters:
otimes - time vector (expanded)
odata - data samples (1D)
Keyword Parameters:
out_style - desired output time style (see anytim.pro) DEF=INTS
_extra - Data Tag to extract (determines samples per structure)
ddt - delta-T per sample
offset_ddt - optional delta-T (seonds) between intimes and
first sample
Calling Sequence:
IN OUT OUT
ssw_expand_times, intimes, otimes, odata [,out_style=out_style], $
ddt=ddt, offset_ddt=offset_ddt, $
_extra=_extra
Calling Example:
[ output from 'get_solar_indicies' includes 8 KP samples/structure ]
IDL> ind=get_solar_indicies('1-nov-2001','1-dec-2001')
IDL> ssw_expand_times,ind,kptime,kpdata,/kp,ddt=(3.*3600),out='utc_int
IDL> help, ind, kptime, kpdata
IND STRUCT = -> MS_060814109002 Array[31]
KPTIME STRUCT = -> CDS_INT_TIME Array[248]
KPDATA INT = Array[248]
IDL> utplot,kptime,kpdata.... etc
CALLS:
[Previous]
[Next]
Name: ssw_fill_cube
Purpose: fill missing data with data from neighbors
Input Parameters:
cube - data cube (output if only one parameter passed)
Output Parameters:
ocube - optional - output (filled cube) - default replaces input
Keyword Parameters:
missing - if set, pixel value considered 'missing' (default=0)
times - vector of image times (not yet implemented)
track_progress - switch, if set, print correction status info
window - limit window of neighbors to check (+/- limit)
(for large cubes, dont wander further than required
Output Parameters:
orig_miss - percent missing data in original cube [fltarr(nimages)]
final_miss - percent missing data in final cube
Calling Sequence:
ssw_fill_cube,cube ; overwrite input with filled version
ssw_fill_cube,cube,ocube ; filled version in ocube (orig saved)
Calling Examples:
ssw_fill_cube,cube, orig=orig, final=final
ssw_fill_cube,cube, mising='aa'x ; AA(hex) is "missing" (ex: fill data)
ssw_fill_cube,cube, window=2 ; check neghbors within +2/-2
CALLED BY:
ssw_flare_locator
Restrictions:
Assumes images are kindof like their neighbors
(normalization, wavelenth, structure, registration, time, whatever)
History:
24-apr-2001 S.L.Freeland - ssw_fill_cube from eit_fill_cube
Previous History:
17-feb-1996 S.L.Freeland - wrote eit_fill_cube
18-Feb-1996 S.L.Freeland - add WINDOW keyword and function
CALLS: ***
data_chk [1], data_chk [2]
Side Effects:
Input array is filled ('clobbered') if only one parameter (for space)
[Previous]
[Next]
Name: ssw_find_transit
Purpose: find planet against solar disk
Input Parameters:
index, data - standard 'ssw' index,data 2D/3D (read_eit, read_trace..)
Output Parameters:
centx,centy - the weighted centroid position (planet location)
Keyword Parameters:
ponly - output array of 'planet only' (same size as data)
boolean - if set, use boolean array instead of data array for centroid
display - if set, show results
sfactor - expected signal difference; default = .1 (10%)
pixpad - optional pixel padding (only consider this distance above limb)
default=20 pix, increase for EUV & XRAY
xcen_limit - (input) optional xcen limits (restrict search to this reg)
ycen_limit - (input) optional ycen limits (restrict search to this region)
xpix_limit - (input) optional x pixel range restrict search to this reg)
ypix_limit - (input) optional x pixel range restrict search to this reg)
xcen,ycen - (output) centx and centy in arcsecs from sun center (ssw std)
History:
2-December-1999 - S.L.Freeland - orig for TRACE/Mercury transit
3-December-1999 - S.L.Freeland - add call to ssw_mask_image
(enable xcen/ycen search limit)
CALLS: ***
AVERAGE, BOX_MESSAGE, CENTROIDW [1], CENTROIDW [2], SOLAR_MASK, SSW_MASK_IMAGE
WDEF [1], WDEF [2], align_label, data_chk [1], data_chk [2]
Restrictions:
~ on disk only - assumes planet signal low compared to solar disk
[Previous]
[Next]
ssw_flare_locator
Purpose: locate flares from input data (3D or 2D)
Input Paramters:
index,data - ssw compliant 'index,data'; usually
one "before" and another during or shortly after peak
Output:
function returns xcen/ycen of flare
Keyword Parameters:
limb_pad - size of above limb region to consider ( -> solar_disk.pro )
smooth_width - width of box in boxcar smooth
nosmooth - switch, if set, don't apply the smoothing algorithm
dark_flare - if set, look for dark, not bright "flare" (dimming?)
helio - if set, function return heliographic (arcmin2hel convention)
ldata - (output) - data array used in the location
flare_helio (output) - flare coordinates in heliographic
nofill - if set, dont fill missing pixels from neighbors
(default is to fill via ssw_fill_cube which results in zeroing out the
missing pixels in the differenence image, probably a reasonable thing)
nospikes/despikes (input, synonyms) - if set, despike both images prior to
applying flare algorithm (suggested if not done prior to call)
Current algorithm is via ssw/gen nospike.pro (/FLARE set)
reg_minutes - if set, number of minutes seperation when image
registration w/differential rotation will kick in
(default is no registration)
CALLS: ***
ARCMIN2HEL, BOX_MESSAGE, COMP_FITS_CRVAL, CONV_A2H [1], CONV_A2H [2], REVERSE
SOLAR_MASK, SSW_REGISTER, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
coord_l2v, data_chk [1], data_chk [2], difference_movie, gt_tagval [1]
gt_tagval [2], nospike, ssw_deltat, ssw_fill_cube, struct2ssw
History:
Circa Jan 1 2002 - written
16-Mar-2004 - allow one image (make it look like 2)
protect against 2 image input of identical images
12-may-2005 - add REG_MINUTES keyword and function