This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import h5py | |
from importlib import resources # assuming python >= 3.7 is installed | |
def data_load_function(): | |
data = {'Sensors': {'Lumbar': {}}} | |
with resources.path('sit2standpy.data', 'sample.h5') as file_path: | |
with h5py.File(file_path, 'r') as h5: | |
data['Sensors']['Lumbar']['Accelerometer'] = h5['Sensors']['Lumbar']['Accelerometer'][()] | |
data['Sensors']['Lumbar']['Unix Time'] = h5['Sensors']['Lumbar']['Unix Time'][()] |