diff --git a/test/test_data/channel_map.npy b/test/test_data/channel_map.npy new file mode 100644 index 0000000..e5567c7 Binary files /dev/null and b/test/test_data/channel_map.npy differ diff --git a/test/test_merged_spike_analysis.py b/test/test_merged_spike_analysis.py index 8c2befc..d3cf825 100644 --- a/test/test_merged_spike_analysis.py +++ b/test/test_merged_spike_analysis.py @@ -121,3 +121,21 @@ def test_merge_z_score(sa): test_merged_msa.set_stimulus_data() test_merged_msa.set_spike_data() + + sa.events = { + "0": { + "events": np.array([100, 200]), + "lengths": np.array([100, 100]), + "trial_groups": np.array([1, 1]), + "stim": "test", + } + } + sa.get_raw_psth(window=[0, 300], time_bin_ms=50) + sa.get_raw_firing_rate(time_bin_ms=1000, bsl_window=None, fr_window=[0, 300], mode="raw") + sa.z_score_data(time_bin_ms=1000, bsl_window=[0, 50], z_window=[0, 300]) + + test_msa = MergedSpikeAnalysis([sa, sa], name_list=["test", "test1"]) + test_msa.merge(psth=["zscore", "fr"]) + test_merged_msa = test_msa.get_merged_data() + + assert isinstance(test_merged_msa.mean_firing_rate, dict) diff --git a/test/test_spike_data.py b/test/test_spike_data.py index 025da04..48af794 100644 --- a/test/test_spike_data.py +++ b/test/test_spike_data.py @@ -140,6 +140,12 @@ def test_get_waveforms_read_json(spikes, tmp_path): assert isinstance(spikes.waveforms, np.ndarray) +def test_get_waveforms_binary(spikes): + spikes.get_waveforms() + print(spikes.waveforms) + assert isinstance(spikes.waveforms, np.ndarray) + + def test_set_qc_error(spikes): with pytest.raises(Exception): spikes.set_qc()