12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- %% Calculate characteristic features
- % This script obtains the spike height, the amplitude of the T cell during
- % - 2nA and 1.5 nA interneuron stimulation as well as the latency of the
- % interneuron response to a T cell spike. All values are obtained for all
- % 62 datasets and stored in a data file for later usage.
- % This script was written to abolish the need to calculate all the
- % data used for the graphical clustering every time they are needed.
- % -------------------------------------------------------------------------
- % Program by: Bjarne Schultze [last modified: 11.03.2022]
- % -------------------------------------------------------------------------
- % calculate the spike amplitudes for all interneurons
- [spike_heights, ~] = intSpikeHeight(1:62);
- % obtain the latencies of the average postsynaptic response (interneuron)
- % to a presynaptic spike (in the T cell)
- latencies = spikeTrigAvg_postsyn(1:62);
- % calculate the amplitudes of the membrane potential during -2 nA and
- % 1.5 nA stimulation of the interneuron
- AmpIout = ampAtStim(1:62,'Stimuli',[-2,1.5],'StimCell','INT',...
- 'Filter','hn');
- % preallocate vectors for the amplitudes at -2 nA and 1.5 nA
- amp_minus2nA_stim = zeros(62,1);
- amp_1_5nA_stim = zeros(62,1);
- % extract the results from the AmpIout variable
- for file = 1:62
- amp_minus2nA_stim(file,1) = AmpIout{file,1}.MeanAmplitudeT(1);
- amp_1_5nA_stim(file,1) = AmpIout{file,1}.MeanAmplitudeT(2);
- end
- % set all files were no latency was measured to 60 (important to plot the
- % results later)
- latencies(isnan(latencies)) = 60;
- % set latency for dataset 5, 20 and 50 to 60, because in these datasets the
- % T cell is not spiking. Hence, there can't be a response to T cell spikes
- latencies([5,20,50]) = 60;
- % set spike height of non-spinking interneurons to -10 (function can't
- % handle them in an adequat way)
- spike_heights([5,10,26,36,38,40],1) = -10;
- % manually adapt two hyperpolarization measurements because the function
- % did not measure actual graded hyperpolarizations
- amp_minus2nA_stim([31,57]) = 0;
- % save all values for later usage in other functions
- save("../AdditionalFiles/decisionData.mat", "amp_minus2nA_stim", ...
- "spike_heights", "latencies", "amp_1_5nA_stim")
- %% End
- % clear workspace
- clear
|