archiver_test.pv_archive_events#
Data set module for the Dataset type and related functions.
Module Contents#
Classes#
Result of a test. |
|
Represent difference information between two datasets. |
|
Representation of a data set of the pv information in an archiver. |
Functions#
|
|
|
|
|
Imports data. |
|
Compares an array of length 2 of datasets by using DeepDiff |
Attributes#
- archiver_test.pv_archive_events.equal_but_status(event: epicsarchiver.ArchiveEvent, other: epicsarchiver.ArchiveEvent) bool[source]#
- class archiver_test.pv_archive_events.Result(*args, **kwds)[source]#
Bases:
enum.FlagResult of a test.
- class archiver_test.pv_archive_events.DataSetDiff[source]#
Bases:
NamedTupleRepresent difference information between two datasets.
- class archiver_test.pv_archive_events.PVArchiveEvents[source]#
Representation of a data set of the pv information in an archiver.
- details: dict[archiver_test.details.Detail, str][source]#
- async export_data(output_folder: pathlib.Path, archiver: str, filename: str) pathlib.Path[source]#
- Stores the data from a dataset into a store folder with path:
output_folder/store/archiver/pv_name/filename.pickle
- Parameters:
output_folder – Path of folder to store data.
archiver – Hostname of archiver
filename – Filename of file, usually “sop-eop”
- async avg_mean_diff(other: PVArchiveEvents) float[source]#
- Calculates the average difference between the values of the events in
the data vs the other dataset.
- Parameters:
other – Another dataset.
- async compare(other: PVArchiveEvents) DataSetDiff[source]#
Compares the current dataset with another. Calculates the number of different events in each set, and the average difference between the means.
- Parameters:
other – Another dataset.
- archiver_test.pv_archive_events.val_to_number(val: int | float | str | list[str] | list[int] | list[float] | bytes) float[source]#
- async archiver_test.pv_archive_events.import_pv_archive_events(input_file: pathlib.Path) PVArchiveEvents[source]#
Imports data.
- Parameters:
input_file – Path of file of data
- async archiver_test.pv_archive_events.compare_data(datasets_old: dict[str, PVArchiveEvents], datasets_new: dict[str, PVArchiveEvents]) dict[str, DataSetDiff][source]#
Compares an array of length 2 of datasets by using DeepDiff
- Parameters:
datasets_old – Datasets from the first archiver.
dataset_new – Datasets form the second archiver.