[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)
[Previous]
[Next]
NAME:
view
PURPOSE:
Display 2D bitmap array. Display if running X-windows.
CATEGORY:
Imaging
CALLING SEQUENCE:
PRO view, $
input_image = input_image, $
output_image = output_image, $
new_window = new_window, $
log_scale = log_scale, $
stretch_image = stretch_image,$
truecolorimage = TrueColorImage,$
rgbplane = RGBPlane, $
tl = tl, $
trtr= tr, $
br = br, $
bl = bl, $
center = center,$
cl = cl, $
tc = tc, $
cr = cr, $
bc = bc, $
levels = levels, $
covered=covered, $
_extra = _extra
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
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
InitVar, IsDisplay, IsType, img_read, twin
CALLED BY:
TMO_tracksky, even_light, qView_Wall, show_wso, smei_star_fit, smei_star_standard
stardistance
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)
[Previous]
[Next]
NAME:
vox_read
PURPOSE:
Read a vox file for use with the Volume Pro board
CATEGORY:
I/O
CALLING SEQUENCE:
FUNCTION vox_read, InFile , $
count = count , $
minf = minf , $
maxf = maxf , $
topb = topb , $
version = version , $
copyright = copyright , $
vol_size = vol_size , $
vox_size = vox_size , $
vol_name = vol_name , $
gen_comments= gen_comments, $
vol_comments= vol_comments, $
errormessage= errormessage, $
silent = silent
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)
[Previous]
[Next]
NAME:
vox_update
PROCEDURE:
Updates collection of vox files in IPS forecast
INPUTS:
list scalar; type: string
list of nv3d and wson files to process
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
FILEPATH, destroyvar, hide_env, strposn, txt_read, vu_header, vu_prefix, vu_vox_write
MODIFICATION HISTORY:
JUN-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
vox_write
PURPOSE:
Write a vox file for use with the Volume Pro board
CATEGORY:
I/O
CALLING SEQUENCE:
PRO vox_write, Filename, Volume, $
_extra =_extra , $
minf = minf , $
maxf = maxf , $
topb = topb , $
volumename = VolumeName, $
copyright = Copyright , $
general_comments= General_Comments, $
volume_comments = Volume_Comments , $
silent = silent
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, 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
[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)
/is_carrington passed to InterpolateHeliosphere
/cv2carrington 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, Carrington, InterpolateHeliosphere, IsType, SubArray, SuperArray, SyncDims
TimeInterpol, TimeOp, TimeUnit
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)
[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)
[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)
[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)
[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, $
hdr_bb = hdr_bb , $
bb = bb , $
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 , $
wavelength = wavelength , $
filter_bb = filter_bb
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 Carrington 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'
Four parameters define the grid used to calculate the sky map (see PROCEDURE).
These are passed to EarthSky3DLoc and EarthTransit3DLoc:
nRA = nRA scalar; type: int; default: 72
# points in skymap in longitudinal direction
(either right ascension or ecliptic longitude)
nDE = nDE scalar; type: int; default: 36
# points in skymap in latitudinal direction
(either declination or ecliptic latitude)
nRR = nRR scalar; type: int; default: 20
# steps along lines of sight at each point in the sky
dRR = dRR scalar; type: float; default: 0.1 AU
step size along line of sight (AU)
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
/rotationmeasure Faraday rotation measure
type=type array[1]; type: structure
wavelength=wavelength
scalar; type: any; default: none
radio wavelength in meters (used only for Faraday
rotation maps to convert the rotation measure
(in degrees/m^2) to rotation (degrees).
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: ***
Carrington, EarthSky3DLoc, EarthTransit3DLoc, FILEPATH, GetFileSpec, IPS_params
InitVar, IntegrateLOS, IsType, PlotEarthSkymap, Reset_Colors, STRETCH, SetFileSpec
SuperArray, ThomsonRadialFilter, ThomsonUBVConst, TimeGet, TimeUnit, set_page
vu_fnc, vu_get, vu_get_page, vu_getdata, vu_gettime, vu_point_source, vu_prefix
vu_select, vu_type_skymap
CALLED BY:
forecast, vu_localskymap, vu_movie, vu_nagoyasourcemap
PROCEDURE:
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)
Added keyword zero_shift.
JUN-2007, Paul Hick (UCSD/CASS)
Added keyword wavelength
SEP-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Bugfix. Added filter_bb as keyword.
[Previous]
[Next]
NAME:
vu_extract
PURPOSE:
Interpolate data in region of interest for points
specified in any one of the reference frames
supported by CvSky
CATEGORY:
sat/idl/util/vupack
CALLING SEQUENCE:
FUNCTION vu_extract, hdr, ff , $
speed = speed , $
density = density , $
brad = brad , $
btang = btang , $
rr = rr , $
ndim = ndim , $
range = range , $
grid = grid , $
coord1 = coord1 , $
coord2 = coord2 , $
coord3 = coord3 , $
rectangular = rectangular , $
degrees = degrees , $
write = write , $
format = format , $
destination = destination , $
outfiles = outfiles , $
silent = silent , $
_extra = _extra
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:
/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
The reference frame is selected using one of the from_* keywords
of CvSky (e.g. if /from_ihg is set then all coordinates are
assumed to be IHG coordinates.
/degrees if set, then all angles are in degrees (default: radians)
/rectangular if set, then input coordinates are assumed to be
in rectangular coordinates (default: spherical
coordinates).
The data points can be specified explicitly using the keyword "rr"
rr = rr array[3,*]; type: float; default: none
Points specified in spherical or rectangular
coordinates, depending on setting of /rectangular:
If /rectangular NOT set:
rr[0,*]: longitudes
rr]1,*]: latitudes
rr[2,*]; heliocentric distances (AU)
If /rectangular SET:
rr[0,*]: x-coordinates (AU)
rr[1,*]: y-coordinates (AU)
rr[2,*]: z-coordinates (AU)
Alternatively use keywords range and ndim, to set up
an equally spaced spherical or rectangular grid.
ndim = ndim scalar; array[3]; type: integer
grid resolution for three spatial dimensions
/rectangular NOT set: default: [72,36,31]
/rectangular SET : default: [31,31,31]
range = range array[2,3]; ranges for the three spatial dimensions
Angles are in units set by keyword /degrees;
distances are in AU.
/rectangular NOT set:
longitude (default: [0,360])
latitude (default: [-90,90])
heliocentric distance (default: [0,3]
/rectangular SET:
rectangular x,y,z coordinates
(default: [0,3] AU for all three coordinates)
The three spatial dimensions can be specified separately
using the keywords coord1, coord2, coord3. When used, all
three keyword must be specified.
coord1 = coord1 scalar or array[n1]; type: float
x-coordinates or longitudes of points
coord2 = coord2 scalar or array[n2]; type: float
y-coordinate of latitudes of points
coord3 = coord3 scalar or array[n2]; type: float
z-coordinates or heliocentric distances
of points
If /rectangular is SET then rectangular
(x,y,z) coordinates are assumed. If NOT set
the spherical (longitude, latitude,
heliocentric distance) coordinates are
assumed.
If /grid is SET then coord1,coord2,coord3 are
assumed to be linear grids (not necessarily
equally spaced) for the three spatial
coordinates. In this case keyword "ndim" is
ignored. If NOT set then they are assumed
to be ranges (start and end values), and
"ndim" specifies the number of grid points
in each dimension.
coord1,coord2 and coord3 are combined into
3D-grid of size [n1,n2,n3]
/write If set, then write function values into
ascii files.
destination = destination
scalar; type: string; default: same
directory as tomography file
Destination directory for output files.
Only used if /write is set
Additional keywords:
Keywords passed to vu_getdata are explained there.
/from_* keywords are passed to CvSky.
OUTPUTS:
rr = rr array[3,*]; type: float
grid for which function values are returned.
This is returned in the coordinate system
implied by the selected from_* keyword to CvSky.
OPTIONAL OUTPUTS:
outfiles=outfiles array; type: string
list of file names of all files created
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
AngleRange, CV_COORD, Carrington, CvSky, FILEPATH, GetFileSpec, InitVar, IsType
PutFileSpec, SetFileSpec, SuperArray, TimeGet, ToDegrees, boost, destroyvar, gridgen
hide_env, vu_fnc, vu_get, vu_getdata, vu_type_insitu
EXAMPLE:
gg = vu_extract(hdr,ff,coord1=[0,360],coord2=[-90,90], $
coord3=1.0,ndim=[360,180],/degrees,/from_ihg,/density)
returns a float array of size [360,180,1] for the density
at 1 AU for a 1-degree grid in IHG coordinates.
PROCEDURE:
> The name of the output file is based on the name of the
tomography file, e.g. t3d_1962.345 will be output as
t3d_1962_345.out
The selected matrix is used to calculate function values
by linear interpolation.
MODIFICATION HISTORY:
JUN-2008, Paul Hick (UCSD/CASS)
[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: ***
Carrington, FILEPATH, InitVar, IsType, vu_prefix
CALLED BY:
vu_write
PROCEDURE:
MODIFICATION HISTORY:
SEP-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[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 , $
all = all
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:
PlotEarthSkymap, vu_earthskymap, vu_extract, vu_insitu, vu_insitu_type__define
vu_insitucurve, vu_planarcut, vu_remoteview, 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)
[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)
[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:
forecast, qRemoteView_Pick, qvu_draw, qvu_pick, vu_cvgrid, vu_earthskymap
vu_extract, 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_remoteview
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:
[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 , $
notwin = notwin
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: ***
Carrington, CheckDir, FILEPATH, GetFileSpec, InitVar, IsType, Reset_Colors, STRETCH
SetFileSpec, TimeGet, TimeUnit, boost, do_file, get_page, hide_env
CALLED BY:
vu_earthskymap, vu_insitu, vu_planarcut, vu_remoteview, 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
[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: ***
Carrington, FILEPATH, GetFileSpec, InitVar, IsType, SetFileSpec, TimeGet, TimeOp
TimeUnit, destroyvar, vu_get, vu_read, vu_select
CALLED BY:
qvu_pick, vu_earthskymap, vu_extract, vu_insitu, vu_localskymap, vu_planarcut
vu_remoteview, vu_solardisk, vu_synopticmap, vu_vox_write, vu_whatis
PROCEDURE:
ut can be a Carrington variable or a time structure. Use Carrington 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.
[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: ***
Carrington, InitVar, IsTime, IsType, TimeInterpol, TimeOp, TimeUnit, vu_get, vu_mean
EXTERNAL:
vu_header__define
CALLED BY:
forecast, qvu_draw, vu_earthskymap, vu_insitu_raw, vu_planarcut, vu_remoteview
vu_solardisk, vu_synopticmap
PROCEDURE:
ut can be a Carrington variable or a time structure.
Use Carrington to settle on either one of these.
MODIFICATION HISTORY:
JUL-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu
[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, TimeSet, TimeUnit, destroyvar
flt_read, flt_string, hide_env, vu_set_time_entry
EXTERNAL:
vu_header__define
CALLED BY:
vox_update, 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
[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)
V1.03; added nl, nlos, dlos and binx
SEP-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
V1.04; added prefix
[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: ***
Carrington, CheckDir, FILEPATH, GetFileSpec, InitVar, IsDisplay, IsType, Reset_Colors
STRETCH, SetFileSpec, TimeGet, TimeUnit, do_file, get_page
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)
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.
[Previous]
[Next]
NAME:
vu_insitu
PURPOSE:
Produces a plot, comparing a time series from a tomographic reconstruction
and insitu observations from instrument 'source'.
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 , $
source = source , $
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 Carrington 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):
source=source 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 'source'
For keywords controlling plot layout see vu_type_insitu.
ascii_file=ascii_file
scalar; type: string
name of file used to write timeseries data in ascii
If ascii_file='terminal" output is written to terminal.
OUTPUTS:
(graphics)
INCLUDE:
@compile_opt.pro ; On error, return to caller
@vu_fnc_include.pro ;
CALLS: ***
BadValue, Carrington, InitVar, InsituTimeSeries, Instrument, IsTime, IsType
Reset_Colors, SetFileSpec, TimeGet, TimeOp, TimeSet, TimeUnit, UNIQ, big_body
destroyvar, gridgen, hide_env, jpl_body, set_page, vu_fnc, vu_get, vu_get_page
vu_getdata, vu_insitucurve, vu_is_sequence, vu_prefix, vu_timeseries
vu_type_insitu
CALLED BY:
forecast, 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)
Dropped /earth keyword and associated section of code that
was used to compare time series from nv3d* and ea* files.
FEB-2007, Paul Hick (UCSD/.CASS; pphick@ucsd.edu)
Added option to print to terminal
AUG-2007, George Megally(UCSD/CASS; gmegally@ucsd.edu
Expanded program to include STEREO A/B satellites.
AUG-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Renamed keyword 'from' to 'source' to avoid conflicts
with 'from' keyword 'from' Time* functions
[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, Carrington, InitVar, IsTime, IsType, TimeGet, TimeInterpol, TimeOp, TimeSet
TimeUnit, UNIQ, vu_get, vu_gettime, vu_insitu, vu_select, where_common
CALLED BY:
forecast
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)
[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:
[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 , $
colored = colored
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, Carrington, InitVar, IsTime, IsType, LOADCT, MEAN, PlotCurve, TimeGet
TimeLimits, TimeOp, TimeSet, TimeUnit, TimeXAxis, anicenum, 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.
[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.
[Previous]
[Next]
NAME:
vu_lineofsight
PURPOSE:
CATEGORY:
user/phick/idl
CALLING SEQUENCE:
FUNCTION vu_lineofsight, ff , $
xcgrid = xcgrid , $
xlgrid = xlgrid , $
rrgrid = rrgrid , $
utt = utt , $
ra = ra , $
dec = dec , $
equator = equator , $
nrr = nrr , $
drr = drr , $
degrees = degrees , $
ips_speed = ips_speed , $
ips_glevel = ips_glevel, $
thomson_b = thomson_b , $
thomson_pb = thomson_pb, $
column_density=column_density, $
faraday_rm = faraday_rm, $
betan = betan , $
betar = betar , $
silent = silent , $
_extra = _extra
INPUTS:
ff array[n,m,l,k]; type: float
k=2,3,4 or 5
3D volume data on grid specified in
a spherical coordinate system
ff[*,*,*,0]: solar wind speed (km/s)
ff[*,*,*,1]: normalized density (cm^-3); n x (r/r0)^2
ff[*,*,*,2]: ? Bx (not sure what coordinate frame)
ff[*,*,*,3]: ? By
ff[*,*,*,4]: ? Bz
xcgrid=xcgrid array[n]; longitudinal grid
xlgrid=xlgrid array[m]; latitudinal grid
rrgrid=rrgrid array[l]; radial grid
ra array[*]; ra/ecl long of line(s) of sight
dec array[*]; decl/ecl latituded of line(s) of sight
OPTIONAL INPUT PARAMETERS:
utt=utt array[1]; type: time structure
UT time assigned to volume data ff
nrr=nrr scalar; type: integer
nr of segments along line(s) of sight
drr=drr scalar; type: float
stepsize along line(s) of sight (AU)
/degrees if set, indicates that all angles are in degrees. Default: radians.
/equator if set, ra and dec are assumed to be equatorial
coordinates (default is ecliptic long and latitude)
/ips_speed IPS speed
/ips_glevel IPS g-level
/thomson_b Thomson scattering brightness
/thomson_pb Thomson scattering polarization brightness
OUTPUTS:
(none)
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, IPS_params, InitVar, IntegrateLOS, IsType, SuperArray
ThomsonRadialFilter, ThomsonUBVConst, TimeGet, TimeUnit
PROCEDURE:
> Several parameters define the grid used to calculate the sky map.
These are passed to EarthSky3DLoc and EarthTransit3DLoc:
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)
MODIFICATION HISTORY:
FEB-2007, Paul Hick (UCSD/CASS)
[Previous]
[Next]
NAME:
vu_localskymap
PURPOSE:
Overplot IPS sources for given day on a 'sky sweep'
map derived from a tomographic reconstruction.
CATEGORY:
Forecast project
CALLING SEQUENCE:
PRO vu_localskymap, hdr, ff, $
ihdr = ihdr , $
ut0 = ut0 , $
dut = dut , $
degrees = degrees , $
_extra = _extra , $
utnoon = UTnoon , $
RA_full = RA_full , $
F_full = F_full , $
track = track , $
solar = solar , $
band = band , $
silent = silent , $
module = module , $
ooty = ooty , $
nagoya = nagoya
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 Carrington 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 or Ooty
for which the sky sweep is made.
INCLUDE:
@compile_opt.pro ; On error, return to caller
CALLS: ***
Carrington, GETOOTYSOURCES, GeographicInfo, InitVar, IsTime, IsType, TimeGet, TimeOp
TimeSet, TimeUnit, getnagoyasources, vu_earthskymap, vu_getdata
CALLED BY:
forecast, vu_movie
PROCEDURE:
The skymap is built from strips along the local meridian
at Nagoya or Ooty, 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)
[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, Carrington, InitVar, IsType, SuperArray, TimeGet
TimeInterpol, TimeOp, TimeUnit, UNIQ, 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
[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: $TUB
destination directory for animations
If the directory doesn't exist then the animation is written to $TUB
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: ***
Carrington, CheckDir, FILEPATH, GetFileSpec, InitVar, Instrument, IsTime, IsType
SetFileSpec, TimeGet, TimeOp, TimeSet, TimeUnit, UNIQ, big_body, boost, destroyvar
do_file, jpl_body, mk_flick, vu_earthskymap, vu_get, vu_insitu, vu_localskymap
vu_planarcut, vu_remoteview, vu_select, vu_solardisk, vu_synopticmap
vu_type_insitu, vu_type_skymap
CALLED BY:
forecast_movie
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)
Improved handling of individual frames for movies.
SEP-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
Added Stereo A and Stereo B
[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: ***
Carrington, GeographicInfo, InitVar, IsType, TimeGet, TimeOp, TimeSet, destroyvar
getnagoyasources, vu_earthskymap
CALLED BY:
qnagoya_skymap
PROCEDURE:
MODIFICATION HISTORY:
MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[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