Skip to content

Commit e216da6

Browse files
committed
Added optional rotated plots to sinepowerspec for comparing timing
1 parent 8f76163 commit e216da6

3 files changed

Lines changed: 35 additions & 5 deletions

File tree

Analysis/SK/AnnotatedScripts/Velocity_VoltageAtt_180913.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
ephysData = ImportPatchData('incl',1);
1414
projects = {'FAT';'SYM'};
1515
ephysData = FilterProjectData(ephysData, projects);
16+
%fix a couple messed up names
17+
ephysData.FAT029 = ephysData.FAT029s;
18+
ephysData.FAT017 = ephysData.FAT017e001;
19+
ephysData.FAT164 = ephysData.FAT164001;
20+
ephysData = rmfield(ephysData,{'FAT017e001';'FAT029s';'FAT164001'});
21+
1622
clear projects;
1723

1824
ephysMetaData = ImportMetaData(); %Recording Database.xlsx
@@ -344,7 +350,7 @@
344350
%% Correct all velocities and export for Igor fitting of Boltzmann to each recording
345351

346352
% Set the filename
347-
fname = 'PatchData/attCorrectedVel_subQ(190217).xls';
353+
fname = 'PatchData/attCorrectedVel_test(190217).xls';
348354
noCorr = 0;
349355
normFlag = 1; %normalize to 40mm/s ramp (highest velocity "step")
350356
normVel = 39740; % must be negative for off

Analysis/SK/Scripts-in-progress/Sim_Distance_Comparison.m

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@
3232
% scrsz = get(groot,'ScreenSize');
3333
% figure('Position',[200 200 800 600]);
3434

35+
% Plot rotated plots for individual channel currents to look at timing
36+
isRotate = 0;
37+
3538
for iPanel = 1:3
3639
fh(iPanel,1) = figure('Position',[100 100 650 600]); % stim and macro currents
3740
fh(iPanel,2) = figure('Position',[500 100 800 600]); % channel currents
38-
41+
if isRotate
42+
fh(iPanel,3) = figure('Position',[600 0 600 800]); % rotated channel currents
43+
end
3944
switch iPanel
4045
case 1 % displacement
4146
stType = 'disp';
@@ -144,6 +149,21 @@
144149
plot(simTime, -simDataMat{iPanel}(:,thisCol),'b');
145150
end
146151

152+
% Alternative plot for looking at timing vs. distance
153+
if isRotate == 1
154+
figure(fh(iPanel,3));
155+
axh3(kDist,jIntensity) = subplot(4,3,kDist+4*(jIntensity-1));
156+
if strcmp(stType,'disp') || strcmp(stType,'speed')
157+
thisCol = sum([chCurrCols; intCols{jIntensity}; onCols{1}; distCols{kDist}],1)==4;
158+
plot(simTime, -simDataMat{iPanel}(:,thisCol),'b'); % on = blue
159+
hold on;
160+
thisCol = sum([chCurrCols; intCols{jIntensity}; onCols{2}; distCols{kDist}],1)==4;
161+
plot(simTime, -simDataMat{iPanel}(:,thisCol),'m'); % off = magenta
162+
elseif strcmp(stType,'freq')
163+
thisCol = sum([chCurrCols; intCols{jIntensity}; distCols{kDist}],1)==3;
164+
plot(simTime, -simDataMat{iPanel}(:,thisCol),'b');
165+
end
166+
end
147167
end
148168

149169
end
@@ -187,9 +207,13 @@
187207
% set(axh1(3,3),'YLim',[-72.2 -71])
188208
%
189209
set(axh2,'YLim',[-2 0]);
190-
210+
% set(axh3(:,1),'XLim',[-0.05 0.25])
211+
% set(axh3(:,2),'XLim',[0.22 0.25])
212+
% set(axh3(:,3),'XLim',[0.244 0.25])
213+
% set(axh3,'YLim',[-2 0]);
214+
191215
end
192-
clear axh1 axh2;
216+
clear axh1 axh2 axh3;
193217

194218
end
195219

Analysis/SK/Scripts-in-progress/SinePowerSpec.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
set(yyh{i},'XTickLabel',[]);
219219
end
220220

221-
plotfixer
221+
plotfixer;
222222
%% Calculate steady state mean and rms by frequency
223223

224224
whichPeaks = sinePeaks;

0 commit comments

Comments
 (0)