Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

1
0

circle_figure.m 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. clear all;
  2. mainfolder='U:/'
  3. load('good_partis.mat') %list of participant with a good performance
  4. partis=good_partis';
  5. partis_sub=good_partis';
  6. %% 1st Panel
  7. figure;
  8. oris=[11.25;33.75;56.25;78.75;101.25;123.75;146.25;168.75;191.25;213.75;236.25;258.75;281.25;303.75;326.25;348.75];
  9. colores=(colormap((hsv(16))));
  10. colores=[colores(13:16,:);colores(1:4,:);colores(5:8,:);colores(9:12,:);]
  11. rrr=ones(1,16)*1;
  12. for ooo=1:16
  13. polarplot(deg2rad(oris(ooo)),rrr(ooo),'wo','MarkerSize',18,'LineWidth',2,'MarkerFaceColor',colores(ooo,:));hold on,
  14. end
  15. rlim([0.5 1.1])
  16. oris1=[0 90 180 270]'
  17. ost=[num2str(oris1)]
  18. ost(:,4)='°'
  19. thetaticks(oris1)
  20. thetaticklabels(ost)
  21. ax=gca;
  22. ax.ThetaGrid='on';
  23. ax.RGrid='off';
  24. ax.RTickLabel=[];
  25. set(gca,'FontSize',20);
  26. set(gca,'color','none');
  27. %% 2nd Panel
  28. %% Uncomment to run from scratch
  29. % %% Parameters to be modify per loop
  30. %
  31. % tobefound{1} = 'find(data_epoch_thr.trialinfo.object_1_rot==objlist(k)&data_epoch_thr.trialinfo.retrocue==1)';
  32. % tobefound{2} = 'find(data_epoch_thr.trialinfo.object_2_rot==objlist(k)&data_epoch_thr.trialinfo.retrocue==2)';
  33. % tobefound{3} = 'find(data_epoch_thr.trialinfo.object_2_rot==objlist(k)&data_epoch_thr.trialinfo.retrocue==2)';
  34. % tobefound{4} = 'find(data_epoch_thr.trialinfo.object_1_rot==objlist(k)&data_epoch_thr.trialinfo.retrocue_uncued==1)';
  35. %
  36. % %%
  37. % foldlo{1}='eyelink_preprocessed/mean_recentered_th100/object_1_onset_11_seconds/';
  38. % foldlo{2}='eyelink_preprocessed/mean_recentered_th100/object_1_onset_11_seconds/';
  39. % foldlo{3}='eyelink_preprocessed/mean_recentered_th100/object_1_onset_11_seconds/';
  40. % foldlo{4}='eyelink_preprocessed/mean_recentered_th100/2nd_cue_onset_17_5__seconds/';
  41. %
  42. % %%
  43. % item_id_rsa{1}=nan(length(partis),16,3,5501);
  44. % item_id_rsa{2}=nan(length(partis),16,3,5501);
  45. % item_id_rsa{3}=nan(length(partis),16,3,5501);
  46. % item_id_rsa{4}=nan(length(partis),16,3,8751);
  47. % %%
  48. % for fff=1:4
  49. %
  50. % for ppp=1:length(partis)
  51. %
  52. % %% Loading dataset
  53. % toload =[mainfolder foldlo{fff} partis{ppp,:} '.mat'];
  54. % load(toload)
  55. %
  56. % %Loading logfiles
  57. %
  58. % subtable=[];
  59. %
  60. % if strcmp(partis_sub{ppp,:},'p11')
  61. % load([mainfolder 'logfiles/resultfile_p11_table_repaired.mat'])
  62. % subtable=sub
  63. % else
  64. %
  65. % sub = tdfread([mainfolder 'logfiles/resultfile_' partis_sub{ppp,:} '.txt'],'tab'); %Logfile for this participant
  66. % subtable=struct2table(sub);
  67. % end
  68. %
  69. %
  70. %
  71. % %% Selecting trials per rot only (not ID)
  72. %
  73. % objlistid=unique(data_epoch_thr.trialinfo.object_1_id);
  74. % counter=1;
  75. %
  76. % objlist=unique(data_epoch_thr.trialinfo.object_1_rot);
  77. %
  78. % for k =1:length(objlist)
  79. %
  80. % triales = eval(tobefound{fff});
  81. % [t_s_ave{counter}] = squeeze(nanmean(data_epoch_thr.eyedat(triales,:,:),1));
  82. % counter=counter+1;
  83. %
  84. % end
  85. %
  86. % %% Substracting the mean per condition (not in this case)
  87. %
  88. % for k = 1:length(t_s_ave);
  89. %
  90. % if ~isempty(t_s_ave{k})
  91. %
  92. % rr=(t_s_ave{k});
  93. % item_id_rsa{fff}(ppp,k,:,:)=[rr];
  94. %
  95. % elseif isnan(t_s_ave{k})
  96. % item_id_rsa{fff}(ppp,k,1:3,1:size(data_epoch_thr.eyedat,3))=NaN;
  97. % end
  98. % end
  99. %
  100. % time{fff}=data_epoch_thr.time;
  101. %
  102. % %%
  103. %
  104. % end
  105. %
  106. % end
  107. % %%
  108. %
  109. % save('circledata.mat','objlist','item_id_rsa', 'time')
  110. %% Load results
  111. load('circledata.mat')
  112. %% Plots
  113. IDs = {'1',' ',' ','4','5',' ',' ','8','9',' ',' ','12','13',' ',' ','16'}
  114. colores=(colormap(flip(hsv(16))));
  115. toi{1} = [400 1000];
  116. toi{2} = [1400 2000];
  117. toi{3} = [5350 5850];
  118. toi{4} = [2350 2850];
  119. titu={'stimulus 1';'stimulus 2';'delay 1';'delay 2';}
  120. figure
  121. for fff=1:4
  122. subplot(1,4,fff)
  123. ave_item_id_rsa=squeeze(nanmedian(item_id_rsa{fff},1));
  124. std_item_id_rsa=squeeze(std(item_id_rsa{fff},1,1));
  125. avg_std_item_id_rsa=squeeze(nanmean(std_item_id_rsa(:,1:2,:),2));
  126. t1=find(time{1}==toi{fff}(1));
  127. t2=find(time{1}==toi{fff}(2));
  128. for ppp=1:size(item_id_rsa{fff},1)
  129. x=squeeze(mean(item_id_rsa{fff}(ppp,:,1,t1:t2),4));
  130. y=squeeze(mean(item_id_rsa{fff}(ppp,:,2,t1:t2).*-1,4));
  131. sct=scatter(x,y,60,colores,'filled','MarkerFaceAlpha',.25);hold on;
  132. end
  133. x=mean(ave_item_id_rsa(:,1,t1:t2),3);
  134. y=mean(ave_item_id_rsa(:,2,t1:t2).*-1,3);
  135. z=(mean(avg_std_item_id_rsa(:,t1:t2),2)/40)*250;
  136. sct=scatter(x,y,z,colores,'filled','MarkerEdgeColor',[1 1 1],...
  137. 'LineWidth',1.5)
  138. set(gca,'Color','k')
  139. ao=0.8/0.0217;
  140. xlim([-ao ao])
  141. ylim([-ao ao])
  142. pixtovd=0.0217; %pixel to visual degrees
  143. set(gca,'XTick',-ao:(ao/2):ao)
  144. set(gca,'XTickLabel',(-ao:(ao/2):ao)*pixtovd)
  145. set(gca,'YTick',-ao:(ao/2):ao)
  146. set(gca,'YTickLabel',(-ao:(ao/2):ao)*pixtovd)
  147. title(titu{fff})
  148. % ylabel('° vis. angle')
  149. xlabel('° vis. angle')
  150. set(gca,'FontSize',20);
  151. end