EZdiagRFsSheet.m 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. global Exp
  2. try % Try the whole routine
  3. if strcmp(Exp(expN).DexpType,'multi') ||...
  4. strcmp(Exp(expN).DexpType,'chrono')
  5. DexpN=n;
  6. end
  7. rnames=[];
  8. data=[];
  9. try
  10. cnames={'RF Name','Median','Mean','STD','Minimum','Maximum'};
  11. rCnt=0;
  12. RFfilename= fullfile(Exp(expN).Dexp(DexpN).resDir,'PrintResults','!RFsDiagnostics.txt');
  13. fid=fopen(RFfilename,'w'); %('RFdiagnostic.txt','w');
  14. ftitle= strcat(ExpPath,':::Reference Diagnostic Values');
  15. try
  16. fprintf(fid,'%s\n',ftitle);
  17. catch mErr
  18. errorMessage=mErr.message
  19. msg='Check Permissions of PrintResult folder. !RFsDiagnostics.txt may not be created';
  20. warning((msg));
  21. warndlg('Check Permissions of PrintResult folder. !RFsDiagnostics.txt may not be created');
  22. end
  23. fprintf(fid,'%s\t %s\t %s\t %s\t %s\t %s','RF Name','Median','Mean','STD','Min','Max');
  24. fprintf(fid,'\n');
  25. rnames= cell(1,1);
  26. for d=1:DMnum
  27. try
  28. % RF1 MasterPlate Stats
  29. RFmd1LB=Exp(expN).Dexp(DexpN).RFmd1LB(d);
  30. mval1=Exp(expN).Dexp(DexpN).RFmd1val(d);
  31. mean1=Exp(expN).Dexp(DexpN).mean1(d);
  32. std1=Exp(expN).Dexp(DexpN).std1(d);
  33. min1=Exp(expN).Dexp(DexpN).min1(d);
  34. max1=Exp(expN).Dexp(DexpN).max1(d);
  35. fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n',...
  36. cell2mat(RFmd1LB), mval1,mean1,std1,min1,max1)
  37. rCnt=rCnt+1;
  38. data(rCnt,1:5)=[mval1,mean1,std1,min1,max1];
  39. rnames(rCnt)=RFmd1LB;
  40. catch
  41. message='No RF1 MasterPlate'
  42. end
  43. try
  44. % RF2 MasterPlate Stats
  45. RFmd2LB=Exp(expN).Dexp(DexpN).RFmd2LB(d);
  46. mval2=Exp(expN).Dexp(DexpN).RFmd2val(d);
  47. mean2=Exp(expN).Dexp(DexpN).mean2(d);
  48. std2=Exp(expN).Dexp(DexpN).std2(d);
  49. min2=Exp(expN).Dexp(DexpN).min2(d);
  50. max2=Exp(expN).Dexp(DexpN).max2(d);
  51. fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n', cell2mat(RFmd2LB),mval2,mean2,std2,min2,max2)
  52. rCnt=rCnt+1;
  53. data(rCnt,1:5)= [mval2,mean2,std2,min2,max2];
  54. rnames(rCnt)= RFmd2LB;
  55. catch
  56. message='No RF2 MasterPlate'
  57. end
  58. % Distributed Global stats
  59. try
  60. RFmdGLB=Exp(expN).Dexp(DexpN).RFmdGLB(d);
  61. mvalsDG=Exp(expN).Dexp(DexpN).RFmedianG(d);
  62. RFmeanG=Exp(expN).Dexp(DexpN).RFmeanG(d);
  63. RFstdG=Exp(expN).Dexp(DexpN).RFstdG(d);
  64. maxG=Exp(expN).Dexp(DexpN).RFmaxG(d);
  65. minG=Exp(expN).Dexp(DexpN).RFminG(d);
  66. fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n', cell2mat(RFmdGLB),mvalsDG,RFmeanG,RFstdG,minG,maxG)
  67. rCnt=rCnt+1;
  68. data(rCnt,1:5)=[mvalsDG,RFmeanG,RFstdG,minG,maxG];
  69. rnames(rCnt)=RFmdGLB;
  70. catch
  71. message='No RF2 MasterPlate'
  72. end
  73. end
  74. % Distributed RF1 Plates Stats Print
  75. try
  76. for d=1:DMnum
  77. for mm=1:length(dMPs)
  78. % RFmd1posD= Exp(expN).Dexp(DexpN).RFmdPindx(d,dMPs(mm));
  79. % dMP= Exp(expN).Dexp(DexpN).RFmdPpltN(d,dMPs(mm)); %This is a storage of the MasterPlate used NOT the ScanPlate? WeMight wish to store the ScanPlateNumber also???
  80. % rf1scNdisp= Exp(expN).Dexp(DexpN).RFmdPscanN(d,dMPs(mm));
  81. RFmdPLB=Exp(expN).Dexp(DexpN).RFmdPLB(d,dMPs(mm));
  82. mval1Disp=Exp(expN).Dexp(DexpN).RFmedianP(d,dMPs(mm));
  83. mean1Disp=Exp(expN).Dexp(DexpN).meanP(d,dMPs(mm));
  84. std1Disp=Exp(expN).Dexp(DexpN).stdP(d,dMPs(mm));
  85. minDisp=Exp(expN).Dexp(DexpN).minP(d,dMPs(mm));
  86. maxDisp=Exp(expN).Dexp(DexpN).maxP(d,dMPs(mm));
  87. fprintf(fid,'%s\t %7.2f\t %7.4f\t %7.4f\t %7.4f\t %7.4f\t\n', cell2mat(RFmdPLB),mval1Disp,mean1Disp,std1Disp,minDisp,maxDisp);
  88. rCnt=rCnt+1;
  89. data(rCnt,1:5)=expjobsfld[mval1Disp,mean1Disp,std1Disp,minDisp,maxDisp];
  90. rnames(rCnt)=RFmdPLB;
  91. end
  92. end
  93. catch
  94. message='No Distributed RF1 MasterPlates'
  95. end
  96. catch
  97. Warndlg('Problem writing the RFdiagnosticSheet.txt file')
  98. end
  99. fclose(fid)
  100. catch
  101. msg='EZdiagRFsSheet.m failed. Check Permissions'
  102. end