master
mDescape 3 years ago
parent deb1ad605c
commit 367b1834d8
  1. BIN
      C7000 _SDK/Sample/.vs/C7000_SDK_Sample/v16/.suo
  2. 16
      C7000 _SDK/Sample/bin/Release/SkCommIo.log
  3. 123
      Code/C7000_Controller/netcoreapp3.1/SkCommIo.log
  4. 11
      Code/Matlab/CURRENT_CalibrateVisualStim_Descalzo.m
  5. 4
      Code/Matlab/Calibration_curve.csv
  6. 4
      Code/Matlab/Calibration_curve2.csv
  7. 4
      Code/Matlab/Calibration_curve_paper.csv
  8. 153
      Code/Matlab/DEBUG_CalibrateVisualStim_Descalzo.asv
  9. 93
      Code/Matlab/NEW_CalibrateVisualStim_Descalzo.m
  10. 162
      Code/Matlab/Post_Cal_Test.m
  11. 25
      Code/Matlab/Present_single_image.m
  12. BIN
      Documents/Bibliografia/1_vanagaite1997 light induced discomfort.pdf
  13. BIN
      Documents/Bibliografia/2_main1997.pdf
  14. BIN
      Documents/Bibliografia/3_woodhouse1993.pdf
  15. BIN
      Documents/Bibliografia/4_IEC62471-2006.pdf
  16. BIN
      Documents/Bibliografia/5_CREE_XLamp_EyeSafety.pdf
  17. BIN
      Documents/Bibliografia/6_optoma-uhd51a-user-manual-en.pdf
  18. BIN
      Documents/Bibliografia_llindar_molestia.rar
  19. BIN
      Documents/Presentació VHIR 29-Abril.pptx
  20. BIN
      images/17_04/Calibration_curve_3.jpg
  21. BIN
      images/17_04/Sensibilitat_tallada.jpg
  22. BIN
      images/17_04/cal_mati.jpg
  23. BIN
      images/17_04/cal_nit.jpg
  24. BIN
      images/17_04/delete_me.jpg
  25. BIN
      images/17_04/sensibilitat_sencera.jpg
  26. BIN
      images/Espectre_projector/blanc_36800.png
  27. BIN
      images/Espectre_projector/blue_1780.png
  28. BIN
      images/Espectre_projector/green_8410.png
  29. BIN
      images/Espectre_projector/red_2130.png
  30. BIN
      images/Espectre_projector/yellow_18000.png
  31. BIN
      images/open_loop_calibraton_curve.jpg

