Skip to content
Snippets Groups Projects
Commit 1c049b5b authored by Sander Snoo's avatar Sander Snoo
Browse files

Example to load datasets from file

parent ccc09436
No related branches found
Tags v1.4.3
No related merge requests found
from core_tools.data.ds.reader import load_by_uuid, set_data_location
from glob import glob
import os
path = 'c:/measurements/test_export'
# Set data location for load_by_uuid.
# When path is set it will use the path and not the database
set_data_location(path)
files = glob(path+'/ds_*.hdf5')
# Check if all measurements can be imported again.
for fname in files:
name = os.path.basename(fname)
uuid = int(name[3:-5])
d = load_by_uuid(uuid)
print(f'imported {uuid}')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment