and returns observations and paramaterized NU test suits.
The problem is what to do with AIBS observations, which are available a bit less often.
def get_neuron_criteria(cell_id,file_name=None):
from neuronunit import tests as nu_tests, neuroelectro
from neuronunit.tests import passive, waveform, fi
#
tests = []
#observation = fi.neuroelectro_summary_observation(fi_basket)
tests += [fi.RheobaseTestP(observation=observation)]
test_class_params = [(fi.RheobaseTest,None),
(passive.InputResistanceTest,None),
(passive.TimeConstantTest,None),
(passive.CapacitanceTest,None),
(passive.RestingPotentialTest,None),
(waveform.InjectedCurrentAPWidthTest,None),
(waveform.InjectedCurrentAPAmplitudeTest,None),
(waveform.InjectedCurrentAPThresholdTest,None)]#,
inh_observations = []
for cls,params in test_class_params:
inh_observations.append(cls.neuroelectro_summary_observation(cell_id))
tests += [cls(inh_observations[-1])]
hooks = {tests[0]:{'f':update_amplitude}} #This is a trick to dynamically insert the method
#update amplitude at the location in sciunit thats its passed to, without any loss of generality.
suite = sciunit.TestSuite("vm_suite",tests)#
if file_name is not None:
file_name = file_name +'.p'
with open(file_name, 'wb') as f:
pickle.dump(tests, f)
return tests, inh_observations
The function takes neurolex_id
and returns observations and paramaterized NU test suits.
The problem is what to do with AIBS observations, which are available a bit less often.