vtk_wave

vtk_wave_addinterval

Obsolete

Usage:         
vtk_wave_addinterval waveGroupName waveIndex t1 t2 value

Description:   
OBSOLETE: please use vtkwave_addinterval instead.

vtk_wave_addpoints

Obsolete

Usage:         
vtk_wave_addpoints waveName Index TimeValueList

Description:   
OBSOLETE: use vtkwave_addpoints instead.

vtk_wave_crop

Obsolete

Usage:         
vtk_wave_crop waveName startTs endTs

Description:   
Crop the wave between startTs and endTs. OBSOLETE: use vtkwave_crop instead.

vtk_wave_load

Obsolete

Usage:         
vtk_wave_load waveGroupName waveFile [start [end]]

Description:   
Load a wave from the given file, limiting to the interval from start to end (default now). 

OBSOLETE: Use vtkwave_load instead.

vtk_wave_multiply

Obsolete

Usage:         
vtk_wave_multiply waveGroup  result factor1 factor2

Description:   
resultRes: the name for to store the results 

OBSOLETE: Use vtkwave_multiply or vtkwave_op instead.

vtk_wave_remove_glitches

Obsolete

Usage:         
vtk_wave_remove_glitches waveGroupName waveIndex maxGlitchWidth

Description:   
OBSOLETE 
use vtkwave_remove_glitches

vtk_wave_save

Obsolete

Usage:         
vtk_wave_save waveGroupName waveFile

Description:   
OBSOLETE: Use vtkwave_save instead

vtk_wave_statistics

Obsolete

Usage:         
vtk_wave_statistics startTime endTime array

Description:   
Fills array with statistics about the waves that have been loaded. Returns the number of waves that have been analyzed. 

OBSOLETE: Please use vtkwave_statistics instead.

vtk_wave_sum

Obsolete

Usage:         
vtk_wave_sum resultRes res1 res2

Description:   
resultRes: the name for to store the results 

OBSOLETE: Use vtkwave_sum instead.

vtkwave_addinterval

Usage:         
vtkwave_addinterval waveName startTs endTs value

Description:   
Adds a value to the wave that is good for the specified time range. 

Examples:
vtkwave_addinterval x\a $t1 $t2 0
vtkwave_addinterval x       $t1 $t2 $value ;   ## Add an interval to all waves in wavegroup x.


vtkwave_addpoints

Usage:         
vtkwave_addpoints waveName time-value-list

Description:   
Add a list of time/value pairs to the wave. No simplification occurs. 

Examples:
vtkwave_addpoints w\x [list $now 2.1]
vtkwave_addpoints w\x [list $ts1 2 $ts2 3]

vtkwave_addstring

Usage:         
vtkwave_addstring waveName timestamp string

Description:   
Add a string at given timestamp. No simplification occurs. Examples: vtkwave_addstring wx {$now} {placement phase}

Example:
vtkwave_addstring w\x $now "placement phase"


vtkwave_ceil

Usage:         
vtkwave_ceil waveOrGroup

Description:   
Round up each point in the wave to the next larger integer.

vtkwave_copy

Usage:         
vtkwave_copy Destination Source

Description:   
Copy a wave or wave group. 

Examples:
vtkwave_copy x\b x\a;  ### Copy wave x\a into x\b
vtkwave_copy x y;      ### Copy whole wave group y into wave group x


vtkwave_crop

Usage:         
vtkwave_crop waveOrGroup startTs endTs

Description:   
Crop the wave between startTs and endTs.

vtkwave_derivative

Usage:         
vtkwave_derivative derivativeWave originalWave step

Description:   
Compute the derivative wave from an original wave. This is of course a rough approximation of a derivative, given that the waves are step functions. The derivative in this case is the average slope in the intervals defined by "step" 

Examples:
vtkwave_derivative x\d x\f 10

vtkwave_destroy

Usage:         
vtkwave_destroy waveNameOrGroup

Description:   
Destroys an existing wave object. 

Examples:
catch {vtkwave_destroy x\a}   ;# Destroy the wave "x\a"
catch {vtkwave_destroy x}     ;# Destroy the wave group "x"

vtkwave_dump

