| |
- builtins.object
-
- OpqMongoClient
- enum.Enum(builtins.object)
-
- BoxEventType
- Collection
- IEEEDuration
- IncidentClassification
- IncidentIeeeDuration
- IncidentMeasurementType
class BoxEventType(enum.Enum) |
|
BoxEventType(value, names=None, *, module=None, qualname=None, type=None, start=1)
String enumerations and constants for event types |
|
- Method resolution order:
- BoxEventType
- enum.Enum
- builtins.object
Data and other attributes defined here:
- FREQUENCY_DIP = <BoxEventType.FREQUENCY_DIP: 'FREQUENCY_SAG'>
- FREQUENCY_INTERRUPTION = <BoxEventType.FREQUENCY_INTERRUPTION: 'FREQUENCY_INTERRUPTION'>
- FREQUENCY_SWELL = <BoxEventType.FREQUENCY_SWELL: 'FREQUENCY_SWELL'>
- OTHER = <BoxEventType.OTHER: 'OTHER'>
- THD = <BoxEventType.THD: 'THD'>
- VOLTAGE_DIP = <BoxEventType.VOLTAGE_DIP: 'VOLTAGE_SAG'>
- VOLTAGE_SWELL = <BoxEventType.VOLTAGE_SWELL: 'VOLTAGE_SWELL'>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class Collection(enum.Enum) |
|
Collection(value, names=None, *, module=None, qualname=None, type=None, start=1)
String enumerations and constants for collection names |
|
- Method resolution order:
- Collection
- enum.Enum
- builtins.object
Data and other attributes defined here:
- BOX_EVENTS = <Collection.BOX_EVENTS: 'box_events'>
- EVENTS = <Collection.EVENTS: 'events'>
- HEALTH = <Collection.HEALTH: 'health'>
- INCIDENTS = <Collection.INCIDENTS: 'incidents'>
- MEASUREMENTS = <Collection.MEASUREMENTS: 'measurements'>
- OPQ_BOXES = <Collection.OPQ_BOXES: 'opq_boxes'>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class IEEEDuration(enum.Enum) |
|
IEEEDuration(value, names=None, *, module=None, qualname=None, type=None, start=1)
String enumerations and constants for durations |
|
- Method resolution order:
- IEEEDuration
- enum.Enum
- builtins.object
Data and other attributes defined here:
- INSTANTANEOUS = <IEEEDuration.INSTANTANEOUS: 'INSTANTANEOUS'>
- MOMENTARY = <IEEEDuration.MOMENTARY: 'MOMENTARY'>
- SUSTAINED = <IEEEDuration.SUSTAINED: 'SUSTAINED'>
- TEMPORARY = <IEEEDuration.TEMPORARY: 'TEMPORARY'>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class IncidentClassification(enum.Enum) |
|
IncidentClassification(value, names=None, *, module=None, qualname=None, type=None, start=1)
Incident Classification Types |
|
- Method resolution order:
- IncidentClassification
- enum.Enum
- builtins.object
Data and other attributes defined here:
- ARCING_TRANSIENT = <IncidentClassification.ARCING_TRANSIENT: 'ARCING_TRANSIENT'>
- BIPOLAR_TRANSIENT = <IncidentClassification.BIPOLAR_TRANSIENT: 'BIPOLAR_TRANSIENT'>
- EXCESSIVE_THD = <IncidentClassification.EXCESSIVE_THD: 'EXCESSIVE_THD'>
- FREQUENCY_INTERRUPTION = <IncidentClassification.FREQUENCY_INTERRUPTION: 'FREQUENCY_INTERRUPTION'>
- FREQUENCY_SAG = <IncidentClassification.FREQUENCY_SAG: 'FREQUENCY_SAG'>
- FREQUENCY_SWELL = <IncidentClassification.FREQUENCY_SWELL: 'FREQUENCY_SWELL'>
- IMPULSIVE_TRANSIENT = <IncidentClassification.IMPULSIVE_TRANSIENT: 'IMPULSIVE_TRANSIENT'>
- ITIC_NO_DAMAGE = <IncidentClassification.ITIC_NO_DAMAGE: 'ITIC_NO_DAMAGE'>
- ITIC_PROHIBITED = <IncidentClassification.ITIC_PROHIBITED: 'ITIC_PROHIBITED'>
- MULTIPLE_ZERO_CROSSING_TRANSIENT = <IncidentClassification.MULTIPLE_ZERO_CROSSING_TRANSIENT: 'MULTIPLE_ZERO_CROSSING_TRANSIENT'>
- OSCILLATORY_TRANSIENT = <IncidentClassification.OSCILLATORY_TRANSIENT: 'OSCILLATORY_TRANSIENT'>
- OUTAGE = <IncidentClassification.OUTAGE: 'OUTAGE'>
- PERIODIC_NOTCHING = <IncidentClassification.PERIODIC_NOTCHING: 'PERIODIC_NOTCHING'>
- SEMI_F47_VIOLATION = <IncidentClassification.SEMI_F47_VIOLATION: 'SEMI_F47_VIOLATION'>
- UNDEFINED = <IncidentClassification.UNDEFINED: 'UNDEFINED'>
- UNIPOLAR_TRANSIENT = <IncidentClassification.UNIPOLAR_TRANSIENT: 'UNIPOLAR_TRANSIENT'>
- VOLTAGE_INTERRUPTION = <IncidentClassification.VOLTAGE_INTERRUPTION: 'VOLTAGE_INTERRUPTION'>
- VOLTAGE_SAG = <IncidentClassification.VOLTAGE_SAG: 'VOLTAGE_SAG'>
- VOLTAGE_SWELL = <IncidentClassification.VOLTAGE_SWELL: 'VOLTAGE_SWELL'>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class IncidentIeeeDuration(enum.Enum) |
|
IncidentIeeeDuration(value, names=None, *, module=None, qualname=None, type=None, start=1)
IEEE Duration Classifications |
|
- Method resolution order:
- IncidentIeeeDuration
- enum.Enum
- builtins.object
Data and other attributes defined here:
- INSTANTANEOUS = <IncidentIeeeDuration.INSTANTANEOUS: 'INSTANTANEOUS'>
- MOMENTARY = <IncidentIeeeDuration.MOMENTARY: 'MOMENTARY'>
- SUSTAINED = <IncidentIeeeDuration.SUSTAINED: 'SUSTAINED'>
- TEMPORARY = <IncidentIeeeDuration.TEMPORARY: 'TEMPORARY'>
- UNDEFINED = <IncidentIeeeDuration.UNDEFINED: 'UNDEFINED'>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class IncidentMeasurementType(enum.Enum) |
|
IncidentMeasurementType(value, names=None, *, module=None, qualname=None, type=None, start=1)
Incident Feature Extracted Measurement Types |
|
- Method resolution order:
- IncidentMeasurementType
- enum.Enum
- builtins.object
Data and other attributes defined here:
- FREQUENCY = <IncidentMeasurementType.FREQUENCY: 'FREQUENCY'>
- HEALTH = <IncidentMeasurementType.HEALTH: 'HEALTH'>
- THD = <IncidentMeasurementType.THD: 'THD'>
- TRANSIENT = <IncidentMeasurementType.TRANSIENT: 'TRANSIENT'>
- VOLTAGE = <IncidentMeasurementType.VOLTAGE: 'VOLTAGE'>
Data descriptors inherited from enum.Enum:
- name
- The name of the Enum member.
- value
- The value of the Enum member.
Data descriptors inherited from enum.EnumMeta:
- __members__
- Returns a mapping of member name->value.
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.
|
class OpqMongoClient(builtins.object) |
|
OpqMongoClient(host: str = '127.0.0.1', port: int = 27017, database_name: str = 'opq')
Convenience mongo client for easily operating on OPQ data |
|
Methods defined here:
- __init__(self, host: str = '127.0.0.1', port: int = 27017, database_name: str = 'opq')
- Initializes an OpqMongoClient.
:param host: Host of mongo database
:param port: Port of mongo database
:param database_name: The name of the database on mongo
- drop_collection(self, collection: str)
- Drops a collection by name
Parameters
----------
collection : str
Name of the collection
- drop_indexes(self, collection: str)
- Drop all indexes of a particular named collection
Parameters
----------
collection : str
Name of the collection
Returns
-------
- get_collection(self, collection: str)
- Returns a mongo collection by name
Parameters
----------
collection : str
Name of collection
Returns
-------
A mongo collection
- read_file(self, fid: str) -> bytes
- Loads a file from gridfs as an array of bytes
:param fid: The file name to open stored in gridfs
:return: A list of bytes from reading the file
- write_incident_waveform(self, incident_id: int, gridfs_filename: str, payload: bytes)
- Write incident waveform to database.
:param incident_id: The id of the incident we are storing a waveform for.
:param gridfs_filename: The filename to store the waveform to.
:param payload: The bytes of the waveform.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |