OpenSourceBrain / osb-model-validation

Tools for automated model validation in OpenSourceBrain projects
GNU Lesser General Public License v3.0
9 stars 9 forks source link

add frequency analyzer #4

Open borismarin opened 10 years ago

borismarin commented 10 years ago
expected:
  spiking frequency: 12 Hz
pgleeson commented 9 years ago

An option for this (and many other tests) might be integration with pyelectro (originally by @vellamike). My fork has been updated to work with neurotune for model optimisation and this has been integrated into pyNeuroML

With pyelectro analyses you can extract multiple values from traces, e.g.

'average_maximum': 44.029340000000005,
'average_minimum': -34.528464285714286,
'first_spike_time': 25.68,
'interspike_time_covar': 0.18967153431137065,
'max_peak_no': 15,
'mean_spike_frequency': 73.688088846820193,
'min_peak_no': 14,
'peak_decay_exponent': -0.87574137470510405,
'peak_linear_gradient': -0.035234798008075469,
'spike_broadening': 0.89612516334441239,
'spike_frequency_adaptation': -0.061486017703066345,
'spike_width_adaptation': 0.030554813160406775,
'trough_decay_exponent': 0.17495735351734659,
'trough_phase_adaptation': 0.020467490805728347

With NetworkAnalysis (example), you can even analyse across a population, e.g. for 8 cells:

{'Pop0/0/RS/v:average_last_1percent': -78.05726329999996,
'Pop0/0/RS/v:max_peak_no': 0,
'Pop0/0/RS/v:maximum': -78.05712,
'Pop0/0/RS/v:min_peak_no': 0,
'Pop0/0/RS/v:minimum': -93.23432,
'Pop0/1/RS/v:average_last_1percent': -78.05447155000017,
'Pop0/1/RS/v:max_peak_no': 0,
'Pop0/1/RS/v:maximum': -78.05438000000001,
'Pop0/1/RS/v:min_peak_no': 0,
'Pop0/1/RS/v:minimum': -85.56111,
'Pop0/2/RS/v:average_last_1percent': -78.04968999999984,
'Pop0/2/RS/v:max_peak_no': 0,
'Pop0/2/RS/v:maximum': -78.04969,
'Pop0/2/RS/v:min_peak_no': 0,
'Pop0/2/RS/v:minimum': -80.0,
'Pop0/3/RS/v:average_last_1percent': -78.04233762499992,
'Pop0/3/RS/v:max_peak_no': 0,
'Pop0/3/RS/v:maximum': -70.74634999999999,
'Pop0/3/RS/v:min_peak_no': 0,
'Pop0/3/RS/v:minimum': -80.0,
'Pop0/4/RS/v:average_last_1percent': -78.03175660000001,
'Pop0/4/RS/v:max_peak_no': 0,
'Pop0/4/RS/v:maximum': -63.57441,
'Pop0/4/RS/v:min_peak_no': 0,
'Pop0/4/RS/v:minimum': -80.0,
'Pop0/5/RS/v:average_last_1percent': -78.017118725,
'Pop0/5/RS/v:max_peak_no': 0,
'Pop0/5/RS/v:maximum': -56.54653,
'Pop0/5/RS/v:min_peak_no': 0,
'Pop0/5/RS/v:minimum': -80.0,
'Pop0/6/RS/v:average_last_1percent': -77.97327665,
'Pop0/6/RS/v:average_maximum': 50.014809999999997,
'Pop0/6/RS/v:first_spike_time': 63.3,
'Pop0/6/RS/v:max_peak_no': 1,
'Pop0/6/RS/v:maximum': 50.01481,
'Pop0/6/RS/v:min_peak_no': 0,
'Pop0/6/RS/v:minimum': -80.0,
'Pop0/7/RS/v:average_last_1percent': -77.71963322500004,
'Pop0/7/RS/v:average_maximum': 42.762688500000003,
'Pop0/7/RS/v:average_minimum': -50.345349473684209,
'Pop0/7/RS/v:first_spike_time': 24.97,
'Pop0/7/RS/v:interspike_time_covar': 0.48520513388067654,
'Pop0/7/RS/v:max_peak_no': 20,
'Pop0/7/RS/v:maximum': 52.035560000000004,
'Pop0/7/RS/v:mean_spike_frequency': 97.791960471460186,
'Pop0/7/RS/v:min_peak_no': 19,
'Pop0/7/RS/v:minimum': -80.0,
'Pop0/7/RS/v:peak_decay_exponent': -1.8243706435178504,
'Pop0/7/RS/v:peak_linear_gradient': 0.059292086452458044,
'Pop0/7/RS/v:spike_broadening': 1.1113270215496485,
'Pop0/7/RS/v:spike_frequency_adaptation': -0.071894385875145822,
'Pop0/7/RS/v:spike_width_adaptation': 0.023094452119918195,
'Pop0/7/RS/v:trough_decay_exponent': 0.065597269846303097,
'Pop0/7/RS/v:trough_phase_adaptation': -0.057783771142840709}