Usage:         
vtkwave_dump waveName

Description:
Get info about all points in a wave and return in raw format.

Examples:
set data [vtkwave_dump x\running]
puts $data
0123456789 1 0123456790 2 ...

vtkwave_exists

Usage:         
vtkwave_exists waveName

Description:   
Test the existence of a specific wave. 

Examples:
if [vtkwave_exists x\a] {
  ## do something
}

Returns:
The procedure returns 1 if the wave exists and 0 otherwise. 

vtkwave_floor

Usage:         
vtkwave_floor waveOrGroup

Description:   
Round down each point in the wave to the next larger integer.

vtkwave_get

Usage:         
vtkwave_get waveName array

Description:   
Get info about all points in a wave. 

Examples:
vtkwave_get x\running a
parray a
a(count) 33
a(label) "running"
a(group) "x"
a(0,ts)  12892892829
a(0,v)   22.2
...
a(32,ts)   1289289888
a(32,v)    1.2

vtkwave_get_json

Usage:         
vtkwave_get_json waveName

Description:   
Get info about all points in a wave and return in JSON array format. 

Examples:
set data [vtkwave_get_json x\running]
puts $data
[[0123456789,1],[0123456790,2]...]

vtkwave_intervals

Usage:         
vtkwave_intervals waveName t1 t2 type

Description:   
Create a wave with one point of value 1.0 at the boundaries of the intervals specified by 'type', where type is one of: yearly quarterly monthly semimonthly biweekly weekly daily hourly minutely 60s or an integer number of seconds. 

Examples:
vtkwave_intervals w\intervals $startTs $endTs   10
vtkwave_intervals w\intervals $startTs $endTs   hourly
vtkwave_intervals w\intervals $startTs $endTs   daily;    ## Accounts for DST
vtkwave_intervals w\intervals $startTs $endTs   monthly;

See Also

vtkwave_workweek

vtkwave_invert

Usage:         
vtkwave_invert invertedWave originalWave

Description:   
Create an inverted wave from original wave. The inverted wave has value 1 where the original is 0, and 0 elsewhere. 

Example:
vtkwave_invert x\inv x\a   ; ## Compute invert of wave x\a


vtkwave_levels

Usage:         
vtkwave_levels waveName startTs endTs separateLevelFlag

Description:   
If separateLevelFlag is 1, then compute the time spent at each level, else compute the time spent at or below each level. It is expected that waveName has only integer levels. 

Examples:
vtkwave_levels x\r $t1 $t2 1

vtkwave_load

Usage:         
vtkwave_load waveGroupName waveFile [start [end]]

Description:   
Load a wave from a file into a wave group. The waves are cropped from start to end, where by default start is 0 and end is 'now'. This procedure should probably be called vtkwavegroup_load

See Also

vtkwave_save

vtkwave_multiply

Usage:         
vtkwave_multiply waveNameOrGroup  factor

Description:   
Multiply wave or all waves in a wave group by factor. The product or products are stored in place. 

Examples: 
vtkwave_multiply w\a w\b;   # Multiply w\a by w\b with result in w\a
vtkwave_multiply X w\b;     # Multiply all waves in group X  w\b with result in X.

See Also

vtkwave_op

vtkwave_op

Usage:         
vtkwave_op operation resultWaveOrGroup operandWaveOrGroup

Description:   
Perform an operation on the result and operand waves or wave groups. Operation is one of MUL ADD SUB MAX MIN 

Examples:      
vtkwave_op ADD x\acc x\a      ; ## Add wave x\a to x\acc, with result in x\acc
vtkwave_op MUL x\acc x\f      ; ## Multiply wave x\acc by wave x\f with result in x\acc
vtkwave_op MAX x\M x\a        ; ## Take the max of x\M and x\a, with result in x\M
vtkwave_op ADD ACC A          ; ## Add, wave by wave, all waves in A to all waves in ACC


vtkwave_print

Usage:        
vtkwave_print waveName labelPrefix

Description:   
Print all points in a wave to stdout. This procedure is mostly meant to be used for debugging. 

Examples:      
vtkwave_print x\a "before simplification" 
vtkwave_simplify x\a 
vtkwave_print x\a "after simplification"

