Code to look for evoked potentials in variable spacing stimulation data as well as fit analytic models to the volume conducted signals
This repository contains code to analyze human intracranial datasets from the stimulation spacing and stimulation geometry projects.
An example workflow is shown for Subject ID 010dcb. The relevant code is under StimulationVoltageAnalysis/look_for_eps.
running ep_search_iterate.m as setup will create the data files for 010dcb, which can then be fed into analyze_010dcb.m which illustrates how once the data has been extracted into a chunked form, the peak to peak voltages can be calculated. Plots are also made showing the stimulation artifact in ep_search_iterate.m, as well as the evoked potentials in analyze_010dcb.m*. This requires the data generated by ep_search_iterate to be placed in a single folder.
The functions which extract the peak to peak voltages of the EPs are in the analysisFunctions folder, while functions helpful for plotting are under helperFunctions
Scripts which function on single files are available with ep_search_gui_select.m, which requires various parameters to be set in code, but this enables rapid loading of converted data files for further analysis.
To fit the analytic models from 8 subjects as discussed in David Caldwell's thesis, the following master scripts are useful: calculate_spherical_patient.m in ElectrodeModeling/manuscript/spherical_model as well as calculate_spherical_patient_3ada8b.m in ElectrodeModeling/manuscript/spherical_model
The folders ECoG_subjs and DBS_subjs under manuscript/extraction_analysis_pipeline/recorded_waveforms_analysis/individual_subject_scripts highlights example scripts for previous subject on how to extract their data for volume conduction analysis.
The key function is voltage_extract_avg
The folder manuscript/extraction_analysis_pipeline/Analyze_Stim_Curves has scripts and functions to analyze the applied stimulation voltage waveform.
The folder StimulationVoltageAnalysis/salineAnalysis contains scripts and functions to process TDT saline stimulation data sets.
A folder with legacy code for extracting data epochs is under StimulationVoltageAnalysis/resistivity_extraction
https://drive.google.com/open?id=1j\_J7ncKy4aAgdwGUmLxid6NIPJ8\_Eytz
David J Caldwell, BSD-3 License