2023-09-27 02:50:49 +00:00
|
|
|
import pdb
|
|
|
|
|
2023-09-23 08:33:28 +00:00
|
|
|
import pytest
|
|
|
|
import h5py
|
2023-09-27 02:50:49 +00:00
|
|
|
import time
|
2023-09-23 08:33:28 +00:00
|
|
|
|
2023-09-27 02:50:49 +00:00
|
|
|
from nwb_linkml.maps.hdmf import model_from_dynamictable, dynamictable_to_model
|
2023-09-23 08:33:28 +00:00
|
|
|
|
|
|
|
NWBFILE = '/Users/jonny/Dropbox/lab/p2p_ld/data/nwb/sub-738651046_ses-760693773.nwb'
|
|
|
|
|
|
|
|
@pytest.mark.skip()
|
|
|
|
def test_make_dynamictable():
|
|
|
|
h5f = h5py.File(NWBFILE, 'r')
|
2023-09-27 02:50:49 +00:00
|
|
|
group = h5f['units']
|
2023-09-23 08:33:28 +00:00
|
|
|
|
2023-09-27 02:50:49 +00:00
|
|
|
start_time = time.time()
|
2023-09-23 08:33:28 +00:00
|
|
|
model = model_from_dynamictable(group)
|
2023-09-27 02:50:49 +00:00
|
|
|
data = dynamictable_to_model(group, model)
|
|
|
|
ser = data.model_dump_json()
|
|
|
|
end_time = time.time()
|
|
|
|
total_time = end_time - start_time
|
|
|
|
pdb.set_trace()
|
2023-09-23 08:33:28 +00:00
|
|
|
|
|
|
|
|