-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgeneralFunctions.js
1186 lines (1057 loc) · 102 KB
/
generalFunctions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//General Analysis
var thickness = 1;
var _thickness = 1;
var _mpod = 0.5, _t = 1, _d = 1, _p = 0;
var sourcelist;
var manUnique = [];
var lampUnique = [];
var cctUnique = [];
var setwavelength = [380,382,384,386,388,390,392,394,396,398,400,402,404,406,408,410,412,414,416,418,420,422,424,426,428,430,432,434,436,438,440,442,444,446,448,450,452,454,456,458,460,462,464,466,468,470,472,474,476,478,480,482,484,486,488,490,492,494,496,498,500,502,504,506,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,564,566,568,570,572,574,576,578,580,582,584,586,588,590,592,594,596,598,600,602,604,606,608,610,612,614,616,618,620,622,624,626,628,630,632,634,636,638,640,642,644,646,648,650,652,654,656,658,660,662,664,666,668,670,672,674,676,678,680,682,684,686,688,690,692,694,696,698,700,702,704,706,708,710,712,714,716,718,720,722,724,726,728,730];
function efficienyFunctions(wavelength, thickness){
var results = {};
var Vlambda = {
wavelength: [390,392,394,396,398,400,402,404,406,408,410,412,414,416,418,420,422,424,426,428,430,432,434,436,438,440,442,444,446,448,450,452,454,456,458,460,462,464,466,468,470,472,474,476,478,480,482,484,486,488,490,492,494,496,498,500,502,504,506,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,564,566,568,570,572,574,576,578,580,582,584,586,588,590,592,594,596,598,600,602,604,606,608,610,612,614,616,618,620,622,624,626,628,630,632,634,636,638,640,642,644,646,648,650,652,654,656,658,660,662,664,666,668,670,672,674,676,678,680,682,684,686,688,690,692,694,696,698,700,702,704,706,708,710,712,714,716,718,720,722,724,726,728,730],
value: [0.000120024,0.000151522,0.000191854,0.000246955,0.000318583,0.000396078,0.000473117,0.000572332,0.000724703,0.000941346,0.001210239,0.001531054,0.001935705,0.002455285,0.003118416,0.00400079,0.005160339,0.006547453,0.008088105,0.00976961,0.011602292,0.013585404,0.015718195,0.018010918,0.020457961,0.023004545,0.0256153,0.028356852,0.031317017,0.034527941,0.038007508,0.041776253,0.045851728,0.050253608,0.054991424,0.060011855,0.065290418,0.070925101,0.077031218,0.083683332,0.090997977,0.09906541,0.107905917,0.117555223,0.12801809,0.139047469,0.150499031,0.162749851,0.176277924,0.191311294,0.208061102,0.2267793,0.2475301,0.270238286,0.295108799,0.323063821,0.354755882,0.389364419,0.425714,0.463485962,0.503099387,0.54461959,0.587081278,0.629478954,0.671007758,0.710140288,0.745610895,0.777990492,0.808270074,0.836472045,0.862170322,0.885137259,0.905622106,0.92391732,0.940108318,0.9541885,0.966198272,0.976215351,0.984286846,0.990508475,0.995146691,0.998295513,0.999945739,1.000054261,0.998522758,0.995196601,0.989938162,0.982918276,0.974276168,0.964047248,0.952188105,0.938684637,0.923640065,0.907185615,0.889380497,0.870171902,0.849559831,0.827744821,0.804953719,0.781346355,0.757149575,0.732567119,0.707636294,0.682353999,0.656804152,0.631124679,0.605434003,0.57975243,0.554070557,0.528457197,0.503099387,0.478124854,0.453492788,0.429164782,0.40511203,0.381075281,0.356897705,0.332883361,0.309399222,0.286650228,0.265052361,0.244937987,0.226097466,0.20820273,0.19119297,0.175034578,0.159677944,0.145154575,0.131526283,0.118802669,0.107021142,0.096207646,0.086281895,0.077135878,0.068723656,0.061012053,0.053965701,0.047559045,0.041766971,0.036571065,0.032006323,0.028082188,0.024712932,0.021805078,0.01928489,0.017003359,0.014840112,0.012837316,0.011070497,0.009535195,0.008211622,0.007086824,0.006139698,0.005344115,0.004677328,0.004102811,0.003589808,0.003134712,0.00273868,0.002393717,0.002091413,0.001824941,0.001590501,0.00138477,0.00120433,0.001047207,0.000911289,0.000793395,0.000690963,0.000599614,0.000520103]
};
var Vprime = {
wavelength: [390,392,394,396,398,400,402,404,406,408,410,412,414,416,418,420,422,424,426,428,430,432,434,436,438,440,442,444,446,448,450,452,454,456,458,460,462,464,466,468,470,472,474,476,478,480,482,484,486,488,490,492,494,496,498,500,502,504,506,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,564,566,568,570,572,574,576,578,580,582,584,586,588,590,592,594,596,598,600,602,604,606,608,610,612,614,616,618,620,622,624,626,628,630,632,634,636,638,640,642,644,646,648,650,652,654,656,658,660,662,664,666,668,670,672,674,676,678,680,682,684,686,688,690,692,694,696,698,700,702,704,706,708,710,712,714,716,718,720,722,724,726,728,730],
value: [0.002209,0.002939,0.003921,0.00524,0.00698,0.00929,0.01231,0.01619,0.02113,0.0273,0.03484,0.0439,0.0545,0.0668,0.0808,0.0966,0.1141,0.1334,0.1541,0.1764,0.1998,0.2243,0.2496,0.2755,0.3017,0.3281,0.3543,0.3803,0.406,0.431,0.455,0.479,0.502,0.524,0.546,0.567,0.588,0.61,0.631,0.653,0.676,0.699,0.722,0.745,0.769,0.793,0.817,0.84,0.862,0.884,0.904,0.923,0.941,0.957,0.97,0.982,0.99,0.997,1,1,0.997,0.99,0.981,0.968,0.953,0.935,0.915,0.892,0.867,0.84,0.811,0.781,0.749,0.717,0.683,0.65,0.616,0.581,0.548,0.514,0.481,0.448,0.417,0.3864,0.3569,0.3288,0.3018,0.2762,0.2519,0.2291,0.2076,0.1876,0.169,0.1517,0.1358,0.1212,0.1078,0.0956,0.0845,0.0745,0.0655,0.0574,0.0502,0.0438,0.03816,0.03315,0.02874,0.02487,0.02147,0.01851,0.01593,0.01369,0.01175,0.01007,0.00862,0.00737,0.0063,0.00538,0.00459,0.003913,0.003335,0.002842,0.002421,0.002062,0.001757,0.001497,0.001276,0.001088,0.000928,0.000792,0.000677,0.000579,0.000496,0.000425,0.0003645,0.0003129,0.0002689,0.0002313,0.0001991,0.0001716,0.000148,0.0001277,0.0001104,0.0000954,0.0000826,0.0000715,0.000062,0.0000538,0.0000467,0.0000406,0.00003533,0.00003075,0.00002679,0.00002336,0.00002038,0.0000178,0.00001556,0.0000136,0.00001191,0.00001043,0.00000914,0.00000802,0.00000704,0.00000618,0.00000544,0.00000478,0.00000421,0.000003709,0.00000327,0.000002884,0.000002546]
};
var Scone = {
wavelength: [3.90E+02,3.92E+02,3.94E+02,3.96E+02,3.98E+02,4.00E+02,4.02E+02,4.04E+02,4.06E+02,4.08E+02,4.10E+02,4.12E+02,4.14E+02,4.16E+02,4.18E+02,4.20E+02,4.22E+02,4.24E+02,4.26E+02,4.28E+02,4.30E+02,4.32E+02,4.34E+02,4.36E+02,4.38E+02,4.40E+02,4.42E+02,4.44E+02,4.46E+02,4.48E+02,4.50E+02,4.52E+02,4.54E+02,4.56E+02,4.58E+02,4.60E+02,4.62E+02,4.64E+02,4.66E+02,4.68E+02,4.70E+02,4.72E+02,4.74E+02,4.76E+02,4.78E+02,4.80E+02,4.82E+02,4.84E+02,4.86E+02,4.88E+02,4.90E+02,4.92E+02,4.94E+02,4.96E+02,4.98E+02,5.00E+02,5.02E+02,5.04E+02,5.06E+02,5.08E+02,5.10E+02,5.12E+02,5.14E+02,5.16E+02,5.18E+02,5.20E+02,5.22E+02,5.24E+02,5.26E+02,5.28E+02,5.30E+02,5.32E+02,5.34E+02,5.36E+02,5.38E+02,5.40E+02,5.42E+02,5.44E+02,5.46E+02,5.48E+02,5.50E+02,5.52E+02,5.54E+02,5.56E+02,5.58E+02,5.60E+02,5.62E+02,5.64E+02,5.66E+02,5.68E+02,5.70E+02,5.72E+02,5.74E+02,5.76E+02,5.78E+02,5.80E+02,5.82E+02,5.84E+02,5.86E+02,5.88E+02,5.90E+02,5.92E+02,5.94E+02,5.96E+02,5.98E+02,6.00E+02,6.02E+02,6.04E+02,6.06E+02,6.08E+02,6.10E+02,6.12E+02,6.14E+02,6.16E+02,6.18E+02,6.20E+02,6.22E+02,6.24E+02,6.26E+02,6.28E+02,6.30E+02,6.32E+02,6.34E+02,6.36E+02,6.38E+02,6.40E+02,6.42E+02,6.44E+02,6.46E+02,6.48E+02,6.50E+02,6.52E+02,6.54E+02,6.56E+02,6.58E+02,6.60E+02,6.62E+02,6.64E+02,6.66E+02,6.68E+02,6.70E+02,6.72E+02,6.74E+02,6.76E+02,6.78E+02,6.80E+02,6.82E+02,6.84E+02,6.86E+02,6.88E+02,6.90E+02,6.92E+02,6.94E+02,6.96E+02,6.98E+02,7.00E+02,7.02E+02,7.04E+02,7.06E+02,7.08E+02,7.10E+02,7.12E+02,7.14E+02,7.16E+02,7.18E+02,7.20E+02,7.22E+02,7.24E+02,7.26E+02,7.28E+02,7.30E+02],
value: [7.77E-03,4.10E-02,7.43E-02,1.08E-01,1.41E-01,1.74E-01,2.12E-01,2.50E-01,2.87E-01,3.25E-01,3.63E-01,4.23E-01,4.82E-01,5.42E-01,6.02E-01,6.61E-01,7.10E-01,7.59E-01,8.07E-01,8.56E-01,9.04E-01,9.24E-01,9.43E-01,9.62E-01,9.81E-01,1.00E+00,9.83E-01,9.66E-01,9.50E-01,9.33E-01,9.16E-01,8.93E-01,8.70E-01,8.48E-01,8.25E-01,8.02E-01,7.80E-01,7.58E-01,7.37E-01,7.15E-01,6.93E-01,6.48E-01,6.04E-01,5.59E-01,5.15E-01,4.70E-01,4.32E-01,3.93E-01,3.54E-01,3.16E-01,2.77E-01,2.55E-01,2.32E-01,2.10E-01,1.87E-01,1.65E-01,1.51E-01,1.37E-01,1.23E-01,1.09E-01,9.56E-02,8.59E-02,7.63E-02,6.67E-02,5.70E-02,4.74E-02,4.30E-02,3.87E-02,3.43E-02,3.00E-02,2.56E-02,2.30E-02,2.04E-02,1.77E-02,1.51E-02,1.24E-02,1.10E-02,9.63E-03,8.24E-03,6.84E-03,5.44E-03,4.82E-03,4.20E-03,3.57E-03,2.95E-03,2.33E-03,2.18E-03,2.02E-03,1.86E-03,1.71E-03,1.55E-03,1.40E-03,1.24E-03,1.09E-03,9.32E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,7.77E-04,6.22E-04,4.66E-04,3.11E-04,1.55E-04,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00]
};
var Macula = {
wavelength: [4.00E+02,4.05E+02,4.10E+02,4.15E+02,4.20E+02,4.25E+02,4.30E+02,4.35E+02,4.40E+02,4.45E+02,4.50E+02,4.55E+02,4.60E+02,4.65E+02,4.70E+02,4.75E+02,4.80E+02,4.85E+02,4.90E+02,4.95E+02,5.00E+02,5.05E+02,5.10E+02,5.15E+02,5.20E+02,5.25E+02,5.30E+02,5.35E+02,5.40E+02,5.45E+02,5.50E+02,5.55E+02,5.60E+02,5.65E+02,5.70E+02,5.75E+02,5.80E+02,5.85E+02,5.90E+02,5.95E+02,6.00E+02,6.05E+02,6.10E+02,6.15E+02,6.20E+02,6.25E+02,6.30E+02,6.35E+02,6.40E+02,6.45E+02,6.50E+02,6.55E+02,6.60E+02,6.65E+02,6.70E+02,6.75E+02,6.80E+02,6.85E+02,6.90E+02,6.95E+02,7.00E+02,7.05E+02,7.10E+02,7.15E+02,7.20E+02,7.25E+02,7.30E+02],
value: [2.24E-01,2.44E-01,2.64E-01,2.83E-01,3.14E-01,3.53E-01,3.83E-01,4.00E-01,4.17E-01,4.40E-01,4.66E-01,4.90E-01,5.00E-01,4.83E-01,4.62E-01,4.38E-01,4.37E-01,4.36E-01,4.27E-01,4.04E-01,3.51E-01,2.83E-01,2.14E-01,1.55E-01,9.60E-02,6.80E-02,4.00E-02,2.85E-02,1.70E-02,1.30E-02,9.00E-03,8.50E-03,8.00E-03,6.50E-03,5.00E-03,4.50E-03,4.00E-03,2.00E-03,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00]
};
var Melanopsin = {
wavelength: [3.80E+02,3.81E+02,3.82E+02,3.83E+02,3.84E+02,3.85E+02,3.86E+02,3.87E+02,3.88E+02,3.89E+02,3.90E+02,3.91E+02,3.92E+02,3.93E+02,3.94E+02,3.95E+02,3.96E+02,3.97E+02,3.98E+02,3.99E+02,4.00E+02,4.01E+02,4.02E+02,4.03E+02,4.04E+02,4.05E+02,4.06E+02,4.07E+02,4.08E+02,4.09E+02,4.10E+02,4.11E+02,4.12E+02,4.13E+02,4.14E+02,4.15E+02,4.16E+02,4.17E+02,4.18E+02,4.19E+02,4.20E+02,4.21E+02,4.22E+02,4.23E+02,4.24E+02,4.25E+02,4.26E+02,4.27E+02,4.28E+02,4.29E+02,4.30E+02,4.31E+02,4.32E+02,4.33E+02,4.34E+02,4.35E+02,4.36E+02,4.37E+02,4.38E+02,4.39E+02,4.40E+02,4.41E+02,4.42E+02,4.43E+02,4.44E+02,4.45E+02,4.46E+02,4.47E+02,4.48E+02,4.49E+02,4.50E+02,4.51E+02,4.52E+02,4.53E+02,4.54E+02,4.55E+02,4.56E+02,4.57E+02,4.58E+02,4.59E+02,4.60E+02,4.61E+02,4.62E+02,4.63E+02,4.64E+02,4.65E+02,4.66E+02,4.67E+02,4.68E+02,4.69E+02,4.70E+02,4.71E+02,4.72E+02,4.73E+02,4.74E+02,4.75E+02,4.76E+02,4.77E+02,4.78E+02,4.79E+02,4.80E+02,4.81E+02,4.82E+02,4.83E+02,4.84E+02,4.85E+02,4.86E+02,4.87E+02,4.88E+02,4.89E+02,4.90E+02,4.91E+02,4.92E+02,4.93E+02,4.94E+02,4.95E+02,4.96E+02,4.97E+02,4.98E+02,4.99E+02,5.00E+02,5.01E+02,5.02E+02,5.03E+02,5.04E+02,5.05E+02,5.06E+02,5.07E+02,5.08E+02,5.09E+02,5.10E+02,5.11E+02,5.12E+02,5.13E+02,5.14E+02,5.15E+02,5.16E+02,5.17E+02,5.18E+02,5.19E+02,5.20E+02,5.21E+02,5.22E+02,5.23E+02,5.24E+02,5.25E+02,5.26E+02,5.27E+02,5.28E+02,5.29E+02,5.30E+02,5.31E+02,5.32E+02,5.33E+02,5.34E+02,5.35E+02,5.36E+02,5.37E+02,5.38E+02,5.39E+02,5.40E+02,5.41E+02,5.42E+02,5.43E+02,5.44E+02,5.45E+02,5.46E+02,5.47E+02,5.48E+02,5.49E+02,5.50E+02,5.51E+02,5.52E+02,5.53E+02,5.54E+02,5.55E+02,5.56E+02,5.57E+02,5.58E+02,5.59E+02,5.60E+02,5.61E+02,5.62E+02,5.63E+02,5.64E+02,5.65E+02,5.66E+02,5.67E+02,5.68E+02,5.69E+02,5.70E+02,5.71E+02,5.72E+02,5.73E+02,5.74E+02,5.75E+02,5.76E+02,5.77E+02,5.78E+02,5.79E+02,5.80E+02,5.81E+02,5.82E+02,5.83E+02,5.84E+02,5.85E+02,5.86E+02,5.87E+02,5.88E+02,5.89E+02,5.90E+02,5.91E+02,5.92E+02,5.93E+02,5.94E+02,5.95E+02,5.96E+02,5.97E+02,5.98E+02,5.99E+02,6.00E+02,6.01E+02,6.02E+02,6.03E+02,6.04E+02,6.05E+02,6.06E+02,6.07E+02,6.08E+02,6.09E+02,6.10E+02,6.11E+02,6.12E+02,6.13E+02,6.14E+02,6.15E+02,6.16E+02,6.17E+02,6.18E+02,6.19E+02,6.20E+02,6.21E+02,6.22E+02,6.23E+02,6.24E+02,6.25E+02,6.26E+02,6.27E+02,6.28E+02,6.29E+02,6.30E+02,6.31E+02,6.32E+02,6.33E+02,6.34E+02,6.35E+02,6.36E+02,6.37E+02,6.38E+02,6.39E+02,6.40E+02,6.41E+02,6.42E+02,6.43E+02,6.44E+02,6.45E+02,6.46E+02,6.47E+02,6.48E+02,6.49E+02,6.50E+02,6.51E+02,6.52E+02,6.53E+02,6.54E+02,6.55E+02,6.56E+02,6.57E+02,6.58E+02,6.59E+02,6.60E+02,6.61E+02,6.62E+02,6.63E+02,6.64E+02,6.65E+02,6.66E+02,6.67E+02,6.68E+02,6.69E+02,6.70E+02,6.71E+02,6.72E+02,6.73E+02,6.74E+02,6.75E+02,6.76E+02,6.77E+02,6.78E+02,6.79E+02,6.80E+02,6.81E+02,6.82E+02,6.83E+02,6.84E+02,6.85E+02,6.86E+02,6.87E+02,6.88E+02,6.89E+02,6.90E+02,6.91E+02,6.92E+02,6.93E+02,6.94E+02,6.95E+02,6.96E+02,6.97E+02,6.98E+02,6.99E+02,7.00E+02,7.01E+02,7.02E+02,7.03E+02,7.04E+02,7.05E+02,7.06E+02,7.07E+02,7.08E+02,7.09E+02,7.10E+02,7.11E+02,7.12E+02,7.13E+02,7.14E+02,7.15E+02,7.16E+02,7.17E+02,7.18E+02,7.19E+02,7.20E+02,7.21E+02,7.22E+02,7.23E+02,7.24E+02,7.25E+02,7.26E+02,7.27E+02,7.28E+02,7.29E+02,7.30E+02],
value: [1.21E-03,1.52E-03,1.88E-03,2.27E-03,2.71E-03,3.20E-03,3.74E-03,4.35E-03,4.88E-03,5.46E-03,6.09E-03,7.54E-03,9.10E-03,1.08E-02,1.26E-02,1.45E-02,1.66E-02,1.88E-02,2.11E-02,2.34E-02,2.59E-02,3.06E-02,3.54E-02,4.05E-02,4.59E-02,5.15E-02,5.73E-02,6.33E-02,7.01E-02,7.71E-02,8.44E-02,9.44E-02,1.05E-01,1.15E-01,1.26E-01,1.37E-01,1.49E-01,1.61E-01,1.74E-01,1.88E-01,2.02E-01,2.18E-01,2.34E-01,2.50E-01,2.66E-01,2.83E-01,3.00E-01,3.17E-01,3.35E-01,3.54E-01,3.72E-01,3.88E-01,4.04E-01,4.20E-01,4.36E-01,4.52E-01,4.68E-01,4.85E-01,5.02E-01,5.20E-01,5.38E-01,5.51E-01,5.64E-01,5.77E-01,5.91E-01,6.05E-01,6.19E-01,6.33E-01,6.47E-01,6.62E-01,6.76E-01,6.89E-01,7.01E-01,7.14E-01,7.27E-01,7.41E-01,7.54E-01,7.67E-01,7.82E-01,7.96E-01,8.10E-01,8.22E-01,8.34E-01,8.45E-01,8.57E-01,8.69E-01,8.80E-01,8.91E-01,9.01E-01,9.11E-01,9.21E-01,9.31E-01,9.41E-01,9.49E-01,9.57E-01,9.65E-01,9.72E-01,9.79E-01,9.84E-01,9.89E-01,9.94E-01,9.97E-01,9.99E-01,1.00E+00,1.00E+00,1.00E+00,9.99E-01,9.97E-01,9.95E-01,9.92E-01,9.89E-01,9.85E-01,9.81E-01,9.75E-01,9.69E-01,9.62E-01,9.54E-01,9.46E-01,9.37E-01,9.28E-01,9.17E-01,9.06E-01,8.95E-01,8.83E-01,8.71E-01,8.58E-01,8.44E-01,8.30E-01,8.16E-01,8.01E-01,7.86E-01,7.69E-01,7.53E-01,7.36E-01,7.19E-01,7.01E-01,6.84E-01,6.67E-01,6.50E-01,6.32E-01,6.14E-01,5.97E-01,5.80E-01,5.63E-01,5.45E-01,5.28E-01,5.11E-01,4.94E-01,4.77E-01,4.60E-01,4.44E-01,4.28E-01,4.12E-01,3.97E-01,3.81E-01,3.66E-01,3.52E-01,3.38E-01,3.24E-01,3.10E-01,2.97E-01,2.84E-01,2.71E-01,2.59E-01,2.47E-01,2.35E-01,2.24E-01,2.13E-01,2.03E-01,1.93E-01,1.83E-01,1.74E-01,1.64E-01,1.56E-01,1.47E-01,1.39E-01,1.32E-01,1.24E-01,1.17E-01,1.11E-01,1.04E-01,9.82E-02,9.24E-02,8.69E-02,8.16E-02,7.66E-02,7.19E-02,6.74E-02,6.32E-02,5.92E-02,5.54E-02,5.18E-02,4.84E-02,4.53E-02,4.23E-02,3.95E-02,3.68E-02,3.44E-02,3.20E-02,2.98E-02,2.78E-02,2.59E-02,2.41E-02,2.24E-02,2.08E-02,1.93E-02,1.79E-02,1.66E-02,1.54E-02,1.43E-02,1.33E-02,1.23E-02,1.14E-02,1.05E-02,9.76E-03,9.03E-03,8.35E-03,7.72E-03,7.15E-03,6.61E-03,6.11E-03,5.65E-03,5.22E-03,4.83E-03,4.46E-03,4.12E-03,3.80E-03,3.51E-03,3.25E-03,3.00E-03,2.77E-03,2.56E-03,2.36E-03,2.18E-03,2.01E-03,1.86E-03,1.72E-03,1.58E-03,1.46E-03,1.35E-03,1.25E-03,1.16E-03,1.07E-03,9.86E-04,9.12E-04,8.43E-04,7.79E-04,7.21E-04,6.67E-04,6.17E-04,5.71E-04,5.29E-04,4.90E-04,4.54E-04,4.20E-04,3.90E-04,3.61E-04,3.35E-04,3.11E-04,2.88E-04,2.67E-04,2.48E-04,2.30E-04,2.14E-04,1.99E-04,1.84E-04,1.71E-04,1.59E-04,1.48E-04,1.38E-04,1.28E-04,1.19E-04,1.11E-04,1.03E-04,9.58E-05,8.92E-05,8.30E-05,7.73E-05,7.20E-05,6.71E-05,6.25E-05,5.82E-05,5.43E-05,5.06E-05,4.71E-05,4.40E-05,4.10E-05,3.82E-05,3.57E-05,3.33E-05,3.11E-05,2.90E-05,2.71E-05,2.53E-05,2.36E-05,2.21E-05,2.06E-05,1.93E-05,1.80E-05,1.68E-05,1.57E-05,1.47E-05,1.38E-05,1.29E-05,1.21E-05,1.13E-05,1.06E-05,9.90E-06,9.27E-06,8.68E-06,8.13E-06,7.62E-06,7.14E-06,6.69E-06,6.28E-06,5.89E-06,5.52E-06,5.17E-06,4.86E-06,4.56E-06,4.28E-06,4.02E-06,3.77E-06,3.54E-06,3.32E-06,3.12E-06,2.93E-06,2.76E-06,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00,0.00E+00]
};
//var thickness = 1.0;
var macularT = arrayPow(10,arrayScalar(Macula.value,-thickness));
var macularTi = interp1(Macula.wavelength,macularT,wavelength,1);
var VprimeInt1 = interp1(Vprime.wavelength,Vprime.value,wavelength,0);
var VprimeInt = arrayNormalize(VprimeInt1);
var MelanopsinInt1 = interp1(Melanopsin.wavelength,Melanopsin.value,wavelength,0);
var MelanopsinInt = arrayNormalize(MelanopsinInt1);
var SconeInt1 = interp1(Scone.wavelength,Scone.value,wavelength,0);
var SconeInt2 = arrayDiv(SconeInt1,macularTi);
var SconeInt = arrayNormalize(SconeInt2);
var VlambdaInt1 = interp1(Vlambda.wavelength,Vlambda.value,wavelength,0);
var VlambdaInt2 = arrayDiv(VlambdaInt1,macularTi);
var VlambdaInt = arrayNormalize(VlambdaInt2);
var PhotopicInt = arrayNormalize(VlambdaInt1);
results = {
Vlambda: VlambdaInt,
Vprime: VprimeInt,
Scone: SconeInt,
Melanopsin: MelanopsinInt,
Photopic: PhotopicInt,
};
return results;
}
function isoTempLinesNewestFine23Sep05(){
return {
T: [100000000,1000000,500000,333333.33,250000,200000,166666.67,142857.14,125000,111111.11,100000,90909.091,83333.333,76923.077,71428.571,66666.667,62500,58823.529,55555.556,52631.579,50000,47619.048,45454.545,43478.261,41666.667,40000,38461.538,37037.037,35714.286,34482.759,33333.333,32258.065,31250,30303.03,29411.765,28571.429,27777.778,27027.027,26315.789,25641.026,25000,24390.244,23809.524,23255.814,22727.273,22222.222,21739.13,21276.596,20833.333,20408.163,20000,19607.843,19230.769,18867.925,18518.519,18181.818,17857.143,17543.86,17241.379,16949.153,16666.667,16393.443,16129.032,15873.016,15625,15384.615,15151.515,14925.373,14705.882,14492.754,14285.714,14084.507,13888.889,13698.63,13513.514,13333.333,13157.895,12987.013,12820.513,12658.228,12500,12345.679,12195.122,12048.193,11904.762,11764.706,11627.907,11494.253,11363.636,11235.955,11111.111,10989.011,10869.565,10752.688,10638.298,10526.316,10416.667,10309.278,10204.082,10101.01,10000,9900.9901,9803.9216,9708.7379,9615.3846,9523.8095,9433.9623,9345.7944,9259.2593,9174.3119,9090.9091,9009.009,8928.5714,8849.5575,8771.9298,8695.6522,8620.6897,8547.0085,8474.5763,8403.3613,8333.3333,8264.4628,8196.7213,8130.0813,8064.5161,8000,7936.5079,7874.0157,7812.5,7751.938,7692.3077,7633.5878,7575.7576,7518.797,7462.6866,7407.4074,7352.9412,7299.2701,7246.3768,7194.2446,7142.8571,7092.1986,7042.2535,6993.007,6944.4444,6896.5517,6849.3151,6802.7211,6756.7568,6711.4094,6666.6667,6622.5166,6578.9474,6535.9477,6493.5065,6451.6129,6410.2564,6369.4268,6329.1139,6289.3082,6250,6211.1801,6172.8395,6134.9693,6097.561,6060.6061,6024.0964,5988.024,5952.381,5917.1598,5882.3529,5847.9532,5813.9535,5780.3468,5747.1264,5714.2857,5681.8182,5649.7175,5617.9775,5586.5922,5555.5556,5524.8619,5494.5055,5464.4809,5434.7826,5405.4054,5376.3441,5347.5936,5319.1489,5291.0053,5263.1579,5235.6021,5208.3333,5181.3472,5154.6392,5128.2051,5102.0408,5076.1421,5050.5051,5025.1256,5000,4975.1244,4950.495,4926.1084,4901.9608,4878.0488,4854.3689,4830.9179,4807.6923,4784.689,4761.9048,4739.3365,4716.9811,4694.8357,4672.8972,4651.1628,4629.6296,4608.2949,4587.156,4566.21,4545.4545,4524.8869,4504.5045,4484.3049,4464.2857,4444.4444,4424.7788,4405.2863,4385.9649,4366.8122,4347.8261,4329.0043,4310.3448,4291.8455,4273.5043,4255.3191,4237.2881,4219.4093,4201.6807,4184.1004,4166.6667,4149.3776,4132.2314,4115.2263,4098.3607,4081.6327,4065.0407,4048.583,4032.2581,4016.0643,4000,3984.0637,3968.254,3952.5692,3937.0079,3921.5686,3906.25,3891.0506,3875.969,3861.0039,3846.1538,3831.4176,3816.7939,3802.2814,3787.8788,3773.5849,3759.3985,3745.3184,3731.3433,3717.4721,3703.7037,3690.0369,3676.4706,3663.0037,3649.635,3636.3636,3623.1884,3610.1083,3597.1223,3584.2294,3571.4286,3558.7189,3546.0993,3533.5689,3521.1268,3508.7719,3496.5035,3484.3206,3472.2222,3460.2076,3448.2759,3436.4261,3424.6575,3412.9693,3401.3605,3389.8305,3378.3784,3367.0034,3355.7047,3344.4816,3333.3333,3322.2591,3311.2583,3300.33,3289.4737,3278.6885,3267.9739,3257.329,3246.7532,3236.246,3225.8065,3215.4341,3205.1282,3194.8882,3184.7134,3174.6032,3164.557,3154.5741,3144.6541,3134.7962,3125,3115.2648,3105.5901,3095.9752,3086.4198,3076.9231,3067.4847,3058.104,3048.7805,3039.5137,3030.303,3021.148,3012.0482,3003.003,2994.012,2985.0746,2976.1905,2967.3591,2958.5799,2949.8525,2941.1765,2932.5513,2923.9766,2915.4519,2906.9767,2898.5507,2890.1734,2881.8444,2873.5632,2865.3295,2857.1429,2849.0028,2840.9091,2832.8612,2824.8588,2816.9014,2808.9888,2801.1204,2793.2961,2785.5153,2777.7778,2770.0831,2762.4309,2754.8209,2747.2527,2739.726,2732.2404,2724.7956,2717.3913,2710.0271,2702.7027,2695.4178,2688.172,2680.9651,2673.7968,2666.6667,2659.5745,2652.5199,2645.5026,2638.5224,2631.5789,2624.6719,2617.801,2610.9661,2604.1667,2597.4026,2590.6736,2583.9793,2577.3196,2570.6941,2564.1026,2557.5448,2551.0204,2544.5293,2538.0711,2531.6456,2525.2525,2518.8917,2512.5628,2506.2657,2500,2493.7656,2487.5622,2481.3896,2475.2475,2469.1358,2463.0542,2457.0025,2450.9804,2444.9878,2439.0244,2433.09,2427.1845,2421.3075,2415.4589,2409.6386,2403.8462,2398.0815,2392.3445,2386.6348,2380.9524,2375.2969,2369.6682,2364.0662,2358.4906,2352.9412,2347.4178,2341.9204,2336.4486,2331.0023,2325.5814,2320.1856,2314.8148,2309.4688,2304.1475,2298.8506,2293.578,2288.3295,2283.105,2277.9043,2272.7273,2267.5737,2262.4434,2257.3363,2252.2523,2247.191,2242.1525,2237.1365,2232.1429,2227.1715,2222.2222,2217.2949,2212.3894,2207.5055,2202.6432,2197.8022,2192.9825,2188.1838,2183.4061,2178.6492,2173.913,2169.1974,2164.5022,2159.8272,2155.1724,2150.5376,2145.9227,2141.3276,2136.7521,2132.1962,2127.6596,2123.1423,2118.6441,2114.1649,2109.7046,2105.2632,2100.8403,2096.4361,2092.0502,2087.6827,2083.3333,2079.0021,2074.6888,2070.3934,2066.1157,2061.8557,2057.6132,2053.3881,2049.1803,2044.9898,2040.8163,2036.6599,2032.5203,2028.3976,2024.2915,2020.202,2016.129,2012.0724,2008.0321,2004.008,2000,1996.008,1992.0319,1988.0716,1984.127,1980.198,1976.2846,1972.3866,1968.5039,1964.6365,1960.7843,1956.9472,1953.125,1949.3177,1945.5253,1941.7476,1937.9845,1934.236,1930.5019,1926.7823,1923.0769,1919.3858,1915.7088,1912.0459,1908.3969,1904.7619,1901.1407,1897.5332,1893.9394,1890.3592,1886.7925,1883.2392,1879.6992,1876.1726,1872.6592,1869.1589,1865.6716,1862.1974,1858.7361,1855.2876,1851.8519,1848.4288,1845.0185,1841.6206,1838.2353,1834.8624,1831.5018,1828.1536,1824.8175,1821.4936,1818.1818,1814.882,1811.5942,1808.3183,1805.0542,1801.8018,1798.5612,1795.3321,1792.1147,1788.9088,1785.7143,1782.5312,1779.3594,1776.1989,1773.0496,1769.9115,1766.7845,1763.6684,1760.5634,1757.4692,1754.386,1751.3135,1748.2517,1745.2007,1742.1603,1739.1304,1736.1111,1733.1023,1730.1038,1727.1157,1724.1379,1721.1704,1718.2131,1715.2659,1712.3288,1709.4017,1706.4846,1703.5775,1700.6803,1697.7929,1694.9153,1692.0474,1689.1892,1686.3406,1683.5017,1680.6723,1677.8523,1675.0419,1672.2408,1669.4491,1666.6667],
ut: [0.18006492,0.18012013,0.18017661,0.18023382,0.18029176,0.18035045,0.18040989,0.18047009,0.18053105,0.18059279,0.1806553,0.18071861,0.18078272,0.18084763,0.18091336,0.18097991,0.18104729,0.1811155,0.18118456,0.18125447,0.18132524,0.18139688,0.1814694,0.1815428,0.18161708,0.18169227,0.18176836,0.18184537,0.1819233,0.18200215,0.18208194,0.18216267,0.18224435,0.18232699,0.18241059,0.18249516,0.18258071,0.18266725,0.18275477,0.18284329,0.18293281,0.18302335,0.1831149,0.18320747,0.18330107,0.1833957,0.18349138,0.1835881,0.18368588,0.18378471,0.1838846,0.18398557,0.1840876,0.18419072,0.18429492,0.18440021,0.18450659,0.18461407,0.18472265,0.18483234,0.18494313,0.18505505,0.18516808,0.18528224,0.18539752,0.18551394,0.18563148,0.18575017,0.18586999,0.18599096,0.18611308,0.18623634,0.18636076,0.18648633,0.18661305,0.18674094,0.18686998,0.18700019,0.18713157,0.18726411,0.18739782,0.18753269,0.18766874,0.18780596,0.18794436,0.18808393,0.18822467,0.18836659,0.18850968,0.18865395,0.18879939,0.18894602,0.18909381,0.18924279,0.18939294,0.18954427,0.18969677,0.18985045,0.1900053,0.19016132,0.19031851,0.19047688,0.19063642,0.19079712,0.19095899,0.19112203,0.19128623,0.19145159,0.19161811,0.19178579,0.19195463,0.19212462,0.19229576,0.19246806,0.19264149,0.19281608,0.1929918,0.19316867,0.19334667,0.1935258,0.19370607,0.19388746,0.19406997,0.19425361,0.19443836,0.19462423,0.19481121,0.1949993,0.19518849,0.19537878,0.19557017,0.19576265,0.19595622,0.19615088,0.19634661,0.19654343,0.19674131,0.19694027,0.19714029,0.19734137,0.1975435,0.19774669,0.19795093,0.19815621,0.19836252,0.19856988,0.19877826,0.19898766,0.19919809,0.19940953,0.19962198,0.19983544,0.2000499,0.20026536,0.20048181,0.20069925,0.20091766,0.20113706,0.20135743,0.20157876,0.20180106,0.20202432,0.20224852,0.20247368,0.20269978,0.20292681,0.20315478,0.20338367,0.20361349,0.20384422,0.20407587,0.20430842,0.20454187,0.20477622,0.20501146,0.20524759,0.2054846,0.20572248,0.20596123,0.20620085,0.20644133,0.20668267,0.20692485,0.20716788,0.20741175,0.20765645,0.20790198,0.20814833,0.20839551,0.20864349,0.20889229,0.20914189,0.20939228,0.20964347,0.20989545,0.2101482,0.21040174,0.21065605,0.21091112,0.21116696,0.21142355,0.2116809,0.21193899,0.21219783,0.2124574,0.2127177,0.21297873,0.21324048,0.21350294,0.21376612,0.21403,0.21429459,0.21455987,0.21482584,0.2150925,0.21535985,0.21562787,0.21589656,0.21616591,0.21643593,0.21670661,0.21697794,0.21724992,0.21752254,0.2177958,0.21806969,0.21834421,0.21861935,0.21889512,0.2191715,0.21944849,0.21972608,0.22000427,0.22028306,0.22056245,0.22084241,0.22112296,0.22140409,0.2216858,0.22196807,0.2222509,0.22253429,0.22281824,0.22310274,0.22338779,0.22367338,0.22395951,0.22424617,0.22453336,0.22482107,0.2251093,0.22539805,0.22568732,0.22597709,0.22626736,0.22655813,0.2268494,0.22714116,0.2274334,0.22772613,0.22801933,0.22831301,0.22860716,0.22890178,0.22919686,0.2294924,0.22978839,0.23008483,0.23038172,0.23067905,0.23097682,0.23127502,0.23157365,0.23187271,0.2321722,0.2324721,0.23277242,0.23307315,0.23337429,0.23367583,0.23397777,0.23428011,0.23458284,0.23488596,0.23518947,0.23549336,0.23579763,0.23610227,0.23640728,0.23671266,0.23701841,0.23732451,0.23763098,0.23793779,0.23824496,0.23855247,0.23886033,0.23916853,0.23947706,0.23978593,0.24009512,0.24040464,0.24071449,0.24102465,0.24133514,0.24164593,0.24195704,0.24226845,0.24258016,0.24289218,0.24320449,0.24351709,0.24382999,0.24414318,0.24445664,0.24477039,0.24508442,0.24539873,0.2457133,0.24602815,0.24634326,0.24665863,0.24697427,0.24729016,0.24760631,0.2479227,0.24823935,0.24855624,0.24887337,0.24919075,0.24950836,0.2498262,0.25014427,0.25046258,0.25078111,0.25109986,0.25141883,0.25173802,0.25205742,0.25237704,0.25269686,0.25301689,0.25333712,0.25365756,0.25397819,0.25429902,0.25462004,0.25494125,0.25526265,0.25558424,0.25590601,0.25622796,0.25655008,0.25687238,0.25719486,0.2575175,0.25784031,0.25816329,0.25848643,0.25880973,0.25913319,0.2594568,0.25978057,0.26010449,0.26042855,0.26075277,0.26107712,0.26140162,0.26172625,0.26205103,0.26237593,0.26270097,0.26302614,0.26335144,0.26367686,0.26400241,0.26432808,0.26465386,0.26497976,0.26530578,0.26563191,0.26595815,0.26628449,0.26661095,0.2669375,0.26726416,0.26759092,0.26791778,0.26824473,0.26857177,0.26889891,0.26922613,0.26955344,0.26988084,0.27020832,0.27053588,0.27086353,0.27119125,0.27151904,0.27184691,0.27217485,0.27250286,0.27283093,0.27315908,0.27348729,0.27381555,0.27414388,0.27447227,0.27480072,0.27512922,0.27545777,0.27578637,0.27611503,0.27644373,0.27677248,0.27710127,0.2774301,0.27775898,0.27808789,0.27841684,0.27874582,0.27907484,0.2794039,0.27973298,0.28006209,0.28039123,0.28072039,0.28104958,0.28137879,0.28170802,0.28203726,0.28236653,0.28269581,0.28302511,0.28335442,0.28368374,0.28401307,0.2843424,0.28467175,0.28500109,0.28533045,0.2856598,0.28598915,0.28631851,0.28664786,0.2869772,0.28730655,0.28763588,0.2879652,0.28829452,0.28862382,0.28895312,0.28928239,0.28961166,0.2899409,0.29027013,0.29059934,0.29092852,0.29125769,0.29158683,0.29191594,0.29224503,0.29257409,0.29290312,0.29323213,0.2935611,0.29389003,0.29421894,0.2945478,0.29487663,0.29520543,0.29553418,0.29586289,0.29619157,0.29652019,0.29684878,0.29717732,0.29750581,0.29783425,0.29816265,0.29849099,0.29881929,0.29914753,0.29947571,0.29980385,0.30013192,0.30045994,0.3007879,0.30111581,0.30144365,0.30177143,0.30209914,0.30242679,0.30275438,0.3030819,0.30340936,0.30373674,0.30406406,0.30439131,0.30471848,0.30504559,0.30537261,0.30569957,0.30602645,0.30635325,0.30667998,0.30700662,0.30733319,0.30765967,0.30798608,0.3083124,0.30863864,0.30896479,0.30929086,0.30961684,0.30994274,0.31026855,0.31059426,0.31091989,0.31124542,0.31157087,0.31189622,0.31222148,0.31254664,0.3128717,0.31319667,0.31352154,0.31384632,0.31417099,0.31449557,0.31482004,0.31514441,0.31546868,0.31579284,0.3161169,0.31644086,0.31676471,0.31708845,0.31741209,0.31773561,0.31805903,0.31838233,0.31870553,0.31902861,0.31935158,0.31967444,0.31999718,0.32031981,0.32064232,0.32096472,0.321287,0.32160916,0.3219312,0.32225312,0.32257493,0.32289661,0.32321817,0.3235396,0.32386092,0.32418211,0.32450317,0.32482411,0.32514492,0.32546561,0.32578617,0.3261066,0.3264269,0.32674707,0.32706712,0.32738703,0.32770681,0.32802646,0.32834597,0.32866535,0.3289846,0.32930371,0.32962268,0.32994152,0.33026023,0.33057879,0.33089722,0.33121551,0.33153366,0.33185167,0.33216954,0.33248726,0.33280485,0.33312229,0.33343959,0.33375675,0.33407376,0.33439063,0.33470735,0.33502393,0.33534035,0.33565664,0.33597277,0.33628876,0.33660459,0.33692028,0.33723582],
vt: [0.26352349,0.26374983,0.26398041,0.26421295,0.26444744,0.26468388,0.26492224,0.26516253,0.26540473,0.26564882,0.2658948,0.26614266,0.26639237,0.26664393,0.26689732,0.26715253,0.26740954,0.26766834,0.26792892,0.26819125,0.26845532,0.26872111,0.2689886,0.26925778,0.26952864,0.26980114,0.27007527,0.27035102,0.27062836,0.27090727,0.27118773,0.27146973,0.27175323,0.27203823,0.27232469,0.2726126,0.27290193,0.27319267,0.27348478,0.27377825,0.27407306,0.27436917,0.27466657,0.27496523,0.27526513,0.27556624,0.27586854,0.27617201,0.27647662,0.27678235,0.27708917,0.27739705,0.27770598,0.27801592,0.27832685,0.27863875,0.27895159,0.27926534,0.27957998,0.27989548,0.28021182,0.28052898,0.28084692,0.28116562,0.28148505,0.2818052,0.28212603,0.28244752,0.28276964,0.28309237,0.28341568,0.28373954,0.28406394,0.28438885,0.28471423,0.28504007,0.28536635,0.28569303,0.28602009,0.28634751,0.28667526,0.28700332,0.28733167,0.28766028,0.28798912,0.28831818,0.28864742,0.28897684,0.2893064,0.28963608,0.28996585,0.2902957,0.29062561,0.29095555,0.29128549,0.29161542,0.29194532,0.29227517,0.29260493,0.2929346,0.29326415,0.29359357,0.29392282,0.2942519,0.29458078,0.29490944,0.29523786,0.29556603,0.29589392,0.29622152,0.2965488,0.29687576,0.29720237,0.29752862,0.29785448,0.29817995,0.29850499,0.29882961,0.29915378,0.29947748,0.2998007,0.30012342,0.30044563,0.30076732,0.30108846,0.30140905,0.30172906,0.30204849,0.30236733,0.30268555,0.30300314,0.30332009,0.3036364,0.30395204,0.304267,0.30458127,0.30489484,0.3052077,0.30551983,0.30583123,0.30614188,0.30645178,0.3067609,0.30706925,0.30737681,0.30768357,0.30798952,0.30829465,0.30859895,0.30890242,0.30920504,0.30950681,0.30980772,0.31010775,0.31040691,0.31070518,0.31100255,0.31129902,0.31159458,0.31188923,0.31218295,0.31247574,0.3127676,0.31305851,0.31334847,0.31363747,0.31392551,0.31421259,0.31449869,0.31478382,0.31506796,0.31535111,0.31563327,0.31591443,0.31619458,0.31647373,0.31675187,0.31702899,0.3173051,0.31758017,0.31785422,0.31812725,0.31839923,0.31867018,0.31894009,0.31920895,0.31947677,0.31974353,0.32000925,0.32027391,0.32053751,0.32080005,0.32106153,0.32132195,0.3215813,0.32183959,0.3220968,0.32235295,0.32260802,0.32286202,0.32311494,0.32336678,0.32361755,0.32386724,0.32411586,0.32436339,0.32460984,0.32485521,0.32509949,0.3253427,0.32558482,0.32582586,0.32606581,0.32630468,0.32654247,0.32677917,0.32701479,0.32724933,0.32748279,0.32771516,0.32794645,0.32817666,0.32840578,0.32863383,0.3288608,0.32908668,0.32931149,0.32953522,0.32975788,0.32997946,0.33019996,0.3304194,0.33063776,0.33085504,0.33107126,0.33128641,0.3315005,0.33171351,0.33192547,0.33213636,0.33234619,0.33255496,0.33276267,0.33296933,0.33317493,0.33337948,0.33358298,0.33378543,0.33398684,0.3341872,0.33438651,0.33458479,0.33478203,0.33497823,0.3351734,0.33536753,0.33556063,0.33575271,0.33594376,0.33613379,0.33632279,0.33651078,0.33669775,0.33688371,0.33706866,0.3372526,0.33743553,0.33761746,0.33779839,0.33797832,0.33815725,0.33833519,0.33851214,0.3386881,0.33886308,0.33903707,0.33921009,0.33938212,0.33955319,0.33972328,0.3398924,0.34006056,0.34022775,0.34039399,0.34055926,0.34072359,0.34088696,0.34104938,0.34121086,0.34137139,0.34153099,0.34168965,0.34184738,0.34200417,0.34216004,0.34231498,0.342469,0.34262211,0.3427743,0.34292557,0.34307594,0.3432254,0.34337396,0.34352162,0.34366838,0.34381425,0.34395923,0.34410332,0.34424652,0.34438885,0.3445303,0.34467087,0.34481057,0.3449494,0.34508737,0.34522448,0.34536072,0.34549612,0.34563066,0.34576435,0.34589719,0.34602919,0.34616036,0.34629068,0.34642017,0.34654884,0.34667667,0.34680369,0.34692988,0.34705526,0.34717982,0.34730357,0.34742651,0.34754865,0.34766999,0.34779053,0.34791028,0.34802924,0.34814741,0.34826479,0.34838139,0.34849722,0.34861226,0.34872654,0.34884005,0.34895279,0.34906477,0.34917599,0.34928646,0.34939617,0.34950514,0.34961335,0.34972083,0.34982756,0.34993356,0.35003882,0.35014336,0.35024716,0.35035025,0.35045261,0.35055425,0.35065518,0.3507554,0.35085491,0.35095372,0.35105182,0.35114923,0.35124593,0.35134195,0.35143728,0.35153192,0.35162588,0.35171915,0.35181176,0.35190368,0.35199494,0.35208553,0.35217545,0.35226471,0.35235332,0.35244126,0.35252856,0.3526152,0.3527012,0.35278656,0.35287128,0.35295535,0.3530388,0.35312161,0.3532038,0.35328536,0.35336629,0.35344661,0.35352631,0.3536054,0.35368388,0.35376174,0.35383901,0.35391567,0.35399174,0.3540672,0.35414208,0.35421636,0.35429006,0.35436317,0.35443571,0.35450766,0.35457904,0.35464984,0.35472007,0.35478974,0.35485884,0.35492738,0.35499536,0.35506279,0.35512966,0.35519598,0.35526176,0.35532699,0.35539167,0.35545582,0.35551943,0.35558251,0.35564505,0.35570707,0.35576856,0.35582952,0.35588997,0.3559499,0.35600931,0.35606821,0.3561266,0.35618448,0.35624186,0.35629874,0.35635511,0.35641099,0.35646638,0.35652127,0.35657568,0.35662959,0.35668303,0.35673598,0.35678845,0.35684045,0.35689197,0.35694303,0.35699361,0.35704372,0.35709338,0.35714257,0.3571913,0.35723957,0.35728739,0.35733476,0.35738168,0.35742816,0.35747419,0.35751977,0.35756492,0.35760963,0.3576539,0.35769775,0.35774116,0.35778414,0.3578267,0.35786883,0.35791055,0.35795184,0.35799272,0.35803319,0.35807324,0.35811289,0.35815212,0.35819096,0.35822938,0.35826741,0.35830504,0.35834228,0.35837912,0.35841556,0.35845162,0.3584873,0.35852258,0.35855748,0.35859201,0.35862615,0.35865992,0.35869331,0.35872633,0.35875898,0.35879126,0.35882318,0.35885473,0.35888592,0.35891675,0.35894722,0.35897734,0.3590071,0.35903651,0.35906557,0.35909428,0.35912265,0.35915067,0.35917835,0.3592057,0.3592327,0.35925937,0.3592857,0.3593117,0.35933738,0.35936272,0.35938774,0.35941243,0.3594368,0.35946085,0.35948458,0.35950799,0.35953109,0.35955388,0.35957635,0.35959852,0.35962037,0.35964193,0.35966317,0.35968412,0.35970476,0.35972511,0.35974515,0.35976491,0.35978437,0.35980354,0.35982241,0.359841,0.35985931,0.35987733,0.35989506,0.35991251,0.35992969,0.35994658,0.3599632,0.35997955,0.35999562,0.36001142,0.36002695,0.36004222,0.36005721,0.36007194,0.36008641,0.36010062,0.36011456,0.36012825,0.36014168,0.36015486,0.36016778,0.36018045,0.36019286,0.36020503,0.36021696,0.36022863,0.36024006,0.36025125,0.3602622,0.3602729,0.36028337,0.3602936,0.36030359,0.36031336,0.36032288,0.36033218,0.36034125,0.36035008,0.36035869,0.36036708,0.36037524,0.36038318,0.3603909,0.36039839,0.36040567,0.36041273,0.36041958,0.36042621,0.36043263,0.36043883,0.36044483,0.36045062,0.3604562,0.36046157,0.36046673,0.3604717,0.36047646,0.36048102,0.36048538,0.36048954,0.3604935,0.36049727,0.36050084,0.36050422,0.36050741,0.3605104,0.36051321],
tt: [-0.24342099,-0.24443454,-0.24548344,-0.24655767,-0.2476573,-0.2487824,-0.24993306,-0.25110935,-0.25231133,-0.25353909,-0.25479268,-0.25607218,-0.25737766,-0.25870918,-0.2600668,-0.26145058,-0.26286059,-0.26429688,-0.26575951,-0.26724854,-0.26876402,-0.27030601,-0.27187455,-0.2734697,-0.27509151,-0.27674003,-0.27841529,-0.28011736,-0.28184627,-0.28360206,-0.28538478,-0.28719446,-0.28903116,-0.2908949,-0.29278572,-0.29470367,-0.29664877,-0.29862106,-0.30062057,-0.30264735,-0.30470141,-0.30678279,-0.30889152,-0.31102763,-0.31319114,-0.3153821,-0.31760052,-0.31984643,-0.32211985,-0.32442082,-0.32674936,-0.32910549,-0.33148924,-0.33390063,-0.33633969,-0.33880643,-0.34130089,-0.34382308,-0.34637303,-0.34895076,-0.35155629,-0.35418965,-0.35685086,-0.35953994,-0.36225691,-0.3650018,-0.36777462,-0.37057541,-0.37340419,-0.37626097,-0.37914579,-0.38205867,-0.38499962,-0.38796869,-0.39096589,-0.39399125,-0.3970448,-0.40012657,-0.40323657,-0.40637485,-0.40954143,-0.41273634,-0.41595961,-0.41921128,-0.42249138,-0.42579994,-0.429137,-0.43250259,-0.43589674,-0.43931951,-0.44277092,-0.44625103,-0.44975986,-0.45329746,-0.45686388,-0.46045915,-0.46408334,-0.46773649,-0.47141864,-0.47512984,-0.47887016,-0.48263964,-0.48643833,-0.49026631,-0.49412362,-0.49801032,-0.50192648,-0.50587216,-0.50984743,-0.51385236,-0.517887,-0.52195144,-0.52604575,-0.53017,-0.53432427,-0.53850864,-0.54272319,-0.546968,-0.55124315,-0.55554874,-0.55988484,-0.56425156,-0.56864899,-0.57307722,-0.57753635,-0.58202647,-0.5865477,-0.59110013,-0.59568388,-0.60029905,-0.60494574,-0.60962409,-0.6143342,-0.61907619,-0.62385019,-0.62865631,-0.63349468,-0.63836543,-0.6432687,-0.64820461,-0.65317331,-0.65817493,-0.66320961,-0.6682775,-0.67337874,-0.67851349,-0.6836819,-0.68888412,-0.69412031,-0.69939063,-0.70469525,-0.71003433,-0.71540804,-0.72081655,-0.72626004,-0.73173869,-0.73725268,-0.74280219,-0.74838741,-0.75400853,-0.75966574,-0.76535924,-0.77108923,-0.77685591,-0.78265949,-0.78850017,-0.79437817,-0.8002937,-0.80624698,-0.81223824,-0.81826769,-0.82433557,-0.8304421,-0.83658753,-0.84277209,-0.84899602,-0.85525957,-0.86156298,-0.86790651,-0.87429042,-0.88071495,-0.88718038,-0.89368698,-0.900235,-0.90682473,-0.91345644,-0.92013041,-0.92684693,-0.93360628,-0.94040876,-0.94725467,-0.95414429,-0.96107794,-0.96805593,-0.97507856,-0.98214615,-0.98925902,-0.99641749,-1.0036219,-1.0108726,-1.0181698,-1.025514,-1.0329055,-1.0403446,-1.0478317,-1.0553671,-1.0629512,-1.0705844,-1.0782671,-1.0859995,-1.0937821,-1.1016153,-1.1094995,-1.117435,-1.1254222,-1.1334616,-1.1415536,-1.1496986,-1.1578969,-1.166149,-1.1744554,-1.1828164,-1.1912326,-1.1997043,-1.208232,-1.2168161,-1.2254571,-1.2341555,-1.2429117,-1.2517263,-1.2605996,-1.2695322,-1.2785245,-1.2875771,-1.2966905,-1.3058651,-1.3151016,-1.3244003,-1.3337618,-1.3431867,-1.3526755,-1.3622287,-1.3718469,-1.3815306,-1.3912805,-1.401097,-1.4109808,-1.4209324,-1.4309524,-1.4410415,-1.4512002,-1.4614291,-1.4717289,-1.4821001,-1.4925435,-1.5030596,-1.5136491,-1.5243126,-1.5350509,-1.5458645,-1.5567542,-1.5677206,-1.5787645,-1.5898865,-1.6010874,-1.6123678,-1.6237286,-1.6351703,-1.6466939,-1.6582999,-1.6699893,-1.6817627,-1.693621,-1.7055649,-1.7175952,-1.7297128,-1.7419184,-1.7542129,-1.7665972,-1.779072,-1.7916382,-1.8042968,-1.8170486,-1.8298944,-1.8428352,-1.8558719,-1.8690054,-1.8822366,-1.8955666,-1.9089962,-1.9225265,-1.9361583,-1.9498928,-1.9637309,-1.9776736,-1.991722,-2.0058771,-2.0201399,-2.0345116,-2.0489933,-2.063586,-2.0782908,-2.0931089,-2.1080415,-2.1230896,-2.1382545,-2.1535373,-2.1689392,-2.1844616,-2.2001055,-2.2158723,-2.2317632,-2.2477795,-2.2639225,-2.2801935,-2.296594,-2.3131251,-2.3297883,-2.346585,-2.3635166,-2.3805846,-2.3977903,-2.4151352,-2.4326209,-2.4502489,-2.4680206,-2.4859376,-2.5040015,-2.522214,-2.5405765,-2.5590908,-2.5777584,-2.5965812,-2.6155608,-2.634699,-2.6539974,-2.6734579,-2.6930823,-2.7128725,-2.7328302,-2.7529574,-2.773256,-2.793728,-2.8143753,-2.8351999,-2.8562038,-2.8773892,-2.8987581,-2.9203126,-2.9420549,-2.9639871,-2.9861116,-3.0084305,-3.0309462,-3.0536609,-3.076577,-3.099697,-3.1230232,-3.1465581,-3.1703043,-3.1942643,-3.2184406,-3.2428359,-3.2674529,-3.2922943,-3.3173629,-3.3426613,-3.3681926,-3.3939595,-3.4199651,-3.4462123,-3.4727041,-3.4994437,-3.5264341,-3.5536785,-3.5811803,-3.6089426,-3.6369689,-3.6652625,-3.6938269,-3.7226656,-3.7517823,-3.7811805,-3.810864,-3.8408365,-3.8711019,-3.901664,-3.9325269,-3.9636945,-3.9951711,-4.0269607,-4.0590677,-4.0914964,-4.1242511,-4.1573364,-4.1907569,-4.2245171,-4.258622,-4.2930762,-4.3278847,-4.3630525,-4.3985848,-4.4344866,-4.4707634,-4.5074205,-4.5444634,-4.5818977,-4.6197291,-4.6579635,-4.6966068,-4.735665,-4.7751444,-4.8150511,-4.8553916,-4.8961725,-4.9374004,-4.9790821,-5.0212246,-5.063835,-5.1069205,-5.1504884,-5.1945463,-5.2391019,-5.284163,-5.3297376,-5.3758339,-5.4224603,-5.4696252,-5.5173374,-5.5656058,-5.6144395,-5.6638477,-5.7138399,-5.7644258,-5.8156154,-5.8674187,-5.9198462,-5.9729083,-6.026616,-6.0809802,-6.1360123,-6.191724,-6.2481269,-6.3052334,-6.3630557,-6.4216066,-6.480899,-6.5409463,-6.6017622,-6.6633604,-6.7257555,-6.7889619,-6.8529947,-6.9178692,-6.9836012,-7.0502069,-7.1177028,-7.1861058,-7.2554334,-7.3257034,-7.3969341,-7.4691442,-7.5423531,-7.6165806,-7.6918468,-7.7681727,-7.8455796,-7.9240895,-8.0037251,-8.0845094,-8.1664663,-8.2496203,-8.3339966,-8.419621,-8.5065202,-8.5947216,-8.6842532,-8.7751441,-8.867424,-8.9611238,-9.0562749,-9.15291,-9.2510625,-9.3507671,-9.4520592,-9.5549756,-9.6595541,-9.7658337,-9.8738546,-9.9836584,-10.095288,-10.208787,-10.324202,-10.441579,-10.560968,-10.682419,-10.805983,-10.931715,-11.05967,-11.189905,-11.322481,-11.457458,-11.594901,-11.734876,-11.87745,-12.022696,-12.170686,-12.321497,-12.475208,-12.6319,-12.79166,-12.954575,-13.120738,-13.290244,-13.463192,-13.639686,-13.819833,-14.003744,-14.191537,-14.383332,-14.579256,-14.779441,-14.984023,-15.193147,-15.406961,-15.625623,-15.849296,-16.078149,-16.312362,-16.552122,-16.797624,-17.049074,-17.306685,-17.570684,-17.841306,-18.1188,-18.403427,-18.695461,-18.995189,-19.302917,-19.618962,-19.943662,-20.277373,-20.620469,-20.973347,-21.336426,-21.710147,-22.094981,-22.491425,-22.900005,-23.321281,-23.755848,-24.204337,-24.667421,-25.145818,-25.640291,-26.151657,-26.680789,-27.22862,-27.796151,-28.384454,-28.994681,-29.628073,-30.285962,-30.969788,-31.681105,-32.421591,-33.193068,-33.99751,-34.837063,-35.714062,-36.631057,-37.590832,-38.596437,-39.651217,-40.758854,-41.923404,-43.14935,-44.441659,-45.805847,-47.248061,-48.775167,-50.394863,-52.115806,-53.947767,-55.901815,-57.990543,-60.228335,-62.631702,-65.219684,-68.01436,-71.041472,-74.331225,-77.919292,-81.848114,-86.168583,-90.942257,-96.244308,-102.1675,-108.82768,-116.37139]
};
}
function cie31by1(){
var results = {};
results = {
wavelength: [360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830],
xbar: [0.0001299,0.000145847,0.000163802,0.000184004,0.00020669,0.0002321,0.000260728,0.000293075,0.000329388,0.000369914,0.0004149,0.000464159,0.000518986,0.000581854,0.000655235,0.0007416,0.00084503,0.000964527,0.001094949,0.001231154,0.001368,0.00150205,0.001642328,0.001802382,0.001995757,0.002236,0.002535385,0.002892603,0.003300829,0.003753236,0.004243,0.004762389,0.005330048,0.005978712,0.006741117,0.00765,0.008751373,0.01002888,0.0114217,0.01286901,0.01431,0.01570443,0.01714744,0.01878122,0.02074801,0.02319,0.02620736,0.02978248,0.03388092,0.03846824,0.04351,0.0489956,0.0550226,0.0617188,0.069212,0.07763,0.08695811,0.09717672,0.1084063,0.1207672,0.13438,0.1493582,0.1653957,0.1819831,0.198611,0.21477,0.2301868,0.2448797,0.2587773,0.2718079,0.2839,0.2949438,0.3048965,0.3137873,0.3216454,0.3285,0.3343513,0.3392101,0.3431213,0.3461296,0.34828,0.3495999,0.3501474,0.350013,0.349287,0.34806,0.3463733,0.3442624,0.3418088,0.3390941,0.3362,0.3331977,0.3300411,0.3266357,0.3228868,0.3187,0.3140251,0.308884,0.3032904,0.2972579,0.2908,0.2839701,0.2767214,0.2689178,0.2604227,0.2511,0.2408475,0.2298512,0.2184072,0.2068115,0.19536,0.1842136,0.1733273,0.1626881,0.1522833,0.1421,0.1321786,0.1225696,0.1132752,0.1042979,0.09564,0.08729955,0.07930804,0.07171776,0.06458099,0.05795001,0.05186211,0.04628152,0.04115088,0.03641283,0.03201,0.0279172,0.0241444,0.020687,0.0175404,0.0147,0.01216179,0.00991996,0.00796724,0.006296346,0.0049,0.003777173,0.00294532,0.00242488,0.002236293,0.0024,0.00292552,0.00383656,0.00517484,0.00698208,0.0093,0.01214949,0.01553588,0.01947752,0.02399277,0.0291,0.03481485,0.04112016,0.04798504,0.05537861,0.06327,0.07163501,0.08046224,0.08973996,0.09945645,0.1096,0.1201674,0.1311145,0.1423679,0.1538542,0.1655,0.1772571,0.18914,0.2011694,0.2133658,0.2257499,0.2383209,0.2510668,0.2639922,0.2771017,0.2904,0.3038912,0.3175726,0.3314384,0.3454828,0.3597,0.3740839,0.3886396,0.4033784,0.4183115,0.4334499,0.4487953,0.464336,0.480064,0.4959713,0.5120501,0.5282959,0.5446916,0.5612094,0.5778215,0.5945,0.6112209,0.6279758,0.6447602,0.6615697,0.6784,0.6952392,0.7120586,0.7288284,0.7455188,0.7621,0.7785432,0.7948256,0.8109264,0.8268248,0.8425,0.8579325,0.8730816,0.8878944,0.9023181,0.9163,0.9297995,0.9427984,0.9552776,0.9672179,0.9786,0.9893856,0.9995488,1.0090892,1.0180064,1.0263,1.0339827,1.040986,1.047188,1.0524667,1.0567,1.0597944,1.0617992,1.0628068,1.0629096,1.0622,1.0607352,1.0584436,1.0552244,1.0509768,1.0456,1.0390369,1.0313608,1.0226662,1.0130477,1.0026,0.9913675,0.9793314,0.9664916,0.9528479,0.9384,0.923194,0.907244,0.890502,0.87292,0.8544499,0.835084,0.814946,0.794186,0.772954,0.7514,0.7295836,0.7075888,0.6856022,0.6638104,0.6424,0.6215149,0.6011138,0.5811052,0.5613977,0.5419,0.5225995,0.5035464,0.4847436,0.4661939,0.4479,0.4298613,0.412098,0.394644,0.3775333,0.3608,0.3444563,0.3285168,0.3130192,0.2980011,0.2835,0.2695448,0.2561184,0.2431896,0.2307272,0.2187,0.2070971,0.1959232,0.1851708,0.1748323,0.1649,0.1553667,0.14623,0.13749,0.1291467,0.1212,0.1136397,0.106465,0.09969044,0.09333061,0.0874,0.08190096,0.07680428,0.07207712,0.06768664,0.0636,0.05980685,0.05628216,0.05297104,0.04981861,0.04677,0.04378405,0.04087536,0.03807264,0.03540461,0.0329,0.03056419,0.02838056,0.02634484,0.02445275,0.0227,0.02108429,0.01959988,0.01823732,0.01698717,0.01584,0.01479064,0.01383132,0.01294868,0.0121292,0.01135916,0.01062935,0.009938846,0.009288422,0.008678854,0.008110916,0.007582388,0.007088746,0.006627313,0.006195408,0.005790346,0.005409826,0.005052583,0.004717512,0.004403507,0.004109457,0.003833913,0.003575748,0.003334342,0.003109075,0.002899327,0.002704348,0.00252302,0.002354168,0.002196616,0.00204919,0.00191096,0.001781438,0.00166011,0.001546459,0.001439971,0.001340042,0.001246275,0.001158471,0.00107643,0.000999949,0.000928736,0.000862433,0.00080075,0.000743396,0.000690079,0.000640516,0.000594502,0.000551865,0.000512429,0.000476021,0.000442454,0.000411512,0.000382981,0.000356649,0.000332301,0.000309759,0.000288887,0.000269539,0.000251568,0.000234826,0.000219171,0.000204526,0.000190841,0.000178065,0.000166151,0.000155024,0.000144622,0.00013491,0.000125852,0.000117413,0.000109552,0.000102225,9.54E-05,8.90E-05,8.31E-05,7.75E-05,7.23E-05,6.75E-05,6.29E-05,5.87E-05,5.48E-05,5.11E-05,4.77E-05,4.45E-05,4.15E-05,3.87E-05,3.61E-05,3.37E-05,3.15E-05,2.94E-05,2.74E-05,2.55E-05,2.38E-05,2.22E-05,2.07E-05,1.93E-05,1.80E-05,1.67E-05,1.56E-05,1.46E-05,1.36E-05,1.27E-05,1.18E-05,1.10E-05,1.03E-05,9.56E-06,8.91E-06,8.31E-06,7.75E-06,7.22E-06,6.73E-06,6.28E-06,5.85E-06,5.46E-06,5.09E-06,4.74E-06,4.42E-06,4.12E-06,3.84E-06,3.58E-06,3.34E-06,3.11E-06,2.90E-06,2.71E-06,2.52E-06,2.35E-06,2.19E-06,2.04E-06,1.91E-06,1.78E-06,1.66E-06,1.54E-06,1.44E-06,1.34E-06,1.25E-06],
ybar: [3.92E-06,4.39E-06,4.93E-06,5.53E-06,6.21E-06,6.97E-06,7.81E-06,8.77E-06,9.84E-06,1.10E-05,1.24E-05,1.39E-05,1.56E-05,1.74E-05,1.96E-05,2.20E-05,2.48E-05,2.80E-05,3.15E-05,3.52E-05,3.90E-05,4.28E-05,4.69E-05,5.16E-05,5.72E-05,6.40E-05,7.23E-05,8.22E-05,9.35E-05,0.000106136,0.00012,0.000134984,0.000151492,0.000170208,0.000191816,0.000217,0.000246907,0.00028124,0.00031852,0.000357267,0.000396,0.000433715,0.000473024,0.000517876,0.000572219,0.00064,0.00072456,0.0008255,0.00094116,0.00106988,0.00121,0.001362091,0.001530752,0.001720368,0.001935323,0.00218,0.0024548,0.002764,0.0031178,0.0035264,0.004,0.00454624,0.00515932,0.00582928,0.00654616,0.0073,0.008086507,0.00890872,0.00976768,0.01066443,0.0116,0.01257317,0.01358272,0.01462968,0.01571509,0.01684,0.01800736,0.01921448,0.02045392,0.02171824,0.023,0.02429461,0.02561024,0.02695857,0.02835125,0.0298,0.03131083,0.03288368,0.03452112,0.03622571,0.038,0.03984667,0.041768,0.043766,0.04584267,0.048,0.05024368,0.05257304,0.05498056,0.05745872,0.06,0.06260197,0.06527752,0.06804208,0.07091109,0.0739,0.077016,0.0802664,0.0836668,0.0872328,0.09098,0.09491755,0.09904584,0.1033674,0.1078846,0.1126,0.117532,0.1226744,0.1279928,0.1334528,0.13902,0.1446764,0.1504693,0.1564619,0.1627177,0.1693,0.1762431,0.1835581,0.1912735,0.199418,0.20802,0.2171199,0.2267345,0.2368571,0.2474812,0.2586,0.2701849,0.2822939,0.2950505,0.308578,0.323,0.3384021,0.3546858,0.3716986,0.3892875,0.4073,0.4256299,0.4443096,0.4633944,0.4829395,0.503,0.5235693,0.544512,0.56569,0.5869653,0.6082,0.6293456,0.6503068,0.6708752,0.6908424,0.71,0.7281852,0.7454636,0.7619694,0.7778368,0.7932,0.8081104,0.8224962,0.8363068,0.8494916,0.862,0.8738108,0.8849624,0.8954936,0.9054432,0.9148501,0.9237348,0.9320924,0.9399226,0.9472252,0.954,0.9602561,0.9660074,0.9712606,0.9760225,0.9803,0.9840924,0.9874182,0.9903128,0.9928116,0.9949501,0.9967108,0.9980983,0.999112,0.9997482,1,0.9998567,0.9993046,0.9983255,0.9968987,0.995,0.9926005,0.9897426,0.9864444,0.9827241,0.9786,0.9740837,0.9691712,0.9638568,0.9581349,0.952,0.9454504,0.9384992,0.9311628,0.9234576,0.9154,0.9070064,0.8982772,0.8892048,0.8797816,0.87,0.8598613,0.849392,0.838622,0.8275813,0.8163,0.8047947,0.793082,0.781192,0.7691547,0.757,0.7447541,0.7324224,0.7200036,0.7074965,0.6949,0.6822192,0.6694716,0.6566744,0.6438448,0.631,0.6181555,0.6053144,0.5924756,0.5796379,0.5668,0.5539611,0.5411372,0.5283528,0.5156323,0.503,0.4904688,0.4780304,0.4656776,0.4534032,0.4412,0.42908,0.417036,0.405032,0.393032,0.381,0.3689184,0.3568272,0.3447768,0.3328176,0.321,0.3093381,0.2978504,0.2865936,0.2756245,0.265,0.2547632,0.2448896,0.2353344,0.2260528,0.217,0.2081616,0.1995488,0.1911552,0.1829744,0.175,0.1672235,0.1596464,0.1522776,0.1451259,0.1382,0.1315003,0.1250248,0.1187792,0.1127691,0.107,0.1014762,0.09618864,0.09112296,0.08626485,0.0816,0.07712064,0.07282552,0.06871008,0.06476976,0.061,0.05739621,0.05395504,0.05067376,0.04754965,0.04458,0.04175872,0.03908496,0.03656384,0.03420048,0.032,0.02996261,0.02807664,0.02632936,0.02470805,0.0232,0.02180077,0.02050112,0.01928108,0.01812069,0.017,0.01590379,0.01483718,0.01381068,0.01283478,0.01192,0.01106831,0.01027339,0.009533311,0.008846157,0.00821,0.007623781,0.007085424,0.006591476,0.006138485,0.005723,0.005343059,0.004995796,0.004676404,0.004380075,0.004102,0.003838453,0.003589099,0.003354219,0.003134093,0.002929,0.002738139,0.002559876,0.002393244,0.002237275,0.002091,0.001953587,0.00182458,0.00170358,0.001590187,0.001484,0.001384496,0.001291268,0.001204092,0.001122744,0.001047,0.00097659,0.000911109,0.000850133,0.000793238,0.00074,0.000690083,0.00064331,0.000599496,0.000558455,0.00052,0.000483914,0.000450053,0.000418345,0.000388718,0.0003611,0.000335384,0.00031144,0.000289166,0.000268454,0.0002492,0.000231302,0.000214686,0.000199288,0.000185048,0.0001719,0.000159778,0.000148604,0.000138302,0.000128793,0.00012,0.00011186,0.000104322,9.73E-05,9.08E-05,8.48E-05,7.91E-05,7.39E-05,6.89E-05,6.43E-05,6.00E-05,5.60E-05,5.22E-05,4.87E-05,4.54E-05,4.24E-05,3.96E-05,3.69E-05,3.44E-05,3.21E-05,3.00E-05,2.80E-05,2.61E-05,2.44E-05,2.27E-05,2.12E-05,1.98E-05,1.85E-05,1.72E-05,1.61E-05,1.50E-05,1.40E-05,1.31E-05,1.22E-05,1.14E-05,1.06E-05,9.89E-06,9.22E-06,8.59E-06,8.01E-06,7.47E-06,6.96E-06,6.49E-06,6.05E-06,5.64E-06,5.26E-06,4.90E-06,4.57E-06,4.26E-06,3.97E-06,3.70E-06,3.45E-06,3.22E-06,3.00E-06,2.80E-06,2.61E-06,2.43E-06,2.27E-06,2.11E-06,1.97E-06,1.84E-06,1.71E-06,1.60E-06,1.49E-06,1.39E-06,1.29E-06,1.21E-06,1.12E-06,1.05E-06,9.77E-07,9.11E-07,8.49E-07,7.92E-07,7.38E-07,6.88E-07,6.42E-07,5.98E-07,5.58E-07,5.20E-07,4.85E-07,4.52E-07],
zbar: [0.0006061,0.000680879,0.000765146,0.000860012,0.000966593,0.001086,0.001220586,0.001372729,0.001543579,0.001734286,0.001946,0.002177777,0.002435809,0.002731953,0.003078064,0.003486,0.003975227,0.00454088,0.00515832,0.005802907,0.006450001,0.007083216,0.007745488,0.008501152,0.009414544,0.01054999,0.0119658,0.01365587,0.01558805,0.01773015,0.02005001,0.02251136,0.02520288,0.02827972,0.03189704,0.03621,0.04143771,0.04750372,0.05411988,0.06099803,0.06785001,0.07448632,0.08136156,0.08915364,0.09854048,0.1102,0.1246133,0.1417017,0.1613035,0.1832568,0.2074,0.2336921,0.2626114,0.2947746,0.3307985,0.3713,0.4162091,0.4654642,0.5196948,0.5795303,0.6456,0.7184838,0.7967133,0.8778459,0.959439,1.0390501,1.1153673,1.1884971,1.2581233,1.3239296,1.3856,1.4426352,1.4948035,1.5421903,1.5848807,1.62296,1.6564048,1.6852959,1.7098745,1.7303821,1.74706,1.7600446,1.7696233,1.7762637,1.7804334,1.7826,1.7829682,1.7816998,1.7791982,1.7758671,1.77211,1.7682589,1.764039,1.7589438,1.7524663,1.7441,1.7335595,1.7208581,1.7059369,1.6887372,1.6692,1.6475287,1.6234127,1.5960223,1.564528,1.5281,1.4861114,1.4395215,1.3898799,1.3387362,1.28764,1.2374223,1.1878243,1.1387611,1.090148,1.0419,0.9941976,0.9473473,0.9014531,0.8566193,0.8129501,0.7705173,0.7294448,0.6899136,0.6521049,0.6162,0.5823286,0.5504162,0.5203376,0.4919673,0.46518,0.4399246,0.4161836,0.3938822,0.3729459,0.3533,0.3348578,0.3175521,0.3013375,0.2861686,0.272,0.2588171,0.2464838,0.2347718,0.2234533,0.2123,0.2011692,0.1901196,0.1792254,0.1685608,0.1582,0.1481383,0.1383758,0.1289942,0.1200751,0.1117,0.1039048,0.09666748,0.08998272,0.08384531,0.07824999,0.07320899,0.06867816,0.06456784,0.06078835,0.05725001,0.05390435,0.05074664,0.04775276,0.04489859,0.04216,0.03950728,0.03693564,0.03445836,0.03208872,0.02984,0.02771181,0.02569444,0.02378716,0.02198925,0.0203,0.01871805,0.01724036,0.01586364,0.01458461,0.0134,0.01230723,0.01130188,0.01037792,0.009529306,0.008749999,0.0080352,0.0073816,0.0067854,0.0062428,0.005749999,0.0053036,0.0048998,0.0045342,0.0042024,0.0039,0.0036232,0.0033706,0.0031414,0.0029348,0.002749999,0.0025852,0.0024386,0.0023094,0.0021968,0.0021,0.002017733,0.0019482,0.0018898,0.001840933,0.0018,0.001766267,0.0017378,0.0017112,0.001683067,0.001650001,0.001610133,0.0015644,0.0015136,0.001458533,0.0014,0.001336667,0.00127,0.001205,0.001146667,0.0011,0.0010688,0.0010494,0.0010356,0.0010212,0.001,0.00096864,0.00092992,0.00088688,0.00084256,0.0008,0.00076096,0.00072368,0.00068592,0.00064544,0.0006,0.000547867,0.0004916,0.0004354,0.000383467,0.00034,0.000307253,0.00028316,0.00026544,0.000251813,0.00024,0.000229547,0.00022064,0.00021196,0.000202187,0.00019,0.000174213,0.00015564,0.00013596,0.000116853,0.0001,8.61E-05,7.46E-05,6.50E-05,5.69E-05,5.00E-05,4.42E-05,3.95E-05,3.57E-05,3.26E-05,3.00E-05,2.77E-05,2.56E-05,2.36E-05,2.18E-05,2.00E-05,1.81E-05,1.62E-05,1.42E-05,1.21E-05,1.00E-05,7.73E-06,5.40E-06,3.20E-06,1.33E-06,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
};
return results;
}
function cieDaySn(){
var results = {};
results = {
wavelength: [300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830],
S0: [0.04,6,29.6,55.3,57.3,61.8,61.5,68.8,63.4,65.8,94.8,104.8,105.9,96.8,113.9,125.6,125.5,121.3,121.3,113.5,113.1,110.8,106.5,108.8,105.3,104.4,100,96,95.1,89.1,90.5,90.3,88.4,84,85.1,81.9,82.6,84.9,81.3,71.9,74.3,76.4,63.3,71.7,77,65.2,47.7,68.6,65,66,61,53.3,58.9,61.9],
S1: [0.02,4.5,22.4,42,40.6,41.6,38,42.4,38.5,35,43.4,46.3,43.9,37.1,36.7,35.9,32.6,27.9,24.3,20.1,16.2,13.2,8.6,6.1,4.2,1.9,0,-1.6,-3.5,-3.5,-5.8,-7.2,-8.6,-9.5,-10.9,-10.7,-12,-14,-13.6,-12,-13.3,-12.9,-10.6,-11.6,-12.2,-10.2,-7.8,-11.2,-10.4,-10.6,-9.7,-8.3,-9.3,-9.8],
S2: [0,2,4,8.5,7.8,6.7,5.3,6.1,3,1.2,-1.1,-0.5,-0.7,-1.2,-2.6,-2.9,-2.8,-2.6,-2.6,-1.8,-1.5,-1.3,-1.2,-1,-0.5,-0.3,0,0.2,0.5,2.1,3.2,4.1,4.7,5.1,6.7,7.3,8.6,9.8,10.2,8.3,9.6,8.5,7,7.6,8,6.7,5.2,7.4,6.8,7,6.4,5.5,6.1,6.5]
};
return results;
}
function Tcs14_23Sep09(){
var results = {};
results = {
wavelength: [360,365,370,375,380,385,390,395,400,405,410,415,420,425,430,435,440,445,450,455,460,465,470,475,480,485,490,495,500,505,510,515,520,525,530,535,540,545,550,555,560,565,570,575,580,585,590,595,600,605,610,615,620,625,630,635,640,645,650,655,660,665,670,675,680,685,690,695,700,705,710,715,720,725,730,735,740,745,750,755,760,765,770,775,780,785,790,795,800,805,810,815,820,825,830],
color_standards: {
R01: [116,136,159,190,219,239,252,256,256,254,252,248,244,240,237,232,230,226,225,222,220,218,216,214,214,214,216,218,223,225,226,226,225,225,227,230,236,245,253,262,272,283,298,318,341,367,390,409,424,435,442,448,450,451,451,451,451,451,450,450,451,451,453,454,455,457,458,460,462,463,464,465,466,466,466,466,467,467,467,467,467,467,467,467,467,467,467,466,466,466,466,466,465,464,464],
R02: [53,55,59,64,70,79,89,101,111,116,118,120,121,122,122,122,123,124,127,128,131,134,138,143,150,159,174,190,207,225,242,253,260,264,267,269,272,276,282,289,299,309,322,329,335,339,341,341,342,342,342,341,341,339,339,338,338,337,336,335,334,332,332,331,331,330,329,328,328,327,326,325,324,324,324,323,322,321,320,318,316,315,315,314,314,313,313,312,312,311,311,311,311,311,310],
R03: [58,59,61,63,65,68,70,72,73,73,74,74,74,73,73,73,73,73,74,75,77,80,85,94,109,126,148,172,198,221,241,260,278,302,339,370,392,399,400,393,380,365,349,332,315,299,285,272,264,257,252,247,241,235,229,224,220,217,216,216,219,224,230,238,251,269,288,312,340,366,390,412,431,447,460,472,481,488,493,497,500,502,505,510,516,520,524,527,531,535,539,544,548,552,555],
R04: [57,59,62,67,74,83,93,105,116,121,124,126,128,131,135,139,144,151,161,172,186,205,229,254,281,308,332,352,370,383,390,394,395,392,385,377,367,354,341,327,312,296,280,263,247,229,214,198,185,175,169,164,160,156,154,152,151,149,148,148,148,149,151,154,158,162,165,168,170,171,170,168,166,164,164,165,168,172,177,181,185,189,192,194,197,200,204,210,218,225,233,243,254,264,274],
R05: [143,187,233,269,295,306,310,312,313,315,319,322,326,330,334,339,346,352,360,369,381,394,403,410,415,418,419,417,413,409,403,396,389,381,372,363,353,342,331,320,308,296,284,271,260,247,232,220,210,200,194,189,185,183,180,177,176,175,175,175,175,177,180,183,186,189,192,195,199,200,199,198,196,195,195,196,197,200,203,205,208,212,215,217,219,222,226,231,237,243,249,257,265,273,280],
R06: [79,81,89,113,151,203,265,339,410,464,492,508,517,524,531,538,544,551,556,556,554,549,541,531,519,504,488,469,450,431,414,395,377,358,341,325,309,293,279,265,253,241,234,227,225,222,221,220,220,220,220,220,223,227,233,239,244,251,258,263,268,273,278,281,283,286,291,296,302,313,325,338,351,364,376,389,401,413,425,436,447,458,469,477,485,493,500,506,512,517,521,525,529,532,535],
R07: [150,177,218,293,378,459,524,546,551,555,559,560,561,558,556,551,544,535,522,506,488,469,448,429,408,385,363,341,324,311,301,291,283,273,265,260,257,257,259,260,260,258,256,254,254,259,270,284,302,324,344,362,377,389,400,410,420,429,438,445,452,457,462,466,468,470,473,477,483,489,496,503,511,518,525,532,539,546,553,559,565,570,575,578,581,583,585,587,588,589,590,590,590,591,592],
R08: [75,78,84,90,104,129,170,240,319,416,462,482,490,488,482,473,462,450,439,426,413,397,382,366,352,337,325,310,299,289,283,276,270,262,256,251,250,251,254,258,264,269,272,274,278,284,295,316,348,384,434,482,528,568,604,629,648,663,676,685,693,700,705,709,712,715,717,719,721,720,719,722,725,727,729,730,730,730,730,730,730,730,730,730,730,730,731,731,731,731,731,731,731,731,731],
R09: [69,72,73,70,66,62,58,55,52,52,51,50,50,49,48,47,46,44,42,41,38,35,33,31,30,29,28,28,28,29,30,30,31,31,32,32,33,34,35,37,41,44,48,52,60,76,102,136,190,256,336,418,505,581,641,682,717,740,758,770,781,790,797,803,809,814,819,824,828,830,831,833,835,836,836,837,838,839,839,839,839,839,839,839,839,839,839,839,839,839,838,837,837,836,836],
R10: [42,43,45,47,50,54,59,63,66,67,68,69,69,70,72,73,76,78,83,88,95,103,113,125,142,162,189,219,262,305,365,416,465,509,546,581,610,634,653,666,678,687,693,698,701,704,705,705,706,707,707,707,708,708,710,711,712,714,716,718,720,722,725,729,731,735,739,742,746,748,749,751,753,754,755,755,755,755,756,757,758,759,759,759,759,759,759,759,759,759,758,757,757,756,756],
R11: [74,79,86,98,111,121,127,129,127,121,116,112,108,105,104,104,105,106,110,115,123,134,148,167,192,219,252,291,325,347,356,353,346,333,314,294,271,248,227,206,188,170,153,138,125,114,106,100,96,92,90,87,85,82,80,79,78,78,78,78,81,83,88,93,102,112,125,141,161,182,203,223,242,257,270,282,292,302,310,314,317,323,330,334,338,343,348,353,359,365,372,380,388,396,403],
R12: [189,175,158,139,120,103,90,82,76,68,64,65,75,93,123,160,207,256,300,331,346,347,341,328,307,282,257,230,204,178,154,129,109,90,75,62,51,41,35,29,25,22,19,17,17,17,16,16,16,16,16,16,16,16,18,18,18,18,19,20,23,24,26,30,35,43,56,74,97,128,166,210,257,305,354,401,446,485,520,551,577,599,618,633,645,656,666,674,680,686,691,694,697,700,702],
R13: [71,76,82,90,104,127,161,211,264,313,341,352,359,361,364,365,367,369,372,374,376,379,384,389,397,405,416,429,443,454,461,466,469,471,474,476,483,490,506,526,553,582,618,651,680,701,717,729,736,742,745,747,748,748,748,748,748,748,748,748,747,747,747,747,747,747,747,746,746,746,745,744,743,744,745,748,750,750,749,748,748,747,747,747,747,746,746,746,746,745,745,745,745,745,745],
R14: [36,36,36,36,36,36,37,38,39,39,40,41,42,42,43,44,44,45,45,46,47,48,50,52,55,57,62,67,75,83,92,100,108,121,133,142,150,154,155,152,147,140,133,125,118,112,106,101,98,95,93,90,89,87,86,85,84,84,84,84,85,87,92,96,102,110,123,137,152,169,188,207,226,243,260,277,294,310,325,339,353,366,379,390,399,408,416,422,428,434,439,444,448,451,454]
}
};
return results;
}
function vs_74(){
var results = {};
results = {
wavelength: [360,365,370,375,380,385,390,395,400,405,410,415,420,425,430,435,440,445,450,455,460,465,470,475,480,485,490,495,500,505,510,515,520,525,530,535,540,545,550,555,560,565,570,575,580,585,590,595,600,605,610,615,620,625,630,635,640,645,650,655,660,665,670,675,680,685,690,695,700,705,710,715,720,725,730,735,740,745,750,755,760,765,770,775,780,785,790,795,800,805,810,815,820,825,830],
color_standards: {
VS1: [0.1086,0.1086,0.1086,0.1086,0.1086,0.138,0.1729,0.2167,0.2539,0.2785,0.2853,0.2883,0.286,0.2761,0.2674,0.2565,0.2422,0.2281,0.214,0.2004,0.1854,0.1733,0.1602,0.1499,0.1414,0.1288,0.1204,0.1104,0.1061,0.1018,0.0968,0.0941,0.0881,0.0842,0.0808,0.0779,0.0782,0.0773,0.0793,0.079,0.0793,0.0806,0.0805,0.0793,0.0803,0.0815,0.0842,0.0912,0.1035,0.1212,0.1455,0.1785,0.2107,0.246,0.2791,0.3074,0.333,0.3542,0.3745,0.392,0.4052,0.4186,0.4281,0.4395,0.444,0.4497,0.4555,0.4612,0.4663,0.4707,0.4783,0.4778,0.4844,0.4877,0.4928,0.496,0.4976,0.4993,0.5015,0.5044,0.5042,0.5073,0.5112,0.5147,0.5128,0.5108,0.5171,0.5135,0.5191,0.5191,0.5191,0.5191,0.5191,0.5191,0.5191],
VS2: [0.1053,0.1053,0.1053,0.1053,0.1053,0.1323,0.1662,0.2113,0.2516,0.2806,0.2971,0.3042,0.3125,0.3183,0.3196,0.3261,0.3253,0.3193,0.3071,0.2961,0.2873,0.2729,0.2595,0.2395,0.2194,0.1949,0.1732,0.156,0.1436,0.1305,0.1174,0.1075,0.0991,0.0925,0.0916,0.0896,0.0897,0.0893,0.0891,0.0868,0.082,0.0829,0.0854,0.0871,0.0922,0.0978,0.1037,0.1079,0.1092,0.1088,0.1078,0.1026,0.0991,0.0995,0.1043,0.1101,0.1187,0.1311,0.143,0.1583,0.1704,0.1846,0.1906,0.1983,0.1981,0.1963,0.2003,0.2034,0.2061,0.212,0.2207,0.2257,0.2335,0.2441,0.255,0.2684,0.2862,0.3086,0.3262,0.3483,0.3665,0.3814,0.3974,0.4091,0.4206,0.423,0.4397,0.4456,0.4537,0.4537,0.4537,0.4537,0.4537,0.4537,0.4537],
VS3: [0.0858,0.0858,0.0858,0.0858,0.0858,0.099,0.1204,0.1458,0.1696,0.1922,0.2101,0.2179,0.2233,0.2371,0.2499,0.2674,0.2949,0.3232,0.3435,0.3538,0.3602,0.3571,0.3511,0.3365,0.3176,0.2956,0.2747,0.2506,0.2279,0.2055,0.1847,0.1592,0.1438,0.1244,0.1105,0.0959,0.0871,0.079,0.0703,0.0652,0.0555,0.0579,0.0562,0.0548,0.0517,0.0544,0.0519,0.052,0.0541,0.0537,0.0545,0.056,0.056,0.0561,0.0578,0.0586,0.0573,0.0602,0.0604,0.0606,0.0606,0.0595,0.0609,0.0605,0.0602,0.058,0.0587,0.0573,0.0606,0.0613,0.0618,0.0652,0.0647,0.0684,0.0718,0.0731,0.0791,0.0828,0.0896,0.098,0.1063,0.1137,0.1238,0.1381,0.1505,0.1685,0.1862,0.2078,0.2338,0.2338,0.2338,0.2338,0.2338,0.2338,0.2338],
VS4: [0.079,0.079,0.079,0.079,0.079,0.0984,0.1242,0.1595,0.1937,0.2215,0.2419,0.2488,0.2603,0.2776,0.2868,0.3107,0.3309,0.3515,0.3676,0.3819,0.4026,0.4189,0.4317,0.4363,0.4356,0.4297,0.4199,0.4058,0.3882,0.366,0.3433,0.3148,0.289,0.2583,0.234,0.2076,0.1839,0.1613,0.1434,0.1243,0.1044,0.0978,0.091,0.0832,0.0771,0.0747,0.0726,0.0682,0.0671,0.066,0.0661,0.066,0.0653,0.0644,0.0653,0.0669,0.066,0.0677,0.0668,0.0693,0.0689,0.0676,0.0694,0.0687,0.0698,0.0679,0.0694,0.0675,0.0676,0.0662,0.0681,0.0706,0.0728,0.0766,0.0814,0.0901,0.1042,0.1228,0.1482,0.1793,0.2129,0.2445,0.2674,0.2838,0.2979,0.3067,0.3226,0.3396,0.3512,0.3512,0.3512,0.3512,0.3512,0.3512,0.3512],
VS5: [0.1167,0.1167,0.1167,0.1167,0.1167,0.1352,0.1674,0.2024,0.2298,0.2521,0.2635,0.2702,0.2758,0.2834,0.2934,0.3042,0.3201,0.3329,0.3511,0.3724,0.4027,0.4367,0.4625,0.489,0.5085,0.5181,0.5243,0.5179,0.5084,0.4904,0.4717,0.4467,0.4207,0.3931,0.3653,0.3363,0.3083,0.2808,0.2538,0.226,0.2024,0.1865,0.1697,0.1592,0.1482,0.1393,0.1316,0.1217,0.1182,0.1112,0.1071,0.1059,0.1044,0.1021,0.0991,0.1,0.098,0.0963,0.0997,0.0994,0.1022,0.1005,0.1044,0.1073,0.1069,0.1103,0.1104,0.1084,0.1092,0.1074,0.1059,0.1082,0.1106,0.1129,0.1186,0.1243,0.1359,0.1466,0.1617,0.1739,0.1814,0.1907,0.1976,0.1958,0.1972,0.2018,0.2093,0.2161,0.2269,0.2269,0.2269,0.2269,0.2269,0.2269,0.2269],
VS6: [0.0872,0.0872,0.0872,0.0872,0.0872,0.1001,0.1159,0.1339,0.1431,0.1516,0.157,0.1608,0.1649,0.1678,0.1785,0.1829,0.1896,0.2032,0.212,0.2294,0.2539,0.2869,0.317,0.357,0.3994,0.4346,0.4615,0.4747,0.4754,0.4691,0.4556,0.4371,0.4154,0.3937,0.3737,0.3459,0.3203,0.2941,0.2715,0.2442,0.2205,0.1979,0.18,0.161,0.1463,0.1284,0.1172,0.1045,0.0964,0.0903,0.0873,0.0846,0.0829,0.0814,0.0805,0.0803,0.0801,0.0776,0.0797,0.0801,0.081,0.0819,0.0856,0.0913,0.093,0.0958,0.1016,0.1044,0.1047,0.1062,0.1052,0.1029,0.1025,0.1008,0.1036,0.1059,0.1123,0.1175,0.1217,0.1304,0.133,0.1373,0.1376,0.1384,0.139,0.1378,0.1501,0.1526,0.1646,0.1646,0.1646,0.1646,0.1646,0.1646,0.1646],
VS7: [0.0726,0.0726,0.0726,0.0726,0.0726,0.076,0.0789,0.0844,0.0864,0.0848,0.0861,0.0859,0.0868,0.0869,0.0882,0.0903,0.0924,0.0951,0.0969,0.1003,0.1083,0.1203,0.1383,0.1634,0.1988,0.2376,0.2795,0.3275,0.3671,0.403,0.4201,0.4257,0.4218,0.409,0.3977,0.3769,0.3559,0.3312,0.3072,0.2803,0.2532,0.2313,0.2109,0.1897,0.1723,0.1528,0.1355,0.1196,0.105,0.0949,0.0868,0.0797,0.0783,0.0732,0.0737,0.0709,0.0703,0.0696,0.0673,0.0677,0.0682,0.0665,0.0691,0.0695,0.0723,0.0727,0.0757,0.0767,0.081,0.0818,0.0837,0.0822,0.0838,0.0847,0.0837,0.0864,0.0882,0.0923,0.0967,0.0996,0.1027,0.108,0.1115,0.1118,0.1152,0.1201,0.1253,0.1313,0.1393,0.1393,0.1393,0.1393,0.1393,0.1393,0.1393],
VS8: [0.0652,0.0652,0.0652,0.0652,0.0652,0.0657,0.0667,0.0691,0.0694,0.0709,0.0707,0.0691,0.0717,0.0692,0.071,0.0717,0.0722,0.0737,0.0731,0.0777,0.0823,0.0917,0.1062,0.1285,0.1598,0.1993,0.2445,0.2974,0.3462,0.3894,0.418,0.4433,0.4548,0.4605,0.4647,0.4626,0.4604,0.4522,0.4444,0.4321,0.4149,0.4039,0.3879,0.3694,0.3526,0.3288,0.308,0.2829,0.2591,0.2388,0.2228,0.2109,0.2033,0.1963,0.1936,0.1887,0.1847,0.1804,0.1766,0.1734,0.1721,0.172,0.1724,0.1757,0.1781,0.1829,0.1897,0.1949,0.2018,0.2051,0.2071,0.2066,0.2032,0.1998,0.2024,0.2032,0.2074,0.216,0.2194,0.2293,0.2378,0.2448,0.2489,0.2558,0.2635,0.2775,0.2957,0.3093,0.3239,0.3239,0.3239,0.3239,0.3239,0.3239,0.3239],
VS9: [0.0643,0.0643,0.0643,0.0643,0.0643,0.0661,0.0702,0.0672,0.0715,0.0705,0.0727,0.0731,0.0745,0.077,0.0756,0.0773,0.0786,0.0818,0.0861,0.0907,0.0981,0.1067,0.1152,0.1294,0.141,0.1531,0.1694,0.1919,0.2178,0.256,0.311,0.3789,0.4515,0.5285,0.5845,0.6261,0.6458,0.6547,0.6545,0.6473,0.6351,0.6252,0.6064,0.5924,0.5756,0.5549,0.5303,0.5002,0.4793,0.4517,0.434,0.4169,0.406,0.3989,0.3945,0.3887,0.3805,0.3741,0.37,0.363,0.364,0.359,0.3648,0.3696,0.3734,0.3818,0.3884,0.3947,0.4011,0.404,0.4072,0.4065,0.4006,0.3983,0.3981,0.399,0.4096,0.4187,0.4264,0.437,0.4424,0.4512,0.4579,0.4596,0.4756,0.488,0.5066,0.5214,0.545,0.545,0.545,0.545,0.545,0.545,0.545],
VS10: [0.054,0.054,0.054,0.054,0.054,0.0489,0.0548,0.055,0.0529,0.0521,0.0541,0.0548,0.0541,0.0531,0.0599,0.0569,0.0603,0.0643,0.0702,0.0715,0.0798,0.086,0.0959,0.1088,0.1218,0.1398,0.1626,0.1878,0.2302,0.2829,0.3455,0.4171,0.4871,0.5529,0.5955,0.6299,0.6552,0.6661,0.6752,0.6832,0.6851,0.6964,0.6966,0.7063,0.7104,0.7115,0.7145,0.7195,0.7183,0.7208,0.7228,0.7274,0.7251,0.7274,0.7341,0.7358,0.7362,0.7354,0.7442,0.7438,0.744,0.7436,0.7442,0.7489,0.7435,0.746,0.7518,0.755,0.7496,0.7548,0.7609,0.758,0.7574,0.7632,0.7701,0.7667,0.7735,0.772,0.7739,0.774,0.7699,0.7788,0.7801,0.7728,0.7793,0.7797,0.7754,0.781,0.7789,0.7789,0.7789,0.7789,0.7789,0.7789,0.7789],
VS11: [0.0482,0.0482,0.0482,0.0482,0.0482,0.0456,0.0478,0.0455,0.0484,0.0494,0.0456,0.047,0.0473,0.0486,0.0501,0.048,0.049,0.0468,0.0471,0.0486,0.0517,0.0519,0.0479,0.0494,0.0524,0.0527,0.0537,0.0577,0.0647,0.0737,0.0983,0.1396,0.1809,0.228,0.2645,0.2963,0.3202,0.3545,0.395,0.4353,0.4577,0.4904,0.5075,0.5193,0.5273,0.5359,0.5431,0.5449,0.5493,0.5526,0.5561,0.5552,0.5573,0.562,0.5607,0.5599,0.5632,0.5644,0.568,0.566,0.5709,0.5692,0.5657,0.5716,0.5729,0.5739,0.5714,0.5741,0.5774,0.5791,0.5801,0.5804,0.584,0.5814,0.5874,0.5885,0.5911,0.5878,0.5896,0.5947,0.5945,0.5935,0.5979,0.5941,0.5962,0.5919,0.5996,0.5953,0.5953,0.5953,0.5953,0.5953,0.5953,0.5953,0.5953],
VS12: [0.0691,0.0691,0.0691,0.0691,0.0691,0.0692,0.0727,0.0756,0.077,0.0806,0.0771,0.0742,0.0766,0.0733,0.0758,0.0768,0.0775,0.0754,0.0763,0.0763,0.0752,0.0782,0.0808,0.0778,0.0788,0.0805,0.0809,0.0838,0.0922,0.1051,0.123,0.1521,0.1728,0.1842,0.1897,0.1946,0.2037,0.2248,0.2675,0.3286,0.3895,0.4654,0.5188,0.5592,0.5909,0.6189,0.6343,0.6485,0.6607,0.6648,0.6654,0.6721,0.6744,0.6723,0.6811,0.6792,0.6774,0.6796,0.6856,0.6853,0.6864,0.6879,0.6874,0.6871,0.6863,0.689,0.6863,0.6893,0.695,0.6941,0.6958,0.695,0.7008,0.702,0.7059,0.7085,0.7047,0.7021,0.7071,0.7088,0.7055,0.7073,0.7114,0.7028,0.7105,0.7078,0.7112,0.7123,0.7158,0.7158,0.7158,0.7158,0.7158,0.7158,0.7158],
VS13: [0.0829,0.0829,0.0829,0.0829,0.0829,0.0829,0.0866,0.0888,0.0884,0.0853,0.0868,0.0859,0.0828,0.0819,0.0822,0.0818,0.0822,0.0819,0.0807,0.0787,0.0832,0.0828,0.081,0.0819,0.0836,0.0802,0.0809,0.0838,0.0842,0.0865,0.091,0.092,0.0917,0.0917,0.0952,0.0983,0.1036,0.115,0.1331,0.1646,0.207,0.2754,0.3279,0.3819,0.425,0.469,0.5067,0.5443,0.5721,0.5871,0.6073,0.6141,0.617,0.6216,0.6272,0.6287,0.6276,0.6351,0.6362,0.6348,0.6418,0.6438,0.6378,0.641,0.646,0.6451,0.6432,0.6509,0.6517,0.6514,0.6567,0.6597,0.6576,0.6576,0.6656,0.6641,0.6667,0.6688,0.6713,0.6657,0.6712,0.6745,0.678,0.6744,0.6786,0.6823,0.6806,0.6718,0.6813,0.6813,0.6813,0.6813,0.6813,0.6813,0.6813],
VS14: [0.053,0.053,0.053,0.053,0.053,0.0507,0.0505,0.0502,0.0498,0.0489,0.0503,0.0492,0.0511,0.0509,0.0496,0.0494,0.048,0.0487,0.0468,0.0443,0.044,0.0427,0.0421,0.0414,0.0408,0.04,0.0392,0.0406,0.0388,0.0396,0.0397,0.0391,0.0405,0.0394,0.0401,0.0396,0.0396,0.0395,0.0399,0.042,0.041,0.0464,0.05,0.0545,0.062,0.0742,0.0937,0.1279,0.1762,0.2449,0.3211,0.405,0.4745,0.5335,0.5776,0.6094,0.632,0.6495,0.662,0.6743,0.6833,0.6895,0.6924,0.703,0.7075,0.7112,0.7187,0.7214,0.7284,0.7327,0.7351,0.7374,0.741,0.7417,0.7491,0.7516,0.7532,0.7567,0.76,0.7592,0.7605,0.7629,0.7646,0.7622,0.768,0.7672,0.7645,0.7669,0.7683,0.7683,0.7683,0.7683,0.7683,0.7683,0.7683],
VS15: [0.0908,0.0908,0.0908,0.0908,0.0908,0.1021,0.113,0.128,0.1359,0.1378,0.1363,0.1363,0.1354,0.1322,0.1294,0.1241,0.1209,0.1137,0.1117,0.1045,0.1006,0.097,0.0908,0.0858,0.0807,0.0752,0.0716,0.0688,0.0678,0.0639,0.0615,0.0586,0.0571,0.0527,0.0513,0.0537,0.0512,0.053,0.0517,0.0511,0.0507,0.0549,0.0559,0.0627,0.0678,0.081,0.1004,0.1268,0.1595,0.2012,0.2452,0.2953,0.3439,0.3928,0.4336,0.4723,0.4996,0.5279,0.5428,0.5601,0.5736,0.5837,0.589,0.5959,0.5983,0.6015,0.6054,0.6135,0.62,0.6287,0.6405,0.6443,0.6489,0.6621,0.6662,0.6726,0.6774,0.6834,0.6808,0.6838,0.6874,0.6955,0.7012,0.6996,0.7023,0.7022,0.7144,0.7062,0.7075,0.7075,0.7075,0.7075,0.7075,0.7075,0.7075]
}
};
return results;
}
function ssAbsoluteSPDCalc(){
var result = {
absoluteIll: 0,
absoluteSPD: {
wavelength: setwavelength,
value: arrayScalar(setwavelength,0)
}
};
for(var i = 0;i < sourcelist.length;i++){
if(sourcelist[i].isSelected){
result.absoluteIll = result.absoluteIll + sourcelist[i].selectedSource.illuminance;
result.absoluteSPD.value = arrayAdd(result.absoluteSPD.value,sourcelist[i].selectedSource.absoluteSPD);
}
}
return result;
}
function sourceListModal(i){
var source = sourcelist[i];
$('#source-modal-label').html(" " + source.id);
$('#source-lamptype').html(source.lamp);
$('#source-cct').html(source.cct);
$('#source-manufacturer').html(source.manufacturer);
$('#source-info').html(source.info);
$('#source-add').attr("data-i", i);
$('#source-modal-footer').removeClass('d-none');
sourceData = [];
for(i = 0; i < source.spd.wavelength.length; i++){
sourceData[i] = {
x: source.spd.wavelength[i],
y: source.relativeSPD[i],
};
}
var sourceSPD = {
label: source.id,
fill: false,
lineTension: 0.1,
backgroundColor: "rgba(255, 205, 86,1)", // Yellow
borderColor: "rgba(255, 205, 86,1)", // Yellow
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0.0,
borderJoinStyle: 'miter',
pointBorderColor: "rgba(255, 205, 86,1)", // Yellow
pointBackgroundColor: "#fff",
pointBorderWidth: 1,
radius: 0,
data: sourceData,
yAxisID: 'y-axis-1',
};
configSourceSPD.data.datasets[0] = sourceSPD;
sourceSPDChart.update();
$('#source-modal').modal('show');
}
function updateResults(){
var combinedValues = ssAbsoluteSPDCalc();
combinedValues.relativeSPD = {
wavelength: setwavelength,
value: spdNormalize(setwavelength,combinedValues.absoluteSPD.value)
};
// Calculate CLA and CS Values based on macular thickness range
combinedValues.CLA = CLAcalc(combinedValues.absoluteSPD, thickness*2);
combinedValues.CS = cla2cs(combinedValues.CLA);
// Calculate Melanopic Lux
combinedValues.EML = melanopicLux(combinedValues.absoluteSPD);
// Calculate Spectral Irradiance
combinedValues.Irr = (combinedValues.absoluteSPD.value).sum()*2;
// Calculate photon flux
combinedValues.pf = (arrayDiv(combinedValues.absoluteSPD.value,arrayInverse(arrayScalar(combinedValues.absoluteSPD.wavelength,((1E-9)/(1.9865275648E-25)))))).sum()*2;
// Calculate color metrics
combinedValues.CCT = CCTcalc(combinedValues.relativeSPD);
combinedValues.CRI = cri23Sep05(combinedValues.relativeSPD);
combinedValues.GAI = gamutArea23Sep05(combinedValues.relativeSPD);
combinedValues.Duv = ansi_duv(combinedValues.relativeSPD);
//combinedValues.DFBB = dfbb(combinedValues.relativeSPD);
// Calculate color cordinates
var ccVals = Lxy23Sep05(combinedValues.absoluteSPD);
combinedValues.x = ccVals.x;
combinedValues.y = ccVals.y;
// Calculate Spectral Efficiency Function
var rodSat0 = 0.1088;
var test = {
spd: combinedValues.relativeSPD,
thickness: thickness*2,
};
var rodSat = fmin(prepGenerateCircadianSpectralResponceForSPD,test,rodSat0);
var sefObj = generateCircadianSpectralResponceForSPD(test.spd,test.thickness,rodSat);
if(sefObj.cool){
spectralEfficiencyFunctionDataset.label = 'Relative Spectral Contribution of the Circadian Response*: Cool';
spectralEfficiencyFunctionDataset.backgroundColor = "rgba(0,0,192,1)";
spectralEfficiencyFunctionDataset.borderColor = "rgba(0,0,192,1)";
spectralEfficiencyFunctionDataset.pointBorderColor = "rgba(0,0,192,1)";
}else{
spectralEfficiencyFunctionDataset.label = 'Relative Spectral Contribution of the Circadian Response*: Warm';
spectralEfficiencyFunctionDataset.backgroundColor = "rgba(192,0,0,1)";
spectralEfficiencyFunctionDataset.borderColor = "rgba(192,0,0,1)";
spectralEfficiencyFunctionDataset.pointBorderColor = "rgba(192,0,0,1)";
}
// Update Results Section HTML
$('#resultIll').html(combinedValues.absoluteIll);
$('#resultEML').html((combinedValues.EML).toFixed());
$('#resultCLA').html((combinedValues.CLA).toFixed());//$('#resultCLA').html((combinedValues.CLAlow).toFixed() + ' to ' + (combinedValues.CLAhigh).toFixed());
$('#resultCS').html((combinedValues.CS).toFixed(3));//$('#resultCS').html((combinedValues.CSlow).toFixed(3) + ' to ' + (combinedValues.CShigh).toFixed(3));
$('#resultCCT').html((combinedValues.CCT).toFixed());
$('#resultDuv').html((combinedValues.Duv).toFixed(3));
$('#resultCRI').html((combinedValues.CRI).toFixed(1));
$('#resultGAI').html((combinedValues.GAI).toFixed(1));
$('#resultXY').html((combinedValues.x).toFixed(2) + ', ' + (combinedValues.y).toFixed(2));
$('#resultIrr').html((combinedValues.Irr).toExponential(4));
$('#resultPf').html((combinedValues.pf).toExponential(4));
var normSPDVals = arrayNormalize(combinedValues.absoluteSPD.value);
// Update Relative SPD HTML
$('#RelSpdTable').empty();
var row, wave, val;
for(var i = 0; i < combinedValues.relativeSPD.wavelength.length; i++){
row = document.createElement('tr');
wave = document.createElement('td');
wave.innerHTML = combinedValues.relativeSPD.wavelength[i];
row.appendChild(wave);
val = document.createElement('td');
val.innerHTML = normSPDVals[i].toExponential(4);
row.appendChild(val);
$("#RelSpdTable")[0].appendChild(row);
}
// Update Absolute SPD HTML
$('#AbsSpdTable').empty();
for(i = 0; i < combinedValues.absoluteSPD.wavelength.length; i++){
row = document.createElement('tr');
wave = document.createElement('td');
wave.innerHTML = combinedValues.absoluteSPD.wavelength[i];
row.appendChild(wave);
val = document.createElement('td');
val.innerHTML = combinedValues.absoluteSPD.value[i].toExponential(4);
row.appendChild(val);
$("#AbsSpdTable")[0].appendChild(row);
}
//Update Chart Combined SPD
//spdChart.data.datasets[0].label = 'Combined Source SPD'
var dataValue;
var dataTest;
var j, k;
for(i = 0; i < sourcelist.length; i++){
if(sourcelist[i].isSelected){
for(j = 0; j < configSPD.data.datasets.length; j++){
if(sourcelist[i].id === configSPD.data.datasets[j].label){
dataValue = arrayScalar(arrayNormalize(sourcelist[i].selectedSource.relativeSPD),sourcelist[i].selectedSource.illuminance/combinedValues.absoluteIll);
dataTest = {};
for(k = 0;k < setwavelength.length; k++){
dataTest[k] = {
x: setwavelength[k],
y: dataValue[k],
};
}
configSPD.data.datasets[j].data = dataTest;
}
}
}
}
// Update SEF
if(configSPD.data.datasets.length > 0){
dataValue = arrayNormalize(sefObj.specRespMinusRod);
dataTest = [];
for(k = 0; k < setwavelength.length; k++){
dataTest[k] = {
x: setwavelength[k],
y: dataValue[k],
};
}
if(configSPD.data.datasets.length > 2){
configSPD.data.datasets[1].data = dataTest;
}else{
configSPD.data.datasets[0].data = dataTest;
}
}
// Update Combined
if(configSPD.data.datasets.length > 2){
dataValue = normSPDVals;
dataTest = [];
for(k = 0; k < setwavelength.length; k++){
dataTest[k] = {
x: setwavelength[k],
y: dataValue[k],
};
}
configSPD.data.datasets[0].data = dataTest;
}
spdChart.update();
document.getElementById('spdLegend').innerHTML = spdChart.generateLegend();
// Update CRM Plot
configCRM.data.datasets[0].data[0].x = combinedValues.CRI;
configCRM.data.datasets[0].data[0].y = combinedValues.GAI;
if(combinedValues.CRI < 30){
configCRM.options.scales.xAxes[0].ticks.min = -100;
}else{
configCRM.options.scales.xAxes[0].ticks.min = 20;
}
crmChart.update();
document.getElementById('crmLegend').innerHTML = crmChart.generateLegend();
// Update Chromaticity Plot
configChromaticity.data.datasets[0].data[0].x = combinedValues.x;
configChromaticity.data.datasets[0].data[0].y = combinedValues.y;
if( (combinedValues.x > 0.3 && combinedValues.x < 0.5) && (combinedValues.y > 0.3 && combinedValues.y < 0.5)){
configChromaticity.options.scales.xAxes[0].ticks.min = 0.30;
configChromaticity.options.scales.xAxes[0].ticks.max = 0.50;
configChromaticity.options.scales.xAxes[0].ticks.stepSize = 0.05;
configChromaticity.options.scales.yAxes[0].ticks.min = 0.30;
configChromaticity.options.scales.yAxes[0].ticks.max = 0.50;
configChromaticity.options.scales.yAxes[0].ticks.stepSize = 0.05;
}else{
configChromaticity.options.scales.xAxes[0].ticks.min = 0.00;
configChromaticity.options.scales.xAxes[0].ticks.max = 0.90;
configChromaticity.options.scales.xAxes[0].ticks.stepSize = 0.10;
configChromaticity.options.scales.yAxes[0].ticks.min = 0.00;
configChromaticity.options.scales.yAxes[0].ticks.max = 0.90;
configChromaticity.options.scales.yAxes[0].ticks.stepSize = 0.10;
}
chromaticityChart.update();
document.getElementById('chromaticityLegend').innerHTML = chromaticityChart.generateLegend();
return;
}
function applyNewSource(i, el){
// Expand the source object
el.isSelected = false;
var valueInt = interp1(el.spd.wavelength, el.spd.value, setwavelength, 0);
el.relativeSPD = arrayScalar(arrayNormalize(spdNormalize(setwavelength, valueInt)),1);
el.selectedSource = {
relativeSPD: spdNormalize(setwavelength, valueInt),
illuminance: 0,
absoluteSPD: arrayScalar(setwavelength,0)
};
// Create Source list button
var li = '<li id="source_'+i+'" class="list-group-item text-center source-item" data-i="'+i+'">'+el.id+'</li>';
//Append arrays
$("#names-list").append(li);
if(manUnique.indexOf(el.manufacturer) == -1) manUnique.push(el.manufacturer);
if(lampUnique.indexOf(el.lamp) == -1) lampUnique.push(el.lamp);
if(cctUnique.indexOf(el.cct) == -1) cctUnique.push(el.cct);
}
function updateSortSource(){
// Clear previous values
$("#manufacterer").empty();
$("#lamp").empty();
$("#cct").empty();
// Update sort options.
manUnique.sort();
lampUnique.sort();
cctUnique.sort();
// Move Other to end
manUnique.toEnd("Other");
lampUnique.toEnd("Other");
cctUnique.toEnd("Other");
// Move Any to front
manUnique.toFront("Any");
lampUnique.toFront("Any");
cctUnique.toFront("Any");
// Update inner HTML
$(manUnique).each(function(i, el){
var opt = document.createElement("option");
opt.innerHTML = el;
$("#manufacterer")[0].appendChild(opt);
});
$(lampUnique).each(function(i, el){
var opt = document.createElement("option");
opt.innerHTML = el;
$("#lamp")[0].appendChild(opt);
});
$(cctUnique).each(function(i, el){
var opt = document.createElement("option");
opt.innerHTML = el;
$("#cct")[0].appendChild(opt);
});
}
function addSourceDataset(source){
var newDataset = {
label: source.id,
fill: false,
lineTension: 0.1,
backgroundColor: "rgba(255, 205, 86,1)", // Yellow
borderColor: "rgba(255, 205, 86,1)", // Yellow
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0.0,
borderJoinStyle: 'miter',
pointBorderColor: "rgba(255, 205, 86,1)", // Yellow
pointBackgroundColor: "#fff",
pointBorderWidth: 1,
radius: 0,
data: dataTestZero,
yAxisID: 'y-axis-1',
};
configSPD.data.datasets.push(newDataset);
if(configSPD.data.datasets.length == 1){
configSPD.data.datasets.unshift(spectralEfficiencyFunctionDataset);
$('#spdLegendDiv').show();
$('#crmLegendDiv').show();
$('#chromaticityLegendDiv').show();
$('#csInputSection').show();
}else if(configSPD.data.datasets.length == 3){
configSPD.data.datasets.unshift(combinedSourceDataset);
$('#csInputSection').hide();
}else{
$('#csInputSection').hide();
}
spdChart.update();
document.getElementById('spdLegend').innerHTML = spdChart.generateLegend();
$('#noSelectedSources').hide();
$('#sources-table').show();
}
function removeSourceDataset(source){
for(var i = 0;i < configSPD.data.datasets.length;i++){
if(source.id === configSPD.data.datasets[i].label){
configSPD.data.datasets.splice(i,1);
if(configSPD.data.datasets.length == 1 || configSPD.data.datasets.length == 3){
configSPD.data.datasets[0].data = dataTestNan;
configSPD.data.datasets.splice(0,1);
$('#csInputSection').show();
if(configSPD.data.datasets.length == 0){
$('#spdLegendDiv').hide();
$('#crmLegendDiv').hide();
$('#chromaticityLegendDiv').hide();
$('#noSelectedSources').show();
$('#sources-table').hide();
$('#csInputSection').hide();
}
}
}
}
spdChart.update();
document.getElementById('spdLegend').innerHTML = spdChart.generateLegend();
}
//General Analysis
// Math
function arrayScalar(array,scalar){
var result = [];
for(var i = 0;i < array.length; i++){
result[i] = array[i] * scalar;
}
return result;
}
function arrayAdd(array1,array2){
var result = [];
if(array1.length != array2.length){
result = NaN;
}else{
for(var i = 0;i < array1.length;i++){
result[i] = array1[i] + array2[i];
}
}
return result;
}
function arraySub(array1,array2){
var result = [];
if(array1.length != array2.length){
result = NaN;
}else{
for(var i = 0;i < array1.length;i++){
result[i] = array1[i] - array2[i];
}
}
return result;
}
function arrayAdd2(array1,value){
var result = [];
var i;
if(Array.isArray(value)){
if(array1.length != value.length){
result = NaN;
}else{
for(i = 0; i < array1.length; i++){
result[i] = array1[i] + value[i];
}
}
}else{
for(i = 0; i < array1.length; i++){
result[i] = array1[i] + value;
}
}
return result;
}
function arraySub2(array1,value){
var result = [];
var i;
if(Array.isArray(value)){
if(array1.length != value.length){
result = NaN;
}else{
for(i = 0; i < array1.length; i++){
result[i] = array1[i] - value[i];
}
}
}else{
for(i = 0; i < array1.length; i++){
result[i] = array1[i] - value;
}
}
return result;
}
function arrayNormalize(array){
var result = [];
var max = Math.max.apply(null,array);
if(max != 0){
var factor = 1/max;
result = arrayScalar(array,factor);
}else{
result = arrayScalar(array,NaN);
}
return result;
}
function arrayPow(base, array){
var result = [];
for(var i = 0;i < array.length;i++){
var exponent = array[i] * 1.0;
result[i] = Math.pow(base, exponent);
}
return result;
}
function arrayBase(array, value){
var result = [];
for(var i = 0;i < array.length;i++){
result[i] = Math.pow(array[i], value);
}
return result;
}
function arrayInverse(array){
var result = [];
for(var i = 0;i < array.length;i++){
result[i] = 1/array[i];
}
return result;
}
function arrayDiv(array1, array2){
var result = [];
for(var i = 0;i < array1.length;i++){
result[i] = array1[i]/array2[i];
}
return result;
}
function arrayMul(array1, array2){
var result = [];
for(var i = 0;i < array1.length;i++){
result[i] = array1[i] * array2[i];
}
return result;
}
function arrayDiff(array){
var result = [];
if(array.length > 1){
for(var i = 0;i < array.length-1;i++){
result[i] = array[i+1] - array[i];
}
}else{
result[0] = NaN;
}
return result;
}
function arrayRep(value, length){
var result = [];
for(var i = 0;i < length;i++){
result[i] = value;
}
return result;
}
function arrayAbs(array){
var result = [];
for(var i = 0;i < array.length;i++){
result[i] = Math.abs(array[i]);
}
return result;
}
function lessthanequal(val1, val2){
var result = [];
result = val1 <= val2;
return result;
}
function findx1index(x, array){
var result = [];
array.reverse();
var rindex = -1;
for(var i = 0;i < array.length;i++){
if(array[i] <= x){
rindex = i;
break;
}
}
result = array.length - (rindex + 1);
array.reverse();
return result;
}
function lerp(x, x1, x2, y1, y2){
var result = [];
result = y1 + (y2 - y1) * (x - x1) / (x2 - x1);
return result;
}
function linearInterp(xarray, yarray, x, value){
var result;
var xmax = Math.max.apply(null, xarray);
var xmin = Math.min.apply(null, xarray);
if(x < xmin){
result = value;
}else if(x > xmax){
result = value;
}else if(x == xmax){
var yendindex = (yarray.length) - 1;
result = yarray[yendindex];
}else{
var x1index = findx1index(x, xarray);
var x1 = xarray[x1index];
var x2 = xarray[x1index + 1];
var y1 = yarray[x1index];
var y2 = yarray[x1index + 1];
result = lerp(x, x1, x2, y1, y2);
}
return result;
}
function interp1(xarray, yarray, array, value){
var result = [];
var x;
if(Array.isArray(array)){
for(var i = 0;i < array.length;i++){
x = array[i];
result[i] = linearInterp(xarray, yarray, x, value);
}
}else{
x = array;
result[0] = linearInterp(xarray, yarray, x, value);
}
return result;
}
function sumproduct(array1, array2){
var result = 0;
for(var i = 0; i < array1.length; i++){
result += (array1[i] * array2[i]);
}
return result;
}
function createDelta(wavelength){
var result = [];
for(var i = 0;i < wavelength.length;i++){
if(i == 0){
result[i] = (wavelength[i+1] - wavelength[i])/2;
}else if(i == (wavelength.length - 1)){
result[i] = (wavelength[i] - wavelength[i-1])/2;
}else{
result[i] = ((wavelength[i] - wavelength[i-1])/2 + (wavelength[i+1] - wavelength[i])/2);
}
}
return result;
}
function spdNormalize(wavelength,value){
var result = [];
//var efs = efficienyFunctions(wavelength);
var cie = cie31by1();
var ybar = interp1(cie.wavelength,cie.ybar,wavelength,0);
var deltaWavelength = createDelta(wavelength);
var spdPhotopic = sumproduct(value, arrayMul(deltaWavelength, ybar));
var factor = 1/(683*spdPhotopic);
result = arrayScalar(value,factor);
return result;
}
Array.prototype.toEnd = function(el){
var i = this.indexOf(el);
if(i >= 0){
this.splice(i,1);
}
this.push(el);
};
Array.prototype.toFront = function(el){
var i = this.indexOf(el);
if(i >= 0){
this.splice(i,1);
}
this.unshift(el);
};
function uniqueId(objArray, newId){
var result = true;
for(var i = 0;i < objArray.length;i++){
if(objArray[i].id == newId){
result = false;
break;
}
}
return result;
}
Array.prototype.indicies = function(array){
var result = [];
for(var i = 0;i < array.length;i++){
result[i] = this[array[i]];
}
return result;
};
Array.prototype.sum = function(){
var result = 0;
for(var i = 0; i < this.length;i++){
result += this[i];
}
return result;
};
function arrayEval(array1, array2){
var result = [];
for(var i = 0;i < array2.length;i++){
var idx = array2[i];
result[i] = array1[idx];
}
return result;
}
// Math
// Page Action
$(document).ready(function(){
$.ajax({
mimeType: "application/json",
url: "json/sources.json",
async: false,
dataType: 'json',
success: function(result) {
$.each(result,function(){
sourcelist = this;
});
}
});
$(sourcelist).each(function(i, el){
applyNewSource(i, el);
});
updateSortSource();
$('.source-item').on('click',function(){
var i = $(this).attr('data-i');
sourceListModal(i);
});
$('.sortSource').change( function () {
for(var i = 0; i < sourcelist.length; i++){
$("#source_"+i).hide();
}
$("#noAvailableSources").show();
var manSelected = $('#manufacterer option:selected').text();
var cctSelected = $('#cct option:selected').text();
var lampSelected = $('#lamp option:selected').text();
var searchVal = ($('#searchSource').val()).toLocaleLowerCase();
for(i = 0; i < sourcelist.length;i++){
var j, k;
// Sort using the dropdown menus
var manTest = manSelected == "Any" || sourcelist[i].manufacturer == manSelected;
var cctTest = cctSelected == "Any" || sourcelist[i].cct == cctSelected;
var lampTest = lampSelected == "Any" || sourcelist[i].lamp == lampSelected;
// Sort using the keyword box
var searchTest = false;
if(notEmpty(searchVal)){
// Initialize Search Test
searchTest = false;
// Split the search string
var searchValArray = searchVal.split(" ");
// Search ID
var sourceIDArray = ((sourcelist[i].id).toLocaleLowerCase()).split(" ");
for(j = 0; j < sourceIDArray.length; j++){
var isSourceID = true;
for(k = 0; k < searchValArray.length; k++){
isSourceID = isSourceID & (sourceIDArray[j].search(searchValArray[k]) == 0);
}
if(isSourceID){
searchTest = true;
break;
}
}
// Search Manufacturer
if(!searchTest){
var sourceManArray = ((sourcelist[i].manufacturer).toLocaleLowerCase()).split(" ");
for(j = 0; j < sourceManArray.length; j++){
var isSourceMan = true;
for(k = 0; k < searchValArray.length; k++){
isSourceMan = isSourceMan & (sourceManArray[j].search(searchValArray[k]) == 0);
}
if(isSourceMan){
searchTest = true;
break;
}
}
}
// Search CCTs
if(!searchTest){
var sourceCCTArray =((sourcelist[i].cct).toLocaleLowerCase()).split(" ");
for(j = 0; j < sourceCCTArray.length; j++){
var isSourceCCT = true;
for(k = 0; k < searchValArray.length; k++){
isSourceCCT = isSourceCCT & (sourceCCTArray[j].search(searchValArray[k]) == 0);
}
if(isSourceCCT){
searchTest = true;
break;
}
}
}
// Search Lamps
if(!searchTest){
var sourceLampArray = ((sourcelist[i].lamp).toLocaleLowerCase()).split(" ");
for(j = 0; j < sourceLampArray.length; j++){
var isSourceLamp = true;
for(k = 0; k < searchValArray.length; k++){
isSourceLamp = isSourceLamp & (sourceLampArray[j].search(searchValArray[k]) == 0);
}
if(isSourceLamp){
searchTest = true;
break;
}
}
}
}else{
searchTest = true;
}
if(manTest & cctTest & lampTest & searchTest){
$("#source_"+i).show();
$("#noAvailableSources").hide();
}
}
});
// Reset search options
$('#reset').on("click",function(){
document.getElementById("manufacterer").selectedIndex = 0;
document.getElementById("cct").selectedIndex = 0;
document.getElementById("lamp").selectedIndex = 0;
document.getElementById("searchSource").value = '';
$('.sortSource').trigger('change');
var manSelected = $('#manufacterer option:selected').text();
});
$('.addSource').on('click',function(){
if($("#stepChange2").hasClass("disabled")){
$("#stepChange2").fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500);
$("#stepChange2").removeClass("disabled");
}
//Get Source data
var sourceIdx = $(this).attr('data-i');
// Create selected source object
sourcelist[sourceIdx].isSelected = true;
// Create HTML
var tr = document.createElement("tr");
tr.setAttribute('id','SelectedSource_'+sourceIdx);
var tdSource = document.createElement("td");
var pSource = document.createElement("p");
pSource.setAttribute('class','selected-source mb-0 mt-1');
pSource.setAttribute('data-i', sourceIdx);
pSource.innerHTML = sourcelist[sourceIdx].id;
tdSource.appendChild(pSource);
tr.appendChild(tdSource);
var tdIll = document.createElement("td");
var tdIllInput = document.createElement("input");
tdIllInput.setAttribute('id','ssIll_'+sourceIdx);
tdIllInput.setAttribute('class','form-control ssIll');
//tdIllInput.setAttribute('type','number');
tdIllInput.setAttribute('placeholder',sourcelist[sourceIdx].selectedSource.illuminance);
//tdIllInput.setAttribute('min',0);
//tdIllInput.setAttribute('step',0.01);
tdIll.appendChild(tdIllInput);
tr.appendChild(tdIll);
var tdRemove = document.createElement("td");
tdRemove.setAttribute('class','text-center align-middle');
var tdRemoveSourceI = document.createElement("i");
tdRemoveSourceI.setAttribute('class','removeSource far fa-trash-alt fa-lg');
tdRemove.appendChild(tdRemoveSourceI);
tr.appendChild(tdRemove);
$("#selected-sources")[0].appendChild(tr);
// Disable sourcelist button
$("#source_"+sourceIdx).addClass('disabled');
$("#source_"+sourceIdx).prop('disabled',true);
updateResults();
// Update chart dataset array
addSourceDataset(sourcelist[sourceIdx]);
jpButtonToggle();
$(pSource).on('click', function(){
var i = sourceIdx