dbcolsdecimate [-p RELATIVE_PREC] [-P ABSOLUTE_PREC] column1 [column2...]
For each of the given columns, prune it back to show changes with at most RELATIVE_PRECISION fraction of total range change (default: 0.01; alternativey one can specify an absolute precision). This tool is designed for reducing the actual data in a graph while keeping it visually identical.
Precisions, if specified, apply to any any subsequent columns. (One can therefore have different precisions for different columsn.)
With multiple columns, major changes in any column cause a record to be emitted.
Our goal is to output an identical plot, with fewer points if we can. This goal differs from and is easier than prior published work that has the goal of the number of points by a known factor, or to a constant number, while preserving as much fidelity as possible.
(Note that we usually put out a pair of points at each change, so that if the data has stairsteps, they don't turn in to diagonals.)
If all columns are given absolute precisions, this program runs with constant memory. Otherwise (if any column has relative precision, and by default), this program temporarily stores a complete copy of the input data on disk.
- --precision-relative P or --relative-precision P or -p P
Set the precision of how large a fraction of the total range should be presereved. Applies to any subsequent columns. Default: 0.01.
- --precision-absolute P or --absolute-precision P or -P P
Set the precision in absolute units. Applies to any subsequent columns.
- -T TmpDir
where to put tmp files. Also uses environment variable TMPDIR, if -T is not specified. Default is /tmp.
This module also supports the standard fsdb options:
Enable debugging output.
Enable verbose output.
- -i or --input InputSource
Read from InputSource, typically a file name, or
-for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
- -o or --output OutputDestination
Write to OutputDestination, typically a file name, or
-for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.
- --autorun or --noautorun
By default, programs process automatically, but Fsdb::Filter objects in Perl do not run until you invoke the run() method. The
--(no)autorunoption controls that behavior within Perl.
Show full manual.
cat xxx | dbcolsdecimate xxx
AUTHOR and COPYRIGHT
Copyright (C) 2023 by John Heidemann <firstname.lastname@example.org>
This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.