Next: Cyclic Redundancy Check: crc32
Up: Command Line Utilities
Previous: Making PostScript from Vector
Vector Field File Difference:
avfdiff
The avfdiff program computes differences between vector field files
in any of the
recognized formats (OVF, VIO). The input data
must lie on rectangular meshes with identical dimensions.
Launching
The avfdiff launch command is:
tclsh oommf.tcl avfdiff [standard options] [-cross] [-filesort method] \
[-info] [-numfmt fmt] [-odt label units valexpr] \
[-resample fileselect interp_order] file-0 file-1 [... file-n]
where
- -cross
- Compute the pointwise vector cross product
of each file-k against file-0 instead of subtraction.
- -filesort method
- Specifies the sorting order to apply to the target file list,
file-1 through file-n. The order is important when using
the -odt option, because it controls the order of the rows in the
output. Parameter method should be a valid option string for the
Tcl command lsort, e.g., ``-ascii -decreasing''. Note that the
lsort sort options all begin with a hyphen, ``-'', and that if
you want to use multiple options they must be grouped as one element
to -filesort (by, for example, placing quotes around the list).
If this option is not specified then the order is as presented on the
command line (or as produced by wildcard expansion).
- -info
- Prints statistics on file differences. If this option is selected
then no output files are created.
- -numfmt fmt
- Parameter fmt specifies a C-style output format for numeric data if
-info or -odt is selected. Default value is
``
%- #20.15g
''.
- -odt label units valexpr
- Computes the file differences, but instead of writing difference files
to disk this option writes OOMMF Data Table
(ODT) output to
stdout. The ODT output consists of eight columns. The first column
is an index column identifying the target file (file-1 through
file-n). The label parameter is a string specifying the
label for this column, and likewise the units parameter is a
string specifying the units for the column. The third parameter,
valexpr, is any valid Tcl expr expression that may
include the special variables $i, $f1, $f2, ...,
$d1, $d2, ...; here $i is the 0-based index of
the file in the target file list (file-1 is index 0, file-2
is index 1, etc.), $f1 is the first number appearing in the
target filename, $f2 is the second number appearing in the target
filename, $d1 is the first number appearing in the ``Desc''
fields in the header of the target file, etc. This control is
analogous to the -index option to
avf2odt.
The next three columns are the sum of each of the vector components in
the difference. The last four columns are the averaged L1 norm,
the normalized L2 norm, minimum component absolute value, and
maximum component absolute value of the difference; these columns
correspond to those produced by the -extravals option to
avf2odt.
- -resample <0|n> <0|1|3>
- Resample either the base file (file-0) to match the resolutions of
the target files (file-1 through file-n), or resample each
target file to match the resolution of the base file. Set
fileselect to 0 for the former, to n for the latter. The second
argument specifies the polynomial interpolation order: 0 for
nearest value, 1 for trilinear interpolation, or 3 for fitting with
tricubic Catmull-Rom splines. Default is no resampling.
- file-0
- Name of input file to subtract from other files. Must be either
an OVF 1.0 file in the rectangular mesh subformat, or an VIO file. Required.
- file-1
- Name of first input file from which file-0 is to be subtracted.
Must also be either an OVF 1.0 file in the rectangular mesh
subformat, or an VIO file, and must have the same dimensions as
file-0. Required.
- ... file-n
- Optional additional files from which file-0 is to be
subtracted, with the same requirements as file-1.
If neither -info nor -odt are specified, then for each target
file file-1 through file-n a separate output file is
generated, in the OVF 1.0 format. Each output file has a name based
on the name of corresponding input file, with a -diff suffix. If a
file with the same name already exists, it will be overwritten.
For output file format details, see the OVF file
description.
OOMMF Documentation Team
September 30, 2022