rfwtools.example
A package for managing the data associated with a single fault event.
The has a single class that manages basic data access for an individual fault event Example. If the data is not found in the specified location, then it will attempt to download the data and create the appropriate directory structure. This functionality typically requires access to JLab’s internal networks (e.g., VPN).
Expected data structure is <data_dir>/<zone>/<date>/<timestamp>/<capture files>. Alternatively, event data may be compressed at the <timestamp> directory level, i.e. <timestamp>.tar.gz.
Typical usage example:
import Example
e = Example(zone="1L23", dt=datetime.strptime("%Y-%m-%d %H:%M:%S.%f"), cavity_label="1", fault_label="Microphonics",
cavity_conf=math.nan, fault_conf=math.nan, label_source='my_label_file.txt')
e.load_data()
df = e.event_df
e.unload_data()
# Now do something with the data
Classes
|
A class representing a (SME) labeled fault event. |
|
The types of supported IExample types |
|
A class for producing a variety of types of IExample objects |
|
Abstract class that defines the basic interface for an Example. |
|
An extension of Example class that allows the caller to specify only a time-window of event_df be returned. |