[Previous]
[Next]
NAME:
defsysv_smei
PURPOSE:
Defines a number of useful constants as system variables
CATEGORY:
Environment
CALLING SEQUENCE:
defsysv_smei
INPUTS:
(none)
OUTPUTS:
Defines system variables
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
DEFSYSV_
PROCEDURE:
> For all system variables the IDL defsysv procedure is called only if the variable
doesn't exist yet. A 2nd call to this procedure does nothing useful.
> !TheForegroundColor and !TheBackgroundColor
The idea is to set !TheForegroundColor to black and !TheBackgroundColor to white.
IDL sets the foreground to white (color index !d.n_colors-1) and the background to
black (index 0) everytime the plot device is switched with 'set_plot'. This can be
reversed by calling 'flip_colors' (which uses the two new color-related system
variables).
> !TheTerminal, !ThePrinter
Typically the terminal device (e.g. X or WIN) and the printer device (e.g. HP, EPS)
remain the same during an IDL session. To assist in switching back to either device
after a 'set_plot' call the device names are stored in two system variables.
!TheTerminal can be set here since IDL sets the proper !d.name on startup.
!ThePrinter is set here to the generic windows 'PRINTER' device, just to make sure it
exists. For other platforms dependent it should be updated in the IDL_postop_* procedures.
> !ThePlotFile
!ThePlotFile is used by 'set_page' and 'spitplot' do keep track of the current plotfile.
The constants are stored in several structures: !sun, !earth, !physics
MODIFICATION HISTORY:
SEP-1999, Paul Hick (UCSD/CASS)
OCT-2002, Paul Hick (UCSD/CASS)
Added JulianYr to !earth
JAN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added !TheTime
[Previous]
[Next]
NAME:
destroyvar
PURPOSE:
Destroy an IDL variable
CATEGORY:
Toolbox: generic
CALLING SEQUENCE:
PRO destroyvar, a, b, c, d, e, f, g, h
INPUTS:
a,b,c,d,e,f,g,h any IDL variable
OUTPUTS:
(none; that's the point)
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLED BY:
AlignHeliosphere, CvSky, InsituTimeSeries [1], InsituTimeSeries [2], PlotBars
PlotDashes, RemoteView, RemoteView_Display2D, RemoteView_Display3D
RemoteView_FOV, ThomsonLOSDensity, ThomsonLOSFar, ThomsonLOSRomb, ThomsonLOSStep
ThomsonSetupLOS, TimeSplit, TimeXAxis, big_eph, big_eph_clean, cvsmei_init
even_light, even_light_info, even_light_photometry, flt_read, flt_string
getnagoyasources, getootyasources, getsmeisources, grd_read, hide_env
init_contiguous_group, jpl_close, merge_ranges, next_contiguous_group
nso_fe_start, plotbars_plot, qGlitch_Run, qImage_cw_DrawEphem, qImage_cw_Ephem
qImage_cw_EphemKill [1], qImage_cw_EphemKill [2], qImage_cw_SMEI, qLine_Curve
qView_ApplyGain, qView_Gain, qView_PlotTrack, qvu_pick, set_page, skyd_cat, smei_buf
smei_buf_getframe, smei_buf_prep, smei_buf_read, smei_filepath, smei_findcrazy
smei_findpnt, smei_frm_base, smei_frm_drive, smei_frm_findpoint, smei_frm_hbar
smei_frm_summary, smei_frm_track, smei_frm_where, smei_getfile
smei_hdr_c3maskupload, smei_hdr_get, smei_hdr_plot, smei_mkbase, smei_mkcal
smei_orbit_stats, smei_plot_timeseries, smei_setup_roi, smei_sgp4_orbits
smei_sky, smei_sky_cleanedge_fov, smei_sky_read, smei_star_fit, smei_star_list
smei_star_lsqfit, smei_star_readpnt, smei_star_remove, smei_star_show
smei_star_standard, smei_www_skymaps, smei_zld_model, smeidb_mounted
txt_block_read, txt_read, vu_coronagraph, vu_earthskymap, vu_elotime, vu_extract
vu_getdata, vu_header, vu_insitu, vu_linecut, vu_movie, vu_nagoyasourcemap
vu_planarcut, vu_radialcut, vu_read, vu_remoteview, vu_solardisk, vu_spherecut
vu_syncgrid, vu_synopticmap, vu_type_insitu, vu_vox_write, where_overlap
wso_write, www_help_crosslinks, www_help_is_code
RESTRICTIONS:
Up to 7 variables can be destroyed in one call
PROCEDURE:
Use 'temporary' to move the variable to be deleted to local variable,
which in turn is destroyed when the subroutine exits.
MODIFICATION HISTORY:
MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
do_file
PURPOSE:
File manipulations: moving, copying and deleting files
CALLING SEQUENCE:
FUNCTION do_file, file, dest, copy=copy, delete=delete, move=move, $
silent=silent, buffer=buffer
INPUTS:
file scalar: type: string
file spec (may contain wildcards)
dest scalar: type: string
destination for copy or move
OPTIONAL INPUT PARAMETERS:
/copy copies file
/delete deletes file
/move moves (renames) file
silent=silent controls messages to screen
OUTPUTS:
Result 1 = success ; 0 = failure
on Windows and Unix no status code is available
and the value 1 is returned.
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
FILEPATH, GetFileSpec, InitVar, IsType, SetFileSpec, hide_env, who_am_i
CALLED BY:
bin_read, flt_read, get_page, grd_read, img_read, mk_flick, run_ssw_smei, set_page
smei_buf, smei_findcrazy, smei_frm_cp, smei_frm_findpoint, smei_frm_read
smei_fts_read, smei_hdr_plot, smei_mkglare, smei_mkorb, smei_orbit_stats
smei_sky_cleanedge_map, smei_star_readpnt, smei_star_remove, smei_star_split
smei_zld_remove [1], txt_read, vox_read, vu_get_page, vu_image, vu_movie
vu_quick_movie, vu_write, www_help_rsi, www_help_smei
RESTRICTIONS:
One and only one keyword can be set
PROCEDURE:
> FIND_FILE is used to locate a file matching the input `file' value.
(if file='' or absent no action is taken).
> `dest' is checked by DO_PARSE to make sure it is a valid file name
On VMS all file operations use call_external to execute system functions or
other F77 functions:
/move calls the system function LIB$RENAME_FILE first (if not succesful
the F77 function COPY_FILE is called followed by a LIB$DELETE_FILE
call (this should work across drives)
/copy calls the F77 function COPY_FILE
/delete calls the system function LIB$DELETE_FILE
> On Windows and Unix the proper shell command is spawned, with 'file' and
'destin' as arguments.
RESTRICTIONS:
If large groups of files are processes the concatenated list of file names
can create a cp,rm or mv command that is too long. The threshold for the length
of a shell command apparently is 128kB (the actual limit is somewhat lower in
practice, and apparently is not the same for all Linux boxes on the subnet,
even those running the same Linux distribution).
Currently files are processed in groups that keep the length below 124 kB. So far
this appears to be a safe value. Use the keyword buffer to override the default.
MODIFICATION HISTORY:
JAN-1995, Paul Hick (UCSD/CASS)
APR-2000, Paul Hick (UCSD/CASS)
IDL 5.4 has some added feature: /hide keyword for Windows; exit status
for Windows and unix. The unix modifications haven't been tested since
we don't have 5.4 on any of the Linux boxes yet.
JAN-2002, Paul Hick (UCSD/CASS)
Fixed a pretty lethal bug in the file delete procedure on Windows.
(it might try to delete all files in the current directory!!).
SEP-2005, Paul Hick (UCSD/CASS)
Added code to copy multiple files at once.
JUL-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Replaced findfile by file_search