2020from ..model import TemplateModel
2121
2222
23+
2324#------------------------------------------------------------------------------
2425# Fixture
2526#------------------------------------------------------------------------------
@@ -246,7 +247,7 @@ def test_merger(dataset):
246247
247248 model = TemplateModel (
248249 dir_path = path , dat_path = dataset .dat_path , sample_rate = 2000 , n_channels_dat = dataset .nc )
249- print ( model . merge_map )
250+
250251 c = EphysAlfCreator (model )
251252 c .convert (out_path_merge )
252253
@@ -255,9 +256,10 @@ def test_merger(dataset):
255256 clu_new = np .load (next (out_path_merge .glob ('clusters.peakToTrough.npy' )))
256257 assert clu_old [split_clu ] == clu_new [np .max (clu ) + 2 ]
257258 assert clu_old [split_clu ] == clu_new [np .max (clu ) + 3 ]
258- assert clu_new [split_clu ] == 0
259- assert clu_new [merge_clu [0 ]] == 0
260- assert clu_new [merge_clu [1 ]] == 0
259+
260+ assert np .isnan ([clu_new [split_clu ]])[0 ]
261+ assert np .isnan ([clu_new [merge_clu [0 ]]])[0 ]
262+ assert np .isnan ([clu_new [merge_clu [1 ]]])[0 ]
261263
262264 clu_old = np .load (next (out_path .glob ('clusters.channels.npy' )))
263265 clu_new = np .load (next (out_path_merge .glob ('clusters.channels.npy' )))
@@ -271,9 +273,9 @@ def test_merger(dataset):
271273 clu_new = np .load (next (out_path_merge .glob ('clusters.depths.npy' )))
272274 assert clu_old [split_clu ] == clu_new [np .max (clu ) + 2 ]
273275 assert clu_old [split_clu ] == clu_new [np .max (clu ) + 3 ]
274- assert clu_new [split_clu ] == 0
275- assert clu_new [merge_clu [0 ]] == 0
276- assert clu_new [merge_clu [1 ]] == 0
276+ assert np . isnan ([ clu_new [split_clu ]])[ 0 ]
277+ assert np . isnan ([ clu_new [merge_clu [0 ]]])[ 0 ]
278+ assert np . isnan ([ clu_new [merge_clu [1 ]]])[ 0 ]
277279
278280 clu_old = np .load (next (out_path .glob ('clusters.waveformsChannels.npy' )))
279281 clu_new = np .load (next (out_path_merge .glob ('clusters.waveformsChannels.npy' )))
0 commit comments