plotMultiDump
Description
plotMultiDump is a specialized plotting utility designed to visualize multiple time-series datasets, typically from different ASCII dump files generated by tools like DelayEditor. Unlike plotDump, which plots multiple parameters from a single file, plotMultiDump allows plotting a single parameter (or multiple lines of parameters) from multiple input files simultaneously.
This tool is highly interactive, guiding the user through prompts to select parameters, define plot ranges, and apply simple filtering. It’s particularly useful for comparing the same parameter across different data acquisition lines or processing runs.
Usage
plotMultiDump -infile <file1> [-infile <file2> ...] [-outfile <filename.meta>] [OPTIONS]
Arguments
| Option | Description | |
|---|---|---|
-infile <file1> ... | Required. One or more input ASCII files containing time-series data. Each file is assumed to have 33 columns of float values, with the first column being time. | |
-outfile <filename.meta> | Specifies the output PostScript metafile name. | plot.meta |
-size <dx> <dy> | Specifies the plot size in centimeters. | 20.0 25.0 |
-label <string> | Adds a custom title to the plot. | |
-sparse | (Present in USAGE, but implementation not fully shown for plotting) Intended for sparse plotting. | |
-xrange <min> <max> | Sets the X-axis range. | Auto-determined. |
Interactive Mode
After launching, plotMultiDump will guide the user through a series of prompts:
- Number of Plots (
noplots): Prompts for how many vertical subplots to create. - Input Filename (per plot): For each subplot, it prompts for an input ASCII filename. If the file cannot be opened, it warns the user and skips to the next plot.
- Time Range (per plot): It prompts for
xminandxmaxfor the current subplot, representing the start and end times in seconds. - Y-axis Bounds (per plot): For each subplot, it prompts for Y-axis minimum (
ymin[i]) and maximum (ymax[i]) values. - Parameter Selection (Y-axis): For each subplot, it presents a menu of 33 available parameters (similar to
plotDump) and prompts the user to choose which one to plot on the Y-axis. - Continue Plotting (multiple lines per subplot): After plotting one line in a subplot, it asks if the user wants to plot another line in the same subplot.
How It Works
- Initialization: Parses command-line arguments to set plotting options, input file names, and ranges. Initializes a
plotlibPostScript output (plot.meta). - Global Time Range Determination: Reads metadata from all input files (
name,mintime,maxtime,Xmin,Xmax,start,end,range,delay,lag,scale_factor) to determine thetotal_mintimeandtotal_maxtimeacross all datasets. - Plot Setup: Initializes the
plotlibPostScript output. Sets up the overall plot dimensions (xlength,ylength,xoff). - Plotting Loop (per subplot):
- For each of the
noplotsvertical subplots:- Draws the subplot border.
- File Specific Data Loading: Opens the specified input ASCII file. Reads all data for all 33 parameters into a
valuesarray for the current file. - X-axis Grid: Draws X-axis grid lines and labels (time in minutes).
- Prompts for Y-axis range and the parameter to plot.
- Data Plotting: Iterates through
nopoints(records):- Gets
xval(time) andyval(chosen parameter). - If
xvalandyvalare within their respective plot bounds, it draws a line segment from the previous point to the current point.
- Gets
- Adds labels for the chosen parameters and the filename.
- Allows plotting multiple lines within the same subplot.
- For each of the
- Cleanup: Frees allocated memory and closes all input files.
Output Files
<outfile_name>: A PostScript metafile (.meta) containing time-series plots of the selected parameters from multiple input files.
Dependencies
plotlib.h: Forplotlibfunctions.support.h: For general utility functions.math.h: For mathematical functions.
Notes
plotMultiDump is a flexible tool for comparing time-series data from various sources or processing stages. The interactive nature allows users to build complex visualizations with multiple subplots and lines, making it suitable for detailed data analysis and quality control. The input file format is expected to be a consistent ASCII dump with a fixed number of columns representing different parameters. The -sparse option is listed but not implemented.