@ -0,0 +1,16 @@
[#2020/04/22 06:13:46.969]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 06:15:46.307]SkCommIo_SendData :Status=0x20210001:GetLastError=0x00000016
[#2020/04/22 06:15:46.330]SkCommIo_SendData :Status=0x20210001:GetLastError=0x00000016
[#2020/04/22 06:16:31.983]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/22 06:16:32.005]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/22 06:16:32.054]SkCommIo_CloseDevice :Status=0x20210003:GetLastError=0x00000578
[#2020/04/24 11:19:39.145]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/24 11:27:58.856]SkCommIo_SendData :Status=0x20210001:GetLastError=0x00000016
[#2020/04/24 11:27:58.912]SkCommIo_SendData :Status=0x20210001:GetLastError=0x00000016
[#2020/04/24 11:30:41.409]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/24 11:30:41.455]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/24 11:30:41.493]SkCommIo_CloseDevice :Status=0x20210003:GetLastError=0x00000578
[#2020/04/26 11:32:59.944]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/26 11:39:37.883]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/26 11:39:37.893]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/26 11:39:37.985]SkCommIo_CloseDevice :Status=0x20210003:GetLastError=0x00000578

@ -810,3 +810,126 @@
[#2020/04/19 02:04:33.488]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/19 02:04:33.500]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/19 02:05:44.065]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/19 04:49:30.606]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/19 05:04:20.479]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/19 14:01:57.505]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 08:58:46.141]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 09:00:58.076]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:25:52.219]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:27:10.252]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:27:15.272]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:28:10.056]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:28:15.088]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:29:08.601]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:29:51.370]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:29:51.429]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:29:51.450]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:29:51.463]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:12.967]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:12.980]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:12.996]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:13.042]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:37.925]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:37.939]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:37.951]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:37.985]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:55.983]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:55.995]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:56.036]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:30:56.051]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:32:54.010]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:33:29.149]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:34:37.429]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:35:18.514]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:35:52.972]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:36:28.552]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:37:48.236]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:37:48.267]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:37:48.300]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:37:48.318]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:39:30.667]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:40:20.519]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:40:25.570]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:43:40.363]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:44:10.252]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:44:55.127]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:54:55.506]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:54:55.584]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:54:55.648]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:54:55.698]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:56:51.123]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 13:57:46.965]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:57:46.978]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:57:46.990]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 13:57:47.142]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 14:02:11.435]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 14:02:16.568]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 14:07:19.606]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 14:12:54.449]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/20 15:01:44.687]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 15:01:44.722]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 15:01:44.737]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 15:01:44.753]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/20 15:03:42.000]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:35:49.941]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:36:26.412]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:37:01.238]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:37:29.471]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:37:54.359]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:38:22.298]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:38:46.233]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:39:12.723]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:39:37.719]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 09:40:07.558]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 10:10:43.948]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/21 15:01:47.912]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 11:15:54.904]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 12:14:19.529]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 12:15:57.147]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 12:16:02.176]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 12:35:39.102]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 14:27:09.288]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/22 14:27:09.367]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/22 14:27:09.413]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/22 14:27:09.450]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/22 14:28:52.464]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 14:32:51.357]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 14:40:15.113]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 14:47:06.102]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/22 14:50:09.875]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/23 11:41:21.266]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/23 12:27:26.636]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/23 14:36:01.106]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/23 16:13:11.528]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:13:11.548]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:13:11.564]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:13:11.593]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:13:16.035]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/23 16:14:57.397]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/23 16:18:33.145]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:18:33.160]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:18:33.174]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:18:33.228]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/23 16:20:57.379]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/23 16:44:23.476]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/24 08:42:01.305]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/24 09:44:44.362]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/24 09:50:30.722]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/24 09:57:59.842]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/24 09:57:59.859]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/24 09:57:59.871]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/24 09:57:59.898]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/24 09:59:50.595]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/25 15:23:20.784]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/25 15:24:57.094]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/25 17:10:49.817]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/28 09:29:55.310]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/28 10:24:03.709]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/28 10:24:03.761]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/28 10:24:03.781]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/28 10:24:03.812]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/04/28 10:26:02.212]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/28 16:14:32.778]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/28 17:35:25.612]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/28 18:20:29.792]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/04/28 23:29:57.552]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000

@ -58,7 +58,9 @@ for intensity = calIntensity
meanIntensity = intensity*a + b;
while iterations < 10
if meanIntensity > 1
if isnan(meanIntensity)
meanIntensity = 0;
elseif meanIntensity > 1
meanIntensity = 1;
elseif meanIntensity < 0
meanIntensity = 0;
@ -79,11 +81,11 @@ for intensity = calIntensity
break;
end
if meanIntensity == 1 | meanIntensity == 0 %If be hit the limit already, go to the next point
if meanIntensity == 1 | meanIntensity == 0 %If be hit the limit already, go to the next point
break;
end
meanIntensity = meanIntensity - a*(error/100*intensity); %Image generator correction
meanIntensity = meanIntensity - a*(error/100*intensity) %Image generator correction
iterations = iterations + 1;
end
@ -113,6 +115,9 @@ fclose(tcpObj); %Close the server
%Data save
export_me = [calIntensity; useful_intensity];
csvwrite('Calibration_curve.csv', export_me)

@ -0,0 +1,4 @@
0,0.0039216,0.0078431,0.011765,0.015686,0.019608,0.023529,0.027451,0.031373,0.035294,0.039216,0.043137,0.047059,0.05098,0.054902,0.058824,0.062745,0.066667,0.070588,0.07451,0.078431,0.082353,0.086275,0.090196,0.094118,0.098039,0.10196,0.10588,0.1098,0.11373,0.11765,0.12157,0.12549,0.12941,0.13333,0.13725,0.14118,0.1451,0.14902,0.15294,0.15686,0.16078,0.16471,0.16863,0.17255,0.17647,0.18039,0.18431,0.18824,0.19216,0.19608,0.2,0.20392,0.20784,0.21176,0.21569,0.21961,0.22353,0.22745,0.23137,0.23529,0.23922,0.24314,0.24706,0.25098,0.2549,0.25882,0.26275,0.26667,0.27059,0.27451,0.27843,0.28235,0.28627,0.2902,0.29412,0.29804,0.30196,0.30588,0.3098,0.31373,0.31765,0.32157,0.32549,0.32941,0.33333,0.33725,0.34118,0.3451,0.34902,0.35294,0.35686,0.36078,0.36471,0.36863,0.37255,0.37647,0.38039,0.38431,0.38824,0.39216,0.39608,0.4,0.40392,0.40784,0.41176,0.41569,0.41961,0.42353,0.42745,0.43137,0.43529,0.43922,0.44314,0.44706,0.45098,0.4549,0.45882,0.46275,0.46667,0.47059,0.47451,0.47843,0.48235,0.48627,0.4902,0.49412,0.49804,0.50196,0.50588,0.5098,0.51373,0.51765,0.52157,0.52549,0.52941,0.53333,0.53725,0.54118,0.5451,0.54902,0.55294,0.55686,0.56078,0.56471,0.56863,0.57255,0.57647,0.58039,0.58431,0.58824,0.59216,0.59608,0.6,0.60392,0.60784,0.61176,0.61569,0.61961,0.62353,0.62745,0.63137,0.63529,0.63922,0.64314,0.64706,0.65098,0.6549,0.65882,0.66275,0.66667,0.67059,0.67451,0.67843,0.68235,0.68627,0.6902,0.69412,0.69804,0.70196,0.70588,0.7098,0.71373,0.71765,0.72157,0.72549,0.72941,0.73333,0.73725,0.74118,0.7451,0.74902,0.75294,0.75686,0.76078,0.76471,0.76863,0.77255,0.77647,0.78039,0.78431,0.78824,0.79216,0.79608,0.8,0.80392,0.80784,0.81176,0.81569,0.81961,0.82353,0.82745,0.83137,0.83529,0.83922,0.84314,0.84706,0.85098,0.8549,0.85882,0.86275,0.86667,0.87059,0.87451,0.87843,0.88235,0.88627,0.8902,0.89412,0.89804,0.90196,0.90588,0.9098,0.91373,0.91765,0.92157,0.92549,0.92941,0.93333,0.93725,0.94118,0.9451,0.94902,0.95294,0.95686,0.96078,0.96471,0.96863,0.97255,0.97647,0.98039,0.98431,0.98824,0.99216,0.99608,1
13.9,14.5,15.4,16.26,17.78,19.72,22.2,25.36,29.1,33.52,38.84,44.52,51.58,59.02,66.8,76.28,85.9,97.8,109,121,134,148.4,164.2,181.8,199,219.4,239.2,257.8,281.4,308.2,336.6,365,396.8,434.6,464.4,502.4,544.4,586,629.4,677.4,726.6,779,829,895.8,953.6,1020,1074,1140,1204,1276,1342,1406,1476,1546,1614,1694,1770,1854,1950,2040,2116,2214,2304,2378,2474,2554,2668,2776,2874,2980,3078,3172,3304,3402,3514,3624,3744,3844,3980,4114,4240,4362,4488,4634,4770,4890,5022,5176,5282,5432,5590,5722,5886,6028,6186,6328,6416,6580,6716,6830,6972,7130,7256,7384,7538,7688,7824,7952,8136,8256,8394,8570,8710,8818,8954,9124,9238,9414,9594,9682,9830,9954,10100,10260,10400,10760,10660,11120,11180,11220,11680,11600,11640,12060,12180,12160,12780,12540,12680,12840,13200,13320,12940,13400,13980,13240,13620,13620,13140,13620,14200,14520,14540,14940,15460,15020,15160,14580,15680,15600,16460,16360,16560,15680,17420,16500,16960,17920,16860,17900,18260,18860,18900,18060,19020,20500,18420,19480,18780,20840,20680,20320,20100,20200,19420,20460,19640,20220,21040,21840,20360,20600,20940,21960,22660,22720,22360,23040,23080,23320,23640,24160,23560,23180,24480,24060,24300,23920,24360,24860,24320,24880,25100,26060,25920,25780,26880,26680,26980,27120,26620,27780,27660,27820,27780,28180,28300,28360,28300,28540,28620,28860,29480,29120,29620,29840,30100,29920,30560,30640,30640,31020,31100,30900,31560,31620,31380,31520,31660,32420,32540,32160,32340,32460,32660,33400
0.2,0,0,0.04,0.02,0.08,0,0.04,0,0.18,0.16,0.08,0.12,0.18,0.2,0.12,0.2,0.3,0,0,0,0.6,0.8,0.2,0,0.6,0.8,0.2,0.6,0.8,0.4,2,2.2,0.4,0.6,1.6,1.6,1,2.6,2.6,2.4,1,1,5.2,1.4,0,6,0,6,4,8,4,4,4,6,6,10,16,10,10,14,16,6,12,16,26,12,14,16,10,12,8,6,18,26,16,16,16,20,16,10,38,22,26,10,10,8,14,28,38,20,28,14,22,24,12,24,30,24,20,28,30,24,26,32,22,26,18,14,14,26,20,30,12,16,16,22,26,26,8,30,16,0,40,0,940,40,580,720,480,620,400,60,740,520,840,320,260,620,560,700,680,860,900,520,1060,980,580,760,980,800,1380,1560,1160,1040,1280,1640,1520,1620,1300,1040,640,1440,2720,880,1700,1140,1480,3240,2000,1940,1740,1800,2340,1880,1000,1780,2520,1620,1360,520,980,2500,2800,780,1240,1260,1980,1160,2460,540,1100,1260,2840,2440,1680,840,360,520,680,460,1740,840,1020,2420,840,900,580,840,940,1180,1220,1100,540,1080,720,320,1620,620,480,780,520,440,480,920,520,300,740,700,760,580,740,520,780,580,260,400,380,340,260,260,480,500,600,240,780,720,780,640,280,260,540,560,540,740,200
0.7,0,0,0.06,0.08,0.02,0,0.06,0,0.12,0.24,0.22,0.18,0.22,0.1,0.18,0.1,0.1,0,0,0,0.4,0.2,0.8,0,0.4,0.2,0.8,0.4,0.2,1.6,2,2.8,0.6,0.4,2.4,1.4,1,2.4,1.4,1.6,2,3,4.8,2.6,0,4,0,14,6,12,16,16,16,14,14,20,14,10,20,16,14,4,18,34,24,18,16,4,30,8,22,14,12,14,14,14,4,30,24,20,32,28,54,20,30,32,26,32,32,20,42,16,18,36,18,46,10,16,20,22,20,16,14,48,18,24,22,6,16,14,10,20,28,14,34,18,24,14,12,20,14,0,60,0,260,60,420,180,120,380,100,40,260,280,360,380,340,480,540,500,1120,1140,1400,580,840,1020,620,540,920,1200,1620,1340,1440,1360,1520,1460,680,1580,1300,2060,1560,1060,880,1320,1100,1560,1520,1060,1900,1960,2060,2300,1360,1120,1600,1220,2080,1080,1340,880,820,1400,1400,620,1160,540,820,540,1640,460,600,640,1160,1760,1620,660,140,1480,1120,340,760,1660,980,1980,1560,1400,520,1260,1060,920,1580,1500,660,1320,1180,380,2180,1080,320,1420,780,560,720,380,780,500,760,1000,740,420,660,480,920,1520,540,400,220,260,240,340,420,400,600,160,820,780,420,560,520,340,560,940,460,460,200
1 0 0.0039216 0.0078431 0.011765 0.015686 0.019608 0.023529 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.05098 0.054902 0.058824 0.062745 0.066667 0.070588 0.07451 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.10196 0.10588 0.1098 0.11373 0.11765 0.12157 0.12549 0.12941 0.13333 0.13725 0.14118 0.1451 0.14902 0.15294 0.15686 0.16078 0.16471 0.16863 0.17255 0.17647 0.18039 0.18431 0.18824 0.19216 0.19608 0.2 0.20392 0.20784 0.21176 0.21569 0.21961 0.22353 0.22745 0.23137 0.23529 0.23922 0.24314 0.24706 0.25098 0.2549 0.25882 0.26275 0.26667 0.27059 0.27451 0.27843 0.28235 0.28627 0.2902 0.29412 0.29804 0.30196 0.30588 0.3098 0.31373 0.31765 0.32157 0.32549 0.32941 0.33333 0.33725 0.34118 0.3451 0.34902 0.35294 0.35686 0.36078 0.36471 0.36863 0.37255 0.37647 0.38039 0.38431 0.38824 0.39216 0.39608 0.4 0.40392 0.40784 0.41176 0.41569 0.41961 0.42353 0.42745 0.43137 0.43529 0.43922 0.44314 0.44706 0.45098 0.4549 0.45882 0.46275 0.46667 0.47059 0.47451 0.47843 0.48235 0.48627 0.4902 0.49412 0.49804 0.50196 0.50588 0.5098 0.51373 0.51765 0.52157 0.52549 0.52941 0.53333 0.53725 0.54118 0.5451 0.54902 0.55294 0.55686 0.56078 0.56471 0.56863 0.57255 0.57647 0.58039 0.58431 0.58824 0.59216 0.59608 0.6 0.60392 0.60784 0.61176 0.61569 0.61961 0.62353 0.62745 0.63137 0.63529 0.63922 0.64314 0.64706 0.65098 0.6549 0.65882 0.66275 0.66667 0.67059 0.67451 0.67843 0.68235 0.68627 0.6902 0.69412 0.69804 0.70196 0.70588 0.7098 0.71373 0.71765 0.72157 0.72549 0.72941 0.73333 0.73725 0.74118 0.7451 0.74902 0.75294 0.75686 0.76078 0.76471 0.76863 0.77255 0.77647 0.78039 0.78431 0.78824 0.79216 0.79608 0.8 0.80392 0.80784 0.81176 0.81569 0.81961 0.82353 0.82745 0.83137 0.83529 0.83922 0.84314 0.84706 0.85098 0.8549 0.85882 0.86275 0.86667 0.87059 0.87451 0.87843 0.88235 0.88627 0.8902 0.89412 0.89804 0.90196 0.90588 0.9098 0.91373 0.91765 0.92157 0.92549 0.92941 0.93333 0.93725 0.94118 0.9451 0.94902 0.95294 0.95686 0.96078 0.96471 0.96863 0.97255 0.97647 0.98039 0.98431 0.98824 0.99216 0.99608 1
2 13.9 14.5 15.4 16.26 17.78 19.72 22.2 25.36 29.1 33.52 38.84 44.52 51.58 59.02 66.8 76.28 85.9 97.8 109 121 134 148.4 164.2 181.8 199 219.4 239.2 257.8 281.4 308.2 336.6 365 396.8 434.6 464.4 502.4 544.4 586 629.4 677.4 726.6 779 829 895.8 953.6 1020 1074 1140 1204 1276 1342 1406 1476 1546 1614 1694 1770 1854 1950 2040 2116 2214 2304 2378 2474 2554 2668 2776 2874 2980 3078 3172 3304 3402 3514 3624 3744 3844 3980 4114 4240 4362 4488 4634 4770 4890 5022 5176 5282 5432 5590 5722 5886 6028 6186 6328 6416 6580 6716 6830 6972 7130 7256 7384 7538 7688 7824 7952 8136 8256 8394 8570 8710 8818 8954 9124 9238 9414 9594 9682 9830 9954 10100 10260 10400 10760 10660 11120 11180 11220 11680 11600 11640 12060 12180 12160 12780 12540 12680 12840 13200 13320 12940 13400 13980 13240 13620 13620 13140 13620 14200 14520 14540 14940 15460 15020 15160 14580 15680 15600 16460 16360 16560 15680 17420 16500 16960 17920 16860 17900 18260 18860 18900 18060 19020 20500 18420 19480 18780 20840 20680 20320 20100 20200 19420 20460 19640 20220 21040 21840 20360 20600 20940 21960 22660 22720 22360 23040 23080 23320 23640 24160 23560 23180 24480 24060 24300 23920 24360 24860 24320 24880 25100 26060 25920 25780 26880 26680 26980 27120 26620 27780 27660 27820 27780 28180 28300 28360 28300 28540 28620 28860 29480 29120 29620 29840 30100 29920 30560 30640 30640 31020 31100 30900 31560 31620 31380 31520 31660 32420 32540 32160 32340 32460 32660 33400
3 0.2 0 0 0.04 0.02 0.08 0 0.04 0 0.18 0.16 0.08 0.12 0.18 0.2 0.12 0.2 0.3 0 0 0 0.6 0.8 0.2 0 0.6 0.8 0.2 0.6 0.8 0.4 2 2.2 0.4 0.6 1.6 1.6 1 2.6 2.6 2.4 1 1 5.2 1.4 0 6 0 6 4 8 4 4 4 6 6 10 16 10 10 14 16 6 12 16 26 12 14 16 10 12 8 6 18 26 16 16 16 20 16 10 38 22 26 10 10 8 14 28 38 20 28 14 22 24 12 24 30 24 20 28 30 24 26 32 22 26 18 14 14 26 20 30 12 16 16 22 26 26 8 30 16 0 40 0 940 40 580 720 480 620 400 60 740 520 840 320 260 620 560 700 680 860 900 520 1060 980 580 760 980 800 1380 1560 1160 1040 1280 1640 1520 1620 1300 1040 640 1440 2720 880 1700 1140 1480 3240 2000 1940 1740 1800 2340 1880 1000 1780 2520 1620 1360 520 980 2500 2800 780 1240 1260 1980 1160 2460 540 1100 1260 2840 2440 1680 840 360 520 680 460 1740 840 1020 2420 840 900 580 840 940 1180 1220 1100 540 1080 720 320 1620 620 480 780 520 440 480 920 520 300 740 700 760 580 740 520 780 580 260 400 380 340 260 260 480 500 600 240 780 720 780 640 280 260 540 560 540 740 200
4 0.7 0 0 0.06 0.08 0.02 0 0.06 0 0.12 0.24 0.22 0.18 0.22 0.1 0.18 0.1 0.1 0 0 0 0.4 0.2 0.8 0 0.4 0.2 0.8 0.4 0.2 1.6 2 2.8 0.6 0.4 2.4 1.4 1 2.4 1.4 1.6 2 3 4.8 2.6 0 4 0 14 6 12 16 16 16 14 14 20 14 10 20 16 14 4 18 34 24 18 16 4 30 8 22 14 12 14 14 14 4 30 24 20 32 28 54 20 30 32 26 32 32 20 42 16 18 36 18 46 10 16 20 22 20 16 14 48 18 24 22 6 16 14 10 20 28 14 34 18 24 14 12 20 14 0 60 0 260 60 420 180 120 380 100 40 260 280 360 380 340 480 540 500 1120 1140 1400 580 840 1020 620 540 920 1200 1620 1340 1440 1360 1520 1460 680 1580 1300 2060 1560 1060 880 1320 1100 1560 1520 1060 1900 1960 2060 2300 1360 1120 1600 1220 2080 1080 1340 880 820 1400 1400 620 1160 540 820 540 1640 460 600 640 1160 1760 1620 660 140 1480 1120 340 760 1660 980 1980 1560 1400 520 1260 1060 920 1580 1500 660 1320 1180 380 2180 1080 320 1420 780 560 720 380 780 500 760 1000 740 420 660 480 920 1520 540 400 220 260 240 340 420 400 600 160 820 780 420 560 520 340 560 940 460 460 200

@ -0,0 +1,4 @@
0,0.0039216,0.0078431,0.011765,0.015686,0.019608,0.023529,0.027451,0.031373,0.035294,0.039216,0.043137,0.047059,0.05098,0.054902,0.058824,0.062745,0.066667,0.070588,0.07451,0.078431,0.082353,0.086275,0.090196,0.094118,0.098039,0.10196,0.10588,0.1098,0.11373,0.11765,0.12157,0.12549,0.12941,0.13333,0.13725,0.14118,0.1451,0.14902,0.15294,0.15686,0.16078,0.16471,0.16863,0.17255,0.17647,0.18039,0.18431,0.18824,0.19216,0.19608,0.2,0.20392,0.20784,0.21176,0.21569,0.21961,0.22353,0.22745,0.23137,0.23529,0.23922,0.24314,0.24706,0.25098,0.2549,0.25882,0.26275,0.26667,0.27059,0.27451,0.27843,0.28235,0.28627,0.2902,0.29412,0.29804,0.30196,0.30588,0.3098,0.31373,0.31765,0.32157,0.32549,0.32941,0.33333,0.33725,0.34118,0.3451,0.34902,0.35294,0.35686,0.36078,0.36471,0.36863,0.37255,0.37647,0.38039,0.38431,0.38824,0.39216,0.39608,0.4,0.40392,0.40784,0.41176,0.41569,0.41961,0.42353,0.42745,0.43137,0.43529,0.43922,0.44314,0.44706,0.45098,0.4549,0.45882,0.46275,0.46667,0.47059,0.47451,0.47843,0.48235,0.48627,0.4902,0.49412,0.49804,0.50196,0.50588,0.5098,0.51373,0.51765,0.52157,0.52549,0.52941,0.53333,0.53725,0.54118,0.5451,0.54902,0.55294,0.55686,0.56078,0.56471,0.56863,0.57255,0.57647,0.58039,0.58431,0.58824,0.59216,0.59608,0.6,0.60392,0.60784,0.61176,0.61569,0.61961,0.62353,0.62745,0.63137,0.63529,0.63922,0.64314,0.64706,0.65098,0.6549,0.65882,0.66275,0.66667,0.67059,0.67451,0.67843,0.68235,0.68627,0.6902,0.69412,0.69804,0.70196,0.70588,0.7098,0.71373,0.71765,0.72157,0.72549,0.72941,0.73333,0.73725,0.74118,0.7451,0.74902,0.75294,0.75686,0.76078,0.76471,0.76863,0.77255,0.77647,0.78039,0.78431,0.78824,0.79216,0.79608,0.8,0.80392,0.80784,0.81176,0.81569,0.81961,0.82353,0.82745,0.83137,0.83529,0.83922,0.84314,0.84706,0.85098,0.8549,0.85882,0.86275,0.86667,0.87059,0.87451,0.87843,0.88235,0.88627,0.8902,0.89412,0.89804,0.90196,0.90588,0.9098,0.91373,0.91765,0.92157,0.92549,0.92941,0.93333,0.93725,0.94118,0.9451,0.94902,0.95294,0.95686,0.96078,0.96471,0.96863,0.97255,0.97647,0.98039,0.98431,0.98824,0.99216,0.99608,1
13.18,13.72,14.5,15.4,17.02,18.88,21.22,24.46,27.98,32.58,37.54,42.88,49.78,56.78,64.6,73.22,82.84,94.24,105.2,116,129,143.4,159.2,175,190.8,211.4,229.2,247,269.4,294.2,322.8,350.4,382,411.2,443.6,482.4,521.6,562.2,603.6,648.4,697.4,744.8,791.4,858.4,911.6,972,1022,1084,1150,1204,1290,1326,1406,1470,1532,1616,1686,1778,1858,1938,2024,2110,2184,2276,2350,2448,2534,2624,2728,2820,2924,3014,3118,3224,3340,3454,3548,3656,3758,3890,3990,4130,4248,4354,4508,4616,4758,4888,5012,5130,5266,5412,5556,5704,5842,5958,6038,6202,6340,6424,6562,6728,6852,6950,7092,7234,7372,7498,7696,7784,7980,8088,8200,8316,8460,8548,8720,8838,9004,9096,9256,9354,9490,9642,9776,9902,10040,10100,10400,10660,10620,10780,10880,11100,11360,11540,11500,11700,11920,11900,12020,12360,12580,12540,12720,12940,13360,13060,13040,13620,13700,13980,13980,14100,14580,14600,15260,14940,15000,15000,15380,15680,15740,14560,15540,16040,16240,16920,16120,15680,16500,16820,18260,17680,16760,17980,17640,17740,18420,18480,18300,18440,18600,18540,18760,19080,19320,19620,19580,19260,19540,19340,21220,21420,20720,20480,20540,21180,21720,22060,21500,22060,22540,22680,22620,23260,23000,24120,23240,23160,24020,23020,23840,24240,23740,23900,24780,25020,25900,25980,25100,25220,26200,26300,25820,26800,26600,26440,27260,26820,27540,27380,27760,27940,28200,28300,28520,28660,28640,28280,29300,29420,29080,29500,29320,29840,29580,29820,29820,29800,30460,30560,30600,30360,31260,31380
0.32,0.08,0,0,0.08,0.02,0.08,0.04,0.02,0.12,0.06,0.12,0.12,0.12,0.2,0.08,0.26,0.06,0.8,0,0,0.6,0.8,0,0.2,0.6,0.8,0,0.6,0.8,0.2,0.6,1,0.8,2.4,0.6,1.4,1.8,1.4,0.6,0.6,2.2,4.6,3.6,0.4,2,8,6,0,6,0,14,4,0,8,4,4,2,2,12,6,0,6,4,20,2,16,6,2,10,6,6,12,16,10,6,12,14,22,10,20,10,22,26,12,14,22,22,18,10,24,18,24,26,18,12,12,18,10,16,28,22,8,20,18,16,18,22,34,16,30,22,20,34,20,32,20,12,26,14,24,26,20,18,14,28,60,0,0,740,80,20,20,0,640,360,0,0,480,200,280,440,220,360,880,860,540,1240,960,580,900,820,1020,1200,1120,1000,840,960,500,1700,1120,820,1260,840,1760,460,660,1280,1980,520,1900,1380,740,2020,1040,2120,2960,2060,2280,2420,2900,960,2100,1360,1340,1620,580,580,520,540,1660,860,2080,2380,3380,520,360,520,1180,2140,1000,840,2160,520,3080,2340,700,2080,1760,1140,1080,580,1260,960,860,1200,1820,1680,1900,520,1100,1580,1300,3400,880,1700,1100,4360,2940,880,1160,320,340,2260,300,1000,380,640,560,1020,300,380,620,400,380,360,820,580,480,500,240,440,700,740,1340,1020
0.58,0.02,0,0,0.02,0.08,0.02,0.06,0.08,0.08,0.04,0.08,0.18,0.18,0.2,0.12,0.14,0.04,0.2,0,0,0.4,0.2,0,0.8,0.4,0.2,0,0.4,0.2,0.8,0.4,2,0.2,1.6,1.4,1.6,1.2,1.6,1.4,1.4,1.8,3.4,1.4,0.6,2,2,4,0,4,0,16,6,0,12,16,6,8,8,18,4,0,14,6,20,8,24,4,8,20,24,4,18,14,20,4,18,26,28,20,20,40,38,34,38,16,38,28,12,20,16,32,26,14,12,18,28,12,10,14,22,18,2,10,22,24,22,48,16,14,30,28,20,36,20,18,10,18,24,26,6,14,10,12,16,42,40,0,0,260,20,80,80,0,160,240,0,0,120,100,320,360,180,340,1020,440,160,860,840,1220,900,1480,780,1300,780,1900,1160,1140,800,1700,1680,1980,1840,560,1340,340,1040,1620,1320,680,1200,1320,1260,1580,760,1980,1440,1240,1620,1480,1300,1240,1200,1040,1060,880,1220,520,1080,360,840,440,2020,2020,1120,480,440,480,1220,1260,800,960,1840,580,1320,2160,1100,1020,1540,960,920,1220,1540,1140,1440,1400,1980,2320,700,1080,1800,2020,1700,2200,1320,2300,1100,2540,1660,1020,440,780,260,940,200,1400,620,660,1040,980,500,820,980,200,320,340,1080,620,520,200,260,260,600,460,1860,1680
1 0 0.0039216 0.0078431 0.011765 0.015686 0.019608 0.023529 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.05098 0.054902 0.058824 0.062745 0.066667 0.070588 0.07451 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.10196 0.10588 0.1098 0.11373 0.11765 0.12157 0.12549 0.12941 0.13333 0.13725 0.14118 0.1451 0.14902 0.15294 0.15686 0.16078 0.16471 0.16863 0.17255 0.17647 0.18039 0.18431 0.18824 0.19216 0.19608 0.2 0.20392 0.20784 0.21176 0.21569 0.21961 0.22353 0.22745 0.23137 0.23529 0.23922 0.24314 0.24706 0.25098 0.2549 0.25882 0.26275 0.26667 0.27059 0.27451 0.27843 0.28235 0.28627 0.2902 0.29412 0.29804 0.30196 0.30588 0.3098 0.31373 0.31765 0.32157 0.32549 0.32941 0.33333 0.33725 0.34118 0.3451 0.34902 0.35294 0.35686 0.36078 0.36471 0.36863 0.37255 0.37647 0.38039 0.38431 0.38824 0.39216 0.39608 0.4 0.40392 0.40784 0.41176 0.41569 0.41961 0.42353 0.42745 0.43137 0.43529 0.43922 0.44314 0.44706 0.45098 0.4549 0.45882 0.46275 0.46667 0.47059 0.47451 0.47843 0.48235 0.48627 0.4902 0.49412 0.49804 0.50196 0.50588 0.5098 0.51373 0.51765 0.52157 0.52549 0.52941 0.53333 0.53725 0.54118 0.5451 0.54902 0.55294 0.55686 0.56078 0.56471 0.56863 0.57255 0.57647 0.58039 0.58431 0.58824 0.59216 0.59608 0.6 0.60392 0.60784 0.61176 0.61569 0.61961 0.62353 0.62745 0.63137 0.63529 0.63922 0.64314 0.64706 0.65098 0.6549 0.65882 0.66275 0.66667 0.67059 0.67451 0.67843 0.68235 0.68627 0.6902 0.69412 0.69804 0.70196 0.70588 0.7098 0.71373 0.71765 0.72157 0.72549 0.72941 0.73333 0.73725 0.74118 0.7451 0.74902 0.75294 0.75686 0.76078 0.76471 0.76863 0.77255 0.77647 0.78039 0.78431 0.78824 0.79216 0.79608 0.8 0.80392 0.80784 0.81176 0.81569 0.81961 0.82353 0.82745 0.83137 0.83529 0.83922 0.84314 0.84706 0.85098 0.8549 0.85882 0.86275 0.86667 0.87059 0.87451 0.87843 0.88235 0.88627 0.8902 0.89412 0.89804 0.90196 0.90588 0.9098 0.91373 0.91765 0.92157 0.92549 0.92941 0.93333 0.93725 0.94118 0.9451 0.94902 0.95294 0.95686 0.96078 0.96471 0.96863 0.97255 0.97647 0.98039 0.98431 0.98824 0.99216 0.99608 1
2 13.18 13.72 14.5 15.4 17.02 18.88 21.22 24.46 27.98 32.58 37.54 42.88 49.78 56.78 64.6 73.22 82.84 94.24 105.2 116 129 143.4 159.2 175 190.8 211.4 229.2 247 269.4 294.2 322.8 350.4 382 411.2 443.6 482.4 521.6 562.2 603.6 648.4 697.4 744.8 791.4 858.4 911.6 972 1022 1084 1150 1204 1290 1326 1406 1470 1532 1616 1686 1778 1858 1938 2024 2110 2184 2276 2350 2448 2534 2624 2728 2820 2924 3014 3118 3224 3340 3454 3548 3656 3758 3890 3990 4130 4248 4354 4508 4616 4758 4888 5012 5130 5266 5412 5556 5704 5842 5958 6038 6202 6340 6424 6562 6728 6852 6950 7092 7234 7372 7498 7696 7784 7980 8088 8200 8316 8460 8548 8720 8838 9004 9096 9256 9354 9490 9642 9776 9902 10040 10100 10400 10660 10620 10780 10880 11100 11360 11540 11500 11700 11920 11900 12020 12360 12580 12540 12720 12940 13360 13060 13040 13620 13700 13980 13980 14100 14580 14600 15260 14940 15000 15000 15380 15680 15740 14560 15540 16040 16240 16920 16120 15680 16500 16820 18260 17680 16760 17980 17640 17740 18420 18480 18300 18440 18600 18540 18760 19080 19320 19620 19580 19260 19540 19340 21220 21420 20720 20480 20540 21180 21720 22060 21500 22060 22540 22680 22620 23260 23000 24120 23240 23160 24020 23020 23840 24240 23740 23900 24780 25020 25900 25980 25100 25220 26200 26300 25820 26800 26600 26440 27260 26820 27540 27380 27760 27940 28200 28300 28520 28660 28640 28280 29300 29420 29080 29500 29320 29840 29580 29820 29820 29800 30460 30560 30600 30360 31260 31380
3 0.32 0.08 0 0 0.08 0.02 0.08 0.04 0.02 0.12 0.06 0.12 0.12 0.12 0.2 0.08 0.26 0.06 0.8 0 0 0.6 0.8 0 0.2 0.6 0.8 0 0.6 0.8 0.2 0.6 1 0.8 2.4 0.6 1.4 1.8 1.4 0.6 0.6 2.2 4.6 3.6 0.4 2 8 6 0 6 0 14 4 0 8 4 4 2 2 12 6 0 6 4 20 2 16 6 2 10 6 6 12 16 10 6 12 14 22 10 20 10 22 26 12 14 22 22 18 10 24 18 24 26 18 12 12 18 10 16 28 22 8 20 18 16 18 22 34 16 30 22 20 34 20 32 20 12 26 14 24 26 20 18 14 28 60 0 0 740 80 20 20 0 640 360 0 0 480 200 280 440 220 360 880 860 540 1240 960 580 900 820 1020 1200 1120 1000 840 960 500 1700 1120 820 1260 840 1760 460 660 1280 1980 520 1900 1380 740 2020 1040 2120 2960 2060 2280 2420 2900 960 2100 1360 1340 1620 580 580 520 540 1660 860 2080 2380 3380 520 360 520 1180 2140 1000 840 2160 520 3080 2340 700 2080 1760 1140 1080 580 1260 960 860 1200 1820 1680 1900 520 1100 1580 1300 3400 880 1700 1100 4360 2940 880 1160 320 340 2260 300 1000 380 640 560 1020 300 380 620 400 380 360 820 580 480 500 240 440 700 740 1340 1020
4 0.58 0.02 0 0 0.02 0.08 0.02 0.06 0.08 0.08 0.04 0.08 0.18 0.18 0.2 0.12 0.14 0.04 0.2 0 0 0.4 0.2 0 0.8 0.4 0.2 0 0.4 0.2 0.8 0.4 2 0.2 1.6 1.4 1.6 1.2 1.6 1.4 1.4 1.8 3.4 1.4 0.6 2 2 4 0 4 0 16 6 0 12 16 6 8 8 18 4 0 14 6 20 8 24 4 8 20 24 4 18 14 20 4 18 26 28 20 20 40 38 34 38 16 38 28 12 20 16 32 26 14 12 18 28 12 10 14 22 18 2 10 22 24 22 48 16 14 30 28 20 36 20 18 10 18 24 26 6 14 10 12 16 42 40 0 0 260 20 80 80 0 160 240 0 0 120 100 320 360 180 340 1020 440 160 860 840 1220 900 1480 780 1300 780 1900 1160 1140 800 1700 1680 1980 1840 560 1340 340 1040 1620 1320 680 1200 1320 1260 1580 760 1980 1440 1240 1620 1480 1300 1240 1200 1040 1060 880 1220 520 1080 360 840 440 2020 2020 1120 480 440 480 1220 1260 800 960 1840 580 1320 2160 1100 1020 1540 960 920 1220 1540 1140 1440 1400 1980 2320 700 1080 1800 2020 1700 2200 1320 2300 1100 2540 1660 1020 440 780 260 940 200 1400 620 660 1040 980 500 820 980 200 320 340 1080 620 520 200 260 260 600 460 1860 1680

@ -0,0 +1,4 @@
0,0.0039216,0.0078431,0.011765,0.015686,0.019608,0.023529,0.027451,0.031373,0.035294,0.039216,0.043137,0.047059,0.05098,0.054902,0.058824,0.062745,0.066667,0.070588,0.07451,0.078431,0.082353,0.086275,0.090196,0.094118,0.098039,0.10196,0.10588,0.1098,0.11373,0.11765,0.12157,0.12549,0.12941,0.13333,0.13725,0.14118,0.1451,0.14902,0.15294,0.15686,0.16078,0.16471,0.16863,0.17255,0.17647,0.18039,0.18431,0.18824,0.19216,0.19608,0.2,0.20392,0.20784,0.21176,0.21569,0.21961,0.22353,0.22745,0.23137,0.23529,0.23922,0.24314,0.24706,0.25098,0.2549,0.25882,0.26275,0.26667,0.27059,0.27451,0.27843,0.28235,0.28627,0.2902,0.29412,0.29804,0.30196,0.30588,0.3098,0.31373,0.31765,0.32157,0.32549,0.32941,0.33333,0.33725,0.34118,0.3451,0.34902,0.35294,0.35686,0.36078,0.36471,0.36863,0.37255,0.37647,0.38039,0.38431,0.38824,0.39216,0.39608,0.4,0.40392,0.40784,0.41176,0.41569,0.41961,0.42353,0.42745,0.43137,0.43529,0.43922,0.44314,0.44706,0.45098,0.4549,0.45882,0.46275,0.46667,0.47059,0.47451,0.47843,0.48235,0.48627,0.4902,0.49412,0.49804,0.50196,0.50588,0.5098,0.51373,0.51765,0.52157,0.52549,0.52941,0.53333,0.53725,0.54118,0.5451,0.54902,0.55294,0.55686,0.56078,0.56471,0.56863,0.57255,0.57647,0.58039,0.58431,0.58824,0.59216,0.59608,0.6,0.60392,0.60784,0.61176,0.61569,0.61961,0.62353,0.62745,0.63137,0.63529,0.63922,0.64314,0.64706,0.65098,0.6549,0.65882,0.66275,0.66667,0.67059,0.67451,0.67843,0.68235,0.68627,0.6902,0.69412,0.69804,0.70196,0.70588,0.7098,0.71373,0.71765,0.72157,0.72549,0.72941,0.73333,0.73725,0.74118,0.7451,0.74902,0.75294,0.75686,0.76078,0.76471,0.76863,0.77255,0.77647,0.78039,0.78431,0.78824,0.79216,0.79608,0.8,0.80392,0.80784,0.81176,0.81569,0.81961,0.82353,0.82745,0.83137,0.83529,0.83922,0.84314,0.84706,0.85098,0.8549,0.85882,0.86275,0.86667,0.87059,0.87451,0.87843,0.88235,0.88627,0.8902,0.89412,0.89804,0.90196,0.90588,0.9098,0.91373,0.91765,0.92157,0.92549,0.92941,0.93333,0.93725,0.94118,0.9451,0.94902,0.95294,0.95686,0.96078,0.96471,0.96863,0.97255,0.97647,0.98039,0.98431,0.98824,0.99216,0.99608,1
2.48,2.58,2.74,2.88,3.12,3.5,3.94,4.5,5.2,5.92,6.86,7.84,9.1,10.42,11.82,13.6,15.3,17.42,19.42,21.5,23.8,26.4,29.3,32.44,35.72,39.42,42.88,46.1,50.34,55.14,60.16,65.38,71.18,77.6,82.96,90,97.1,105,112,120.4,129.8,138.8,147.2,159.8,169.6,181,191,202.2,215.6,227.6,239,249.8,261.4,275.4,286.8,301,315,330.2,346.2,362.2,376.8,393,408,424.4,441,456.4,473.6,491.8,509.4,528.6,545.6,561.6,583.6,604.8,625.2,641.2,662.2,682.8,703.6,725.8,749.2,771.8,794.8,818.8,844.4,866.6,892,918,943.6,966,993,1016,1042,1076,1100,1126,1140,1170,1194,1210,1240,1266,1286,1304,1332,1358,1380,1410,1440,1470,1486,1526,1542,1566,1584,1620,1642,1668,1702,1720,1744,1768,1786,1818,1842,1870,1894,1914,1958,1982,2004,2040,2064,2086,2118,2132,2162,2196,2228,2230,2282,2292,2336,2346,2378,2412,2440,2458,2488,2512,2552,2584,2614,2646,2680,2702,2744,2770,2804,2836,2874,2920,2958,2986,3020,3054,3086,3134,3170,3190,3208,3270,3306,3344,3384,3404,3446,3486,3510,3562,3582,3620,3652,3688,3730,3788,3794,3830,3880,3902,3922,3940,4012,4036,4084,4108,4140,4170,4194,4228,4278,4286,4312,4348,4372,4398,4434,4470,4504,4536,4548,4566,4596,4640,4642,4696,4716,4778,4798,4822,4852,4898,4914,4944,4984,5008,5048,5058,5056,5110,5122,5154,5186,5210,5242,5310,5352,5376,5370,5438,5450,5488,5490,5516,5550,5582,5584,5624,5656,5672,5714,5722,5766,5776,5826,5904
0.02,0.02,0.06,0.02,0.08,0,0.06,0,0,0.08,0.04,0.06,0,0.08,0.08,0,0,0.08,0.08,0,0,0,0.1,0.06,0.08,0.08,0.02,0.1,0.16,0.06,0.04,0.12,0.12,0.1,0.14,0.1,0.1,0,0,0.6,0.2,0.2,0.8,0.2,0.4,0,0,0.8,0.4,0.4,1,0.2,0.6,0.6,1.2,0,1,0.8,0.8,0.8,0.2,1,1,0.6,1,1.6,2.4,1.2,1.6,1.4,1.4,2.4,2.4,1.2,0.8,2.8,1.8,1.2,2.4,1.2,2.8,3.2,2.2,2.2,2.6,2.4,2,1,2.4,2,2,4,8,4,0,4,0,0,6,0,0,4,4,6,8,12,10,0,10,0,4,4,8,4,6,0,8,2,8,0,6,2,4,2,8,10,6,6,2,8,6,10,6,14,2,8,8,4,2,0,8,8,4,4,2,8,10,12,2,8,8,6,6,14,10,8,6,10,6,14,6,10,12,14,10,6,4,6,10,10,12,10,4,6,6,6,4,4,10,8,8,10,8,12,10,12,16,10,10,8,8,10,8,4,6,2,10,10,6,2,2,4,8,2,8,2,6,10,6,4,2,14,14,10,8,4,14,12,22,8,8,2,6,16,6,12,12,12,4,0,8,16,4,10,8,0,28,4,0,12,0,2,0,4,0,8,6,6,4,8,6,8,4,4,4,16
0.08,0.08,0.04,0.08,0.02,0,0.04,0,0,0.02,0.06,0.04,0,0.02,0.02,0,0,0.02,0.02,0,0,0,0.1,0.04,0.02,0.12,0.08,0.1,0.14,0.14,0.06,0.08,0.08,0.1,0.06,0.1,0.1,0,0,0.4,0.8,0.8,0.2,0.8,0.6,0,0,0.2,0.6,0.6,1,0.8,0.4,0.4,0.8,0,1,0.2,0.2,0.2,0.8,1,2,0.4,1,3.4,2.6,1.8,2.4,2.6,2.6,1.6,1.6,2.8,0.2,3.2,2.2,1.8,1.6,0.8,2.2,1.8,2.8,1.8,2.4,3.6,2,1,3.6,2,3,6,2,6,0,6,0,0,14,0,0,6,6,4,12,8,10,0,10,0,6,6,2,6,4,0,2,8,12,0,4,8,6,8,2,10,4,4,8,2,4,10,4,6,8,2,2,6,8,0,2,2,6,6,8,12,20,8,8,12,22,4,14,6,10,12,14,10,14,16,14,10,8,16,10,14,16,14,20,10,8,10,6,4,14,14,16,16,10,12,12,10,12,18,10,18,14,10,20,2,12,10,12,6,14,8,10,10,4,8,8,6,12,8,2,8,4,10,4,6,8,6,6,10,12,6,16,8,18,22,2,8,4,14,4,8,8,8,6,0,2,14,6,10,2,0,12,6,0,8,0,8,0,6,0,2,4,4,6,2,4,2,6,6,6,14
1 0 0.0039216 0.0078431 0.011765 0.015686 0.019608 0.023529 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.05098 0.054902 0.058824 0.062745 0.066667 0.070588 0.07451 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.10196 0.10588 0.1098 0.11373 0.11765 0.12157 0.12549 0.12941 0.13333 0.13725 0.14118 0.1451 0.14902 0.15294 0.15686 0.16078 0.16471 0.16863 0.17255 0.17647 0.18039 0.18431 0.18824 0.19216 0.19608 0.2 0.20392 0.20784 0.21176 0.21569 0.21961 0.22353 0.22745 0.23137 0.23529 0.23922 0.24314 0.24706 0.25098 0.2549 0.25882 0.26275 0.26667 0.27059 0.27451 0.27843 0.28235 0.28627 0.2902 0.29412 0.29804 0.30196 0.30588 0.3098 0.31373 0.31765 0.32157 0.32549 0.32941 0.33333 0.33725 0.34118 0.3451 0.34902 0.35294 0.35686 0.36078 0.36471 0.36863 0.37255 0.37647 0.38039 0.38431 0.38824 0.39216 0.39608 0.4 0.40392 0.40784 0.41176 0.41569 0.41961 0.42353 0.42745 0.43137 0.43529 0.43922 0.44314 0.44706 0.45098 0.4549 0.45882 0.46275 0.46667 0.47059 0.47451 0.47843 0.48235 0.48627 0.4902 0.49412 0.49804 0.50196 0.50588 0.5098 0.51373 0.51765 0.52157 0.52549 0.52941 0.53333 0.53725 0.54118 0.5451 0.54902 0.55294 0.55686 0.56078 0.56471 0.56863 0.57255 0.57647 0.58039 0.58431 0.58824 0.59216 0.59608 0.6 0.60392 0.60784 0.61176 0.61569 0.61961 0.62353 0.62745 0.63137 0.63529 0.63922 0.64314 0.64706 0.65098 0.6549 0.65882 0.66275 0.66667 0.67059 0.67451 0.67843 0.68235 0.68627 0.6902 0.69412 0.69804 0.70196 0.70588 0.7098 0.71373 0.71765 0.72157 0.72549 0.72941 0.73333 0.73725 0.74118 0.7451 0.74902 0.75294 0.75686 0.76078 0.76471 0.76863 0.77255 0.77647 0.78039 0.78431 0.78824 0.79216 0.79608 0.8 0.80392 0.80784 0.81176 0.81569 0.81961 0.82353 0.82745 0.83137 0.83529 0.83922 0.84314 0.84706 0.85098 0.8549 0.85882 0.86275 0.86667 0.87059 0.87451 0.87843 0.88235 0.88627 0.8902 0.89412 0.89804 0.90196 0.90588 0.9098 0.91373 0.91765 0.92157 0.92549 0.92941 0.93333 0.93725 0.94118 0.9451 0.94902 0.95294 0.95686 0.96078 0.96471 0.96863 0.97255 0.97647 0.98039 0.98431 0.98824 0.99216 0.99608 1
2 2.48 2.58 2.74 2.88 3.12 3.5 3.94 4.5 5.2 5.92 6.86 7.84 9.1 10.42 11.82 13.6 15.3 17.42 19.42 21.5 23.8 26.4 29.3 32.44 35.72 39.42 42.88 46.1 50.34 55.14 60.16 65.38 71.18 77.6 82.96 90 97.1 105 112 120.4 129.8 138.8 147.2 159.8 169.6 181 191 202.2 215.6 227.6 239 249.8 261.4 275.4 286.8 301 315 330.2 346.2 362.2 376.8 393 408 424.4 441 456.4 473.6 491.8 509.4 528.6 545.6 561.6 583.6 604.8 625.2 641.2 662.2 682.8 703.6 725.8 749.2 771.8 794.8 818.8 844.4 866.6 892 918 943.6 966 993 1016 1042 1076 1100 1126 1140 1170 1194 1210 1240 1266 1286 1304 1332 1358 1380 1410 1440 1470 1486 1526 1542 1566 1584 1620 1642 1668 1702 1720 1744 1768 1786 1818 1842 1870 1894 1914 1958 1982 2004 2040 2064 2086 2118 2132 2162 2196 2228 2230 2282 2292 2336 2346 2378 2412 2440 2458 2488 2512 2552 2584 2614 2646 2680 2702 2744 2770 2804 2836 2874 2920 2958 2986 3020 3054 3086 3134 3170 3190 3208 3270 3306 3344 3384 3404 3446 3486 3510 3562 3582 3620 3652 3688 3730 3788 3794 3830 3880 3902 3922 3940 4012 4036 4084 4108 4140 4170 4194 4228 4278 4286 4312 4348 4372 4398 4434 4470 4504 4536 4548 4566 4596 4640 4642 4696 4716 4778 4798 4822 4852 4898 4914 4944 4984 5008 5048 5058 5056 5110 5122 5154 5186 5210 5242 5310 5352 5376 5370 5438 5450 5488 5490 5516 5550 5582 5584 5624 5656 5672 5714 5722 5766 5776 5826 5904
3 0.02 0.02 0.06 0.02 0.08 0 0.06 0 0 0.08 0.04 0.06 0 0.08 0.08 0 0 0.08 0.08 0 0 0 0.1 0.06 0.08 0.08 0.02 0.1 0.16 0.06 0.04 0.12 0.12 0.1 0.14 0.1 0.1 0 0 0.6 0.2 0.2 0.8 0.2 0.4 0 0 0.8 0.4 0.4 1 0.2 0.6 0.6 1.2 0 1 0.8 0.8 0.8 0.2 1 1 0.6 1 1.6 2.4 1.2 1.6 1.4 1.4 2.4 2.4 1.2 0.8 2.8 1.8 1.2 2.4 1.2 2.8 3.2 2.2 2.2 2.6 2.4 2 1 2.4 2 2 4 8 4 0 4 0 0 6 0 0 4 4 6 8 12 10 0 10 0 4 4 8 4 6 0 8 2 8 0 6 2 4 2 8 10 6 6 2 8 6 10 6 14 2 8 8 4 2 0 8 8 4 4 2 8 10 12 2 8 8 6 6 14 10 8 6 10 6 14 6 10 12 14 10 6 4 6 10 10 12 10 4 6 6 6 4 4 10 8 8 10 8 12 10 12 16 10 10 8 8 10 8 4 6 2 10 10 6 2 2 4 8 2 8 2 6 10 6 4 2 14 14 10 8 4 14 12 22 8 8 2 6 16 6 12 12 12 4 0 8 16 4 10 8 0 28 4 0 12 0 2 0 4 0 8 6 6 4 8 6 8 4 4 4 16
4 0.08 0.08 0.04 0.08 0.02 0 0.04 0 0 0.02 0.06 0.04 0 0.02 0.02 0 0 0.02 0.02 0 0 0 0.1 0.04 0.02 0.12 0.08 0.1 0.14 0.14 0.06 0.08 0.08 0.1 0.06 0.1 0.1 0 0 0.4 0.8 0.8 0.2 0.8 0.6 0 0 0.2 0.6 0.6 1 0.8 0.4 0.4 0.8 0 1 0.2 0.2 0.2 0.8 1 2 0.4 1 3.4 2.6 1.8 2.4 2.6 2.6 1.6 1.6 2.8 0.2 3.2 2.2 1.8 1.6 0.8 2.2 1.8 2.8 1.8 2.4 3.6 2 1 3.6 2 3 6 2 6 0 6 0 0 14 0 0 6 6 4 12 8 10 0 10 0 6 6 2 6 4 0 2 8 12 0 4 8 6 8 2 10 4 4 8 2 4 10 4 6 8 2 2 6 8 0 2 2 6 6 8 12 20 8 8 12 22 4 14 6 10 12 14 10 14 16 14 10 8 16 10 14 16 14 20 10 8 10 6 4 14 14 16 16 10 12 12 10 12 18 10 18 14 10 20 2 12 10 12 6 14 8 10 10 4 8 8 6 12 8 2 8 4 10 4 6 8 6 6 10 12 6 16 8 18 22 2 8 4 14 4 8 8 8 6 0 2 14 6 10 2 0 12 6 0 8 0 8 0 6 0 2 4 4 6 2 4 2 6 6 6 14

@ -1,153 +0,0 @@
num_measures = 5; %Number of measures will be made in each cycle of the calibration
error_max = 1; %max error (in %) permited during calibration
%error = 0;
%iterations = 0;
interStimuliColor_sRGB = [0 0 0];
screenSizePix2 = zeros(1,2);
screenSizePix1 = zeros(1,2);
%Call the C7000 controller (TCP client)
!..\C7000_Controller\netcoreapp3.1\C7000_Test &
%Start the TCP server
tcpObj = tcp_Server_Start(); %Wait here until the client connects
%Screen('Preference', 'ScreenToHead', 0, 1, 1);
Screen('Preference', 'SkipSyncTests', 1);
screenNumber = max(Screen('Screens')); %0: single display setting
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', screenNumber);
[screenSizePix1(1) screenSizePix1(2)] = Screen('WindowSize', 1); %Principal monitor size
wPtr = Screen('OpenWindow', screenNumber, interStimuliColor_sRGB, [screenSizePix1(1) 1 screenSizePix1(1)+screenSizePix2(1) screenSizePix2(2)]);
Screen('FillRect', wPtr, interStimuliColor_sRGB);
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', wPtr);
% >>>>>Start of the calibration<<<<
%Present the first image
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], 0.3, 0);
stimTextureId = Screen('MakeTexture', wPtr, uint8(stimImg.*255));
Screen('DrawTexture', wPtr, stimTextureId);
Screen('Flip', wPtr);
[average1, ~, ~] = C7000_Read(num_measures, tcpObj); %Perform n measures and returun the usefull values
Screen('Close', stimTextureId);
%Present the second image
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], 0.5, 0);
stimTextureId = Screen('MakeTexture', wPtr, uint8(stimImg.*255));
Screen('DrawTexture', wPtr, stimTextureId);
Screen('Flip', wPtr);
[average2, ~, ~] = C7000_Read(num_measures, tcpObj); %Perform n measures and returun the usefull values
Screen('Close', stimTextureId);
%Lineal law: y = ax + b
a = (0.5-0.3)/(average2-average1);
b = (0.3)-(a*average1);
% >>>>Creation of the calibration curve<<<<
calIntensity = [0:250:30000]; %Luminances we are aiming
realIntensity_avr = []; %Real luminances we are getting
realIntensity_max = [];
realIntensity_min = [];
useful_intensity = [];
for intensity = calIntensity
meanIntensity = intensity*a + b;
while iterations < 10
if meanIntensity > 1
meanIntensity = 1;
elseif meanIntensity < 0
meanIntensity = 0;
end
%Present new image
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], meanIntensity, 0);
stimTextureId = Screen('MakeTexture', wPtr, uint8(stimImg.*255));
Screen('DrawTexture', wPtr, stimTextureId);
Screen('Flip', wPtr);
%Perform n measures and returun the usefull values
[average_lx, max_lx, min_lx] = C7000_Read(num_measures, tcpObj);
error = (average_lx - intensity)/intensity*100; %Porcentual deviation of the measure from its desired value
if abs(error) < error_max %If error is |low| enough, go to the next point
break;
end
if meanIntensity = 1 | meanIntensity = 0 %If be hit the limit already, go to the next point
break;
end
meanIntensity = meanIntensity - a*(error/100*intensity); %Image generator correction
iterations = iterations + 1;
end
%Store the useful data for later analisis
realIntensity_avr = [realIntensity_avr, average_lx];
realIntensity_max = [realIntensity_max, max_lx-average_lx];
realIntensity_min = [realIntensity_min, average_lx-min_lx];
useful_intensity = [useful_intensity, meanIntensity];
iterations = 0;
end
errorbar(calIntensity, realIntensity_avr, realIntensity_min, realIntensity_max, '-o');
hold on
plot(calIntensity, calIntensity);
title('Calibration curve');
legend('Experimental points', 'X=Y curve');
ylabel('Iluminance received [lx]');
xlabel('Iluminance desired [lx]');
hold off
%Program clossing
sca;
C7000_End_program(tcpObj); %Return the C-7000 to its manual control
fclose(tcpObj); %Close the server
%C-7000 controller Functions
%START HERE
function tcpObj = tcp_Server_Start()
%Opens a TCP/IP server and waits until a client connects to it
port = 30000;
tcpObj = tcpip('0.0.0.0', port, 'NetworkRole', 'Server')
tcpObj.ByteOrder = 'littleEndian';
tcpObj.Timeout = 9999;
fopen(tcpObj); %Wait until the client connects
end
function [average_lx, max_lx, min_lx] = C7000_Read(n, tcpObj)
%Ask the C-7000 to make n measures and returns average, max and min lux
%of all the measures
fwrite(tcpObj, int16(n), 'int16');
average_lx = fread(tcpObj, 1, 'double');
max_lx = fread(tcpObj, 1, 'double');
min_lx = fread(tcpObj, 1, 'double');
end
function C7000_End_program(tcpObj)
fwrite(tcpObj, int16(-1), 'int16'); %Ask the C-7000 to finish the program
end
%END HERE

@ -0,0 +1,93 @@
num_measures = 5; %Number of measures will be made in each cycle of the calibration
interStimuliColor_sRGB = [0 0 0];
screenSizePix2 = zeros(1,2);
screenSizePix1 = zeros(1,2);
%Call the C7000 controller (TCP client)
!..\C7000_Controller\netcoreapp3.1\C7000_Test &
%Start the TCP server
tcpObj = tcp_Server_Start(); %Wait here until the client connects
%Screen('Preference', 'ScreenToHead', 0, 1, 1);
Screen('Preference', 'SkipSyncTests', 1);
screenNumber = max(Screen('Screens')); %0: single display setting
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', screenNumber);
[screenSizePix1(1) screenSizePix1(2)] = Screen('WindowSize', 1); %Principal monitor size
wPtr = Screen('OpenWindow', screenNumber, interStimuliColor_sRGB, [screenSizePix1(1) 1 screenSizePix1(1)+screenSizePix2(1) screenSizePix2(2)]);
Screen('FillRect', wPtr, interStimuliColor_sRGB);
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', wPtr);
% >>>>Creation of the calibration curve<<<<
calIntensity = [0:1/255:1]; %Input value to the image generator function
realIntensity_avr = []; %Real luminances we are getting
realIntensity_max = [];
realIntensity_min = [];
for intensity = calIntensity
%Present new image
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], intensity, 0); %Create the visual stimuli
stimTextureId = Screen('MakeTexture', wPtr, uint8(stimImg.*255));
Screen('DrawTexture', wPtr, stimTextureId);
Screen('Flip', wPtr);
%Perform n measures and returun the usefull values
[average_lx, max_lx, min_lx] = C7000_Read(num_measures, tcpObj);
%Store the useful data for later analisis
realIntensity_avr = [realIntensity_avr, average_lx];
realIntensity_max = [realIntensity_max, max_lx-average_lx];
realIntensity_min = [realIntensity_min, average_lx-min_lx];
end
errorbar(calIntensity, realIntensity_avr, realIntensity_min, realIntensity_max, '-o');
%Program clossing
sca;
C7000_End_program(tcpObj); %Return the C-7000 to its manual control
fclose(tcpObj); %Close the server
%Data save
export_me = [calIntensity; realIntensity_avr; realIntensity_max; realIntensity_min];
csvwrite('Calibration_curve.csv', export_me)
%C-7000 controller Functions
%START HERE
function tcpObj = tcp_Server_Start()
%Opens a TCP/IP server and waits until a client connects to it
port = 30000;
tcpObj = tcpip('0.0.0.0', port, 'NetworkRole', 'Server')
tcpObj.ByteOrder = 'littleEndian';
tcpObj.Timeout = 9999;
fopen(tcpObj); %Wait until the client connects
end
function [average_lx, max_lx, min_lx] = C7000_Read(n, tcpObj)
%Ask the C-7000 to make n measures and returns average, max and min lux
%of all the measures
fwrite(tcpObj, int16(n), 'int16');
average_lx = fread(tcpObj, 1, 'double');
max_lx = fread(tcpObj, 1, 'double');
min_lx = fread(tcpObj, 1, 'double');
end
function C7000_End_program(tcpObj)
fwrite(tcpObj, int16(-1), 'int16'); %Ask the C-7000 to finish the program
end
%END HERE

