vectorproduct $SSW/smei/ucsd/gen/idl/toolbox/math/vectorproduct.pro
[Previous] [Next]
 NAME:
	vectorproduct
 PURPOSE:
	Calculate vector or scalar product for two vectors
 CATEGORY:
	gen/idl/toolbox/math
 CALLING SEQUENCE:
	result = vectorproduct(r1, r2 [, /unit, /cylin, /sphere, /rect, /degrees, /scalar, /angle])
 INPUTS:
		r1 		arrays[3,*]; type: int or float
		r1	 	arrays[3,*]; type: int or float
					vectors for which the product is to be taken.
					the first dimension identifies the three coordinates: Cartesian (default),
					cylindrical or spherical.
 OPTIONAL INPUT PARAMETERS:
		/scalar		by default the vector (cross-product) is calculated. If /scalar is set
					then the scalar product is calculated instead.
		/angle		if set then information about the angle between the two vectors is returned:
						for vector products sin(angle) = |r1 x r2|/|r1||r2|
						for scalar products cos(angle) = |r1.r2|/|r1||r2|
		/unit		if set, then a unit vector along the cross-product vector is returned
						(keyword not used if /scalar is set)
		/cylin, /sphere, /rect
					indicates whether input vectors are in cylindrical, spherical or rectangular
						coordinates. If none is set then rectangular is assumed.
						For cross-products the output vectors are in the same units as the input vectors.
		/degrees	if set, and spherical or cylindrical coordinates are used, then the angles
						are assumed to be in degrees (default: radians)
 OUTPUTS:
		result	array[3,*] or array[*]	same type as input
					cross-products are returned as array[3,*] (same as the input arrays)
					scalar products or angle information are returned as array[n]
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CV_COORD, InitVar, SyncArgs, SyncDims
 CALLED BY:
	PlotSolarDisk, plot3darc, unitvectors
 PROCEDURE:
 >	The arrays r1 and r2 do not necessarily have the same dimensions, i.e.
	if r1 is an array[3,n] and r2 is an array[3] then r2 is interpreted as an array[3,n]
	with all n vectors the same (SyncArgs is used to synchronize the array dimensions).
 >	Arrays r1 and r2 can have more than two dimensions, i.e. if r1 and r2 are both
	arrays[3,n,m] then the output cross-vectors also will be an array[3,n,m] while scalar
	products will be returned as array[n,m]
 MODIFICATION HISTORY:
	AUG-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


