Skip to content

Commit

Permalink
add vibrations entityset
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahmish committed Jan 2, 2024
1 parent 0d1f5c4 commit e85e789
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
20 changes: 20 additions & 0 deletions zephyr_ml/entityset.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,26 @@ def create_scada_entityset(dfs, new_kwargs_mapping=None):
return es


def create_vibrations_entityset(dfs, new_kwargs_mapping=None):
'''Generate an entityset for Vibrations data datasets
Args:
data_paths (dict): Dictionary mapping entity names ('alarms', 'notifications',
'stoppages', 'work_orders', 'pidata', 'vibrations', 'turbines') to the pandas
dataframe for that entity.
'''
entity_kwargs = {
**get_mapped_kwargs('pidata', new_kwargs_mapping),
**get_mapped_kwargs('vibrations', new_kwargs_mapping),
}
_validate_data(dfs, 'vibrations', entity_kwargs)

es = _create_entityset(dfs, 'vibrations', entity_kwargs)
es.id = 'Vibrations data'

return es


def _validate_data(dfs, es_type, es_kwargs):
'''Validate data by checking for required columns in each entity
'''
Expand Down
52 changes: 52 additions & 0 deletions zephyr_ml/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,58 @@
'TIMESTAMP': 'datetime',
'COD_ELEMENT': 'categorical'
}
},
'vibrations': {
'index': '_index',
'make_index': True,
'time_index': 'timestamp',
'logical_types': {
'COD_ELEMENT': 'categorical',
'turbine_id': 'categorical',
'signal_id': 'categorical',
'timestamp': 'datetime',
'sensorName': 'categorical',
'sensorType': 'categorical',
'sensorSerial': 'integer_nullable',
'siteName': 'categorical',
'turbineName': 'categorical',
'turbineSerial': 'integer_nullable',
'configurationName': 'natural_language',
'softwareVersion': 'categorical',
'rpm': 'double',
'rpmStatus': 'natural_language',
'duration': 'natural_language',
'condition': 'categorical',
'maskTime': 'datetime',
'Mask Status': 'natural_language',
'System Serial': 'categorical',
'WPS-ActivePower-Average': 'double',
'WPS-ActivePower-Minimum': 'double',
'WPS-ActivePower-Maximum': 'double',
'WPS-ActivePower-Deviation': 'double',
'WPS-ActivePower-StartTime': 'datetime',
'WPS-ActivePower-StopTime': 'datetime',
'WPS-ActivePower-Counts': 'natural_language',
'Measured RPM': 'double',
'WPS-ActivePower': 'double',
'WPS-Gearoiltemperature': 'double',
'WPS-GeneratorRPM': 'double',
'WPS-PitchReference': 'double',
'WPS-RotorRPM': 'double',
'WPS-Windspeed': 'double',
'WPS-YawAngle': 'double',
'overload warning': 'categorical',
'bias warning': 'categorical',
'bias voltage': 'double',
'xValueOffset': 'double',
'xValueDelta': 'double',
'xValueUnit': 'categorical',
'yValueUnit': 'categorical',
'TotalCount-RPM0': 'double',
'TotalCount-RPM1': 'double',
'TotalCount-RPM2': 'double',
'TotalCount-RPM3': 'double'
}
}
}

Expand Down

0 comments on commit e85e789

Please sign in to comment.