Cell specific integrate-and-fire type models for a population of P-unit electroreceptors of Apteronotus leptorhynchus.
Model parameters are stored in csv files.
models.csv: the best fitting models from both fitting attemps. Use these models!models_old.csv: the original model parameters.goodcells.datcontains in each line a cell identifier of those cells where the models frommodels_old.csvfit the cells reasonably well.models_202106.csv: model parameters from a newer fitting attempt.
The model.py module provides two functions:
-
load_models(): load the model parameters from a csv file into a list of dictionaries. -
simulate(): simulate a model for a given stimulus.
Requires numpy. numba is optional, but you should definitely use
it to considerably speed up simulation times.
main.py is an example script that demonstrates how to load the model
parameters, prepare a stimulus, and simulate the models.
The EOD of a single fish always has an amplitude of one. The EOD frequency is in the table with the model parameters.
In profiles/ the python script punitprofiles.py generates for each
model cell a pdf with plots showing basic properties of the model in
comparison o the real cell's data. The plots are placed into the
profiles/plots*/ folder. In addition, some basic properties of the
cells and the models are stored in profiles/punitdata.csv,
profiles/model*data.csv, and profiles/model*spectraldata.csv, respectively.
The image of the example cell shown above was generated wih this script.
Requires:
thunderlab: Install from PyPI it using pippip3 install thunderlab
plottools: Install it from github using pippip3 install git+https://github.com/bendalab/plottools.git
numpy,scipy,pandas,matplotlib
Uses:
punitprofiles.pybaseline.pyeod.pyspectral.py
Call it from within the profiles/ folder. Optionally you may pass the models file as an argument:
> cd profiles
> python3 punitprofiles.py ../models_202106.csv