View $SSW/smei/ucsd/sat/idl/util/view.pro
[Previous] [Next]
 NAME:
	View
 PURPOSE:
	Display 2D bitmap array. Display if running X-windows.
 CATEGORY:
	Imaging
 CALLING SEQUENCE:
	View, input=input, output=output, /new,/log
 INPUTS:
	input_image	- file name containing 2D array, or
			  a 2D or 3D array
	/log_scale	convert the image on a log scale
			(if the image contains negative values, the displayed
			image is alog10(INPUT-min(INPUT)+1))
	/new_window	passed to TWIN to open a new window for the image
			(by default the last window opened by TWIN is overwritten)
 OPTIONAL OUTPUT PARAMETERS:
	input_image	(if input value was a file name)
			array read from input file
	output_image	array actually displayed (different from input if
 CALLS: ***
	InitVar, IsDisplay, IsType, img_read, twin
 CALLED BY:
	TMO_tracksky, even_light, qView_Wall, smei_star_fit, smei_star_standard
 PROCEDURE:
 >	The image is plotted using the TV procedure
 >	img_read is used to read the file
 >	3D arrays are displayed using the twin/wallpaper option
 MODIFICATION HISTORY:
	JAN-1994, Paul Hick (UCSD)


vmain $SSW/smei/bham/idl/utils/vmain.pro
[Previous] [Next]
 vmain
	Put a value into a top-level variable.

 Usage:
	vmain, value[, name]

 Arguments:
	value	input	any	The value to be sent up to the main
				program level
	name	input	string	The name of the variable to use.


 Keywords:
	default_name	input	string	A default value for the
					variable name
	group		input	long	The widget ID of a calling
					widget.

 Notes:
	If the name argument is not given, then the user is probmpted
	for a name (possibly with a default).
	If the group keyword is given, then the prompt is via a widget
	interface, otherwise it is via the command line.

 CALLS: ***
	CW_BGROUP, VMAIN_EVENT, XMANAGER, cw_ffield
 History:
	Original: 13/7/01; SJT
	Add ability to send to a file: 19/12/02; SJT
	Removed it again (made specific version for that): 6/1/03; SJT


vox_read $SSW/smei/ucsd/sat/idl/util/vox_read.pro
[Previous] [Next]
 NAME:
	vox_read
 PURPOSE:
	Read a vox file for use with the Volume Pro board
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	Volume = vox_read(Filename [, minf=minf, maxf=maxf, topb=topb,	$
		vol_name	= vol_name,	$
		copyright	= copyright,	$
		gen_comments	= gen_comments,	$
		vol_comments	= vol_comments]
 INPUTS:
	Filename	scalar; type: string
				file name for vox file
 OUTPUTS:
	Volume		array[N,N,N]; type: any
				array to be written to vox file
				If the array is not of type byte it will be
				converted to byte using the IDL bytscl function.
 OPTIONAL OUTPUTS:
	minf=minf
	maxf=maxf
	topb=topb

	vol_name = vol_name
				scalar; type: string
				identifying name of volume data
	copyright = copyright
				scalar; type: string
				copyright notice
	gen_comments	= gen_comments
				array; type: string
				comments stored as part of the general header information
	vol_comments		= vol_comments
				array; type: string
				comments stored as part of the volume section describing the
				data array V.
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
 CALLS: ***
	InitVar, IsType, WhatIs, do_file, flt_string, gunzip_file
 CALLED BY:
	vu_vox_read
 SEE ALSO:
	write_vox
 PROCEDURE:
	See write_vox
 MODIFICATION HISTORY:
	JUL-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vox_write $SSW/smei/ucsd/sat/idl/util/vox_write.pro
[Previous] [Next]
 NAME:
	vox_write
 PURPOSE:
	Write a vox file for use with the Volume Pro board
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	vox_write, Filename, Volume [, minf=minf, maxf=maxf, topb=topb,	$
		volumename	= VolumeName,	$
		copyright	= Copyright,	$
		general_comments	= General_Comments,	$
		volume_comments		= Volume_Comments]
 INPUTS:
	Filename	scalar; type: string
				file name for vox file
	Volume		array[N,N,N]; type: any
				array to be written to vox file
				If the array is not of type byte it will be
				converted to byte using the IDL bytscl function.
 OPTIONAL INPUT PARAMETERS:
	minf=minf	passed to IDL function bytscl in min keyword
	maxf=maxf	passed to IDL function bytscl in max keyword
	topb=topb	passed to IDL function bytscl in top keyword

	ndim=ndim	scalar; type: integer
				resolution of the binary file stored in the vox file
				if specified then the IDL function congrid is used to
				rebin the array to ndim in all three dimensions
	volumename = VolumeName
				scalar; type: string; default: 'Data'
				identifying name of volume data
	copyright = Copyright
				scalar; type: string; default: 'UCSD/CASS Solar Physics Group'
				copyright notice
	general_comments	= General_Comments
				array; type: string
				comments stored as part of the general header information
	volume_comments		= Volume_Comments
				array; type: string
				comments stored as part of the volume section describing the
				data array V.
	silent=silent
				scalar; type: integer
				1 or 2: suppress informational messages (higher value suppresses
				more information)
 OUTPUTS:
	(vox file)
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], InitVar, IsType, boost
 CALLED BY:
	vu_vox_write
 RESTRICTIONS:
 PROCEDURE:
	The vox file format is described in the pdf document
	vp500_vol_file_format.pdf (RTViz Voxel File Format) available at
		http://www.terarecon.com/support/vp500/vp500_sup_document.html
	(link was alive as of 2003/05/28)

	The main sections are a header section for general information, followed
	by sections for each of the data volumes (including the data array
	itself). Currently only a single volume is stored.

	The 'Endian' indicator is set to 'B'. Note that Intel/AMD processors
	are actually little endian. Since endian-ness only affects byte ordering
	the setting doesn't matter as long as byte data are written to the vox
	file.
 MODIFICATION HISTORY:
	JAN-2001, Paul Hick (UCSD/CASS)
	JUL-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added /silent keyword


vu_atlocation $SSW/smei/ucsd/sat/idl/util/vupack/vu_atlocation.pro
[Previous] [Next]
 NAME:
	vu_atlocation
 PURPOSE:
	Extract a function values from heliospheric matrix at specified
	locations (heliographic longitude, latitude, distance and time).
 CATEGORY:
	WWW
 CALLING SEQUENCE:
	FUNCTION vu_atLocation, XC3D, R3D, dR3D, F3D, sequence=sequence,	$
		location=location, times=times, power=power, degrees=degrees, _extra=_extra
 INPUTS:
	The 3D heliospheric matrix is described by the following input:

	XC3D			array[2] or array[2,ntime]; type: float
						Carrington range of reconstruction
	R3D				scalar or array[ntime]; type: float
						heliocentric distance at inner boundary of matrix
	dR3D			scalar or array[ntime]; type: float
						heliocentric distance resolution of the heliospheric matrix
	F3D				array[n,m,l,ntype,ntime]; float
						3D heliocentric matrix;
						1st dim: Carrington variable, covering range XC3D
						2nd dim: Heliographic latitude, covering [-90,90] degrees
						3rd dim: Heliocentric distance, with inner boundary at R3D and resolution dR3D
						4th dim: different data types (usually 2: velocity/density, Br/Bt
						5th dim: # members in a (time-dependent) sequence
 OPTIONAL INPUT PARAMETERS:
	sequence=sequence
					array[ntime]; type: time structure of float; default: none
						if specified, these are the times corresponding to the ntime
						data arrays specified in argument F3D.
	power=power		array[ntype]
						power of heliocentric distance to be removed from the time series
						(2 for normalized density; 2 for radial component of the magnetic field;
						 1 for tangential component)
	location=location
					array[3,N]; type: float
						heliographic locations: longitude or Carrington variable, latitude and
						heliocentric distance.
	times=times		array[N]; type: float or time structure
						times associated with N locations.

	/degrees		if set, then all angles are in degrees (default: radians)

	/longitudes		passed to InterpolateHeliosphere
	/periodic		passed to InterpolateHeliosphere
 OUTPUTS:
	F				array[N]; float
						the function values for all N locations
 INCLUDE:
	@compile_opt.pro							; On error, return to caller
 CALLS: ***
	BadValue, InterpolateHeliosphere, IsType, SubArray, SuperArray, SyncDims
	TimeInterpol, TimeOp, TimeUnit, arg_time
 CALLED BY:
	vu_planarcut, vu_solardisk, vu_synopticmap
 PROCEDURE:
 >	The time associated with a given Carrington variable is the time at which the
	corresponding heliographic longitude crossed the center of the solar disk.
 MODIFICATION HISTORY:
	AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_check $SSW/smei/ucsd/sat/idl/util/vupack/vu_check.pro
[Previous] [Next]
 NAME:
	vu_check
 PURPOSE:
	Checks whether file names conforms to the syntax used for output files from
	the tomography programs
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	FUNCTION vu_check, files, times, imark, count=count, marker=marker, 	$
		prefixlen=prefixlen, str_message=str_message, offset=offset
 INPUTS:
	files		array; type: string
					list of file names
 OPTIONAL INPUT PARAMETERS:
	prefixlen=prefixlen
				scalar; type: integer; default: 4
					length of the prefix preceding the Carrington variable in the file
					name (i.e., 4 for 'nv3d2003.1234')
	offset=offset
				scalar; type: ??; default: 0
					?????
 OUTPUTS:
	Result		status??
	files		array; type: string
					list of file names that conform. File names that don't conform
					are removed from the input list
	times		array; type: double
					times coded into the file names (Carrington variablej)
	imark		array; type: integer
					marker value coded into file name (for time-dependent tomography
					files only)
 OPTIONAL OUTPUT PARAMETERS:
	count=count scalar; type: integer
					# conforming file names (i.e. size of arrays files, times and imark)
	str_message=str_message
				scalar; type: string
					message describing return status
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	GetFileSpec, InitVar, SetFileSpec, SuperArray, flt_string
 CALLED BY:
	vu_select, vu_set_time_entry
 PROCEDURE:
 MODIFICATION HISTORY:
	OCT-2002, Paul Hick (UCSD/CASS)
	JUN-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added check for names of gzipped files (with .gz extension)


vu_correlate $SSW/smei/ucsd/sat/idl/util/vupack/vu_correlate.pro
[Previous] [Next]
 NAME:
	vu_correlate
 PURPOSE:
	Correlate time series for tomography and in situ data;
 CALLING SEQUENCE:
	PRO vu_correlate, t1, f1, t2, f2,	$

		density		= density		, $
		speed		= speed			, $
		bradial 	= bradial		, $
		btang		= btang			, $
		bnorm		= bnorm			, $

		bstrength	= bstrength		, $
		data_type	= data_type		, $

		sc_label	= sc_label		, $
		tm_label	= tm_label 		, $

		result_fit	= result_fit	, $
		result_str	= result_str
 INPUTS:
	t1			array[N]; type: time structure
					times of available data points for tomographic data
	f1			array[N,M]; type: float
					tomographic time series.with 'bad data' indicated by
					!values.f_nan. The second dimension (m) identifies the
					physical quantity

					m=0: density
					m=1: velocity
					m=2: radial magnetic field component
					m=3: tangential magnetic field component
					m=4: radial magnetic field component
					m=5: bt^2+bn^2
					m=6: total field strength

					Currently only m=0,1,2,3 are provided. The others are
					calculated internally. The normal component is set to zero.

	t2			array[N2]; type: time structure
					times of available data point for in situ data
					(always the same as t1???)
	f2			array[N2,M]; type: float
					spacecraft in situ time series with 'bad data' indicated
					by !values.f_nan containing same quantities as f1.
 OPTIONAL INPUT PARAMETERS:
	/speed			select velocity plots
	/density		select density plots
	/bradial		select radial component of magnetic field
	/btang			select tangential component of magnetic field
	/bnorm			select normal component of magnetic field
	/bstrength		select magnetic field strength

	tm_label=tm_label
				 	scalar; type: string; default: 'corotating'
					label used for the tomography time series
	sc_label=sc_label
					scalar; type: string; default: 'in situ'
					label used to indicate origin of in situ data
					(usually this is obtained from Instrument with
					the keyword /label set).
 OPTIONAL OUTPUT PARAMETERS:
	result_str=result_str
					array[n]; type: scalar
					identifying string of correlation results for all time
					series for which correlations were calculated.
	result_fit=result_fit
					array[6,n]; type: float
					result[  0,n]: correlation coefficient
					result[1:5,n]: best fit result from function lsqNormalFit
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	BadValue, CORRELATE, InitVar, boost, lsqNormalFit
 PROCEDURE:
	The 'tomo' arrays are usually extracted from a tomography output file
	The 'insitu' arrays is set up by a call to InsituTimeseries
 MODIFICATION HISTORY:
	JUL-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Extracted from PlotInsituCurve (now called vu_insitu_curve)


vu_cvgrid $SSW/smei/ucsd/sat/idl/util/vupack/vu_cvgrid.pro
[Previous] [Next]
 NAME:
	vu_cvgrid
 PURPOSE:
	Convert between grid indices to heliospheric location and v.v.
 CATEGORY:
	sat/util/vupack
 CALLING SEQUENCE:
	FUNCTION vu_cvgrid, hdr, fromsun=fromsun, fromgrid=fromgrid, tosun=tosun, togrid=togrid, $
		carrington=carrington, latitude=latitude, radius=radius, time=time
 INPUTS:
	hdr
 OPTIONAL INPUT PARAMETERS:
	fromsun  = fromsun
	fromgrid = fromgrid
	/tosun
	/togrid
	/carrington
	/latitude
	/radius
	/time
 OUTPUTS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	InitVar, IsType, SubArray, vu_get
 PROCEDURE:
 MODIFICATION HISTORY:
	AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_earthskymap $SSW/smei/ucsd/sat/idl/util/vupack/vu_earthskymap.pro
[Previous] [Next]
 NAME:
	vu_earthskymap
 PURPOSE:
	Wrapper for PlotEarthSkymap. Displays a view of the sky from Earth
	using a 3D heliospheric matrix from one of the tomography programs.
 CATEGORY:
	WWW: graphics
 CALLING SEQUENCE:
	PRO vu_earthskymap, hdr, ff,	$
		ut0 		= ut0			, $
		ihdr		= ihdr			, $
		type		= type			, $
		nodata		= nodata		, $
		maxelo		= maxelo		, $
		geolng		= geolng		, $
		degrees 	= degrees		, $
		equator 	= equator		, $
		_extra		= _extra		, $
		solar		= solar 		, $
		band		= band			, $
		F_full		= FF_full		, $
		RA_full 	= RA_full		, $
		is_sequence = is_sequence	, $
		point_sources=point_sources , $
		hardcopy	= hardcopy		, $
		count		= count 		, $
		nRA 		= nRA			, $
		nDE 		= nDE			, $
		nRR 		= nRR			, $
		dRR 		= dRR			, $
		silent		= silent		, $
		module		= module		, $
		zero_shift	= zero_shift
 INPUTS:
	hdr				array[1]; type: structure
						information about the tomographic reconstruction.
						if 'hdr' does not exist, then user is prompted for
						a data file using the 'pickfile' dialog.
	ff				array[n,m,l,2]; type: float
						3D volume data; if not present then the files
						specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	ut0=ut0			scalar or array[1]; type: time structure, float or integer
						Specifies the time on which the time series is centered.
						If not specified then the time from the 'hdr' argument is used.
						See arg_time for more details.
	maxelo			scalar; type: float
						if set and non-zero then a fish-eye map is plotted out to
						elongation 'maxelo'. By default a Hammer-Aitoff map is drawn
	destination=destination
					if set to valid directory then graphics output is saved as GIF files
	/degrees		if set, indicates that all angles are in degrees. Default: radians.
	/equator		if set, the 'horizontal' in the sky map is parallel to the
						equatorial plane. By default the horizontal is along the ecliptic
	geolng			scalar; type: float
						geographic longitude of location on Earth (in units implied
						by /degrees keyword). If 'geolng' is specified then a 'transit map'
						is calculated for a one-day period centered on 'ut'

	zero_shift		passed to EarthSky3DLoc
					(NOT used for sky sweeps, i.e. NOT used if 'geolng' is set).
					By default the skymap is centered on the Sun. Setting 'zero_shift' moves
					the center to increasing RA (or ecliptic longitude) by 'zero_shift'.
					E.g. to produces an anti-solar skymap set zero_shift=!pi
					(or zero_shift=180, /degrees).

	point_sources=point_sources
					array[n]; type: structure
						information about IPS observation (location in sky, IPS speed
						and g-level; see GetNagoyaSources.
	/names			if set, then the names of the point sources are plotted

	/solar

	(only if keyword 'band' is used)

	band=band		scalar; type float
						used to replace a limited strip in RA in an already existing skymap.
						band: width of strip in hours
						The strip is inserted into arrays specified in keywords
						F_full and RA_full.
	RA_full=RA_full	array(nRA); type: float
	 F_full=FF_full	array(nRA,nDE); type: float
						skysweep arrays (RA and function value) where only a strip of width
						band needs to be updated. Usually these are obtained from a
						previous call to this procedure. If they don't exist yet then
						keyword 'band' is ignored and a full skysweep map is intialized.

	Several keywords are passed to vu_type_skymap:
	The most important ones set the data type to be plotted:
		/ips_speed		IPS speed
		/ips_glevel 	IPS g-level
		/brightness 	Thomson scattering brightness
		/pb 			Thomson scattering polarization brightness

	type=type		array[1]; type: structure

 OUTPUTS:
	(none)
 OPTIONAL OUTPUTS:
	(only if keyword 'band' is used)

	RA_full=RA_full	array(nRA); type: float: default: none
	 F_full=FF_full	array(nRA,nDE); type: float; default: none
						updated skysweep arrays (RA and function value)
						with new strip of width band inserted
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
	@vu_fnc_include.pro 		;
 EXTERNAL:
	IPS_hlevel_w, IPS_velocity, IPS_velocity_w, ThomsonBrightness
 CALLS: ***
	EarthSky3DLoc, EarthTransit3DLoc, FILEPATH, GetFileSpec, IPS_params, InitVar
	IntegrateLOS, IsType, PlotEarthSkymap, Reset_Colors, STRETCH, SetFileSpec, Set_Page
	SuperArray, ThomsonRadialFilter, TimeString, TimeUnit, UBVConst, arg_time, vu_fnc
	vu_get, vu_get_page, vu_getdata, vu_gettime, vu_point_source, vu_prefix, vu_select
	vu_type_skymap
 CALLED BY:
	vu_NagoyaSourcemap, vu_movie, vu_nagoyaskymap
 PROCEDURE:
 >	Several parameters define the grid used to calculate the sky map.
	These are passed to EarthSky3DLoc and EarthTransit3DLoc:

	nRA		scalar; type: int; default: 72
				# points in skymap in longitudinal direction (either right ascensions
				of ecliptic longitude)
	nDE		scalar; type: int; default: 36
				# points in skymap in latitudinal direction(either declination or
				ecliptic latitude)
	nRR		scalar; type: int; default: 20
				# steps along lines of sight at each point in the sky
	dRR		scalar; type: float; default: 0.1 AU
				step size along line of sight (AU)

 >	The sky map is build from nRA*nDE lines of sight integrations through the F3D array
	The locations in the sky of the lines of sight are
		RA/Lng    = (RA/Lng Sun) -180 + (360./nRA)*[0.5, 1.5, .. , nRA-0.5 ]
		Decl./Lat = - 90 + (180./nDE)*[0.5, 1.5, .. , nDE-0.5 ]
		Dist along los = dRR*[0.5,1.5,...,nRR-1]
	Note that each line of sight is centered on a 'box' of 360/nRA by 180/nDE degrees,
	and that all lines of sight together cover the entire sky.
	The edges of the boxes for all lines of sight are returned in the RA and DE keywords
 MODIFICATION HISTORY:
	MAR-2000, Paul Hick (UCSD/CASS)
	AUG-2000, Paul Hick (UCSD/CASS)
		Added option to accept a vu_read structure as a 1st argument
	SEP-2001, Paul Hick (UCSD/CASS)
		Fixed bug in vu_type_skymap calls
	JAN-2002, Paul Hick (UCSD/CASS)
		Changed the initialization procedure for a skysweep with the 'band'
		keyword set. The initialization now ignores the 'band' value and simply
		calculates a full skysweep map (the earlier initialization put a new
		strip in an otherwise empty sky).
	JUL-2002, Paul Hick (UCSD/CASS)
		Added interpolation between neigbouring times of ut0, instead of
		truncating to nearest grid time.
	AUG-2004, Paul Hick (UCSD/CASS)
		Modifed IntegrateLOS calls. For Thomson scattering brightness maps with
		point sources overplotted a radial filter was applied to the maps but
		not to the point sources. Fixed.
	OCT-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added zero_shift keyword.


vu_filename $SSW/smei/ucsd/sat/idl/util/vupack/vu_filename.pro
[Previous] [Next]
 NAME:
	vu_filename
 PURPOSE:
 CATEGORY:
	Tomography: I/O
 CALLING SEQUENCE:
	FUNCTION vu_filename, prefix, time, marker=marker, root=root, format=format
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
	prefix=prefix	scalar; type: string; default: 'nv3d' (plasma file)
						'nv3d' or 'wson' (magnetic field file)
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	FILEPATH, InitVar, IsType, arg_time, vu_prefix
 CALLED BY:
	vu_write
 PROCEDURE:
 MODIFICATION HISTORY:
	SEP-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_fnc $SSW/smei/ucsd/sat/idl/util/vupack/vu_fnc.pro
[Previous] [Next]
 NAME:
	vu_fnc
 PURPOSE:
	Returns in situ quantities for plotting by other vu_* procedures
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	FUNCTION vu_fnc, id, ff 	, $
		count		= count 	, $
		unit		= unit		, $
		symbol		= symbol	, $
		normalized	= normalized, $
		name		= name		, $
		shortid 	= shortid	, $
		color		= color 	, $
		t3d_array	= t3d_array , $
		dimension	= dimension , $
		get_order	= get_order , $
		los 		= los
 INPUTS:
	id
	ff
 OPTIONAL INPUT PARAMETERS:
	/count
	/unit
	/symbol
	/name
	/shortid
	/color
	/t3d_array
	dimension=dimension
	/get_order
	/los
 OUTPUTS:
	Result
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
	@vu_fnc_include.pro 	;
 CALLS: ***
	InitVar, SubArray
 CALLED BY:
	vu_RemoteView, vu_earthskymap, vu_insitu, vu_insitu_type__define, vu_insitucurve
	vu_planarcut, vu_skymap_type__define, vu_solardisk, vu_synopticmap
	vu_type_insitu, vu_type_skymap, vu_vox_write, vu_whatis
 PROCEDURE:
 MODIFICATION HISTORY:
	SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_fnc_include $SSW/smei/ucsd/sat/idl/util/vupack/vu_fnc_include.pro
[Previous] [Next]
 NAME:
	vu_fnc_include
 PURPOSE:
	Include file for vu package
 CATEGORY:
 CALLING SEQUENCE:
	@vu_fnc_include
 PROCEDURE:
 MODIFICATION HISTORY:
	SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_get $SSW/smei/ucsd/sat/idl/util/vupack/vu_get.pro
[Previous] [Next]
 NAME:
	vu_get
 PURPOSE:
	Extract information from headers produced by tomography programs
 CATEGORY:
	sat/util/vupack
 CALLING SEQUENCE:
	FUNCTION vu_get, hdr,					$
		file			= file			,	$
		created			= created		,	$
		bad				= bad			,	$
		version			= version		,	$
		prefix			= prefix		,	$

		time_index		= time_index	,	$
		uttime			= uttime		,	$

		forecast_time	= forecast_time	,	$

		array_range		= array_range	,	$
		roi_range		= roi_range		,	$

		latitude_range	= latitude_range,	$

		start_distance	= start_distance,	$
		stop_distance	= stop_distance ,	$
		distance_step	= distance_step	,	$

		start_time		= start_time	,	$
		time_step		= time_step		,	$

		power_density	= power_density	,	$
		power_distance	= power_distance,	$
		density_at_1AU	= density_at_1AU,	$
		smooth_filter	= smooth_filter	,	$
		fill_filter		= fill_filter	,	$
		time_filter 	= time_filter	,	$

		clip_longitude	= clip_longitude,	$
		scale			= scale			,	$
		power_norm		= power_norm	,	$
		nlng			= nLng			,	$
		nlat			= nLat			,	$
		nrad			= nRad			,	$
		ntim			= nTim			,	$

		dimension		= dimension		,	$
		iteration		= iteration		,	$

		nltot			= nltot			,	$
		nlos			= nlos			,	$
		dlos			= dlos			,	$
		binx			= binx			,	$

		user_info		= user_info		,	$

		marker			= marker		,	$
		plasma			= plasma		,	$
		magnetic		= magnetic		,	$

		all_radii		= all_radii		,	$
		start_lng		= start_lng 	,	$

		degrees			= degrees
 INPUTS:
	hdr			array[n]; array of headers extracted from tomography files
 OPTIONAL INPUT PARAMETERS:
	The output R depends on the keyword set:

	Keyword:			Return values:

	/file				scalar; type: string; fully-qualified file name
	/created			scalar; type: string; time at which file was created
	/bad				scalar; type: float; value reprenting 'bad' data
	/version			scalar; type: string; version number for header layout
	/time_index
	/uttime
	/forecast_time
	/array_range
	/roi_range
	/latitude_range
	/start_distance
	/stop_distance
	/distance_step
	/start_time
	/time_step
	/power_density
	/power_distance
	/density_at_1AU
	/smooth_filter
	/fill_filter
	/time_filter
	/clip_longitude
	/scale				array[4]; type: float; scaling factors
	/power_norm			array[2]; type: float
	/nlng				scalar; type: integer; longitudinal dimension
	/nlat				scalar; type: integer; latitudinal dimension
	/nrad				scalar; type: integer; radial dimension
	/ntim				scalar; type: integer; time dimension
	/dimension			array[4]; type: integer; # longitudes, latitudes, distances and times
	/iteration
	/nltot				array[2]; type: integer; # lines of sight
	/nlos				array[2]; type: integer, # line-of-sight segments
	/dlos				array[2]; type: float; length of line-of-sight segment
	/binx				array[2]; type: float; # line-of-sight segments per bin threshold
	/user_info
	/marker
	/plasma				scalar; type: integer: 1 for velocity/density data
	/magnetic			scalar; type: integer; 1 for magnetic field data

	/all_radii			array[nRad]; type: float; array of heliocentric distance for hdr[0] only
	/start_lng			scalar; type: double: heliographic longitude at start of ROI

	/degrees
 OUTPUTS:
	R	requested entry from header
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
 CALLS: ***
	ToDegrees, gridgen
 CALLED BY:
	qvu_draw, qvu_pick, vu_RemoteView, vu_cvgrid, vu_earthskymap, vu_getdata, vu_gettime
	vu_insitu, vu_insitu_raw, vu_is_sequence, vu_mean, vu_movie, vu_new_time
	vu_planarcut, vu_quick_movie, vu_read, vu_select, vu_solardisk, vu_synopticmap
	vu_vox_write, vu_whatis, vu_write
 SEE ALSO:
	t3d_get, t3d_iget
 MODIFICATION HISTORY:
	JUL-2001, Paul Hick (UCSD/CASS)
	SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added start_lng keyword
 PROCEDURE:


vu_get_page $SSW/smei/ucsd/sat/idl/util/vupack/vu_get_page.pro
[Previous] [Next]
 NAME:
	vu_get_page
 PURPOSE:
	Save the zbuffer into image files to be used for the IPS forecast Web page
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	PRO vu_get_page, hdr, module, destination=destination, device=device, use_image=use_image, $
		png=png, gif=gif, bmp=bmp, title=title, ut=ut, upto=upto, silent=silent, new=new, logo=logo
 INPUTS:
	hdr				array[1]; type: structure
					scalar; type: string
						header structure or name of tomography file used
					 	to generate the plot
	module			scalar; type: string
						module name describing the plot in the z-buffer
						e.g. 'earth_insitu_v', etc.
 OPTIONAL INPUTS:
	destination=destination
					scalar or array[2]; type: string
						If the first element is a valid directory then an
						image file is created in that directory with a name
						based on the module name.
						If a 2nd directory is specified a backup copy is written
						to subdirectory 'module' of this 2nd directory.
						If this keyword is not specified then the image is
						displayed on the terminal.

						The first element can also be a valid file name to
						be used to name the output image file

	gif=gif 		if set then images are saved as gif files
	png=png 		if set then images are saved as png files

	ut=ut			scalar or array[1]; time; default: none
						time used in title for IDL window, or used in
						construction of image file name. Usually this is the
						forecast time.
	device=device	scalar; type: string; default: none
						graphics device to switch to after the z-buffer has
						been read.
	use_image=use_image
					scalar; type: string
						If keyword 'destination' is specified, then the image
						file (and optional backup copy) is by default created
						by reading the Z-buffer.
						If an image file is already created then its
						fully-qualified name can be specified in keyword
						'use_image', bypassing reading the Z-buffer. The
						use_image file will be moved to 'destination[0]'
						and, optionally, a copy is placed in a subdirectory
						of 'destination[1]'.
 OUTPUTS:
	(Two image files)
 INCLUDE:
	@compile_opt.pro								; On error, return to caller
 CALLS: ***
	CheckDir, FILEPATH, GetFileSpec, Get_Page, InitVar, IsType, Reset_Colors, STRETCH
	SetFileSpec, TimeString, TimeUnit, arg_time, boost, do_file, hide_env
 CALLED BY:
	vu_RemoteView, vu_earthskymap, vu_insitu, vu_planarcut, vu_solardisk
	vu_synopticmap
 PROCEDURE:
	The current graphics device should be the z-buffer. The z-buffer is read
	by a simple tvrd(), and is then either displayed on the screen, or written
	to an image file.

	Two identical image files are created in subdirectories, 'www' and
	'images/module' of the root directory $dat/nagoya.

	The file in 'www' is named 'module#.gif' where # is an integer digit,
	equal to the number of elements in nv3d_file. This file is used directly
	in the Web page.

	The file in 'images' is named 'nv3d_file[0]_#####.module#.gif. Here the
	5-digit integer is the time differences in minutes between the system
	time and the time that file nv3d_file[0] was created. This file serves
	as a backup copy and can also be used to make movies from sequences of
	GIF files.
 MODIFICATION HISTORY:
	MAR-2000, Paul Hick (UCSD/CASS)
	MAY-2000, Paul Hick (UCSD/CASS)
		The skysweep map is now written only once for each tomography run
		(instead of each hour).
	AUG-2000, Paul Hick (UCSD/CASS)
		Added /speed and /density keywords. If one of these is set then '_v'
		or '_n' is added to the name of the gif files.
		Added 'destination' keyword to control destination of gif files.
	FEB-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added the postfix _v or _n to the subdirectory in $dat/nagoya/image
		where the backup copy of the gif file is stored, i.e. density and
		velocity images are now stored in separate directories).
	APR-2003, Paul Hick (UCSD/CASS)
		Removed check for modules skysweep, fore/aftcast (used to avoid
		unnecessarily writing files). Changed file name convention for the
		backup image file. The title keyword explicitly allows specification
		of a prefix, replacing the default name of the nv3d file name
		specified in 'hdr'. The forecast time is now encoded as a UT time
		string instead of a Carrington rotation.
	APR-2003, Paul Hick (UCSD/CASS)
		Introduce hide_env calls in messages.
	AUG-2004, Paul Hick (UCSD/CASS)
		Added option to allow destination[0] to be a valid filename.
	OCT-2006, Paul Hick (UCSD/CASS)
		Added logo keyword


