*** Data underlying publication: Energy efficiency of pulse shaping in electrical stimulation: the interdependence of biophysical effects and circuit design losses ***
Authors: F. Varkevisser, W. A. Serdijn, T. L. Costa
TU Delft, Faculty of Electrical Engineering, Mathematics and Computer Science, Department of Microelectronics, Section Bioelectronics

Corresponding author: T. L. Costa
E-mail: t.m.l.dacosta@tudelft.nl

Shared under license: CC BY-NC-SA 4.0

***General Introduction***
This dataset contains the simulation files for modeling the efficiency of pulse shaping in electrical stimulation. The paper presents results for two models: The Axon Fiber model and Biophysically realistic models.
In this dataset, the folder 'NeuronModel' pertains to the simulations of the Axon Fiber Model, while the folder 'AberraModels' contains the simulations for the biophysically realistic models.
Both models are based on the biophysically realistic models published by Aberra et al. "AberraA S, Peterchev AVand GrillWM2018 Biophysically realistic neuron models for simulation of cortical stimulation J. Neural Eng. 15 066023".
To run the simulations, one needs to properly set up the models and NEURON mechanisms of the models presented by Aberra et al. in both folders.

The dataset was generated in 2022. The research project was funded by the Dutch Research Council (NWO) under grant number 17619 as part of the NWO Crossover Programme 'INTENSE'.

***Purpose of the calculations***
Simulate activation thresholds for different configurations (pulse shape, duration, model) and calculate the associated power losses.


***Software***
The code and dataset are written and generated in Python 3.8.8 and use the NEURON software as python package.
Results of simulations are saved in pickle (.pkl) files.

***Description of the data in this dataset***
NeuronModel:
 - 'model.py': Script that builds the Axon Fiber Model, the membrane dynamics used in this model (e.g., 'K_Pst') are based on the model mechanisms from Aberra et al. 
 - 'main_parallel.py': Script to run multiple simulations in parallel using the multiprocessing package. 
 - 'plotdata.py': Plots the figures as used in the publication.
 - 'WaveformModule.py': Module used by 'model.py' that creates the stimulation pulses used in this study.
 - 'datafiles/data_5_1_0_100_1.pkl': Simulation results for the Axon Fiber Model. Contains a python dictionary with the simulation results, the structure of the dictonary can be found in 'plotdata.py'.
 - 'datafiles/Vcdl.pkl': Simulation results for the effect of a double layer capacitor on the energy efficiency. Contains a python dictionary with the simulation data.

AberraModels:
 - 'addpoints_parallel.py': Script to add more datapoints to an existing dataset.
 - 'analysisfunctions_DF.py': Several functions to obtain relevant data comparisons from the results DataFrame.
 - 'calcVe.py': Reproduction of the HOC code in 'CalcVe.hoc' in Aberra et al.
 - 'config.py': File with possible configurations for the model in model.py, based on the data in Aberra et al.
 - 'Dataconversion.py': Post-processing functions.
 - 'DataFrameConversion.py': The original data was saved as python dictionary, this script is used to convert the results to a pandas DataFrame for easier post processing.
 - 'Datamerge.py': Script to merge the separate result files from 'main_parallel.py'.
 - 'Getparameters.py': Script to obtain model properties that are used in the Axon Fiber Model.
 - 'main.py': Script to run simulations.
 - 'main_parallel.py': Script to run multiple simulations in parallel using multiprocessing.
 - 'model.py': Script to initiate one of the models provided by Aberra et al. 
 - 'plotdata.py': Creates the plots presented in the paper.
 - 'runSim.py': Several simulation functions used in the module 'simulationfunctions.py'
 - 'simulationfunctions.py': Functions to run specific simulation (sweeps).
 - 'WaveformModule.py': Module used in the simulations that creates the stimulation pulses used in this study.
 - 'DataFilesFinal/DataFrame_all.pkl': The resulting DataFrame after simulations and dataconversion.