Archive Loader
Class used to load archived Bpm data initialised using
Archiver_fjc.ArchiveLoad(filename='')
If the filename is left empty, the most recent archived file (that is not the current one) will be loaded.
Process variables can be loaded using the following class methods:
- Archiver_fjc.ArchiveLoad.get(PV): Loads a process variable
- Archiver_fjc.ArchiveLoad.getVars(bpmname): loads all variables listed in the global variable Archiver_fjc.ArchiveLoad.pvals for a single BPM
- Archiver_fjc.ArchiveLoad.getAllVars(): loads all variables listed in the global variable Archiver_fjc.ArchiveLoad.pvals for all BPM
'PV' is the name of a process variable (eg. cbpm:xi, cbpm:rms) and 'bpmname' is the name of a BPM (eq. QD10X, QM16FF).
When a process variable is loaded for all BPMs it will be stored as a class variable in the form 'Archiver_fjc.ArchiveLoad.[pvname]' for the case of all BPMs where 'pvname' is the part of the process variable name that would come after 'cbpm:'. In the case of a single BPM, it will be stored in the form 'Archiver_fjc.ArchiveLoad.[pvname]_[bpmname]'. To get 'pvname' from the full name of the process variable, a static method Archiver_fjc.ArchiveLoad.getName(PV) exists.
Plotting
The class also includes plotting methods:
- Archiver_fjc.ArchiveLoad.timePlot([list of PVs]): Plots a list of process variables against time on the same axes
- Archiver_fjc.ArchiveLoad.spacePlot([list of PVs]): Plots a list of process variables against BPM number
Cutting and Smoothing
The class includes a 'cutData' function that will cut pulses from all stored variables according to a list of conditions and a 'smooth' function that will smooth all stored variables according to a given window (default is moving average (flat window)).