vu_getdata $SSW/smei/ucsd/sat/idl/util/vupack/vu_getdata.pro
[Previous] [Next]
 NAME:
	vu_getdata
 PURPOSE:
	Provides a standardized way of reading in tomography files
 CATEGORY:
	Tomography I/O
 CALLING SEQUENCE:
	FUNCTION vu_getdata, hdr, ff, ut0=ut0, ihdr=ihdr, count=count, fresh=fresh, $
		last_hdr=last_hdr, silent=silent, _extra=_extra,						$
		bfield=bfield, bcount=bcount, bhdr=bhdr, bff=bff
 INPUTS:
	hdr				array; type: header structure
	ff				array; data arrays associated with 'hdr' array
						If not specified, then data will be read using
						vu_select or vu_read.
 OPTIONAL INPUT PARAMETERS:
	/fresh			if set, input variables hdr and ff are destroyed, triggering
					selection of new data files.

	ihdr = ihdr		scalar; type: integer
						Identifies 'principal header'; the only effect of this
						keyword is, that if ut0 is NOT set then the return value
						of ut is hdr[ihdr].time ihdr takes precedence over ut0

	ut0 = ut0		scalar; type: float; default: none
					array[1]; type: time structure
						Carrington variable or time structure.
						Alternative way of selecting the 'principal header' if
						keyword ihdr is NOT set: ihdr is set to the index
						of the header with time closest to ut0

	For additional keywords see vu_select and vu_read
 OUTPUTS:
	Result			scalar; type: float
					array[1]; type: time structure
						'Principal time'.
						Set to iput value of 'ut0' if specified, or else set
						to the time of the 'principal header' hdr[ihdr].time

	hdr				array; type: header structure
	ff				array; data arrays associated with 'hdr' array
						Data read by vu_select or vu_read
 OPTIONAL OUTPUT PARAMETERS:
	count=count		scalar; type: integer
						# headers and files read; 0 if something went wrong
	ihdr=ihdr		scalar; type: integer
						index of 'principal header'.
						If specified as input value it is checked to stay
						inside array limits. If no input 'ihdr' is specified
						then the 'ihdr' value nearest to 'ut0' is selected.
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	FILEPATH, GetFileSpec, InitVar, IsType, SetFileSpec, TimeOp, TimeString, TimeUnit
	arg_time, destroyvar, vu_get, vu_read, vu_select
 CALLED BY:
	qvu_pick, vu_RemoteView, vu_earthskymap, vu_insitu, vu_nagoyaskymap, vu_planarcut
	vu_solardisk, vu_synopticmap, vu_vox_write, vu_whatis
 PROCEDURE:
	ut can be a Carrington variable or a time structure. Use arg_time to
	settle on either one of these.
 MODIFICATION HISTORY:
	APR-2001, Paul Hick (UCSD/CASS)
	JUL-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Modified use of keyword ut0. ut0 now only sets the return
		value of ihdr, not the return value ut anymore (used to be set to
		hdr[ihdr].time if hdr referred to a time sequence.


vu_gettime $SSW/smei/ucsd/sat/idl/util/vupack/vu_gettime.pro
[Previous] [Next]
 NAME:
	vu_gettime
 PURPOSE:
	Get data for a specific time
 CATEGORY:
	Tomography I/O
 CALLING SEQUENCE:
	FUNCTION vu_gettime, hdr, ff, ut=ut, count=count, ff_ut=ff_ut, fixgrid=fixgrid, $
		bracket=bracket, nowrap=nowrap
 INPUTS:
	hdr				array; type: header structure
	ff				array; data arrays associated with 'hdr' array
						Typically these arrays have been read
						by a previous call to vu_getdata
 OPTIONAL INPUT PARAMETERS:
	ut = ut			scalar; type: float; default: none
					array[1]; type: time structure
						Carrington variable or time structure.
						Time at which data are needed
	/fixgrid		if set then time ut is rounded to the nearest grid time
					(instead of interpolating between neighbouring times)
	/nowrap 		passed to vu_mean (which passes it to AlignHeliosphere)
 OUTPUTS:
	Result			array[1]; type: header structure
						Header structure for data at time ut0
	ff_ut			array[*,*,*,2]; data array associated with 'hdr_ut' array
 OPTIONAL OUTPUT PARAMETERS:
	count=count		scalar; type: integer
						0 on error; 1 if data array was obtained successfully
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CarringtonT, InitVar, IsTime, IsType, TimeInterpol, TimeOp, TimeUnit, arg_time, vu_get
	vu_mean
 EXTERNAL:
	vu_header__define
 CALLED BY:
	qvu_draw, vu_RemoteView, vu_earthskymap, vu_insitu_raw, vu_planarcut, vu_solardisk
	vu_synopticmap
 PROCEDURE:
	ut can be a Carrington variable or a time structure. Use arg_time to
	settle on either one of these.
 MODIFICATION HISTORY:
	JUL-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu


vu_header $SSW/smei/ucsd/sat/idl/util/vupack/vu_header.pro
[Previous] [Next]
 NAME:
	vu_header
 PURPOSE:
	Reads header from nv3d* or wson* file
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	FUNCTION vu_header, files, check=check, index=index, count=count,	$
		sort_time=sort_time, allow_nrad_changes=allow_nrad_changes, silent=silent
 INPUTS:
	files			array; type: string
					list of file names
 OPTIONAL INPUT PARAMETERS:
	/check			forces consistency checks
					- check array dimensions
					- check source surface distance and radial separation
					- check data type
	/sort_time		sort headers into chronological order before returning
					(if the 'files' array is output from vu_select this is done
					already)
	/allow_nrad_changes
					if /check is set this bypasses the check on the number of
					radial distances. The start distance and step size must be
					identical for all headers, but the number of distances
					can vary (vu_read will only read the minimum number
					of distances specified in all headers).
 OUTPUTS:
	Result			array; type: vu_header structure
					header information for all files
					if /sort_time is set then the headers are sorted
					into chronological order before returning.
	files			array; type: string
					input array with files that are not
					valid nv3d* or wson* files remove
 OPTIONAL OUTPUT PARAMETERS:
	count			scalar; type: long integer
					#  entries returned in arrays 'files' and 'hdrs'
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	BadValue, GetFileSpec, InitVar, SetFileSpec, TimeOp, TimeSplit, TimeUnit, destroyvar
	flt_read, flt_string, hide_env, vu_set_time_entry
 EXTERNAL:
	vu_header__define
 CALLED BY:
	vu_select
 RESTRICTIONS:
	Using the /sort_time keyword may have unexpected effects when reading files
	with markers in the file name (from the time-dependent tomography) due to
	precision problems with the Carrington variables used in the file name
	(the last digit is just barely significant).
 PROCEDURE:
	Lines in the file header are used to fill a structure containing the
	information about the file content. The exact strings used to identify the
	information in each line should match the strings used in the Fortran
	subroutine vu_header.
 MODIFICATION HISTORY:
	FEB-2001, Paul Hick (UCSD/CASS)
	JAN-2001, Paul Hick (UCSD/CASS)
		Added /exp to flt_string call for reading powers for density and distance
		dependence of density flucuations
	JUL-2002, Paul Hick (UCSD/CASS)
		V1.03; added nl, nlos, dlos and binx
	JUN-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added capability to handle *.gz files transparently


vu_header__define $SSW/smei/ucsd/sat/idl/util/vupack/vu_header__define.pro
[Previous] [Next]
 NAME:
	vu_header__define
 PURPOSE:
	Automatic definition of structure for storing parameters
	for Nagoya IPS observations
 CATEGORY:
	tomography
 CALLING SEQUENCE:
	(called automatically when when using expression
		{vu_header})
 INPUTS:
	(none)
 OUTPUTS:
	(none)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 EXTERNAL BY:
	vu_gettime, vu_header, vu_select
 CALLS:
 PROCEDURE:
	Structure definition:
 MODIFICATION HISTORY:
	FEB-2001, Paul Hick (UCSD/CASS)
	MAR-2002, Paul Hick (UCSD/CASS)
		V1.02; added hdr.latitude_range
	JUL-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		V1.03; added nl, nlos, dlos and binx
	SEP-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		V1.04; added prefix


vu_image $SSW/smei/ucsd/sat/idl/util/vupack/vu_image.pro
[Previous] [Next]
 NAME:
	vu_image
 PURPOSE:
	Save the zbuffer into image files to be used for the IPS forecast Web page
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	PRO vu_image, hdr, module, destination=destination, device=device, notwin=notwin, use_image=use_image, $
		png=png, title=title, ut=ut, upto=upto
 INPUTS:
	hdr				array[1]; type: structure
					scalar; type: string
						header structure or name of tomography file used
					 	to generate the plot
	module			scalar; type: string
						module name describing the plot in the z-buffer
						e.g. 'earth_insitu_v', etc.
 OPTIONAL INPUTS:
	destination=destination
					scalar or array[2]; type: string
						If the first element is a valid directory then an
						image file is created in that directory with a name based
						on the module name.
						If a 2nd directory is specified a backup copy is written
						to subdirectory 'module' of this 2nd directory.
						If this keyword is not specified then the image is
						displayed on the terminal.
	gif=gif 		if set then images are saved as gif files
	png=png 		if set then images are saved as png files

	ut=ut			scalar or array[1]; time; default: none
						time used in title for IDL window, or used in construction
						of image file name. Usually this is the forecast time.
	device=device	scalar; type: string; default: none
						graphics device to switch to after the z-buffer has been read.
	/notwin			if set then the call to 'view' is skipped, and the content of the
						Z-buffer is displayed directly using the 'tv' command.
	use_image=use_image
					scalar; type: string
						If keyword 'destination' is specified, then the image file (and optional
						backup copy) is by default created by reading the Z-buffer.
						If an image file is already created then its fully-qualified
						name can be specified in keyword 'use_image', bypassing reading
						the Z-buffer. The use_image file will be moved to 'destination[0]'
						and, optionally, a copy is placed in a subdirectory of 'destination[1]'.

 OUTPUTS:
	(Two image files)
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CheckDir, FILEPATH, GetFileSpec, Get_Page, InitVar, IsDisplay, IsType, Reset_Colors
	STRETCH, SetFileSpec, TimeString, TimeUnit, arg_time, do_file
 PROCEDURE:
	The current graphics device should be the z-buffer. The z-buffer is read by a simple
	tvrd(), and is then either displayed on the screen, or written to an image file.

	Two identical image files are created in subdirectories, 'www' and 'images/module'
	of the root directory $dat/nagoya.

	The file in 'www' is named 'module#.gif' where # is an integer digit, equal to the
	number of elements in nv3d_file. This file is used directly in the Web page.

	The file in 'images' is named 'nv3d_file[0]_#####.module#.gif. Here the 5-digit integer
	is the time differences in minutes between the system time and the time that file
	nv3d_file[0] was created. This file serves as a backup copy and can also be used to
	make movies from sequences of GIF files.
 MODIFICATION HISTORY:
	MAR-2000, Paul Hick (UCSD/CASS)
	MAY-2000, Paul Hick (UCSD/CASS)
		The skysweep map is now written only once for each tomography run (instead of each hour).
	AUG-2000, Paul Hick (UCSD/CASS)
		Added /speed and /density keywords. If one of these is set then '_v' or '_n' is added
		to the name of the gif files.
		Added 'destination' keyword to control destination of gif files.
	FEB-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added the postfix _v or _n to the subdirectory in $dat/nagoya/image where the
		backup copy of the gif file is stored, i.e. density and velocity images are now
		stored in separate directories).
	APR-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu
		Removed check for modules skysweep, fore/aftcast (used to avoid unnecessarily writing files).
		Changed file name convention for the backup image file. The title keyword explicitly allows
		specification of a prefix, replacing the default name of the nv3d file name specified in 'hdr'.
		The forecast time is now encoded as a UT time string instead of a Carrington rotation.


