Skip to content

Commit 7d73c2b

Browse files
authored
Replace Clustering with SpatialSeries in PyNWBIOTest (#678)
1 parent 806b67d commit 7d73c2b

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

+tests/+system/NWBFileIOTest.m

+7-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ function addContainer(testCase, file) %#ok<INUSL>
88
'timestamps', (0:9) .', ...
99
'data_resolution', 0.1);
1010
file.acquisition.set('test_timeseries', ts);
11-
clust = types.core.Clustering( ...
12-
'description', 'A fake Clustering interface', ...
13-
'num', [0, 1, 2, 0, 1, 2] .', ...
14-
'peak_over_rms', [100, 101, 102] .', ...
15-
'times', (10:10:60) .');
11+
spatialSeries = types.core.SpatialSeries( ...
12+
'description', 'A test spatial series', ...
13+
'data', int64((1:10))' , ...
14+
'data_unit', 'n/a', ...
15+
'timestamps', int64((1:10))');
16+
1617
mod = types.core.ProcessingModule( ...
1718
'description', 'a test module', ...
18-
'Clustering', clust);
19+
'SpatialSeries', spatialSeries);
1920
file.processing.set('test_module', mod);
2021
end
2122

+tests/+system/PyNWBIOTest.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import h5py
88

99
from pynwb import get_manager, NWBFile, TimeSeries
10-
from pynwb.ecephys import ElectricalSeries, Clustering
10+
from pynwb.ecephys import ElectricalSeries
11+
from pynwb.behavior import SpatialSeries
1112
from pynwb.ophys import OpticalChannel, TwoPhotonSeries
1213
from pynwb.misc import Units
1314
from hdmf.backends.hdf5 import HDF5IO
@@ -201,8 +202,10 @@ def addContainer(self, file):
201202
'SIunit', timestamps=list(range(10)), resolution=0.1)
202203
self.file.add_acquisition(ts)
203204
mod = file.create_processing_module('test_module', 'a test module')
204-
mod.add_container(Clustering("A fake Clustering interface", [0, 1, 2, 0, 1, 2],
205-
[100., 101., 102.], list(range(10, 61, 10))))
205+
mod.add_container(SpatialSeries("SpatialSeries", list(range(1, 11)),
206+
description='A test spatial series',
207+
unit='n/a',
208+
timestamps=list(range(1, 11))))
206209

207210
def getContainer(self, file):
208211
return file

0 commit comments

Comments
 (0)