Commit 8043ad3b authored by Antoine Laudrain's avatar Antoine Laudrain
Browse files

MSO: update README with plotting script.

parent 37074a84
......@@ -140,3 +140,42 @@ events = process_sequence(raw_data, npoints, yinc, yorigin)
# At this point, events is a list of np.array.
### Plot various waveforms
To quickly explore data files, the following utility is provided: [``](./
An example minimal usage is as follows:
python --out test_superimpose \
--data /localscratch/data/cosmics_autoTrig230mV.210424_130855.CHAN1.raw 0 1 2 \
--data /localscratch/data/cosmics_autoTrig230mV.210424_204052.CHAN1.raw 5 10 15
Its main argument in the `--data` flag, which expects at least one token.
The first token is an input file name (`.raw` file, the corresponding preamble `.dat` file is automatically read),
and all the following are understood as event number indices within this file.
As shown in the example the `--data` flag can be repeated to get events from as many files as needed.
The other mandatory option is the `--output` flag, which should be provided with the name of the output file
(with directories if needed, but those won't be created), **without extension**.
By default, the plot is created in `pdf` and `png` format.
This can be changed by passing the desired extension to the `--exts` option.
The default behaviour is to process the plot without displaying it on screen (only writing output files).
If the `--display` option is passed, matplotlib will display the plot and the program will not exit before the plot is closed.
#### Plotting options
The following additional option are provided:
- `xmin`, `xmax`, `ymin`, `ymax`: to manually set the plot boundaries.
- `--shift <value in ns>`: each successive waveform will be shifted by this amount.
Can be used to improve the readability.
The following two options can be used for very basic processing and are mutually exclusive:
- `--every <N>`: use only one every `N` points for the plot.
- `--average <N>`: average over groups of `N` points (not rolling: the number or plotted points will be decreased by this amount).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment