| |
- classify_ieee1159_voltage(rms_features: numpy.ndarray)
- This function classifies an ieee1159 voltage incident by analyzing rms_feature array (containing voltage rms
values over
a window/cycle). Searches for incidents in descending order of duration.
- find_incidents(classes: List[mongo.IncidentClassification], offsets: List[tuple], pu_array: numpy.ndarray, sag_range: List[float], swell_range: List[float], cycle_min: int, cycle_max: int = None)
- This function adds to the classes and offset lists incident information (type and cycle offsets) by analyzing
the pu_array array for segments of pus matching duration (in cycles) and value range specificatons
If incidents are found the pu_array array is changed to avoid counting a segment in multiple incidents.
params: classes, offsets - lists of the incident classification types and corresponding offsets.
params: pu_array - array each entry of which the pu value of a given window (rms/nominal rms).
params: sag_range, swell_range - range of pu values for which a given cycle should be considered a sag/swell
params: cycle_min/max - the cycle streak length range required for a segment of pu_array to be classified as an
incident.
params: pu_array - are of pu values for each window in the rms_features
max none correponds to no upper limit on the length of the segments
return: no return but does add to or alter pu_array, classes and offsets
- ieee1159_voltage(mauka_message: mauka_pb2.MaukaMessage, rms_features: numpy.ndarray, opq_mongo_client: mongo.OpqMongoClient = None)
- Calculate the ieee1159 voltage incidents and add them to the mongo database
- indices_to_ranges(indices: numpy.ndarray, cycle_min: int, cycle_max: int = None) -> List[tuple]
- This function looks at an array of indices to find ranges (start and end) of indices that are in accordance with
the min and max cycle streak length provided.
params: indices - a numpy array of indices to some other array
params: cycle_min, cycle_max - the upper and lower bounds of a valid index range length
- nullifiy_and_add_incidents(classes: List[mongo.IncidentClassification], offsets: List[tuple], ranges: List[tuple], class_key: mongo.IncidentClassification, pu_array: numpy.ndarray)
- This function takes an array of indices from an rms_feature array (assumed to be valid incidents)
adds the corresponding IncidentClassification and cycle offset/index start and ends and signals
that the range or rms/pu values can no longer be considered for fur incident.
params: classes, offsets
params: ranges - list for which each entry has the start and end index/cycle offset of an incident
params: class_key - the type/name of the incident in question
is changed to indicate an incident already accounted for (the pu values of an incident are set to -1 so
they will not be considered by future searches for incidents)
- rerun(mauka_message: mauka_pb2.MaukaMessage, logger, mongo_client: mongo.OpqMongoClient = None)
- Retruns this plugin over the provided mauka message.
:param mauka_message: Mauka message to rerun this plugin over.
:param logger: Application logger.
:param mongo_client: An optional mongo client to perform DB queries
- valid_bound(start: int, end: int, cycle_max: int = None) -> bool
- This function asserts that where a cycle_max, where provided, is not exceeding by the
current range.
params: start - the starting index of the range being examined
params: end - the end index of the range being examined
params: cycle_max - the maximum separation (minus one) allowed between the start and end indices
return: bool indicating the range of indices does not exceet cycle streak max provided
|