nilspodlib.consts: Global constants#
Basic constants/names used throughout the lib.
- nilspodlib.consts.SENSOR_SAMPLE_LENGTH = {'acc': (6, 3, <class 'numpy.int16'>), 'analog': (6, 3, <class 'numpy.uint16'>), 'baro': (2, 1, <class 'numpy.int16'>), 'counter': (4, 1, <class 'float'>), 'ecg': (4, 1, <class 'numpy.int32'>), 'gyro': (6, 3, <class 'numpy.int16'>), 'mag': (6, 3, <class 'numpy.int16'>), 'ppg': (4, 1, <class 'numpy.int32'>), 'temperature': (2, 1, <class 'numpy.int16'>)}#
Byte information of each sensor_type in one sample.
Format: Overall number of bytes, number of channels, datatype
- nilspodlib.consts.SENSOR_LEGENDS = {'acc': ('acc_x', 'acc_y', 'acc_z'), 'analog': ('analog_0', 'analog_1', 'analog_2'), 'baro': ('baro',), 'ecg': ('ecg',), 'gyro': ('gyr_x', 'gyr_y', 'gyr_z'), 'mag': ('mag_x', 'mag_y', 'mag_z'), 'ppg': ('ppg',), 'temperature': ('temp',)}#
Default legends for all sensors
- nilspodlib.consts.GRAV = 9.81#
The value of gravity
- nilspodlib.consts.SENSOR_UNITS = {'acc': 'm/s^2', 'baro': 'mbar', 'gyro': 'deg/s', 'temperature': 'C'}#
Default units for all sensors
- nilspodlib.consts.SIMPLE_UNITS = {'deg/s': 'dps', 'm/s^2': 'ms2'}#
simple unit names
- nilspodlib.consts.SENSOR_POS = {0: 'undefined', 1: 'left foot', 2: 'right foot', 3: 'hip', 4: 'left wrist', 5: 'right wrist', 6: 'chest'}#
Available sensor_type positions