vu_insitu $SSW/smei/ucsd/sat/idl/util/vupack/vu_insitu.pro
[Previous] [Next]
 NAME:
	vu_insitu
 PURPOSE:
	Produces a plot, comparing a time series from a tomographic reconstruction
	and insitu observations from instrument 'from'.
 CATEGORY:
	vupack
 CALLING SEQUENCE:
	PRO vu_insitu, hdr, ff, ut0=ut0, ihdr=ihdr,		$

		ts_all 		= ts_all	,	$	; Defines times in time series
		ts_range	= ts_range	,	$
	 	ts_step		= ts_step	,	$

		ti_range	= ti_range	,	$	; Controls s/c insitu data
		nofuture	= nofuture	,	$
		delt		= delt		,	$
		from		= from		,	$

		periodic	= periodic	,	$
		hardcopy	= hardcopy	,	$	; to be phased out
		printer		= printer	,	$
		noplot		= noplot	,	$
		tm_label	= tm_label	,	$
		power		= power		,	$

	 	type		= type		,	$

		nosequence	= nosequence,	$
		use_forecast_time = use_forecast_time,	$
		cast_offset = cast_offset,	$
		silent		= silent	,	$

		body		= body		,	$
		module		= module	,	$

		ascii_file	= ascii_file,	$

    	_extra      = _extra	,	$

		f1=f1, f2=f2, t1=t1, t2=t2
 INPUTS:
	hdr				array[k]; type: structure
						information about the tomographic reconstruction
						(single file or time-dependent sequence)
						if 'hdr' does not exist, then user is prompted for
						a data file using the 'pickfile' dialog.
	ff				array[n,m,l,2,k]; type: float
						3D volume data associated with 'hdr'
						if not present then the files
						specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	ut0=ut0			scalar or array[1]; type: time structure, float or integer
						Specifies the time on which the time series is centered.
						If not specified then the time from 'hdr[ihdr]' is used.
						See arg_time for more details.
	ihdr=ihdr		scalar; type: integer; default: 0
						index of header to be used for display

	/nosequence		Only used if n_elements(hdr) > 1
					if n_elements(hdr) > 1 then an attempt is made to determine whether
					the input data can be treated as a time-ordered sequence, e.g. output
					from the time-dependent tomography (see vu_is_sequence).
					Override this check by setting /nosequence.

	/forecast		if set, a dashed line at the plot center is added, and the word
						'FORECAST' is plotted to the right of the dashed line.
	/use_forecast_time
					(only for internal use by vu_rawtimeseries)

	power=power 	scalar, array[2] or array[2,k]; type: float
						normalization applied to the data if 'ff' by vu_timeseries.
						If NOT set then then the values are extracted from 'hdr'.
						Override these values by setting this keyword. If setting these
						to an array be careful to be consistent with the array structure
						of 'hdr' and 'ff'.

	body=body		scalar; type: string; default: none
						selects a body for which we have an ephemeris available
						the timeseries for the selected body is plotted.
						E.g. body=jpl_body(/mars,/string) plots a time series for Mars.

	Keywords to define the time series (i.e. the times at which data are evaluated).
	Either ts_all is used, or the pair ts_range and ts_step. If neither of these is set then
	the times in 'hdr' are used).

	ts_all=ts_all	array; type: float or time structures
						times at which data are to be evaluated, as Carrington times
						or UT times.
	ts_step=ts_step	scalar; type: float or difference time structure: default: 0.25
						time step in time series in days.
	ts_range=ts_range
					array[2]; type: float; default: [-15,15]
						range of times centered on ut0 in days. The time series covers
						[ut0-ts_range[0],ut0+ts_range[1]] in steps of ts_step.

	Keywords to limit the range of in situ data plotted.

	ti_range=ti_range
					array[1] or array[2]; type: time_structure or Carrington variable
						if array[1] only in situ data upto ti_range[0] are plotted
						if array[2] only in situ data inside time range ti_range are plotted.
	/nofuture		if set, ti_range is set to ut0, i.e. only in situ data up to time ut0
						(usually the forecast time) are plotted.

	Keywords to select in situ data (see InsituTimeSeries):

	from=from		scalar; type: integer
						identifies insitu instrument (see function Instrument
	delt=delt		scalar; type: time difference structure, or float; default: 0.0
						if present, and non-zero, time window used for averaging (days)
						the in situ date from instrument 'from'

	For keywords controlling plot layout see vu_type_insitu.
 OUTPUTS:
	(graphics)
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
	@vu_fnc_include.pro 		;
 CALLS: ***
	BadValue, CarringtonT, InitVar, InsituTimeSeries, Instrument, IsTime, IsType
	Reset_Colors, STROMPRESS, SetFileSpec, Set_Page, TimeGet, TimeOp, TimeSet, TimeUnit
	UNIQ [1], UNIQ [2], UNIQ [3], arg_time, destroyvar, gridgen, hide_env, jpl_body, vu_fnc
	vu_get, vu_get_page, vu_getdata, vu_insitucurve, vu_is_sequence, vu_prefix
	vu_timeseries, vu_type_insitu
 CALLED BY:
	vu_insitu_raw, vu_movie
 PROCEDURE:
 >	The input file(s) come from a tomographic reconstruction, and contain 3D
	heliospheric matrices for density and velocity (nv3d* file) or magnetic
	field (wson* file). The file(s) are read using vu_getdata.
 >	If a time-dependent sequence is processed the times from the headers are
	used for the time series at Earth. For a single matrix ut0, ts_range and
	ts_step determine the time series.
 MODIFICATION HISTORY:
	MAR-2000, Paul Hick (UCSD/CASS)
	SEP-2002, Paul Hick (UCSD/CASS)
		Added ts_all and /user_forecast_time keywords.
	OCT-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Dropped /earth keyword and associated section of code that
		was used to compare time series from nv3d* and ea* files.


vu_insitu_raw $SSW/smei/ucsd/sat/idl/util/vupack/vu_insitu_raw.pro
[Previous] [Next]
 NAME:
	vu_insitu_raw
 PURPOSE:
	Makes time series plots of data values at the location of Earth
	from the raw tomography files (in particular from time-dependent tomography)
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	PRO vu_insitu_raw, hdr, ff		, $
		ut0 		= ut0			, $
		fixed_time	= fixed_time	, $
		cast_offset = cast_offset	, $
		ntrail		= ntrail		, $
		raw_time	= raw_time		, $
		last_raw	= last_raw		, $
		silent		= silent		, $
		_extra		= _extra
 INPUTS:
	hdr
	ff
 OPTIONAL INPUT PARAMETERS:
	ut0 = ut0			scalar  ; type: float
						array[1]; type: time structure
							forecast time on which to center the time series
							specified as Carrington time or time structure in UT
							(passed to vu_insitu)
	cast_offset=cast_offset
						scalar  : type: float
						array[1]; type: time difference structure
							fore- or aftcast time relative to the forecast time
							(i.e. the time at which the tomography was run)
							specified in days or as a time difference structure.
							If 'fixe_time' is not specified then
							cast_offset=0.0 is assumed.
	fixed_time=fixe_time
						scalar  ; type: float
						array[1]; type: time structure
							Time for which all reconstructed data are requested
							(as Carrington time or time structure)
	raw_time=raw_time	scalar  ; type: float
						array[1]; type: time structure
							Forecast time for which to plot time series
							(the nearest actual forecast time is used).
	/last_raw			specified instead of 'raw_time'. Selects the most recent
						tomographic run.
 OUTPUTS:
	(plot to screen, printer or image file)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	BadValue, CarringtonVar, InitVar, IsTime, IsType, TimeGet, TimeInterpol, TimeOp, TimeSet
	TimeString, TimeUnit, UNIQ [1], UNIQ [2], UNIQ [3], arg_time, vu_get, vu_gettime
	vu_insitu, vu_select, where_common
 PROCEDURE:
	The time axis on the plot is the forecast time stored in the headers
	(retrieved with vu_get(hdr, /forecast_time).
 MODIFICATION HISTORY:
	SEP-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_insitu_type__define $SSW/smei/ucsd/sat/idl/util/vupack/vu_insitu_type__define.pro
[Previous] [Next]
 NAME:
	vu_insitu_type__define
 PURPOSE:
	Automatic definition of structure for storing image type parameters
 CATEGORY:
	tool
 CALLING SEQUENCE:
	(called when using expression {vu_insitu_type})
 INPUTS:
	(none)
 OUTPUTS:
	(none)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 EXTERNAL BY:
	vu_type_insitu
 CALLS: ***
	vu_fnc
 PROCEDURE:
	Structure definition:


vu_insitucurve $SSW/smei/ucsd/sat/idl/util/vupack/vu_insitucurve.pro
[Previous] [Next]
 NAME:
	vu_insitucurve
 PURPOSE:
	Plots time series for tomography and in situ data;
	and/or correlation plots of tomography vs. in situ data
 CALLING SEQUENCE:
	PRO vu_InsituCurve, ttomo, ytomo, tsitu, ysitu,	$
		data_type	= data_type		, $

		timeseries	= timeseries	, $
		correlation	= correlation	, $

		ut0			= ut0			, $
		tx_range	= tx_range		, $
		forecast	= forecast		, $

		fmin		= fmin			, $
		fmax		= fmax			, $

		upto		= upto			, $
		sc_label	= sc_label		, $
		tm_label	= tm_label		, $
		digits		= digits		, $

		_extra		= _extra		, $

		plot_type	= plot_type 	, $
		vert_ut 	= vert_ut
 INPUTS:
	ttomo		array[N]; type: time structure
					times of available data points for tomographic data
	ytomo		array[N1,M,K]; type: float
					tomographic time series.with 'bad data' indicated by
					!values.f_nan. The second dimension (m) identifies the
					physical quantity

					m=0: density
					m=1: velocity
					m=2: radial magnetic field component
					m=3: tangential magnetic field component
					m=4: normal magnetic field component
					m=5: bt^2+bn^2
					m=6: total field strength
					m=7: dynamic pressure

					The 3rd dimension identifies multiple sets of tomographic
					data (this is currently only used to compare timeseries from
					the nv3d files with the ea files).

	tsitu		array[N2]; type: time structure
					times of available data point for in situ data
					(always the same as ttomo???)
	ysitu		array[N2,M]; type: float
					spacecraft in situ time series with 'bad data' indicated
					by !values.f_nan containing same quantities as ytomo.
 OPTIONAL INPUT PARAMETERS:
	ut0=ut0		scalar; type: integer or time structure
					If absent, then array 'ttomo' defines the timeaxis
					If present, 'ttomo' determines the range of the time axis,
					but the time axis will be centered on 'ut0'.
					If 'ut0' is specified as an integer then it is interpreted
					as the difference between local time and UT in hours
	tx_range=tx_range
				array[2]; float or time structure
					defines the range of the time axis. A float array is
					interpreted as a time range in days centered on 'ut0'
	/forecast	only used if keyword 'ut0' is set.
					Adds a vertical dashed line at the center of the time
					series (marking time 'ut0'), and adds the word 'FORECAST'
					to the right of the dashed line.

	If 'ut0' is absent then the time series reflects the time range of the
	'ttomo' array.

	fmin	= fmin	scalar, array[2]; type: any
					scalar is same as [scalar,scalar]
	fmax	= fmax	scalar, array[2]; type: any
					scalar is same as [scalar,scalar]
					sets minimum and maximum on the two timeseries plotted

	Speed/density plots cannot be mixed with magnetic field plots.

	/speed			select velocity plots
	/density		select density plots
	/bradial		select radial component of magnetic field
	/btang			select tangential component of magnetic field
	/bnorm			select normal component of magnetic field
	/brtmag
	/bmag			select magnetic field strength
	/pdynamic		select dynamic (ram) pressure

	data_type=data_type
					array[n] (n=8 currently); type: integer
					array with 0 (data type not plotted) or 1 (data type plotted)
					If not specified the array is constructed from the data type
					keywords listed above.
					If specified it usually is the tag entry with the same name
					from the structure defined by vu_type_insitu.

	/timeseries		plot time series for selected quantities
	/correlation	plot correlations only
					(if both are omitted than time series and correlation are
					plotted).

	sc_label=sc_label
					scalar; type: string
					label used to indicate origin of in situ data
					(usually this is obtained from Instrument with
					the keyword /label set).
	tm_label=tm_label
					scalar or array; type: string; default: ['corotating', 'time dependent']
					labels used for the tomography time series

	_extra=_extra	IDL graphics keyword passed to plot statement
					(charsize, thick, etc.)
 OPTIONAL OUTPUT PARAMETERS:
	tx_range=tx_range
					array[2]; time structure
					actual time range used to plot time axis
	plot_type=plot_type
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
	@vu_fnc_include.pro 	;
 CALLS: ***
	CORRELATE, InitVar, IsTime, IsType, LOADCT, MEAN, PlotCurve, TimeLimits, TimeOp, TimeSet
	TimeString, TimeUnit, TimeXAxis, anicenum, arg_time, gridgen, lsqNormalFit, vu_fnc
 CALLED BY:
	vu_insitu
 PROCEDURE:
	The 'tomo' arrays are usually extracted from a tomography output file
	The 'insitu' arrays is set up by a call to InsituTimeseries
 MODIFICATION HISTORY:
	NOV-1999, Paul Hick (UCSD/CASS)
	JUL-2002, Paul Hick (UCSD/CASS)
		Added keyword /forecast (before this was functionality was
		included with keyword 'ut0'
	AUG-2002, Paul Hick (UCSD/CASS)
		Added keyword tx_range. Also modified the calculation of tx_range
		if it is not specified.
	SEP-2002, Paul Hick (UCSD/CASS)
		Renamed PlotCompareInsitu to PlotInsituCurve and revamped.
	APR-2004, Paul Hick (UCSD/CASS)
		Bug fix (call to TimeAdd instead of TimeOp)
		Added keyword digits to pass info to function 'anicenum'.
	JUL-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Restructured the plotting of the timeseries to provide better
		plots if no tomography data are available. It used to make a
		black window; now it plots 'no data'.
		Removed keyword noplot.
		Removed keywords result_str and result_fit returning infro from
		correlation between tomographic and in situ timeseries (now done
		by vu_correlate.
		Renamed PlotInsituCurve to vu_InsituCurve.


vu_is_sequence $SSW/smei/ucsd/sat/idl/util/vupack/vu_is_sequence.pro
[Previous] [Next]
 NAME:
	vu_is_sequence
 PURPOSE:
	Check whether a 'hdr' array refers to a sequence from a time-dependent
	tomography run.
 CATEGORY:
	Tomography
 CALLING SEQUENCE:
	FUNCTION vu_is_sequence, hdr, silent=silent
 INPUTS:
	hdr
 OPTIONAL INPUTS:
	silent=silent		scalar; type: integer
							0,1,2: suppresses informational messages
 OUTPUTS:
	Result				scalar; type: integer
							0: not a sequence
							1: is a sequence; returned if hdr is an array with more
							than 1 element and all marker values have the same
							non-zero value.
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
 CALLS: ***
	InitVar, TimeOp, TimeUnit, vu_get
 CALLED BY:
	vu_insitu, vu_synopticmap, vu_whatis
 PROCEDURE:
	If more than one hdr is present, check whether it is from a single time-dependent
	tomography run (i.e. whether all markers have the same non-zero value).
 MODIFICATION HISTORY:
	APR-2001, Paul Hick (UCSD/CASS)
	JUL-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added check for sorted time sequence. This is now used to identify
		a sequence rather than a single marker value for all headers.


vu_mean $SSW/smei/ucsd/sat/idl/util/vupack/vu_mean.pro
[Previous] [Next]
 NAME:
	vu_mean
 PURPOSE:
	Calculate a weighted average of a set of tomography arrays
 CATEGORY:
	Tomography
 CALLING SEQUENCE:
	ret_hdr = vu_mean(hdr, ff, weights, tt_weight=tt_weight, ff_mean=ff_mean)
 INPUTS:
	hdr			array[n]; type: structure
					header information for all data arrays
	ff			array[nLng,nLat,nRad,2,n]
					3D data arrays (velocity and density, or magnetic field components)
	weights		array[n]; type: float
					weights to be applied to data arrays
	tt_weight=tt_weight
				array[1]; type: float or time structure
					time at which mean array is required.
					This time is used to calculated the Carrington range and
					range of interest of the mean array by interpolating on the
					the input values in argument 'hdr'.
 OPTIONAL INPUT PARAMETERS:
	hdr_index=hdr_index
				scalar; type: integer; default: 0
					0 <= hdr_index <= n-1; identifies element in 'hdr' on which to base
					the header for the mean data
	/last_hdr		if set, the hdr_index = n-1 is used
	/marker			???? maybe useful when processing files for same times from different
					tomography run (the marker values are written into 'userinfo'
	setbad=setbad		scalar; type: integer
					if set, then bad values in the matrix nearest to tt_weight
					are also flagged bad in the output matrix.
	/nowrap 		passed to AlignHeliosphere
 OUTPUTS:
	ret_hdr		array[1]; type: structure
					header information for returned mean data. The header is based
					on one of the headers in the input 'hdr' array (determined by
					keywords hdr_index and last_hdr) with some fields updated
					(see PROCEDURE).
	ff_mean=ff_mean	array[nLng,nLat,nRad,2]; type: float
					weighted mean data
					if n=1 then the input data are returned unmodified
 OPTIONAL OUTPUT PARAMETERS:
	userinfo=userinfo	array[2]; type: string
					contains some descriptive information about the averaging
					process (times of original files and weight factors).
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	AlignHeliosphere, BadValue, InitVar, IsType, SuperArray, TimeInterpol, TimeOp
	TimeString, TimeUnit, UNIQ [1], UNIQ [2], UNIQ [3], arg_time, vu_get, vu_set
 CALLED BY:
	vu_gettime, vu_new_time, vu_update_marker
 RESTRICTIONS:
	The input data need to be arranged chronologically, i.e.
	the hdr.time array needs to be monotic (if vu_select and vu_read are
	used to set up the input 'hdr' and 'ff' arrays this condition is satisfied).
 PROCEDURE:
 >	The Carrington range and region of interest for the mean array is calculated by
	linear interpolation on time on the input values in the 'hdr' array.

 >	The arrays to be combined may refer to different ranges of Carrington variables
	(i.e. with different hdr.array and hdr.roi values). Before calculating the weighted
	mean array a linear interpolation in the longitudinal dimension is used to put all
	arrays on the grid needed for the mean array (this is done by AlignHeliosphere).

 >	The return header 'ret_hdr' is based on one of the headers in the input 'hdr' array
	(the first one unless /last_hdr or hdr_index is set). The following fields are updated:

	ret_hdr.time			set to tt_weight
	ret_hdr.array			obtained by linear interpolation on hdr.array vs. hdr.time at time tt_weight
	ret_hdr.roi				obtained by linear interpolation on hdr.roi   vs. hdr.time at time tt_weight
	ret_hdr.file			set to blank string (vu_write creates a file name based on hdr_time)
	ret_hdr.time_forecast	set to tt_weight
	ret_hdr.time_start		set to tt_weight
	ret_hdr.marker			if all hdr.marker values are the same that value is retained;
							otherwise set to zero (vu_write appends a non-zero ret_hdr.marker
							value to the file name)
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	JUL-2002, Paul Hick (UCSD/CASS)
		Modified error procedure to avoid divide by zero
		The forecast time in the return header is now also set to tt_weight
	NOV-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added /nowrap keyword


vu_movie $SSW/smei/ucsd/sat/idl/util/vupack/vu_movie.pro
[Previous] [Next]
 NAME:
	vu_movie
 PURPOSE:
	Create animations from final (averaged) tomography files
 CATEGORY:
	smei/sat/idl/util/vupack
 CALLING SEQUENCE:
	PRO vu_movie, ut, map_type			, $
		ut_extra		= ut_extra		, $
		path			= path			, $
		filter			= filter		, $
		movie_destination=movie_destination,$
		image_destination=image_destination,$
		hdr				= hdr			, $
		ff				= ff			, $
		movie_file		= movie_file	, $
		delay			= delay			, $
		png				= png			, $
		gif				= gif			, $
		mpeg			= mpeg			, $
		fillsky			= fillsky		, $
		skip			= skip			, $
		type			= type			, $
		roi_offset		= roi_offset	, $
		ut_off			= ut_off		, $
		silent			= silent		, $
		nv_filter		= nv_filter		, $
 		nv_hdr			= nv_hdr		, $
		nv_ff			= nv_ff			, $
		_extra			= _extra
 INPUTS:
	ut			array[2]; type: float or time structure
					range of times for which movie is required.
					Times can be specified as Carrington variables or in UT
	map_type	scalar; type: character
					Any one of 'synoptic', 'earth_skysnap', 'earth_skysweep',
					'earth_insitu'
 OPTIONAL INPUT PARAMETERS:
	hdr = hdr	array[k]; type: structure
					headers of tomography files used to make individual images
	ff  = ff	array[n,l,m,2,k]; type: float
					3d heliospheric arrays used

				These arrays are either density/velocity or magnetic field data.
				If these do not exist on entry then files are selected and read, and
				output in these keywords (see OUTPUT PARAMETERS). Altnernatively, these
				arrays are passed from a previous call, bypassing the read section here.
				This saves a lot of time.

	nv_hdr = nv_hdr
				array[k]; type: structure
					headers of tomography files (density/velocity)
	nv_ff  = nv_ff
				array[n,l,m,2,k]; type: float
					3d heliospheric arrays (density/velocity)

				These arrays should only be specified if hdr,ff contain magnetic data.
				They should contain the density/velocity data matching the magnetic data,
				and will be used only to make a density/velocity remoteview movie, with the
				current sheet embedded in it.

				If nv_hdr is not defined on entry, and nv_filter is set then an attempt
				is made to locate the density/velocity data matching the hdr,ff data.
 
	path=path	scalar; type: string; default: $dat/nagoya/slow/final
					directory in which to search for files
	filter=filter
				scalar; type: string; default: nv3d*.*
					file filter (including wildcard) used to search for files
	nv_filter=nv_filter
				scalar; type: string; default: nv3d*.*
					file filter (including wildcard) used to search for density/velocityfiles

	movie_destination=movie_destination
				scalar; type: string; default: $TEMP
					destination directory for animations
					If the directory doesn't exist then the animation is written to $TEMP
	image_destination=image_destination
				scalar; type: string; default: none
					destination directory for individual frames
					By default the individual frames are deleted. If image_destination is set to an
					existing directory then the individual frames are saved in this directory.
	/mpeg		by default an animated png is created; if /mpeg or /gif is set then an
	/gif		mpeg movie (NOT YET IMPLEMENTED) or animated gif (REQUIRES CAPABILITY TO
					WRITE GIFS) is made.
	_extra=_extra
 OUTPUTS:
	(animation, and optionally the individual frames)
 OPTIONAL OUTPUT PARAMETERS:
	hdr = hdr	array[k]; type: structure
					headers of tomography files used to make individual images
	ff  = ff	array[n,l,m,2,k]; type: float
					3d heliospheric arrays used

	nv_hdr = nv_hdr
				array[k]; type: structure
					headers of tomography files (density/velocity)
	nv_ff  = nv_ff
				array[n,l,m,2,k]; type: float
					3d heliospheric arrays (density/velocity)

				Will only be filled if nv_hdr does not exist on entry, and nv_filter is set.
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	CheckDir, FILEPATH, GetFileSpec, InitVar, Instrument, IsTime, IsType, SetFileSpec
	TimeGet, TimeOp, TimeSet, TimeString, TimeUnit, UNIQ [1], UNIQ [2], UNIQ [3], arg_time
	boost, destroyvar, do_file, jpl_body, mk_flick, vu_RemoteView, vu_earthskymap, vu_get
	vu_insitu, vu_nagoyaskymap, vu_planarcut, vu_select, vu_solardisk, vu_synopticmap
	vu_type_insitu, vu_type_skymap
 PROCEDURE:
 >	The returned 'hdr' and 'ff' arrays can be passed to a subsequent call to
	make another movie from the same data. This bypasses the time-consuming
	reading of the same set of files.
 >	All nv3d files in the source directory 'path' fitting the 'filter' wildcard
	within the time range 'ut' are processed. Image are created at the time
	of each file.
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	JUL-2003, Paul Hick (UCSD/CASS)
		Adapted to make movies of remoteviews with hcs embedded
	JUL-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Improved handling of individual frames for movies.


vu_nagoyaskymap $SSW/smei/ucsd/sat/idl/util/vupack/vu_nagoyaskymap.pro
[Previous] [Next]
 NAME:
	vu_nagoyaskymap
 PURPOSE:
	Overplot IPS sources for given day on a 'sky sweep' map derived from a
	tomographic reconstruction.
 CATEGORY:
	Forecast project
 CALLING SEQUENCE:
	PRO vu_nagoyaskymap, hdr, ff, ihdr=ihdr, ut0=ut0, degrees=degrees, _extra=_extra,	$
		utnoon=UTnoon, RA_full=RA_full, F_full=F_full, track=track, solar=solar, band=band, $
		silent=silent, module=module

 INPUTS:
	hdr			array[1]; type: structure
					information about the tomographic reconstruction.
					if 'hdr' does not exist, then user is prompted for
					a data file using the 'pickfile' dialog.
	ff			array[n,m,l,2]; type: float
					3D volume data; if not present then the files
					specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	ihdr=ihdr	scalar; type: integer
					identifies the header to be used if hdr is an array with
				    more than one element

	ut0=ut0		scalar or array[1]; type: time structure, float or integer
					Specifies the time on which the time series is centered.
					If not specified then the time from the 'hdr' argument is
					used. See arg_time for more details.
	/degrees	if set then all angles are in degrees (default: radians)

	/track		if set sources within +/-12 hours of ut0 (/solar NOT set) or
					24 hours preceding ut0 (/solar set) are plotted.
				if NOT set sources within +/-12 hours of noon of previous noon
					(/solar NOT set) or 24 hours preceding previous noon
					(/solar set) are plotted.
	/solar
	band=band	scalar; type: any; default: none
				strip

	Additional keywords can be passed to vu_getdata and
	vu_earthskymap. The most important ones are:

	maxelo		scalar; type: float
					controls type of map: Hammer-Aitoff, fish-eye or Mercator
					map
	/equator	if set, the 'horizontal' in the sky map is parallel to the
					equatorial plane. By default the horizontal is along
					the ecliptic
 OUTPUTS:
	UTnoon=UTnoon
				array[1]; type: time structure
					UT for local noon at Nagoya for which the sky sweep is made.
 INCLUDE:
	@compile_opt.pro								; On error, return to caller
 CALLS: ***
	GeographicInfo, GetNagoyaSources, InitVar, IsType, TimeOp, TimeSet, TimeString
	TimeUnit, arg_time, vu_earthskymap, vu_getdata
 CALLED BY:
	vu_movie
 PROCEDURE:
	The skymap is built from strips along the local meridian at Nagoya, centered
	on the last noon preceeding the input time T for which IPS data are
	available.
 MODIFICATION HISTORY:
	MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_NagoyaSourcemap $SSW/smei/ucsd/sat/idl/util/vupack/vu_nagoyasourcemap.pro
[Previous] [Next]
 NAME:
	vu_NagoyaSourcemap
 PURPOSE:
	Overplot IPS sources for given day on a sky map derived from a
	tomographic reconstruction.
 CATEGORY:
	IPS forecast: WWW
 CALLING SEQUENCE:
	PRO vu_NagoyaSourceMap, ut0=ut0, degrees=degrees, _extra=_extra,	$
		utnoon=utnoon, point_sources=point_sources, geolng=geolng, nosweep=nosweep
 INPUTS:
	ut0=ut0		array[1]; type: time structure
					Defines the time (UT) for the skymap
					A scalar is interpreted as the difference between local
					time and UT, and is used to get a UT from the system time.
					If absent then T = 8 is assumed (offset PST and UT)
 OPTIONAL INPUT PARAMETERS:
	geolng=geolng	scalar; type: float
						geographic longitude of Nagoya.
	point_sources=point_sources
					array; type: ips_point_source structure

					Both arguments are calculated internally if not specified

	/degrees	if set then all angles are in degrees (default: radians)

	/ips_speed	if set, plot IPS speed values
	/ips_glevel	if set, plot IPS g-level values

	maxelo		scalar; type: float
					if set and non-zero then a fish-eye map is plotted out to
					elongation 'maxelo'. By default a Hammer-Aitoff map is drawn
	/equator		if set, the 'horizontal' in the sky map is parallel to the
						equatorial plane. By default the horizontal is along the ecliptic
	/names		if set, then the names of the point sources are plotted

 OPTIONAL OUTPUT PARAMETERS:
	UTnoon			array; type: time structure
						UT for previous time when Sun crossed local
						meridian (i.e. local noon)
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
 CALLS: ***
	GeographicInfo, GetNagoyaSources, InitVar, IsType, TimeOp, TimeSet, TimeString
	arg_time, destroyvar, vu_earthskymap
 PROCEDURE:
 MODIFICATION HISTORY:
	MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_new_time $SSW/smei/ucsd/sat/idl/util/vupack/vu_new_time.pro
[Previous] [Next]
 NAME:
	vu_new_time
 PURPOSE:
	Create or update averaged tomography files from original 'raw' files
 CATEGORY:
	Tomography: I/O
 CALLING SEQUENCE:
	PRO vu_new_time, ut, path=path, filter=filter, destination=destination,	$
		ff=ff, update=update, triangle=triangle, nofuture=nofuture, setbad=setbad,$
		count=count, silent=silent, rounds=rounds, gzip=gzip
 INPUTS:
	ut				array[*]; type: time structure
						/update NOT set: times for which new averaged files are
						to be calculated; should be in chronological order.
						if /update set: only ut[0] is used and usually refers to
						the time of the last tomography run (i.e. the time of
						the last 'raw' file available. All files in 'destination'
						which are affected by this raw file are updated.
 OPTIONAL INPUT PARAMETERS:
	path=path		scalar; type: string
						directory where to search for 'raw' files to be used
						to calculate the new averaged file
						(passed to vu_select)
	filter=filter	scalar; type: string
						file name filter for 'raw' files (incl. wildcard)
						(passed to vu_select)
	destination=destination
					scalar; type string
						destination directory of the new averaged file
						if not specified, then no output file is written.
	update_fast=update_fast
						if set then files in 'destination' are updated

	triangle=triangle
					array[4]; type: float; default: [ [4,-(7+4),7-4]/!sun.synodicp, 1.0 ]
						defines the range of time which affects the averaging
						near a given time, i.e. files with times inside this range
						will be given a non-zero weight in the averaging process.
						(see vu_weight). 
	/nofuture		if set, the average is calculated from files with times earlier than
						the specified time.
	/setbad			passed to vu_weight
	/silent			suppresses messages from vu_read and vu_write
 OUTPUTS:
	ff
 OPTIONAL OUTPUT PARAMETERS:
	count=count		scalar; type: integer
						if /update NOT set: # times in 'ut' for which new averaged files
							were created
						if /update set: # times around ut[0] for which averaged files
							were found and updated.
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CarringtonVar, InitVar, IsBadTime, IsType, TimeOp, TimeSet, TimeString, TimeUnit
	arg_time, vu_get, vu_mean, vu_select, vu_set, vu_weight, vu_write, where_common
 CALLED BY:
	vu_update_hours
 PROCEDURE:
 >	vu_select is called with keyword /nohdr set, i.e. file names
	are returned without actually reading the headers.
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added /allow_nrad_changes to vu_select call
	NOV-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added /gzip keyword


vu_planarcut $SSW/smei/ucsd/sat/idl/util/vupack/vu_planarcut.pro
[Previous] [Next]
 NAME:
	vu_planarcut
 PURPOSE:
	Projects tomographic data at fixed distance from the Sun onto the
	plane of the sky.
 CATEGORY:
	Tomography
 CALLING SEQUENCE:
	PRO vu_planarcut, hdr, ff, ihdr=ihdr, ut0=ut0,	$
		radius		= radius		, $
		zoffset 	= zoffset		, $
		type		= type			, $
		hardcopy	= hardcopy		, $
		silent		= silent		, $
		module		= module		, $
		body		= body			, $
		abg_euler	= abg_euler		, $
		degrees		= degrees		, $
		_extra		= _extra
 INPUTS:
	hdr		array[1]; type: structure
			    header information about the tomographic reconstruction
			    as returned from vu_select. If 'hdr' does not exist,
			    vu_select is called.
	ff		array[n,m,l,2]; type: float
			    3D volume data; if not present then the files
			    specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	ihdr=ihdr	scalar; type: integer: default: 0
			    If 'hdr' is an array (and 'ff' the corresponding data arrays)
			    then a synoptic map for data at index 'ihdr' is displayed.

	ut0=ut0 	scalar or array[1]; type: time structure, float or integer
				(passed to vu_getdata)
			    Time (converted to an Earth-based Carrington variable).
				If not specified then the time in 'hdr' is used.
			    If a sequence of files from a time-dependent tomography run is
			    used, and ihdr is not specified, then the hdr closest to ut0 is used.

	type=type	array[1]; type: structure
			    output structure from vu_type_insitu
	radius=radius
				scalar; type: float: default: outer boundary of data sphere
			    	heliocentric distance (AU)
	zoffset=zoffset
				scalar; type: float; default: 0.0
					distance of plane of the cut to the origin (the Sun)
 OUTPUTS:
	(plot to screen)
 OPTIONAL OUTPUT PARAMETERS:
	hdr		array[1]; type: structure
	ff		array[n,m,l,2]; type: float
			    Returns headers and arrays read by vu_select and vu_read
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
	@vu_fnc_include.pro 	;
 CALLS: ***
	AngleRange, CV_COORD, CombineRotations, CvSky, EulerRotate, FILEPATH, InitVar, IsType
	PlotPlanarCut, Reset_Colors, STRETCH, Set_Page, TimeString, TimeUnit, ToDegrees
	arg_time, boost, destroyvar, flt_read, gridgen, vu_atlocation, vu_fnc, vu_get
	vu_get_page, vu_getdata, vu_gettime, vu_type_insitu
 CALLED BY:
	vu_movie
 PROCEDURE:
 MODIFICATION HISTORY:
	SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_point_source $SSW/smei/ucsd/sat/idl/util/vupack/vu_point_source.pro
[Previous] [Next]
 NAME:
	vu_point_source
 PURPOSE:
	Manipulates structure used for plotting of point sources.
 CATEGORY:
	/sat/idl/util/vupack
 CALLING SEQUENCE:
	FUNCTION vu_point_source, point_sources, update, elongation_=elongation_,	$
		name=name, time=time, location=location, ips_speed=ips_speed,			$
		ips_glevel=ips_glevel, brightness=brightness, pb=pb, field=field,		$
		size_base=size_base, size_ratio=size_ratio, xy_pixel=xy_pixel,			$
		degrees=degrees, create=create
 INPUTS:
	pnt 		array; type: sky_point_source structure
 OPTIONAL INPUT PARAMETERS:
	update		if it exists, used to update a field in the input
				structure (as indicated by appropriate keyword)
	create=create
				scalar; type: integer
			 	only used if 'update' exists. Creates a new structure
				of 'create' elements (destroying the input 'pnt' structure).

	/degrees	if set then all angles are in degrees, instead of radians

	/name		return or set name of source
	/time		return or set time of observation
	/location	return or set locatione of source in sky as RA,dec

	/ips_speed	return or set IPS speed
	/ips_glevel return or set IPS g-level
	/brightness return or set Thomson scattering brightness
	/pb 		return or set pB

	/size_ratio if set in combination with /ips_speed, /ips_glevel, /brightness
				or /pb, then the increase of the circle size per data unit
				is returned. In PlotEarthSkymap this is used to increase
				the circle size for larger differences between point source
				and background map.

	/size_base	return or set the base size (minimum size) of circle used
				for plotting point sources

	field=field scalar; type: integer
				return or set the indicated field in the 'pnt' structure
				This overrides any of the above keywords.
 OUTPUTS:
	Result 		if the input 'update' argument does NOT exist, then
				a field from the 'pnt' structure (or a quantity
				derived from one or more fields) as indicated by
				keyword settings, is returned
				if the input 'update' argument DOES exist, then
				the modified structure is returned
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro		; On error, return to caller.
 EXTERNAL:
	sky_point_source__define
 CALLS: ***
	CvSky, Elongation, InitVar, IsType, ToDegrees, big_eph, jpl_body
 CALLED BY:
	GetNagoyaSources, PlotEarthSkymap, PlotPolarSkymap, vu_earthskymap
 PROCEDURE:
	Mostly intended to hide the exact structure of the point source
	structure from users.
 MODIFICATION HISTORY:
	SEP-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_point_source__define $SSW/smei/ucsd/sat/idl/util/vupack/vu_point_source__define.pro
[Previous] [Next]
 NAME:
	vu_point_source__define
 PURPOSE:
	Automatic definition of structure for storing parameters
	for Nagoya IPS observations
 CATEGORY:
	tomography
 CALLING SEQUENCE:
	(called automatically when when using expression
		{vu_point_source})
 INPUTS:
	(none)
 OUTPUTS:
	(none)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 PROCEDURE:
	Should be used only by vu_point_source (which also takes
	care of the initialization of some of the fields).
	All angles are stored in the structure in degrees. vu_point_source
	takes care of the conversion to radians/degrees using the
	usual keyword /degrees.
 MODIFICATION HISTORY:
	JAN-2001, Paul Hick (UCSD/CASS)
	SEP-2004, Paul Hick (UCSD/CASS)
		Renamed from ips_point_source. Added fields for Thomson
		scattering brightness, pB and circle sizes


vu_prefix $SSW/smei/ucsd/sat/idl/util/vupack/vu_prefix.pro
[Previous] [Next]
 NAME:
	vu_prefix
 PURPOSE:
	Get file name prefix to be used for locating output files
	from the tomography.
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	FUNCTION vu_prefix, magnetic=magnetic, fast=fast, silent=silent
 OPTIONAL INPUT PARAMETERS:
	/magnetic			if not set then the filter for the plasma
						data is returned (see PROCEDURE).
						if set then the filter for magnetic data
'						is returned (see PROCEDURE).
	/fast				if set then the filter for time-dependent
						tomography is returned.
						if not set then env var $fast is checked
						if not set and env var $fast is not defined
						then the filter for corotating tomography
						is returned.
	silent=silent
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	InitVar
 CALLED BY:
	vu_RemoteView, vu_earthskymap, vu_filename, vu_insitu, vu_select, vu_type_insitu
	vu_type_skymap, vu_update_hours, vu_update_marker, vu_vox_write
 PROCEDURE:
	If /magnetic NOT set:
	- first check env var $NV_PREFIX
	- if it doesn't exist, check for env var $NV_PREFIX_'kind'
		where 'kind' = 'slow' or 'fast' (depending on setting of /fast)
	- if neither env var exists use the default 'nv3d' if /fast NOT set,
		or 'nv3f' if /fast SET.

	If /magnetic SET:
	- first check env var $BB_PREFIX
	- if it doesn't exist, check for env var $BB_PREFIX_'kind'
		where 'kind' = 'slow' or 'fast' (depending on setting of /fast)
	- if neither env var exists use the default 'wson'.
 MODIFICATION HISTORY:
	AUG-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_quick_movie $SSW/smei/ucsd/sat/idl/util/vupack/vu_quick_movie.pro
[Previous] [Next]
 NAME:
	vu_quick_movie
 PURPOSE:
	Create animated gifs from final (averaged) tomography files
 CATEGORY:
	Tomography
 CALLING SEQUENCE:
	vu_movie, ut, map_type, path=path, filter=filter, movie_dir=movie_dir, gif_dir=gif_dir
 INPUTS:
	ut		array[2]; type: float or time structure
				range of times for which movie is required.
				Times can be specified as Carrington variables or in UT
	map_type
			scalar; type: character
				Any one of 'synoptic', 'earth_skysnap', 'earth_skysweep',
				'earth_insitu'
 OPTIONAL INPUT PARAMETERS:
	path=path
			scalar; type: string; default: $dat/nagoya/slow/final
				directory in which to search for files
	filter=filter
			scalar; type: string; default: nv3d*.*
				file filter (including wildcard) used to search for files
	movie_dir=movie_dir
			scalar; type: string; default: $TEMP
				destination directory for animated gif.
				If the directory doesn't exist then the animated gif is written to $TEMP
	gif_dir=gif_dir
			scalar; type: string; default: $TEMP
				destination directory for individual gifs
				By default the individual gifs are deleted. If gif_dir is set to an
				existing directory then the individual gifs are saved in this directory.
	/mpeg		by default an animated gif is created; if /mpeg is set then an mpeg movie is
				made (NOT YET IMPLEMENTED)
	_extra=_extra
 OUTPUTS:
	(animated gif, and optionally the individual gifs)
 OPTIONAL OUTPUT PARAMETERS:
	hdr = hdr
			array[k]; type: structure
				headers of tomography files used to make individual images
	ff  = ff
			array[n,l,m,2,k]; type: float
				3d heliospheric arrays used
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
 CALLS: ***
	CheckDir, FILEPATH, GetFileSpec, IsType, SetFileSpec, arg_time, do_file, flt_string
	mk_flick, vu_get
 PROCEDURE:
>	The returned 'hdr' and 'ff' arrays can be passed to a subsequent call to
	make another movie from the same data. This bypasses the time-consuming
	reading of the same set of files.
>	All t3d files in the source directory 'path' fitting the 'filter' wildcard
	within the time range 'ut' are processed. Image are created at the time
	of each file.
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_read $SSW/smei/ucsd/sat/idl/util/vupack/vu_read.pro
[Previous] [Next]
 NAME:
	vu_read
 PURPOSE:
	Read output file from tomography file
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	FUNCTION vu_read, hdr,	$
		nobad	= nobad 	, $
		get_roi = get_roi	, $
		get_full= get_full	, $
		fss 	= fss		, $
		shfts	= shfts 	, $
		losxs	= losxs 	, $
		silent	= silent	, $
		count	= count 	, $
		roi_offset=roi_offset
 INPUTS:
	hdr			array; type: structure
					information extracted from file headers
 OPTIONAL INPUTS:
	/nobad		by default 'bad' values are replaced by !values.f_nan.
					The 'bad value' indicator is read from the file header, or,
					if not found in the header is assumed to be -9999.9990
					Set /nobad to suppress this 'bad value' replacement
	/get_full	extract full array (not just region of interest)
	/get_roi	extract region of interest only (this is the default)

	roi_offset=roi_offset
				scalar; type: float: default: 0.0
					offset to be added to the region of interest specified in the
					header (not used if /get_full is set)
 OUTPUTS:
	Result		array; type: float
					3D matrix (invalid values marked by large negative value)
					Either velocity/density or radial/azimuthal magnetic field
 OPTIONAL OUTPUT PARAMETERS:
	count		scalar; type: integer
					# files read; this will be either 0 of the number of valid
					nv3d* or wson* files. If there is a read error on the first of
					these files then count=0 is returned and none of the output
					arrays will exist. If it happens for the second or later file
					then its slot in the output arrays is filled with bad values.
	/silent		if set, informational messages are suppressed

	The following arrays may not be present in the file:

	fss=fss		array[*,*,2]; type: float
					source surface maps
	shfts=shfts
				array[*,*,*]; type: float
					3D shift matrix (shft[*,*,0]=0)
	losxs=losxs
				array[*,*,2]; type: float
					# line of sight crossings at source surface
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
 CALLS: ***
	BadValue, InitVar, IsType, SuperArray, TimeString, WhatIs, boost, destroyvar, flt_read
	vu_get, vu_set
 CALLED BY:
	vu_getdata, vu_select
 PROCEDURE:
 >	The files are read using procedure flt_read. If there is a read error
	then the value zero is returned.
 >	The shift array is assumed to be stored at the end of the file
 MODIFICATION HISTORY:
	AUG-1999, Paul Hick (UCSD/CASS)
	MAR-2001, Paul Hick (UCSD/CASS)
		rewrite to deal with new headers of tomography files
	NOV-2001, Paul Hick (UCSD/CASS)
		added keyword roi_offset to adjust the region of interest
		specified in the header.
	AUG-2002, Paul Hick (UCSD/CASS)
		modification to allow for reading of files with different
		number of radial distances. The lowest number of distances
		is read from each file.
	JUN-2003, Paul Hick (UCSD/CASS)
		Fixed bug which prevented reading of source surface map fss correctly.
	NOV-2003, Paul Hick (UCSD/CASS)
		Fixed bug in determining indices for ROI. If the ROI edges fell exactly
		halfway two gridpoints, one edge would sometimes be rounded up, the
		other rounded down.
	NOV-2003, Paul Hick (UCSD/CASS)
		Modified handling of read errors. If the error occurs on the first file
		then nothing is returned; if it happens for a later file its slot
		in the output arrays is filled with bad values.
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		For magnetic data the third component is added as zeroes if it
		is absent. The radial (1st) and tangential (2nd) component are always
		present. The normal (3rd) component is not (yet) present in the
		magnetic files.


vu_RemoteView $SSW/smei/ucsd/sat/idl/util/vupack/vu_remoteview.pro
[Previous] [Next]
 NAME:
	vu_RemoteView
 PURPOSE:
	Reads tomography files for processing in RemoteView
 CATEGORY:
	Volume rendering
 CALLING SEQUENCE:
	PRO vu_remoteview, hdr, ff, 	$
		ut0 	= ut0		, $
		ihdr	= ihdr		, $
		degrees = degrees	, $
		type_ff = type_ff	, $
		volsize = volsize	, $
		images	= images	, $
		meshhcs = MeshHCS	, $
		mergehcs= MergeHCS	, $
		nearest = nearest	, $
		hdr_bb	= hdr_bb	, $
		bb		= bb		, $
		filter_bb=filter_bb , $
		type_bb = type_bb	, $
		location=location	, $
		upto	= upto		, $
		silent	= silent	, $
		_extra	= _extra	, $
		module	= module
 INPUTS:
	hdr				array[k]; type: header structure
	ff				array[n,l,m,2,k]; data arrays associated with 'hdr' array
						(for k=1 the last dimension may be absent). If not
						specified, then data will be read using vu_getdata.
 OPTIONAL INPUT PARAMETERS:
	ihdr = ihdr		scalar; type: integer
						keyywords are passed to vu_getdata
	ut0  = ut0		scalar; type: float
					array[1]; type: time structure

	type_ff = type_ff
					array[1]; type: structure
						This structure is passed to vu_type_insitu,
						and is used to initialize some of the entries in its
						return structure. See  vu_type_insitu.

	volsize = volsize
					scalar, or array[2]; type: float
						inner and outer limit on radial distance displayed in
						the volume rendering. A scalar specifies only the outer
						limit (with the inner limit assumed to be zero).
						If not specified then the full range (extracted from the
						headers) is used. The values will be rounded to the
						nearest grid distances inside the specified range.
	/degrees		if set, all angles are in degrees (default: radians)

	/meshhcs		if set, the heliospheric current sheet is added to the
						display. This requires magnetic field data, either
						read from file or specified through keyword 'bb'.
	/mergehcs		if set, the heliospheric current sheet is added to the
						display. This requires magnetic field data, either
						read from file or specified through keyword 'bb'.
	/nearest		???

	bb = bb			array[n,l,m,2,kk]; type: float
						(for kk=1 the last dimension may be absent)
						If kk=1 the same magnetic field matrix is used for
						k volume matrices.

	destination=destination
					directory where to write a gif file of the display
					(passed to vu_get_page; useful only when processing
					single view).
	/png			save image as png file
	/gif			save image as gif file (this is the default)
	location=location
					array[3,k]; type: float
						viewing locations associated with each of the
						k data arrays.

	Keywords passed to RemoteView are explained there.

 OUTPUTS:
	hdr				array[k]; type: header structure
	ff				array[n,l,m,2,k]; data arrays associated with 'hdr' array
						(for k=1 the last dimension may be absent)
						Data read using vu_getdata.
 OPTIONAL OUTPUT PARAMETERS:
	bb = bb			array[n,l,m,2,kk]; type: float
						(for kk=1 the last dimension may be absent)
						Magnetic field data read from file.
	type_ff = type_ff
					array[1]; type: structure
						vu_type_insitu structure used in the display
	volsize = volsize
					array[2]; type: float
						actual inner and outer limit on radial distance
						displayed in the volume rendering.
	images = images
				array[k]; type: string
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
	@vu_fnc_include.pro 			;
 CALLS: ***
	AngleRange, BadValue, GetFileSpec, InitVar, IsType, RemoteView, SetFileSpec
	SuperArray, TimeInterpol, TimeString, TimeUnit, ToRadians, arg_time, destroyvar
	vu_fnc, vu_get, vu_get_page, vu_getdata, vu_gettime, vu_prefix, vu_select, vu_set
	vu_type_insitu, vu_write
 CALLED BY:
	vu_movie
 EXAMPLE:
	vu_remoteview, file=filepath(root=getenv('DAT'),subdir='tomography',	$
		'nv3d1653.5000'), full_range=[5,40.0], /density,			$
		full_color=[125,225], full_opa=[0,0.5], ngrid=91, cme=[2,!pi,0],	$
		view_time=CarringtonT(1653.5d0)
 PROCEDURE:
	full_color	= [125,225]
	full_opa	= [0,.5]
	full_range	= [5.0,40.0]
	ngrid		= 91
 MODIFICATION HISTORY:
	APR-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_select $SSW/smei/ucsd/sat/idl/util/vupack/vu_select.pro
[Previous] [Next]
 NAME:
	vu_select
 PURPOSE:
	Find selection of tomography files (nv3d* or wson*)
 CALLING SEQUENCE:
	FUNCTION vu_select, files, files_=files_, path=path, filter=filter, pick=pick,	$
		marker=marker, check=check, allow_nrad_changes=allow_nrad_changes,			$
		prefixlen=prefixlen, tt_range=tt_range, tt_nfile=tt_nfile, rounds=rounds,	$
		nohdr=nohdr, count=count, rots=rots, imark=imark, read_all=read_all, ff=ff, $
		silent=silent, _extra=_extra
 INPUTS:
	files				array; type: string
							list of files. Alternative ways of specifying a set
							of files involve keywords path, filter and pick.
 OPTIONAL INPUT PARAMETERS:
	path=path			scalar; type: string; default: $NAGOYA/slow/raw
							directory in which to search for files
	filter=filter		scalar; type: string; default: nv3d*.*
							file filter (incl. wildcard) to search for files
	/pick				IDL dialog_pickfile function is called to let user
							select files. If not set then FindAllFiles is used.
	/nohdr				if set no headers are read. Instead the Carrington times
							from the file names are returned. (If /nohder is
							not set these times are available in return keyword
							'rots'
	prefixlen=prefixlen	scalar; type: integer; default: 4
							length of filename prefix. This is 4 for the normal
							tomography output files (nv3d, nv3f, wson, nson).
							If set to 3 vu_select can also be used to extract
							times from e.g. ea_ and e3_ files (make sure
							to set /nohdr or there will be trouble !!!)
	/check				passed to vu_header
							This keyword is not used if /nohdr is set
	/allow_nrad_changes	passed to vu_header
							Only used if keyword /check is set

	tt_range=tt_range	array[1] or array[2]; type: time structure or float
							if array[1] only ea* files prior to tt_range are used
							if array[2] only ea* files between tt_range[0] and
								tt_range[1] will be used
							tt_range can be specified as time structure or as
								modified Carrington variable.
	tt_nfile=tt_nfile	scalar; type: integer
							max. # files selected
							only the most recent tt_nfile files are used.
	/read_all			if set than the selected files are read, and the result
							is returned in keyword ff (vu_read keywords,
							such as /get_roi and /silent are also permitted)
	/marker				if set, only headers of files with a marker in the file
							name (made by the time-dependent tomography program)
							are returned. Keyword needs to be set only to
							separate marker files from non-marker files. If the
							file selection consist of either marker files only,
							or non-marker files only, then this keyword is not
							needed (i.e. all files are read regardles of the
							/marker setting).

	rounds=rounds		scalar; type: integer; default: none
							The Carrington variables in the headers typically
							refer to UT times at integer hours. This is the case
							for the raw time-dependent files (each 6 hours) and
							for the final files for both corotating and
							time-dependent tomography (every 2 and every 6
							hours, respectively). The imprecision in the
							Carrington times causes deviations of several
							minutes. This is corrected by converting to UT time,
							rounding to the specified time (rounds=300 should
							do), and then convert back to Carrington variable.
							Procedure forecast_map uses this to try to get an
							exact match between current system time (rounded to
							an integer hour) and a matrix time to avoid
							unnecessary interpolation in the time dimension.
 OUTPUTS:
	Result				array[count]; type: structure
							header information for all files

						Only if /nohdr is set:
						array[count]; type: double
							Carrington times extracted from file names

							Entries are sorted chronologically. Entries with the
							same times (from time-dependent tomography) are also
							sorted on marker value.
 OPTIONAL OUTPUTS:
	count=count			scalar; type: integer
							number of valid tomography files found
	ff=ff				array[n,l,m,2,k]; type: float
							3D heliospheric arrays (only if /read_all is set)

	rots=rots			array; type: time structure
							times extracted from file names converted
							from Carrington variable to UT time. 
	imark=imark			array; type: integer
							Marker values extracted from file name
							(only if /marker is set)
 INCLUDE:
	@compile_opt.pro							; On error, return to caller
 EXTERNAL:
	vu_header__define
 CALLS: ***
	CarringtonT, FILEPATH, FindAllFiles, InitVar, IsBadTime, IsTime, IsType, MEAN, TimeGet
	TimeOp, TimeString, TimeUnit, boost, hide_env, vu_check, vu_get, vu_header, vu_prefix
	vu_read, vu_set
 CALLED BY:
	vu_RemoteView, vu_earthskymap, vu_getdata, vu_insitu_raw, vu_movie, vu_new_time
	vu_update_hours, vu_update_marker, vu_vox_write
 RESTRICTIONS:
	The number of tomography files can get so big that the IDL findfile function
	runs into trouble and does not return any files at all. Try using the
	keyword /forcecd if that happens (see FindAllFiles).
 PROCEDURE:
	Keywords path, filter and pick are used only if argument 'files' is not
	specified.

	The tomographic data are stored in files with names having the form
	abc1234.6789_00001, where 1234.678 indicates a modified Carrington variable,
	and 00001 is a counter for the number of files in rotation 1234.

	Only files with names of the specified form are put in the returned list of
	headers. If one of the keywords tt_range and/or tt_nfile are specified then
	the list of files is further reduced

	If tt_range is specified then only files prior to tt_range[0] are used
	(if tt_range has only one elements) or all files between tt_range[0] and
	tt_range[1] are used (if tt_range has two elements).

	After tt_range has been applied a group of files remain. If tt_nfile is
	specified then only the most recent tt_nfile files are used.
	If tt_nfile is not specified then all files are returned.
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	JUL-2002, Paul Hick (UCSD/CASS)
		Added keyword imark to return marker values if keyword /marker is set.
		Some modifications for increased efficiency. Simplified explicit
		do-loop required by limitation of IDL 'string' function to 1024
		-element string arrays. Modified call to flt_string.
	SEP-2002, Paul Hick (UCSD/CASS)
		Added keyword 'prefixlen' to be able to extract times from the
		file names for ea_ and e3_ files.

		The time-dependent tomography produces multiple reconstructions for the
		same times, differentiated by different marker values. However, the
		Fortran tomography program does not always use completely identical
		times due to inherent imprecision in the calculation of Carrington
		times. Differences should be no bigger than 0.0001 Carrington rotation.
		These differences are eliminated now by using the mean time for all
		entries with different marker values (but referring to the same time).

		Replaced call to IDL findfile function to a call to FindAllFiles
		(including _extra keyword). This allows recursive searches, and, more
		importantly, the /forcecd keyword is available.
	OCT-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added keyword rounds


vu_set $SSW/smei/ucsd/sat/idl/util/vupack/vu_set.pro
[Previous] [Next]
 NAME:
	vu_set
 PURPOSE:
	Update information in headers produced by tomography programs
 CATEGORY:
	sat/util/vupack
 CALLING SEQUENCE:
	hdr = vu_set(hdr [, keyword=value] )
 INPUTS:
	hdr			array[n]; array of headers extracted from tomography files
 OPTIONAL INPUT PARAMETERS:
	Keyword:		Set values:

	file			= file			scalar; type: string; fully-qualified file name
	created			= created		scalar; type: string; time at which file was created
	bad				= bad			scalar; type: float; value reprenting 'bad' data
	version			= version		scalar; type: string; version number for header layout
	prefix			= prefix		scalar; type: string; filename prefix (e.g. 'nv3d')
	time_index		= time_index
	uttime			= uttime
	forecast_time	= forecast_time
	array_range		= array_range
	roi_range		= roi_range
	latitude_range	= latitude_range
	start_distance	= start_distance
	distance_step	= distance_step
	start_time		= start_time
	time_step		= time_step
	power_density	= power_density
	power_distance	= power_distance
	density_at_1AU	= density_at_1AU
	smooth_filter	= smooth_filter
	fill_filter		= fill_filter
	time_filter 	= time_filter
	clip_longitude	= clip_longitude
	scale			= scale			array[4]; type: float; scaling factors
	power_norm		= power_norm	array[2]; type: float
	dimension		= dimension		array[4]; type: integer; # longitudes, latitudes, distances and times
	iteration		= iteration
	nltot			= nltot			array[2]; type: integer; # lines of sight
	nlos			= nlos			array[2]; type: integer, # line-of-sight segments
	dlos			= dlos			array[2]; type: float; length of line-of-sight segment
	binx			= binx			array[2]; type: float; # line-of-sight segments per bin threshold
	user_info		= user_info
	marker			= marker

	/plasma							scalar; type: integer: 1 for velocity/density data
	/magnetic						scalar; type: integer; 1 for magnetic field data

	/degrees
 OUTPUTS:
	R	requested entry from header
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
 CALLS: ***
	InitVar, IsType, ToDegrees, arg_time
 CALLED BY:
	vu_RemoteView, vu_mean, vu_new_time, vu_read, vu_select, vu_update_marker
 SEE ALSO:
	t3d_get, t3d_iget
 PROCEDURE:
 MODIFICATION HISTORY:
	AUG-2002, Paul Hick (UCSD/CASS)
	AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added workaround for an IDL platform inconsistency concerning the
		presence/absence of a leading dummy dimension in hdr.uttime and
		hdr.time_forecast. IDL5.5 on Linux has a dummy dimension, which is
		absent in IDL5.5 on Windows and IDL6.0beta on Linux.


vu_set_header_entry $SSW/smei/ucsd/sat/idl/util/vupack/vu_set_header_entry.pro
[Previous] [Next]
 NAME:
	vu_set_header_entry
 PURPOSE:
	Only for internal use by vu_header
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	flt_string
 MODIFICATION HISTORY:
	OCT-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Extracted from vu_header


vu_set_time_entry $SSW/smei/ucsd/sat/idl/util/vupack/vu_set_time_entry.pro
[Previous] [Next]
 NAME:
	vu_set_time_entry
 PURPOSE:
	Only for internal use by vu_header
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CarringtonT, IsTime, TimeSplit, flt_string, vu_check
 CALLED BY:
	vu_header
 MODIFICATION HISTORY:
	OCT-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Extracted from vu_header.


vu_skymap_type__define $SSW/smei/ucsd/sat/idl/util/vupack/vu_skymap_type__define.pro
[Previous] [Next]
 NAME:
	vu_skymap_type__define
 PURPOSE:
	Automatic definition of structure for storing image type parameters
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	(called when using expression {vu_skymap_type})
 INPUTS:
	(none)
 OUTPUTS:
	(none)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 EXTERNAL BY:
	vu_type_skymap
 CALLS: ***
	vu_fnc
 PROCEDURE:
	Structure definition:


vu_solardisk $SSW/smei/ucsd/sat/idl/util/vupack/vu_solardisk.pro
[Previous] [Next]
 NAME:
	vu_solardisk
 PURPOSE:
	Projects tomographic data at fixed distance from the Sun onto the
	plane of the sky.
 CATEGORY:
	Tomography
 CALLING SEQUENCE:
	PRO vu_solardisk, hdr, ff, ihdr=ihdr, ut0=ut0, radius=radius, type=type,	$
		hardcopy=hardcopy, focus_center=focus_center, degrees=degrees,			$
		silent=silent, module=module, _extra=_extra
 INPUTS:
	hdr		array[1]; type: structure
			    header information about the tomographic reconstruction
			    as returned from vu_select. If 'hdr' does not exist,
			    vu_select is called.
	ff		array[n,m,l,2]; type: float
			    3D volume data; if not present then the files
			    specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	ihdr=ihdr	scalar; type: integer: default: 0
			    If 'hdr' is an array (and 'ff' the corresponding data arrays)
			    then a synoptic map for data at index 'ihdr' is displayed.

	ut0=ut0 	    scalar or array[1]; type: time structure, float or integer
			    Time (converted to an Earth-based Carrington variable)on which
			    the map is centered. If not specified then the time in 'hdr' is used.
			    If a sequence of files from a time-dependent tomography run is
			    used, and ihdr is not specified, then the hdr closest to ut0 is used.

	type=type	array[1]; type: structure
			    output structure from vu_type_insitu
	radius=radius	scalar; type: float: default: 1 AU
			    heliocentric distance for synoptic map (AU)
			    The radius is rounded to the nearest grid distance in the 3D
			    heliospheric matrix.
 OUTPUTS:
	(plot to screen)
 OPTIONAL OUTPUT PARAMETERS:
	hdr		array[1]; type: structure
	ff		array[n,m,l,2]; type: float
			    Returns headers and arrays read by vu_select and vu_read
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
	@vu_fnc_include.pro 	;
 CALLS: ***
	AngleRange, BadValue, CV_COORD, CvSky_Heliographic, CvT3d, InitVar, IsType
	PlotSolarDisk, Reset_Colors, STRETCH, Set_Page, TimeString, TimeUnit, ToRadians
	arg_time, big_eph, boost, destroyvar, gridgen, jpl_body, vu_atlocation, vu_fnc, vu_get
	vu_get_page, vu_getdata, vu_gettime, vu_type_insitu
 CALLED BY:
	vu_movie
 PROCEDURE:
 MODIFICATION HISTORY:
	AUG-2002, Paul Hick (UCSD/CASS)
	JAN-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Minor bug fix. The diameter variable passed to PlotSolarDisk was misspelled.


vu_synopticmap $SSW/smei/ucsd/sat/idl/util/vupack/vu_synopticmap.pro
[Previous] [Next]
 NAME:
	vu_synopticmap
 PURPOSE:
	Plot a synoptic map extracted from a heliospheric tomography file
 CATEGORY:
	Tomography
 CALLING SEQUENCE:
	PRO vu_synopticmap, hdr, ff, ut0=ut0, ihdr=ihdr, radius=radius, type=type,	$
		ylshow=ylshow, degrees=degrees, earth=earth, forecast=forecast,			$
		hardcopy=hardcopy, timeaxis=timeaxis,									$
		eastlimb=eastlimb, westlimb=westlimb, diskcenter=diskcenter,			$
		fromcenter=fromcenter, upto=upto, silent=silent,						$
		_extra=_extra, xysize=xysize, module=module
 INPUTS:
	hdr				array[1]; type: structure
						header information about the tomographic reconstruction
						as returned from vu_select. If 'hdr' does not exist,
						vu_select is called.
	ff				array[n,m,l,2]; type: float
						3D volume data; if not present then the files
						specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	ihdr=ihdr		scalar; type: integer: default: 0
						If 'hdr' is an array (and 'ff' the corresponding data
						arrays) then a synoptic map for data at index 'ihdr' is
						displayed.

	ut0=ut0				scalar or array[1]; type: time structure, float or integer
						Time (converted to an Earth-based Carrington variable)
						on which the map is centered. If not specified then the
						time in 'hdr' is used.
						If a sequence of files from a time-dependent tomography
						run is used, and ihdr is not specified, then the hdr
						closest to ut0 is used.

	type=type		array[1]; type: structure
						output structure from vu_type_insitu

	/timeaxis       if set, adds a time axis at the top of the map, specifying
						the time at which the corresponding heliographic
						longitude crossed the central meridian on the solar disk
						(as seen from Earth).

	radius=radius	scalar; type: float: default: 1 AU
						heliocentric distance for synoptic map (AU)
						The radius is rounded to the nearest grid distance in
						the 3D heliospheric matrix.

	/earth			sets keyword 'radius' to the heliocentric distance of Earth
						at the time corresponding to the center of the synoptic
						map plotted on the screen (see PROCEDURE). Also plots
						the Earth symbol at the heliographic location of Earth
						at that time. If /timeaxis is set, also forces plotting
						of a time series at Earth along the bottom of the map.

	/forecast		if /timeaxis is set, plots vertical dashed line in center of
						map; and the word 'FORECAST' inside left part of map.

	ylshow=ylshow	array[2]; type: float; default: [-60,60] degrees
						range of latitudes shown in the synoptic map in units
						determined by keyword /degrees
	/degrees		if set, then ylshow is assumed to be in degrees (default: radians)
	/hardcopy		if set, print to print device (or EPS) instead of to z-buffer

	Keywords used only when a time-ordered sequence is processed:

	/eastlimb		same as fromcenter = -90 (degrees)
	/westlimb		same as fromcenter = +90 (degrees)
	/diskcenter 	same as fromcenter =   0 (degrees)
	fromcenter=fromcenter
					scalar; type: float; default: none
						offset in heliographic longitude -180 < fromcenter < 180 degrees)

					If none of the above four keywords is set than a synoptic map
					at a single time is plotted. The time is specified through keywords
					ut0 or ihdr.

					If a time-ordered sequence is processed and one of these keywords is
					set then a synoptic map is build from narrow longitudinal strips
					with each strip extracted at a different time.

					E.g. if /diskcenter is SET then strips perpendicular to the solar
					equator at the sub-Earth point (at diskcenter) are extracted from
					each of sequence members.
					If /eastlimb or /westlimb are set the strips are extracted above
					the east or west limb, respectively.

	Additional keywords can be passed to vu_get_page if /hardcopy is not set
 OUTPUTS:
	(plot to screen)
 OPTIONAL OUTPUT PARAMETERS:
	hdr				array[1]; type: structure
	ff				array[n,m,l,2]; type: float
						Returns headers and arrays read by vu_select and vu_read
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
	@vu_fnc_include.pro 				;
 CALLS: ***
	CarringtonVar, GetColors, INTERPOL, InitVar, IsType, MEAN, PlotSynopticMap
	Reset_Colors, STRETCH, Set_Page, SuperArray, TimeString, TimeUnit, ToRadians, arg_time
	big_eph, boost, destroyvar, gridgen, jpl_body, vu_atlocation, vu_fnc, vu_get
	vu_get_page, vu_getdata, vu_gettime, vu_is_sequence, vu_timeseries, vu_type_insitu
 CALLED BY:
	vu_movie
 PROCEDURE:
 >	A t3d file contains a 3D matrix defined on a regular grid in heliographic
	coordinates. The array processed here covers one Carrington rotation [xc,xc+1].
	Typically, the array refers to time xc+0.5.
 >	A 2D matrix is extracted at the distance set by keyword 'radius', or implied by
	keyword /earth.
 >	If argument 'ut' is not specified then the synoptic map plotted covers [xc, xc+1].
 >	If argument 'ut' is specified the plot covers the Carrington variable at time 'ut
	+/- 0.5 rotation.
 MODIFICATION HISTORY:
	AUG-1999, Paul Hick (UCSD/CASS)
	DEC-2000, Paul Hick (UCSD/CASS)
		Added keyword degree
		Added keyword ylshow to set latitude range shown in the synoptic map.
	JAN-2001, Paul Hick (UCSD/CASS)
		Added keyword /earth.
		Added capability to plot synoptic map at any radius inside the range
		covered by the t3d array by linear interpolation on the 3D matrix,
	MAR-2001, Paul Hick (UCSD/CASS)
		Rearrange argument list. Arguments 'hdr' and 'type' are now used to
		set up the display.
	SEP-2001, Paul Hick (UCSD/CASS)
		Fixed bug in call to vu_type_insitu
	JUL-2002, Paul Hick (UCSD/CASS)
		Added interpolation between neigbouring times of ut0, instead of
		truncating to nearest grid time.
	AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Activated option to generate synoptic maps simulating the way some
		types of synoptic data are made: assembling the map from strips of
		data (limb scans, slit along central meridian) taken at different times.


vu_timeseries $SSW/smei/ucsd/sat/idl/util/vupack/vu_timeseries.pro
[Previous] [Next]
 NAME:
	vu_timeseries
 PURPOSE:
	Extract a time series at Earth from a 3D heliospheric matrix obtained with
	one of the tomography programs
 CATEGORY:
	WWW
 CALLING SEQUENCE:
	FUNCTION vu_timeseries, XC3D, R3D, dR3D, F3D, ut=ut, range=range, delt=delt, T=T,	$
		periodic=periodic, sequence=sequence, radius=radius, nearL1=nearL1, 			$
		power=power, body=body
 INPUTS:
	The 3D heliospheric matrix is described by the following input:
	XC3D			array[2] or array[2,ntime]; type: float
						Carrington range of reconstruction
	R3D				scalar or array[ntime]; type: float
						heliocentric distance at inner boundary of matrix
	dR3D			scalar or array[ntime]; type: float
						heliocentric distance resolution of the heliospheric matrix
	F3D				array[n,m,l,ntype,ntime]; float
						3D heliocentric matrix;
						1st dim: Carrington variable, covering range XC3D
						2nd dim: Heliographic latitude, covering [-90,90] degrees
						3rd dim: Heliocentric distance, with inner boundary at R3D and resolution dR3D
						4th dim: different data types (usually 2: velocity/density, Br/Bt
						5th dim: # members in a (time-dependent) sequence
 OPTIONAL INPUT PARAMETERS:
	sequence=sequence
					array[ntim]; type: time structure of float; default: none
						if specified, these are the times corresponding to the
						ntime data arrays specified in argument F3D.
	T=T				array; type: time structure or float
						times at which time series is evaluated. A float array
						is interpreted as an array of Carrington times. If T is
						not set then the times are set up using the 'range' and
						'ut' keywords.
	range=range		array[2]; type: float; default: XC3D[*,0]
						(NOT used if explicit times are specified using the T
						keyword) the Carrington range (start and end Carrington
						variable of time series to be extracted)
	ut=ut			scalar; type: integer
					array[1]; type: time structure
						(NOT used if explicit times are specified using the T
						keyword). Defines the time (UT) used to center the time
						series. A scalar is interpreted as the difference
						between local time and UT, and is used to get a UT from
						the system time. The time series corresponds to
						UT +/- half a the range specified in keyword 'range'.
	delt=delt		scalar; type: float
						time steps in time series (days)
						if not specified then the time step is determined from
						the resolution in Carrington variable of F3D
	radius=radius

	body=body		scalar; type: string
						usually set to return value of function jpl_body.
						if SET then the JPL ephemeris is used to calculate the
						heliospheric locations where the time series is extracted.
						if NOT set then function big_eph is used to extract
						a time series at Earth (i.e. NOT setting 'body' should give the
						save results as setting body=jpl_body(/earth)). 
						Note the keyword /nearL1 only makes sense if body=jpl_body(/earth)

	/nearL1			indicates whether time series is for spacecraft at L1;
					if set the heliocentric distance calculated from
					big_eph is multiplied with 0.99)

	power=power		array[ntype] or array[ntype,ntime]
						power of heliocentric distance to be removed from the time series
						(0 for velocity, 2 for normalized density;
						 2 for radial component of the magnetic field; 1 for tangential component)
 OUTPUTS:
	F				array[*]; float
						the function values for the time series
 OPTIONAL OUTPUT PARAMETERS:
	T				array[*]; time structure
						times at which function values where calculated
						1st and last time correspond to the selected time range
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
 CALLS: ***
	BadValue, CarringtonT, CarringtonVar, InitVar, InterpolateHeliosphere, IsTime
	IsType, MEAN, SuperArray, TimeInterpol, TimeOp, TimeUnit, arg_time, big_eph, gridgen
	jpl_body
 CALLED BY:
	vu_insitu, vu_synopticmap
 PROCEDURE:
 >	The time associated with a given Carrington variable is the time at which the
	corresponding heliographic longitude crossed the center of the solar disk.
 >	The times (or equivalent Carrington variables) to be extracted can be set in several ways:
	1. Explicitly set the times array T
	2. Set 'range' to a two-element array with start and end time or Carrington variable.
		Not setting 'range' is the same as setting 'range' to XC3D
	3. Setting 'range' to a scalar fraction of a rotation is the same as setting
		range = mean(XC3D)+0.5*range*[-1,1], i.e. range=0.5 picks one rotation centered
		on the mean of XC3D.
 > Setting 'ut' shifts 'range' and centers it on 'ut'
 > A time array with the specified step size is set up, and converted to an array of
	Carrington variable. The function values are obtained by interpolating on the 3D matrix.

 > The heliocentric distance by default is the Sun-Earth distance. This can be modified
	using the 'radius' and 'nearL1' keywords. 'radius' can be used to explicitly
	set the distance (usually this will be a scalar). Setting /nearL1 multiplies
	the heliocentric Sun-Earth distance with 0.99.

 MODIFICATION HISTORY:
	OCT-1999, Paul Hick (UCSD/CASS)
	MAY-2001, Paul Hick (UCSD/CASS
		added /nearL1 keyword)
	APR-2004, Paul Hick (UCSD/CASS)
		activated keyword 'body' to enable use of JPL ephemeris.
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Replaced jp_eph by big_eph and made keyword body a string.
	    This allows access to all bodies in the list returned by
	    the function big_body()


vu_type_insitu $SSW/smei/ucsd/sat/idl/util/vupack/vu_type_insitu.pro
[Previous] [Next]
 NAME:
	vu_type_insitu
 PURPOSE:
	Sets up a structure with plot information
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	FUNCTION vu_type_insitu, display,	$

		density 	= density		, $
		speed		= speed 		, $
		bradial 	= bradial		, $
		btang		= btang 		, $
		bnorm		= bnorm 		, $
		brtmag		= brtmag		, $
		bmag		= bmag			, $
		pdynamic	= pdynamic		, $
		
		hdr 		= hdr			, $
		type		= type			, $
		ymin		= ymin			, $
		ymax		= ymax			, $
		breakval	= BreakVal		, $
		xysize		= xysize		, $
		add2label	= add2label 	, $
		charsize	= charsize		, $
		thick		= thick 		, $
		delay		= delay 		, $
		ctable		= ctable		, $
		data_type	= data_type
 INPUTS:
	display				scalar; type: string; default: 'earth_insitu'
							identifies the type of map to be made. Valid values
							are: 'earth_insitu','synoptic'
 OPTIONAL INPUT PARAMETERS:
	/density, /speed, /bradial, /btang, /bnorm, /brtmag, /bmag, /pdynamic
							identifies which type of data will be used to make
							the plot. More than one of these can be set.
	hdr=hdr				array[*]; type: structure
							headers from nv3d* or wson* files (used only to pick
							a data type.
	type=type			array[n]; type: structure
							used to initialize the 'type' structure
							(one structure for each data type selected).

	data_type=data_type array[8]; type: integer
							0: corresponding data type is not processed
							1: corresponding data type is processed

	All the following keywords are use to override default values:

	ymin=ymin			scalar; type: float
	ymax=ymax			scalar; type: float
							sets min and max. value used in plot of time series
							(one for each data type selected).

	breakval=BreakVal	array[*]; type: float
							contour levels for synoptic map
	xysize=xysize		array[1] or array[2]; type: integer
							size of plot window
	charsize=charsize	scalar; type: float
	thick=thick			scalar; type: float
							correspond to standard IDL keywords

	delay				scalar; type: float; default: 0
						array[1]; type: time difference structure
							time difference for fore- and aftcasts in hours or
							as a difference structure (positive for forecasts)
 OUTPUTS:
	type				array[n]; type: structure
							see vu_insitu_type__define
							n is the number of data types selected (i.e. the
							number of keywords in /density, /speed, /bradial,
							/btang set).
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
	@vu_fnc_include.pro 				;
 CALLS: ***
	BadValue, InitVar, IsType, SubArray, destroyvar, vu_fnc, vu_prefix
 EXTERNAL:
	vu_insitu_type__define
 CALLED BY:
	vu_RemoteView, vu_insitu, vu_movie, vu_planarcut, vu_solardisk, vu_synopticmap
	vu_vox_write, vu_whatis
 PROCEDURE:
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	JUL-2002, Paul Hick (UCSD/CASS)
		Rearranged processing of xysize keyword to allow explicit setting
		of both horizontal and vertical window sizes independently.
	SEP-2002, Paul Hick (UCSD/CASS)
		Added 'delay' keyword, Added 'earth_corr' keyword
	SEP-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Some reorganization; also added /pdynamic


vu_type_skymap $SSW/smei/ucsd/sat/idl/util/vupack/vu_type_skymap.pro
[Previous] [Next]
 NAME:
	vu_type_skymap
 PURPOSE:
	Sets up a structure passed to vu_earthskymap
 CATEGORY:
 CALLING SEQUENCE:
	FUNCTION vu_type_skymap, display	, $
		ips_speed		= ips_speed 	, $
		ips_glevel		= ips_glevel	, $
		brightness		= brightness	, $
		pb				= pb			, $
		column_density	= column_density, $
		rotation_measure= rotation_measure, $

		hdr 	= hdr		, $
		type	= type		, $
		ymin	= Fmin		, $
		ymax	= Fmax		, $
		breakval= BreakVal	, $
		xysize	= xysize	, $
		ysize	= ysize 	, $
		charsize= charsize	, $
		thick	= thick 	, $
		add2label= add2label, $
		hammer	= hammer	, $
		ctable	= ctable
 INPUTS:
	display				scalar; type: string; default: 'earth_skysnap'
							identifies the type of map to be made. Valid values are:
							'earth_skysnap', 'earth_skysweep'
 OPTIONAL INPUT PARAMETERS:
	/ips_speed, /ips_glevel, /brightness, /pb, /column_density, /rotation_measure
						one (and only one) of these MUST be set.
							identifies which type of data will be used to make the map
							if none are set then an empty structure is returned
	hdr=hdr				array[*]; type: structure
							headers from nv3d* or wson* files. Used only to pick a data type
							if none of keywords /density, /speed, /bradial, /btang is set.
	type=type			array[1]; type: structure
							used to initialize the structure.

	All the following keywords are use to override default values:

	fmin=Fmin			scalar; type: float
	fmax=Fmax			scalar; type: float
							sets min and max. value used in plot of time series
	breakval=BreakVal	array[*]; type: float
							contour levels for synoptic map
	xysize=xysize		array[1] or array[2]; type: integer
							size of plot window
	charsize=charsize	scalar; type: float
	thick=thick			scalar; type: float
							correspond to standard IDL keywords

 OUTPUTS:
	type				array[1]; type: structure
							see vu_skymap_type__define
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
	@vu_fnc_include.pro 				;
 CALLS: ***
	BadValue, InitVar, IsType, gridgen, vu_fnc, vu_prefix
 EXTERNAL:
	vu_skymap_type__define
 CALLED BY:
	vu_earthskymap, vu_movie
 PROCEDURE:
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	SEP-2001, Paul Hick (UCSD/CASS)
		Improved processing of input keyword 'type'
	OCT-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added column density.


vu_update_hours $SSW/smei/ucsd/sat/idl/util/vupack/vu_update_hours.pro
[Previous] [Next]
 NAME:
	vu_update_hours
 PURPOSE:
	Update the set of available final tomography files
	(usually called when a new raw tomography files has been created)
 CATEGORY:
	WWW
 CALLING SEQUENCE:
	vu_update_hours, kind, nday=nday
 INPUTS:
	kind			scalar; type: string; default: 'slow'
						'slow' or 'fast'
 OPTIONAL INPUT PARAMETERS:
	filter=filter	scalar; type: string; default: 'nv3d'
						type of tomography files ('nv3d' or 'wson')
						(*.* is appended if not present yet)
	hour_step		scalar; type: integer; default: 2
						time step between averaged output files in hours
	nday_past=nday_past
					scalar; type: integer; default: 2
	nday_future=nday_future
					scalar; type: integer; default: 2
						final (averaged) files are created up to nday_future days
						after the time of the last raw tomography file

	/gzip			compresses output files with gzip
	/silent			suppresses messages from vu_new_time
	Keywords passed to vu_new_time:

	triangle=triangle
	/setbad
 OUTPUTS:
	(updated and new final tomography files)
 INCLUDE:
	@compile_opt.pro			; On error return to caller
 CALLS: ***
	FILEPATH, InitVar, IsBadTime, TimeGet, TimeOp, TimeSet, TimeUnit, vu_new_time, vu_prefix
	vu_select
 PROCEDURE:
 >	The last raw tomography file is identified by looking for all
	filter+*.* files in directory root = $NAGOYA/kind
	The list of files is sorted, and the last file on the sorted list is
	assumed to be the most recent raw tomography file.
 >	The final (averaged) tomography files are assumed to be located in
		dest = filepath(root=root, subdir='final', '')
 >	First all final (averaged) tomography files that are affected by the new tomography
	file are updated (by overwriting them). Then a number of new final files are
	created by extending the range of final files to at most 3 days beyond the time of
	the new tomography file.
 MODIFICATION HISTORY:
	APR-2000, Paul Hick (UCSD/CASS)
	SEP-2001, Paul Hick (UCSD/CASS)
		The max # of new files was limited to cover nday=nday_past+nday_future days,
		starting from the last final file found in directory 'dest'.
		This prevented automatic recovery from a big gap in the production of raw
		tomography files (as happened in August 2001). Problem was fixed by centering
		the range of 'nday' days on the time of the last raw tomography file found in 'root'.
	SEP-2002, Paul Hick (UCSD/CASS)
		Fixed bug which prevented processing of anything other than 'nv3d' files
	NOV-2003, Paul Hick (UCSD/CASS)
		Added /gzip keyword.
	NOV-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Made sure that the start time for a new sequence of final files
		always starts at a multiple of hour_step hours into the day.


vu_update_marker $SSW/smei/ucsd/sat/idl/util/vupack/vu_update_marker.pro
[Previous] [Next]
 NAME:
	vu_update_marker
 PURPOSE:
	Update set of 'best' tomography files at regular time intervals
	(at the same time cadence used by the Fortran tomography itself)
	by incorporating results of new tomography run.
 CATEGORY:
	Tomography I/O
 CALLING SEQUENCE:
	vu_update_marker, prefix
 INPUTS:
	prefix		scalar; type: character; default: 'nv3d'
					file name prefix for data files
					(typical values are 'nv3d','nv3f','wson','nson'
 OPTIONAL INPUTS:
	/silent		suppresses messages from vu_write
	/gzip		compresses output files with gzip (passed to vu_write)
 OUTPUTS:
	(written to new tomography data files)
 INCLUDE:
	@compile_opt.pro				; On error, return to caller
 CALLS: ***
	CarringtonVar, FILEPATH, FORECAST_CFG, InitVar, TimeOp, TimeString, TimeUnit, hide_env
	vu_mean, vu_prefix, vu_select, vu_set, vu_write
 PROCEDURE:
 >	Input files are picked up from directory $NAGOYA/fast/raw
	Output files are written to $NAGOYA/fast/final

 >	The procedure is run after a new time-dependent forecast has been
	made. All output files from the last tomography (one for each time)
	are integrated with the averages from results from previous runs
	including the same times.

 >	vu_select is called with keywords /marker and /nohdr set, i.e.
	only files with a rotation counter are picked up, and the file names
	are returned without actually reading the headers.
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	NOV-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added /gzip keyword.


vu_vox_drawelatitude $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_drawelatitude.pro
[Previous] [Next]
 NAME:
	vu_vox_drawelatitude
 PURPOSE:
	Internal use by vu_vox_showeclipgrid only
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CV_COORD, CvSky, gridgen
 CALLED BY:
	vu_vox_showeclipgrid
 MODIFICATION HISTORY:
	JUL-2002, Cindy Wang


vu_vox_drawelongitude $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_drawelongitude.pro
[Previous] [Next]
 NAME:
	vu_vox_drawelongitude
 PURPOSE:
	Internal use by vu_vox_showeclipgrid only
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CV_COORD, CvSky, gridgen
 CALLED BY:
	vu_vox_showeclipgrid
 MODIFICATION HISTORY:
	JUL-2002,Cindy Wang xin_wang02@hotmail.com


vu_vox_drawhcs $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_drawhcs.pro
[Previous] [Next]
 NAME:
	vu_vox_drawhcs
 PURPOSE:
	Internal use by vu_vox
 CATEGORY:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	ArrayLocation
 CALLED BY:
	vu_vox_write
 MODIFICATION HISTORY:
	SEP-2001, Kevin Nguyen, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_vox_drawhlatitude $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_drawhlatitude.pro
[Previous] [Next]
 NAME:
	vu_vox_drawhlatitude
 PURPOSE:
	Internal use by vu_vox_showheliogrid only
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	CV_COORD, gridgen
 CALLED BY:
	vu_vox_showheliogrid
 MODIFICATION HISTORY:
	JUL-2002, Cindy Wang xin_wang02@hotmail.com


vu_vox_drawhlongitude $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_drawhlongitude.pro
[Previous] [Next]
 NAME:
	vu_vox_drawhlongitude
 PURPOSE:
	Internal use by vu_vox_showheliogrid only
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CV_COORD, gridgen
 CALLED BY:
	vu_vox_showheliogrid
 MODIFICATION HISTORY:
	JUL-2002, Cindy Wang


vu_vox_draworbit $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_draworbit.pro
[Previous] [Next]
 NAME:
	vu_vox_draworbit
 PURPOSE:
	Internal use by vu_vox only
 CALLING SEQUENCE:
	FUNCTION vu_vox_draworbit, F, ut, hdr, zero_lng, cntr, dvox, obj_val
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CV_COORD, CvSky, TimeOp, TimeSet, big_eph, gridgen, jpl_body
 CALLED BY:
	vu_vox_write
 MODIFICATION HISTORY:
	SEP-2001, Kevin Nguyen, Paul Hick (UCSD/CASS)
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Replaced NewcombSun by big_eph


vu_vox_drawsphere $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_drawsphere.pro
[Previous] [Next]
 NAME:
	vu_vox_drawsphere
 PURPOSE:
	Internal use by vu_vox only
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro			; On error, return to callers
 CALLS: ***
	InitVar, gridgen
 CALLED BY:
	vu_vox_write
 MODIFICATION HISTORY:
	SEP-2001, Kevin Nguyen, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_vox_read $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_read.pro
[Previous] [Next]
 NAME:
	vu_vox_read
 PURPOSE:
	Read binary file used for Volume Pro board
 CATEGORY:
	I/O
 CALLING SEQUENCE:
	count = vu_vox_read(files, volume=volume)
 INPUTS:
	files		array; type: string
				list of vox file names
				If not specified then the IDL pickfile
				dialog is called
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
	count		scalar; type: integer
				# volumes
	volume		array[count]; type: pointer
				volume data
 OPTIONAL OUTPUTS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	InitVar, IsType, TimeSplit, flt_string, vox_read
 PROCEDURE:
 MODIFICATION HISTORY:
	JUL-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_vox_sequence $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_sequence.pro
[Previous] [Next]
 NAME:
	vu_vox_sequence
 PURPOSE:
	Processes group of t3d files for Volume Pro board
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	PRO vu_vox_sequence, hdr, ff, _extra=_extra
 INPUTS:
	hdr				array[k]; type: structure
						information about the tomographic reconstruction
						(single file or time-dependent sequence)
						if 'hdr' does not exist, then user is prompted for
						a data file using the 'pickfile' dialog.
	ff				array[n,m,l,k,2]; type: float
						3D volume data associated with 'hdr'
						if not present then the files
						specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	All keywords of vu_vox_write are permitted.
 OUTPUTS:
	(vox files, one voxlist file)
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	GetFileSpec, vu_vox_write
 CALLED BY:
	qvox
 RESTRICTIONS:
	M. Bailey's Volume Explorer program vx.exe must be located in
	%SWW_SMEI%\win\exe
 PROCEDURE:
 MODIFICATION HISTORY:
	JUL-2001, Paul Hick (UCSD/CASS)
	NOV-2005, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Substantial rewrite. Instead of creating a DOS batch file
		to run the vx.exe program with a list of input files on the
		command line, now an ASCII file *.voxlist is created with
		the names of all the vox files in it. The list files is written
		into the same directory as the vox files themselves.


vu_vox_showeclipgrid $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_showeclipgrid.pro
[Previous] [Next]
 NAME:
	vu_vox_showeclipgrid
 PURPOSE:
	Internal use by vu_vox only
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	vu_vox_drawelatitude, vu_vox_drawelongitude
 CALLED BY:
	vu_vox_write
 MODIFICATION HISTORY:
	JUL-2002, Cindy Wang


vu_vox_showheliogrid $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_showheliogrid.pro
[Previous] [Next]
 NAME:
	vu_vox_showheliogrid
 PURPOSE:
	Internal use by vu_vox only
 CATEGORY:
	Volume Pro board
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	vu_vox_drawhlatitude, vu_vox_drawhlongitude
 CALLED BY:
	vu_vox_write
 MODIFICATION HISTORY:
	JUL-2002, Cindy Wang  xin_wang02@hotmail.com


vu_vox_write $SSW/smei/ucsd/sat/idl/util/vupack/vu_vox_write.pro
[Previous] [Next]
 NAME:
	vu_vox_write
 PURPOSE:
	Convert ascii t3d file to vox file for Volume Pro board
 CATEGORY:
	sat/idl/util/vupack
 CALLING SEQUENCE:
	PRO vu_vox_write, hdr, ff,		$
		destination = destination	, $
		speed		= speed 		, $
		density 	= density		, $
		brad		= brad			, $
		btang		= btang 		, $
		ndim		= ndim			, $
		range		= range 		, $
		lngrange	= lngrange		, $
		latrange	= latrange		, $
		fix_sun 	= fix_sun		, $
		fix_earth	= fix_earth 	, $
		fix_stars	= fix_stars 	, $
		 _extra 	= _extra		, $
		show_sun	= show_sun		, $
		show_earth	= show_earth	, $
		show_orbit	= show_orbit	, $
		show_heliogrid = show_heliogrid, $
		show_eclipgrid = show_eclipgrid, $
		show_hcs	= show_hcs		, $
		obj_val 	= obj_val		, $
		nodata		= nodata		, $
		hdr_bb		= hdr_bb		, $
		bb			= bb			, $
		nearest 	= nearest		, $
		vox_files	= vox_files 	, $
		silent		= silent		, $
		bb_filter	= bb_filter
 INPUTS:
	hdr				array[1]; type: structure
						information about the tomographic reconstruction.
						if 'hdr' does not exist, then user is prompted for
						a data file using the 'pickfile' dialog.
	ff				array[n,m,l,2]; type: float
						3D volume data; if not present then the files
						specified in the 'hdr' argument are read.
 OPTIONAL INPUT PARAMETERS:
	ndim=ndim		scalar; type: integer; default: 128
						resolution of the binary file stored in the vox file
						(128 or 256)
	range=range		scalar or array[2]; type: float; default=[0.0,1.5]
						range of radial distances (AU) written to binary file.
						Only the part of the array inside range[0],range[1] is
						extracted and stored in the vox file.
	lngrange=lngrange scalar or array[2];type;integer;default = [-180,180]
					  range of longitudes will be passed as a parameter to
					  functions of the show_heliogrid and show_eclipgrid
	latrange=latrange scarlar or array[2];type;integer;default = [-90,90]
					  range of latitudes will be passed as a parameter to
					  functions of the show_heliogrid and show_eclipgrid

	By default the start of the region of interest of a matrix is put along
	the x-axis in the vox volume. For an animated sequence of vox files it is
	important to set one of the following three keywords.

	/fix_sun		makes the x-y-z coordinates of the vox file coincide with
					heliographic coordinates (i.e. heliographic longitude zero
					is put along the x-axis)
	/fix_stars		puts the heliographic longitude of the equinox (ecliptic
					longitude zero, ecliptic latitude zero) on the x-axis
					(i.e. uses a sidereal coordinate frame)
	/fix_earth		puts the Sun-Earth direction along the x-axis

	/speed			if set, processes the velocity data
					This is the default if neither /speed or /density are set.
	/density		if set, processes the density data
	/bradial		if set, process radial magnetic field
	/btang			if set, process tangential magnetic field

	destination=destination
					scalar; type: string; default: same directory as t3d file
					Destination directory

	Keywords for merging objects with volume data:

	/show_sun		show Sun at center of vox volume
	/show_earth		show Earth
	/show_orbit		show Earth's orbit
	/show_heliogrid show longitudes and latitudes in heliographic coordinates
	/show_eclipgrid show longitudes and latitudes in ecliptic coordinates
	/show_hcs		try to add current sheet

	hdr_bb=hdr_bb, bb=bb
					as an alternative to setting /show_hcs headers
					and volume data for the magnetic field can be specified
					directly using these two keywords.

	obj_val=obj_val	scalar; type: real; default: 1.1 x max value in volume data
					Function values used to mark objects added to vox volume
					with show_* keywords. The units are the same as used for
					the volume data (e.g. km/s for velocity, cm^-3 for number
					densities, etc.)

	/nodata			if set, the volume data are suppressed (by muliplying with
					zero). (useful for showing merged objects only)

	Additional keywords:

	Keywords passed to vu_getdata are explained there.

	Keywords passed to vox_write are explained there.
	The most important ones are.

	minf=minf		these three keywords are used in vox_write to convert
	maxf=maxf		the volume data scale to byte (they are used as arguments
	topb=topb		to the idl 'bytscl' function).

 OUTPUTS:
	(*.vox file)
 OPTIONAL OUTPUTS:
	vox_files=vox_files	array; type: string
				list of file names of all vox files created
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	AngleRange, BadValue, CV_COORD, CarringtonVar, CvSky, FILEPATH, GetFileSpec, InitVar
	IsType, PutFileSpec, SetFileSpec, TimeOp, TimeSet, TimeString, TimeUnit, big_eph, boost
	destroyvar, gridgen, jpl_body, vox_write, vu_fnc, vu_get, vu_getdata, vu_prefix
	vu_select, vu_type_insitu, vu_vox_drawhcs, vu_vox_draworbit, vu_vox_drawsphere
	vu_vox_showeclipgrid, vu_vox_showheliogrid
 CALLED BY:
	vu_vox_sequence
 PROCEDURE:
 >	When processing a time sequence of tomography files one of the keywords
	/fix_sun, /fix_earth or /fix_stars should be set, to control the
	heliographic longitude that is put along the x-axis in the vox volume.
	Also the minf, maxf and topb keywords should be used to make sure that the
	same color scale is used for each of the images.

 >	The name of the vox file is based on the name of the t3d file
	e.g.  t3d_1962.345 will be output as t3d_1962_345.vox

	The selected density or velocity matrix is used to calculate
	function values on a Cartesian grid by linear interpolation.
 MODIFICATION HISTORY:
	JAN-2001, Paul Hick (UCSD/CASS)
	SEP-2001, Kevin Nguyen, Paul Hick (UCSD/CASS)
		Added options to merge objects (Sun, Earth, Earth's orbit)
		Added option to add current sheet
	JUL-2002, Cindy Wang
		Added options to show grid in heliographic coordination
		Added options to show grid in ecliptic coordination
	JUN-2003, Paul Hick (UCSD/CASS)
		Added postfix to name of output vox file, depending on type
		of data (density, speed, etc.).
	OCT-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Replaced NewcombSun by big_eph


vu_weight $SSW/smei/ucsd/sat/idl/util/vupack/vu_weight.pro
[Previous] [Next]
 NAME:
	vu_weight
 PURPOSE:
	Set weight to be used by vu_mean to get weighted mean
	of 3D tomography data
 CATEGORY:
	Tomography
 CALLING SEQUENCE:
	ww = vu_weight(t0, tt, triangle=triangle)
 INPUTS:
	t0				array[1]; type: double
						time origin as Carrington variable
	tt				array[*]; type: double
						times for which weight factors are needed
						(as Carrington variable)
 OPTIONAL INPUT PARAMETERS:
	triangle		array[4]; type: double
						parameters defining weight function
 OUTPUTS:
	ww				array[*]; type: double
						weight factors
 INCLUDE:
	@compile_opt.pro					; On error, return to caller
 CALLS: ***
	IsType, TimeOp, TimeSet, TimeUnit
 CALLED BY:
	vu_new_time
 PROCEDURE:
	Units in triangle are fraction of Carrington rotation
		triangle[0]: position of top of triangle
		triangle[1]: left corner of triangle
		triangle[2]: right corner of triangle
		triangle[3]; weight at top of triangle
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_whatis $SSW/smei/ucsd/sat/idl/util/vupack/vu_whatis.pro
[Previous] [Next]
 NAME:
	vu_whatis
 PURPOSE:
	Summary of tomography file
 CATEGORY:
 CALLING SEQUENCE:
	vu_whatis, hdr, ff
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE
	@compile_opt.pro							; On error, return to caller
 CALLS: ***
	CarringtonVar, InitVar, TimeOp, TimeString, TimeUnit, WhatIs, arg_time, qBar, vu_fnc
	vu_get, vu_getdata, vu_is_sequence, vu_type_insitu
 PROCEDURE:
 MODIFICATION HISTORY:
	APR-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


vu_write $SSW/smei/ucsd/sat/idl/util/vupack/vu_write.pro
[Previous] [Next]
 NAME:
	vu_write
 PURPOSE:
	Write tomography t3d* or b3d* file
 CATEGORY:
	Tomography: I/O
 CALLING SEQUENCE:
	vu_write, in_hdr, in_ff, userinfo=userinfo, destination=destination
 INPUTS:
	in_hdr
	in_ff
 OPTIONAL INPUT PARAMETERS:
	destination=destination
			scalar; type: string
				destination directory for output file
	/gzip	compresses output files with gzip
	userinfo
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	FILEPATH, GetFileSpec, InitVar, IsType, TimeString, TimeSystem, TimeUnit, do_file
	gzip_file, hide_env, vu_filename, vu_get
 CALLED BY:
	vu_RemoteView, vu_new_time, vu_update_marker
 SIDE EFFECTS:
 RESTRICTIONS:
 EXAMPLE:
 PROCEDURE:
	The file name specified in in_hdr.file is ignored (usually it is a blank
	string anyway). The filename is build from the destination keywords in
	combination with the time hdr.time, hdr.marker and hdr.prefix
 MODIFICATION HISTORY:
	MAR-2001, Paul Hick (UCSD/CASS)
	JUL-2002, Paul Hick (UCSD/CASS)
		V1.03; added nl, nlos, dlos and binx
	NOV-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
		Added /gzip keyword.
		Also added a trick to avoid having two tomography files for the same
		time present in the directory while the new file is being written.