def test_get_lfp(channels_table_api): session = EcephysSession(api=channels_table_api) obtained = session.get_lfp(0) expected = xr.DataArray(data=np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]), dims=['channel', 'time'], coords=[[2, 1], np.linspace(0, 2, 5)]) xr.testing.assert_equal(expected, obtained)
def test_get_lfp_mask_invalid(lfp_masking_api): session = EcephysSession(api=lfp_masking_api) obtained = session.get_lfp(0) expected = xr.DataArray(data=np.array([[1, 2, 3, np.nan, np.nan], [6, 7, 8, np.nan, np.nan]]), dims=['channel', 'time'], coords=[[2, 1], np.linspace(0, 2, 5)]) print(expected) print(obtained) xr.testing.assert_equal(expected, obtained)