def setUpContainer(self): self.setUpElectrode() return IZeroClampSeries(name="izcs", data=[1, 2, 3, 4, 5], starting_time=123.6, rate=10e3, electrode=self.elec, gain=0.126)
def test_unit_warning(self): electrode_name = GetElectrode() msg = "Unit for IZeroClampSeries 'test_iZCS' is ignored and will be set to 'volts' as per NWB 2.1.0." with self.assertWarnsWith(UserWarning, msg): iZCS = IZeroClampSeries('test_iZCS', list(), electrode_name, 1.0, timestamps=list(), unit='unit') self.assertEqual(iZCS.unit, 'volts')
def setUpContainer(self): self.setUpElectrode() return IZeroClampSeries(name="izcs", data=[1, 2, 3, 4, 5], unit='A', starting_time=123.6, rate=10e3, electrode=self.elec, gain=0.126, bias_current=1.2, bridge_balance=2.3, capacitance_compensation=3.45)
def test_init(self): electrode_name = GetElectrode() iZCS = IZeroClampSeries('test_iZCS', 'a hypothetical source', list(), 'unit', electrode_name, 1.0, timestamps=list()) self.assertEqual(iZCS.name, 'test_iZCS') self.assertEqual(iZCS.source, 'a hypothetical source') self.assertEqual(iZCS.unit, 'unit') self.assertEqual(iZCS.electrode, electrode_name) self.assertEqual(iZCS.gain, 1.0) self.assertEqual(iZCS.bias_current, 0.0) self.assertEqual(iZCS.bridge_balance, 0.0) self.assertEqual(iZCS.capacitance_compensation, 0.0)
def test_stim_desc_warning(self): electrode_name = GetElectrode() msg = ( "Stimulus description 'desc' for IZeroClampSeries 'test_iZCS' is ignored and will be set to 'N/A' " "as per NWB 2.3.0.") with self.assertWarnsWith(UserWarning, msg): iZCS = IZeroClampSeries('test_iZCS', list(), electrode_name, 1.0, timestamps=list(), stimulus_description='desc') self.assertEqual(iZCS.stimulus_description, 'N/A')
def test_init(self): electrode_name = GetElectrode() iZCS = IZeroClampSeries('test_iZCS', list(), electrode_name, 1.0, timestamps=list()) self.assertEqual(iZCS.name, 'test_iZCS') self.assertEqual(iZCS.unit, 'volts') self.assertEqual(iZCS.electrode, electrode_name) self.assertEqual(iZCS.gain, 1.0) self.assertEqual(iZCS.bias_current, 0.0) self.assertEqual(iZCS.bridge_balance, 0.0) self.assertEqual(iZCS.capacitance_compensation, 0.0) self.assertEqual(iZCS.stimulus_description, 'N/A')