Files
lamp-testbench/crates/tm30/tests/golden/lamp_L0002.json
T
grabowski 2a3f28001c Lamp testbench in Rust around the HPCS 6500
lampbench station / export / label / tm30 / calibrate replace the Python
lamp_station.py, lamp_export.py, label_printer.py, tm30.py and
calibration.py that lived in HPCS6500-py. The driver is a submodule
(HPCS6500/, like mppt-testbench). Workspace crates: tm30 (TM-30-18 port of
colour-science 0.4.7), brother-ql (raster protocol, byte-identical to
brother_ql) and lamp-label (QR + ID labels for the QL-820NWB).

Bundles are byte-identical to lamp_export.py's (golden tests); the station
runs end to end in a test against the simulated instrument.
2026-10-22 17:26:14 +07:00

941 lines
14 KiB
JSON

{
"name": "lamp_L0002",
"source": "L0002/spd.csv",
"generator": "crates/tm30/tools/golden.py (tm30.py + colour-science 0.4.7, numpy 2.5.1)",
"wavelengths": [
380.0,
381.92,
383.84,
385.76,
387.68,
389.6,
391.52,
393.44,
395.36,
397.28,
399.2,
401.12,
403.04,
404.96,
406.88,
408.8,
410.72,
412.64,
414.56,
416.48,
418.4,
420.32,
422.23,
424.15,
426.07,
427.99,
429.91,
431.83,
433.75,
435.67,
437.59,
439.51,
441.43,
443.35,
445.27,
447.19,
449.11,
451.03,
452.95,
454.87,
456.79,
458.71,
460.63,
462.55,
464.47,
466.39,
468.31,
470.23,
472.15,
474.07,
475.99,
477.91,
479.83,
481.75,
483.67,
485.59,
487.51,
489.43,
491.35,
493.27,
495.19,
497.11,
499.03,
500.95,
502.87,
504.79,
506.7,
508.62,
510.54,
512.46,
514.38,
516.3,
518.22,
520.14,
522.06,
523.98,
525.9,
527.82,
529.74,
531.66,
533.58,
535.5,
537.42,
539.34,
541.26,
543.18,
545.1,
547.02,
548.94,
550.86,
552.78,
554.7,
556.62,
558.54,
560.46,
562.38,
564.3,
566.22,
568.14,
570.06,
571.98,
573.9,
575.82,
577.74,
579.66,
581.58,
583.5,
585.42,
587.34,
589.26,
591.17,
593.09,
595.01,
596.93,
598.85,
600.77,
602.69,
604.61,
606.53,
608.45,
610.37,
612.29,
614.21,
616.13,
618.05,
619.97,
621.89,
623.81,
625.73,
627.65,
629.57,
631.49,
633.41,
635.33,
637.25,
639.17,
641.09,
643.01,
644.93,
646.85,
648.77,
650.69,
652.61,
654.53,
656.45,
658.37,
660.29,
662.21,
664.13,
666.05,
667.97,
669.89,
671.81,
673.72,
675.64,
677.56,
679.48,
681.4,
683.32,
685.24,
687.16,
689.08,
691.0,
692.92,
694.84,
696.76,
698.68,
700.6,
702.52,
704.44,
706.36,
708.28,
710.2,
712.12,
714.04,
715.96,
717.88,
719.8,
721.72,
723.64,
725.56,
727.48,
729.4,
731.32,
733.24,
735.16,
737.08,
739.0,
740.92,
742.84,
744.76,
746.68,
748.6,
750.52,
752.44,
754.36,
756.28,
758.19,
760.11,
762.03,
763.95,
765.87,
767.79,
769.71,
771.63,
773.55,
775.47,
777.39,
779.31,
781.23,
783.15,
785.07,
786.99,
788.91,
790.83,
792.75,
794.67,
796.59,
798.51,
800.43,
802.35,
804.27,
806.19,
808.11,
810.03,
811.95,
813.87,
815.79,
817.71,
819.63,
821.55,
823.47,
825.39,
827.31,
829.23,
831.15,
833.07,
834.99,
836.91,
838.83,
840.74,
842.66,
844.58,
846.5,
848.42,
850.34,
852.26,
854.18,
856.1,
858.02,
859.94,
861.86,
863.78,
865.7,
867.62,
869.54,
871.46,
873.38,
875.3,
877.22,
879.14,
881.06,
882.98,
884.9,
886.82,
888.74,
890.66,
892.58,
894.5,
896.42,
898.34,
900.26,
902.18,
904.1,
906.02,
907.94,
909.86,
911.78,
913.7,
915.62,
917.54,
919.46,
921.38,
923.3,
925.21,
927.13,
929.05,
930.97,
932.89,
934.81,
936.73,
938.65,
940.57,
942.49,
944.41,
946.33,
948.25,
950.17,
952.09,
954.01,
955.93,
957.85,
959.77,
961.69,
963.61,
965.53,
967.45,
969.37,
971.29,
973.21,
975.13,
977.05,
978.97,
980.89,
982.81,
984.73,
986.65,
988.57,
990.49,
992.41,
994.33,
996.25,
998.17,
1000.09,
1002.01,
1003.93,
1005.85,
1007.77,
1009.68,
1011.6,
1013.52,
1015.44,
1017.36,
1019.28,
1021.2,
1023.12,
1025.04,
1026.96,
1028.88,
1030.8,
1032.72,
1034.64,
1036.56,
1038.48,
1040.4,
1042.32,
1044.24,
1046.16,
1048.08,
1050.0
],
"values": [
0.0,
0.00173501,
0.0141204,
0.0431285,
0.0896217,
0.153065,
0.237699,
0.33388,
0.429872,
0.5368,
0.656583,
0.792128,
0.944333,
1.11338,
1.29868,
1.49927,
1.72128,
1.96704,
2.2412,
2.54845,
2.88773,
3.25844,
3.65909,
4.08734,
4.54137,
5.03432,
5.5693,
6.15379,
6.78897,
7.46713,
8.25135,
9.05817,
9.79608,
10.5172,
11.1984,
11.804,
12.3017,
12.6559,
12.8447,
12.8561,
12.6927,
12.3737,
11.926,
11.3915,
10.8135,
10.2387,
9.6982,
9.21543,
8.79008,
8.41625,
8.0863,
7.79117,
7.52402,
7.26948,
7.01693,
6.76108,
6.50316,
6.25056,
6.00731,
5.77813,
5.56901,
5.38952,
5.24793,
5.14759,
5.08957,
5.07014,
5.07401,
5.10707,
5.16223,
5.23684,
5.32855,
5.4361,
5.55854,
5.69466,
5.85579,
6.03218,
6.20971,
6.39986,
6.60353,
6.81771,
7.04014,
7.26931,
7.50152,
7.73838,
7.97752,
8.21664,
8.45502,
8.69153,
8.92768,
9.1621,
9.39251,
9.61036,
9.81719,
10.0144,
10.2057,
10.3923,
10.5715,
10.7409,
10.9012,
11.054,
11.1971,
11.3311,
11.4555,
11.5699,
11.6751,
11.7757,
11.868,
11.9501,
12.025,
12.0917,
12.1579,
12.2342,
12.3131,
12.3858,
12.4543,
12.519,
12.5843,
12.6557,
12.733,
12.8128,
12.8962,
12.9859,
13.0877,
13.196,
13.3089,
13.4217,
13.5343,
13.6533,
13.7792,
13.9085,
14.0371,
14.1654,
14.2981,
14.4401,
14.5902,
14.7431,
14.8958,
15.0501,
15.2079,
15.3699,
15.5344,
15.6991,
15.8655,
16.0361,
16.2129,
16.3927,
16.5744,
16.7573,
16.9429,
17.134,
17.3343,
17.5423,
17.7542,
17.9709,
18.1922,
18.4198,
18.6546,
18.8971,
19.1303,
19.365,
19.6174,
19.8673,
20.1106,
20.3499,
20.5817,
20.8033,
21.0174,
21.2286,
21.4406,
21.656,
21.8704,
22.075,
22.2691,
22.4514,
22.6232,
22.7861,
22.9394,
23.0784,
23.2059,
23.3219,
23.4253,
23.5184,
23.6003,
23.6792,
23.7495,
23.7977,
23.83,
23.8465,
23.8461,
23.8342,
23.8118,
23.7772,
23.7325,
23.6737,
23.6013,
23.5111,
23.4046,
23.2846,
23.1523,
23.0176,
22.875,
22.7215,
22.5615,
22.4284,
22.2887,
22.1026,
21.9021,
21.6894,
21.4686,
21.245,
21.0154,
20.7765,
20.5285,
20.2719,
20.0097,
19.7456,
19.4773,
19.2068,
18.9344,
18.6603,
18.3832,
18.1464,
17.9037,
17.6097,
17.3126,
17.0157,
16.716,
16.4111,
16.1023,
15.7891,
15.4751,
15.1615,
14.8479,
14.5354,
14.2229,
13.9097,
13.6421,
13.3748,
13.0609,
12.7476,
12.4371,
12.1282,
11.8251,
11.527,
11.2328,
10.9435,
10.6552,
10.3699,
10.0906,
9.81625,
9.58554,
9.36005,
9.10208,
8.85099,
8.60601,
8.36604,
8.1315,
7.90436,
7.68357,
7.46703,
7.25444,
7.0467,
6.84745,
6.68252,
6.5201,
6.33238,
6.14523,
5.95994,
5.7806,
5.6072,
5.43784,
5.27123,
5.10482,
4.9396,
4.7759,
4.6152,
4.48006,
4.34852,
4.20145,
4.05864,
3.91894,
3.78205,
3.64734,
3.51549,
3.38588,
3.2588,
3.13455,
3.03038,
2.92902,
2.81429,
2.70332,
2.59597,
2.49249,
2.39306,
2.29647,
2.20318,
2.11317,
2.02782,
1.94608,
1.87593,
1.80441,
1.7191,
1.63222,
1.54737,
1.46716,
1.39241,
1.32364,
1.26045,
1.20253,
1.15567,
1.11081,
1.06137,
1.01538,
0.972699,
0.931743,
0.892749,
0.854441,
0.817074,
0.780997,
0.750032,
0.719565,
0.685491,
0.652801,
0.621426,
0.591266,
0.562313,
0.534466,
0.507634,
0.482014,
0.460176,
0.438661,
0.414758,
0.392029,
0.369727,
0.348956,
0.328772,
0.308439,
0.288415,
0.268044,
0.249802,
0.231758,
0.212132,
0.194042,
0.178806,
0.1652,
0.151731,
0.138667,
0.12534,
0.113376,
0.102013
],
"expected": {
"Rf": 89.22235652053783,
"Rg": 107.794145809586,
"CCT_K": 3302.606999164301,
"Duv": -0.027884023559389598,
"bins": [
{
"bin": 1,
"ref_a": 23.06228504028278,
"ref_b": 5.111976796411115,
"test_a": 23.361276750135037,
"test_b": 5.416755317843782,
"ref_a_norm": 0.9763032407825085,
"ref_b_norm": 0.21640698241408787,
"test_a_norm": 0.9889605544349064,
"test_b_norm": 0.2293092710500957,
"Rcs_pct": 1.4931218564462425,
"Rhs": 0.010185055381404916,
"Rf_h": 93.37679877312728
},
{
"bin": 2,
"ref_a": 20.34027770654904,
"ref_b": 14.980511329753895,
"test_a": 19.748571045797956,
"test_b": 16.026734361172167,
"ref_a_norm": 0.805189315927886,
"ref_b_norm": 0.5930178458660271,
"test_a_norm": 0.7817660427418597,
"test_b_norm": 0.6344335836022156,
"Rcs_pct": 0.35336111899311373,
"Rhs": 0.04744920074077499,
"Rf_h": 89.83640509054416
},
{
"bin": 3,
"ref_a": 14.66143518044539,
"ref_b": 23.099317524057312,
"test_a": 13.10493477163385,
"test_b": 25.17641901813648,
"ref_a_norm": 0.5358831414560995,
"ref_b_norm": 0.8442921643028213,
"test_a_norm": 0.47899223558734044,
"test_b_norm": 0.9202113127402725,
"Rcs_pct": 3.1517571087424248,
"Rhs": 0.08948147843428221,
"Rf_h": 81.29334855891142
},
{
"bin": 4,
"ref_a": 3.316227329424619,
"ref_b": 22.502834861627402,
"test_a": 1.8836258595589617,
"test_b": 24.05909440964605,
"ref_a_norm": 0.14579465391869886,
"ref_b_norm": 0.9893148734799891,
"test_a_norm": 0.08281174751501695,
"test_b_norm": 1.0577342849593634,
"Rcs_pct": 5.481739618101613,
"Rhs": 0.07512067253541072,
"Rf_h": 85.42851598023903
},
{
"bin": 5,
"ref_a": -2.422587647679764,
"ref_b": 16.424874094297536,
"test_a": -3.1623261538118532,
"test_b": 17.52667154742186,
"ref_a_norm": -0.14591640060398525,
"ref_b_norm": 0.9892969241005338,
"test_a_norm": -0.19047205592004496,
"test_b_norm": 1.0556599796162,
"Rcs_pct": 7.378028515559755,
"Rhs": 0.030752741022185812,
"Rf_h": 89.34336756118215
},
{
"bin": 6,
"ref_a": -12.59768809193046,
"ref_b": 17.563947508620437,
"test_a": -13.10747779349664,
"test_b": 19.174218603514998,
"ref_a_norm": -0.5828304377415757,
"ref_b_norm": 0.8125937981808398,
"test_a_norm": -0.6064157934633361,
"test_b_norm": 0.8870927856356233,
"Rcs_pct": 7.504696579014966,
"Rhs": -0.021778913241988784,
"Rf_h": 88.09105067179252
},
{
"bin": 7,
"ref_a": -18.249827577961938,
"ref_b": 11.874248646479325,
"test_a": -18.57028904118945,
"test_b": 12.974500853965914,
"ref_a_norm": -0.8381946097221974,
"ref_b_norm": 0.5453712462466765,
"test_a_norm": -0.8529130540446718,
"test_b_norm": 0.595904626121666,
"Rcs_pct": 4.031278082692027,
"Rhs": -0.03383984023107154,
"Rf_h": 90.06691863190787
},
{
"bin": 8,
"ref_a": -22.605294909086695,
"ref_b": 6.240759531181509,
"test_a": -22.084463968370827,
"test_b": 6.964942612555458,
"ref_a_norm": -0.9639399520969434,
"ref_b_norm": 0.26611983907883,
"test_a_norm": -0.941730564691763,
"test_b_norm": 0.2970006131442202,
"Rcs_pct": -1.5758100097249599,
"Rhs": -0.03462024519145011,
"Rf_h": 90.52776316682521
},
{
"bin": 9,
"ref_a": -20.517141477076574,
"ref_b": -2.967983976071647,
"test_a": -20.505984212682307,
"test_b": -3.239407524595391,
"ref_a_norm": -0.9896983252548369,
"ref_b_norm": -0.14316851954173118,
"test_a_norm": -0.989160125238145,
"test_b_norm": -0.1562613488575892,
"Rcs_pct": 0.20264256330488042,
"Rhs": 0.012946251886390935,
"Rf_h": 93.99122684695584
},
{
"bin": 10,
"ref_a": -17.771453509913574,
"ref_b": -11.247196926017375,
"test_a": -17.35535413365079,
"test_b": -11.801870559648155,
"ref_a_norm": -0.8449921966289664,
"ref_b_norm": -0.5347786342367783,
"test_a_norm": -0.825207617626011,
"test_b_norm": -0.5611521040169731,
"Rcs_pct": -0.1797961481838133,
"Rhs": 0.032920461860078125,
"Rf_h": 91.74122414581237
},
{
"bin": 11,
"ref_a": -12.963074631950235,
"ref_b": -19.355397572494585,
"test_a": -11.547217290580928,
"test_b": -20.84580842680803,
"ref_a_norm": -0.5564665028736889,
"ref_b_norm": -0.8308700446998475,
"test_a_norm": -0.49568792944960893,
"test_b_norm": -0.8948489802141619,
"Rcs_pct": 1.9429774507801447,
"Rhs": 0.08608032899325543,
"Rf_h": 85.59156834963665
},
{
"bin": 12,
"ref_a": -5.904186330864348,
"ref_b": -18.810951223945303,
"test_a": -4.2470229784883,
"test_b": -19.984982567186975,
"ref_a_norm": -0.2994652753415954,
"ref_b_norm": -0.9541071998809056,
"test_a_norm": -0.215412562267304,
"test_b_norm": -1.0136550528383277,
"Rcs_pct": 4.20057868002626,
"Rhs": 0.09405487357005371,
"Rf_h": 86.06801496625258
},
{
"bin": 13,
"ref_a": 2.5957590943941296,
"ref_b": -18.33391695345533,
"test_a": 4.027469001752538,
"test_b": -19.05563743943754,
"ref_a_norm": 0.14018428761864846,
"ref_b_norm": -0.9901254291779664,
"test_a_norm": 0.2175039564095789,
"test_b_norm": -1.029102032363408,
"Rcs_pct": 5.331199776700167,
"Rhs": 0.06823003496925498,
"Rf_h": 88.99277499790817
},
{
"bin": 14,
"ref_a": 8.370959164610108,
"ref_b": -14.44024775476775,
"test_a": 9.938193871526439,
"test_b": -15.179866503668167,
"ref_a_norm": 0.5015215140613669,
"ref_b_norm": -0.8651451733284964,
"test_a_norm": 0.5954177937643167,
"test_b_norm": -0.9094572655848905,
"Rcs_pct": 8.901013616298016,
"Rhs": 0.053453423860791965,
"Rf_h": 88.0920184740265
},
{
"bin": 15,
"ref_a": 16.806629668817017,
"ref_b": -11.167833309449989,
"test_a": 17.930142442889327,
"test_b": -11.721519338675437,
"ref_a_norm": 0.8328861701583553,
"ref_b_norm": -0.553444331038766,
"test_a_norm": 0.8885640942847659,
"test_b_norm": -0.5808833503685844,
"Rcs_pct": 6.153880435009379,
"Rhs": 0.0081182865168315,
"Rf_h": 91.24253607308947
},
{
"bin": 16,
"ref_a": 19.047107877138007,
"ref_b": -3.2172870794964443,
"test_a": 19.666911461546146,
"test_b": -3.8843704584330836,
"ref_a_norm": 0.9860325322813739,
"ref_b_norm": -0.16655283030552656,
"test_a_norm": 1.018118584494297,
"test_b_norm": -0.20108646751798848,
"Rcs_pct": 3.820670612085186,
"Rhs": -0.027610404798322406,
"Rf_h": 91.32592522208625
}
]
}
}