ck_CollectAllFittingResults.m 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. clear all; clc;
  2. CV='cv1';
  3. Do.MRI = false;
  4. Do.EPHYS = true;
  5. Do.COMBINE = true;
  6. %% MRI ====================================================================
  7. if Do.MRI
  8. monkeys = {'M02','M01'};
  9. models = {...
  10. ['linhrf_' CV '_dhrf'],...
  11. ['linhrf_' CV '_mhrf'],...
  12. ['linhrf_' CV '_dhrf_neggain'],...
  13. ['linhrf_' CV '_mhrf_neggain'],...
  14. ['doghrf_' CV '_dhrf'],...
  15. ['doghrf_' CV '_mhrf'],...
  16. ['csshrf_' CV '_dhrf'],...
  17. ['csshrf_' CV '_mhrf']};
  18. output = ['AllFits_MRI_' CV];
  19. ck_GetMRI_pRF(monkeys,models,output);
  20. end
  21. %% EPHYS ==================================================================
  22. if Do.EPHYS
  23. monkeys = {'M03','M04'};
  24. models = {...
  25. ['linear_ephys_' CV],...
  26. ['linear_ephys_' CV '_neggain'],...
  27. ['dog_ephys_' CV],...
  28. ['css_ephys_' CV],...
  29. 'classicRF'};
  30. output = ['AllFits_ephys_' CV];
  31. ck_GetEphys_pRF(monkeys,models,output);
  32. end
  33. %% COMBINE ================================================================
  34. if Do.COMBINE
  35. homefld = pwd;
  36. cd ../../../
  37. SHARED_ROOT_FLD = pwd;
  38. cd(homefld)
  39. fitres_path = fullfile(SHARED_ROOT_FLD,'FitResults');
  40. % load mri
  41. fprintf('Loading MRI\n');
  42. R_MRI = load(fullfile(fitres_path,'MRI','Combined',['AllFits_MRI_' CV]));
  43. D99 = R_MRI.D99;
  44. R_MRI = R_MRI.R;
  45. % load ephys
  46. fprintf('Loading EPHYS\n');
  47. R_EPHYS = load(fullfile(fitres_path,'EPHYS','Combined',['AllFits_ephys_' CV]));
  48. R_EPHYS = R_EPHYS.R;
  49. % save
  50. fprintf('Saving results from both modalities\n');
  51. save(fullfile(fitres_path,'MULTIMODAL',['AllFits_' CV]),...
  52. 'R_MRI','R_EPHYS','D99');
  53. end
  54. %% Done
  55. fprintf('ALL DONE!\n');