@ -0,0 +1,162 @@
imported_data = csvread('Calibration_curve.csv');
inputGeneratorValue = imported_data(1,:);
realIntensity_avr_cal = imported_data(2,:);
realIntensity_max_cal = imported_data(3,:);
realIntensity_min_cal = imported_data(4,:);
clear imported_data
num_measures = 5;
all_lux = [0:250:30000];
realIntensity_avr = []; %Real luminances we are getting
realIntensity_max = [];
realIntensity_min = [];
interStimuliColor_sRGB = [0 0 0];
screenSizePix2 = zeros(1,2);
screenSizePix1 = zeros(1,2);
%Call the C7000 controller (TCP client)
!..\C7000_Controller\netcoreapp3.1\C7000_Test &
%Start the TCP server
tcpObj = tcp_Server_Start(); %Wait here until the client connects
%Screen('Preference', 'ScreenToHead', 0, 1, 1);
Screen('Preference', 'SkipSyncTests', 1);
screenNumber = max(Screen('Screens')); %0: single display setting
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', screenNumber);
[screenSizePix1(1) screenSizePix1(2)] = Screen('WindowSize', 1); %Principal monitor size
wPtr = Screen('OpenWindow', screenNumber, interStimuliColor_sRGB, [screenSizePix1(1) 1 screenSizePix1(1)+screenSizePix2(1) screenSizePix2(2)]);
Screen('FillRect', wPtr, interStimuliColor_sRGB);
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', wPtr);
for intensity = all_lux
stimImg = GenerateCalibratedImage(intensity, realIntensity_avr_cal, inputGeneratorValue);
ShowStimuli(stimImg, wPtr);
[average_lx, max_lx, min_lx] = C7000_Read(num_measures, tcpObj);
%Store the useful data for later analisis
realIntensity_avr = [realIntensity_avr, average_lx];
realIntensity_max = [realIntensity_max, max_lx-average_lx];
realIntensity_min = [realIntensity_min, average_lx-min_lx];
end
%Program clossing
sca;
C7000_End_program(tcpObj); %Return the C-7000 to its manual control
fclose(tcpObj); %Close the server
%Data plot:
errorbar(all_lux, realIntensity_avr, realIntensity_min, realIntensity_max, '-o');
hold on
plot(all_lux, all_lux);
title('Calibration curve (at night)');
legend('Experimental points', 'X=Y curve');
ylabel('Iluminance received [lx]');
xlabel('Iluminance desired [lx]');
hold off
%Desviació relativa màxima: 15.2%
%Error relatiu màxim: 9.0%
desviacio_min = max((100-(realIntensity_avr - realIntensity_min)*100./realIntensity_avr))
desviacio_max = max((100-(realIntensity_avr - realIntensity_max)*100./realIntensity_avr))
if desviacio_min > desviacio_max
drm = desviacio_min
else
drm = desviacio_max
end
error = abs(realIntensity_avr - all_lux)./all_lux*100;
error(1) = 0;
erm = max(error)
function stimImg = GenerateCalibratedImage(desired_lux, realIntensity_avr_cal, inputGeneratorValue)
%Creates an image of $desired_lux [lx] based on the calibration curve
screenSizePix2 = zeros(1,2);
screenSizePix1 = zeros(1,2);
screenNumber = max(Screen('Screens')); %0: single display setting
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', screenNumber);
[screenSizePix1(1) screenSizePix1(2)] = Screen('WindowSize', 1); %Principal monitor size
lux_values = abs(realIntensity_avr_cal - desired_lux); %Set $desired_lux as the 0 point
[~,Index1] = min(lux_values(:)); %Find the location of the closest point
%to 0. Because it is the closest point (in
%the calibration curve) to the
%desired_lux value.
lux_values(Index1) = NaN; %"Remove" the lowest value from the array
[~,Index2] = min(lux_values(:)); %Find the index of the second lowest value
%{
%First order interpolation (y = ax+b)
if Index2 > Index1
a = (inputGeneratorValue(Index2)-inputGeneratorValue(Index1))/(realIntensity_avr_cal(Index2)-realIntensity_avr_cal(Index1));
b = inputGeneratorValue(Index2) -(a*realIntensity_avr_cal(Index2));
if isnan(a)
a = (inputGeneratorValue(Index2)-inputGeneratorValue(Index1-1))/(realIntensity_avr_cal(Index2)-realIntensity_avr_cal(Index1-1));
end
else
a = (inputGeneratorValue(Index1)-inputGeneratorValue(Index2))/(realIntensity_avr_cal(Index1)-realIntensity_avr_cal(Index2));
b = inputGeneratorValue(Index2) -(a*realIntensity_avr_cal(Index2));
if isnan(a)
a = (inputGeneratorValue(Index1)-inputGeneratorValue(Index2-1))/(realIntensity_avr_cal(Index1)-realIntensity_avr_cal(Index2-1));
b = inputGeneratorValue(Index2-1) -(a*realIntensity_avr_cal(Index2-1));
end
end
%}
inputIntensity = inputGeneratorValue(Index1);
if isnan(inputIntensity)
inputIntensity = 0;
elseif inputIntensity > 1
inputIntensity = 1;
elseif inputIntensity < 0
inputIntensity = 0;
end
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], inputIntensity, 0);
inputIntensity = 0;
end
function ShowStimuli(stimImg, wPtr)
%Presents image (stimImg) to the second screen)
stimTextureId = Screen('MakeTexture', wPtr, uint8(stimImg.*255));
Screen('DrawTexture', wPtr, stimTextureId);
Screen('Flip', wPtr);
end
%C-7000 controller Functions
%START HERE
function tcpObj = tcp_Server_Start()
%Opens a TCP/IP server and waits until a client connects to it
port = 30000;
tcpObj = tcpip('0.0.0.0', port, 'NetworkRole', 'Server')
tcpObj.ByteOrder = 'littleEndian';
tcpObj.Timeout = 9999;
fopen(tcpObj); %Wait until the client connects
end
function [average_lx, max_lx, min_lx] = C7000_Read(n, tcpObj)
%Ask the C-7000 to make n measures and returns average, max and min lux
%of all the measures
fwrite(tcpObj, int16(n), 'int16');
average_lx = fread(tcpObj, 1, 'double');
max_lx = fread(tcpObj, 1, 'double');
min_lx = fread(tcpObj, 1, 'double');
end
function C7000_End_program(tcpObj)
fwrite(tcpObj, int16(-1), 'int16'); %Ask the C-7000 to finish the program
end
%END HERE

@ -0,0 +1,25 @@
interStimuliColor_sRGB = [0 0 0];
background_RGB = [1 1 1];
screenSizePix2 = zeros(1,2);
screenSizePix1 = zeros(1,2);
%Screen('Preference', 'ScreenToHead', 0, 1, 1);
Screen('Preference', 'SkipSyncTests', 1);
screenNumber = max(Screen('Screens')); %0: single display setting
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', screenNumber);
[screenSizePix1(1) screenSizePix1(2)] = Screen('WindowSize', 1); %Principal monitor size
wPtr = Screen('OpenWindow', screenNumber, interStimuliColor_sRGB, [screenSizePix1(1) 1 screenSizePix1(1)+screenSizePix2(1) screenSizePix2(2)]);
Screen('FillRect', wPtr, interStimuliColor_sRGB);
[screenSizePix2(1) screenSizePix2(2)] = Screen('WindowSize', wPtr);
stimImg = GenerateNoisyImage([screenSizePix2(2) screenSizePix2(1)], 1, 0, background_RGB);
stimTextureId = Screen('MakeTexture', wPtr, uint8(stimImg.*255));
Screen('DrawTexture', wPtr, stimTextureId);
Screen('Flip', wPtr);

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Loading…
Cancel
Save