vtkwave_reduce

Usage:         
vtkwave_reduce waveOrGroup BinInterval <max | avg >

Description:   
Reduce a wave or all waves in a group into the specified bins. The result is stored in place.

Examples:      
vtkwave_intervals bin\h $t1 $t2  hourly; ## Create a hourly wave.
vtkwave_copy x\m x\a;                    ## Copy x\a into x\m
vtkwave_reduce x\m bin\h  max;           ## Compute the maximum of wave x\m in each hour.
vtkwave_copy xAVG x;                     ## Copy group x into xAVG
vtkwave_reduce xAVG bin\h  avg;          ## Get hourly average of all waves in xAVG.

vtkwave_remove_glitches

Usage:         
vtkwave_remove_glitches waveOrGroup maxGlitchWidth

Description:   
Removes all features shorter than the specified width from the wave. 

Examples:      
vtkwave_remove_glitches x\a 20;  ## Remove glitches from wave x\a
vtkwave_remove_glitches x   20;  ## Remove glitches from all waves in group x

vtkwave_save

Usage:         
vtkwave_save waveGroupName waveFile

Description:   
Save the entire waveGroup into the specified file. This procedure should probably be called vtkwavegroup_save.

See Also

vtkwave_load

vtkwave_scale

Usage:         
vtkwave_scale waveNameOrGroup scalarFactor

Description:   
Multiply the wave or the wave group by a scalar. 

Example:       
vtkwave_scale X\a 2.2

vtkwave_set_separator

Usage:         
vtkwave_set_separator character

Description:   
A very technical api, just for developers. Used to set the separator between the wave group name and the wave name. The default character is the back-slash ''

vtkwave_simplify

Usage:         
vtkwave_simplify waveOrGroupName

Description:   
Simplify the representation of a wave or of all waves in a group. The simplification eliminates redundant points on the waves and leads to a more compact representation of the waves. Simplification happens automatically as a side effect of many operations. 

Examples:
vtkwave_simplify x\a
vtkwave_simplify x


vtkwave_statistics

Usage:         
vtkwave_statistics waveNameOrWaveGroup startTime endTime resultArray

Description:   
Fills resultArray with statistics about the waves that have been loaded. The statistics include: area avg max min min,ts max,ts begin,ts end,ts If the first argument is a specific wave, the procedure returns nothing. If the first argument is a wave group, the procedure returns the number of waves that have been analyzed. 

Example:
vtkwave_statistics x\a $startTs $endTs waveStats
parray waveStats
waveStats(max) 22
waveStats(min) 0
waveStats(area) 2928917
...


vtkwave_sum

Usage:         
vtkwave_sum result addendum1 addendum2

Description:   
This procedure sums waves or wavegroups. The result is stored into result. 

Examples:      
vtkwave_sum aaa\r  aaa\a aaa\b
vtkwave_sum rrr  aaa bbb

See Also

vtkwave_op

vtkwave_support

Usage:         
vtkwave_support supportWave originalWave

Description:   
Create a support wave from original wave. The support wave has value 1 where the original is different from zero, and 0 (zero) elsewhere. 

Example:
vtkwave_support x\support x\a   ; ## Compute support of wave x\a

vtkwave_workweek

Usage:         
vtkwave_workweek waveName t1 t2 dayStart dayFinish weekendDays

Description:   
Compute a wave to represent a regular workweek. The wave takes daylight savings times into account. The first argument is the name of the resulting wave. The arguments t1 and t2 are the beginning and ending of the wave and it is expected that t2 is greater than t1. The dayStart represents the hour and minutes of the start of the work day, in the format HH:MM. Similarly dayFinish represents the end of the work day, also in the format HH:MM. The last argument specifies which days are considered weekend days. 

Examples:      
vtkwave_workweek ww\work $t1 $t2 08:30 17:30 "Sat Sun"
vtkwave_workweek ww\work $t1 $t2 07:00 16:00 "Fri Sat"

See Also

vtkwave_intervals

vtkwavegroup_get

Usage:         
vtkwavegroup_get waveGroupName resultArray [BinInterval [MaxFlag]]

Description:   
Get information about a group of waves.