Files
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
18 KiB
JSON

{
"name": "noisy_lamp_L0001",
"source": "first lamp + 1% gaussian noise (negative values)",
"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.5453554216008005,
0.24792618513574294,
0.2864476428600886,
0.35703020371347705,
0.8506453563404788,
0.663604942033018,
0.8684545319821,
0.9679475826071613,
0.9652971901696067,
1.2921500149457124,
1.7936543339217699,
1.613677044221842,
1.9249636606471179,
1.9963508598132864,
2.2671027801864154,
2.4677914832778947,
2.813032064912369,
3.1497651772905817,
3.5158668782266034,
3.4362231780308345,
3.7067696426290615,
4.33621571200596,
4.27351860892673,
4.6107463387094665,
4.657570849173851,
4.894154756708831,
5.348676423978722,
5.532700431076364,
5.84584348954998,
5.983242415199149,
6.224370108576785,
6.14210264590153,
6.165825580208871,
6.278175662146519,
6.638920845710629,
6.526713920382358,
6.720034016889225,
6.5819910366581125,
6.298699600812516,
5.93651428796073,
6.145793204117674,
5.966322116153378,
5.739302076711518,
5.611549654491431,
5.131931418600654,
4.716973767517189,
4.698242592291026,
4.168552080099767,
3.858636426209516,
3.689469926950953,
3.7488410045803198,
3.213304399895535,
2.8471786136862205,
2.7638330095155648,
2.7242887049365248,
2.5668123301489034,
2.4173407888440885,
2.2510829533469803,
1.9271720373463845,
2.344954701568824,
2.0109138638172466,
1.6803216933967142,
1.7633120030951823,
1.6265216229583623,
1.7008538312019938,
1.4185665449137213,
1.3777628901480852,
1.4758104502798477,
1.065786249404564,
1.2551702348484088,
1.624900144413397,
1.2710533675635787,
1.362690326355507,
1.2029237730197535,
1.3528554393437615,
1.4837289361360018,
1.3254643342718229,
1.75687384435553,
1.7602094931435461,
1.742262039018851,
1.8525474916208522,
1.845662219832019,
2.3109033604237568,
2.050229840646995,
2.4501406852862946,
2.707773330412885,
2.6749432620831843,
2.725331288845762,
3.1074125366051426,
3.512022946308676,
3.1481943800548806,
3.4199601171866187,
3.846804976339234,
3.9208259553048252,
4.703000997049231,
4.350244155561139,
4.920442748384943,
4.903600288109004,
5.157495221752436,
5.075425636830895,
5.40891620402872,
5.840999123533478,
5.944358078374631,
5.7879909786785495,
6.3918831302214905,
6.224085758009058,
6.49454966395334,
6.580751401737383,
7.0783269981076185,
7.0452665771395555,
7.1575212179072025,
7.267243037430282,
7.5682775699646765,
7.551673703488912,
7.975250935392335,
7.876103518667443,
7.692387318678556,
7.696692922450508,
8.270347306786208,
8.016572168633465,
8.407586114427172,
8.758677089614691,
8.484225027110003,
8.508782663023581,
8.855149230808518,
8.909867766661197,
9.157560992043718,
9.340063530466402,
9.192683899028182,
9.4387189984302,
10.082060093689318,
10.307433889384885,
9.853889989869128,
10.167882734450483,
10.46356297761499,
10.434483046122672,
10.904512866562975,
10.991298684423537,
10.937560995618584,
11.184413513612439,
11.4947142052223,
11.664027910828649,
12.027854468483236,
11.929268024947117,
12.323580523346536,
12.735712249697217,
12.480923272359549,
12.508624407263522,
12.756088558454232,
12.965446931205275,
13.346380940282831,
13.26518103709863,
13.645408929022008,
13.732296630167676,
13.700867173646204,
14.074634734128422,
14.0166584654046,
14.585976611102788,
14.53580149124191,
14.66763502673162,
14.871968915539638,
15.383716814838182,
15.026249159035286,
15.555462566491483,
15.615869900592221,
15.293971281828837,
15.607649413009286,
15.856943186968829,
16.234562416546694,
16.00655591485063,
16.317643278044024,
16.21385736940332,
16.315720973055424,
16.168664921271322,
16.391792838821896,
16.744486075693356,
16.08988491342065,
16.367806346128663,
16.656302533962954,
16.402864564829876,
16.40148216977564,
16.309791570300522,
16.192847606535018,
16.138972091355164,
16.26595488493571,
16.052782389074835,
16.15318356197244,
15.899188942098167,
15.627590410662702,
15.813024742733877,
15.62014707325854,
15.504033141053595,
15.509022162974123,
15.159594694867852,
15.24753849981161,
14.938879169935552,
14.922061503921077,
14.897251446561517,
14.75038455654482,
14.319415835741527,
13.977895640234369,
14.25951373294831,
13.910416722204667,
13.495324368086884,
13.315511427984209,
13.209108275453566,
12.998021430785812,
12.840879906698634,
12.572726820414037,
12.663697078955082,
12.62211649326545,
12.24054233714328,
11.74463465561313,
11.856806444991932,
11.447483105006294,
10.807896048491045,
11.259385017232274,
10.97519453865023,
10.423678159362586,
10.696690439015494,
10.415675880799714,
10.118363170409337,
9.70193823038893,
9.710594140217072,
9.378413773023523,
9.323611017158123,
9.323399246067734,
8.899903296035326,
8.59237494115713,
8.49147750296854,
8.63765448193255,
8.361310225504882,
8.219681630723352,
7.804342771297438,
7.5133056225473105,
7.540789735815707,
7.567361019562632,
6.9989862039494595,
6.864624563528695,
6.716688562475295,
6.419869583820905,
6.312989119703392,
6.118607625590668,
5.966147570490692,
5.795549033600284,
5.649410859784361,
5.672569575831347,
5.318588146765684,
5.207583723649856,
4.9415463906110935,
4.661986516467027,
4.8459504615678135,
4.991318755702628,
4.804169533403984,
4.481613443643415,
4.5311663574007985,
4.095379622430777,
3.983808437038917,
4.052961250179712,
3.622903953384483,
3.403503409694699,
3.405218797845082,
3.449845375708257,
3.302705921952876,
3.1095603190978953,
3.0592165362124084,
2.890621549096419,
2.886511729041452,
2.6475261037727944,
2.507518409479103,
2.5681638822823545,
2.623204826085835,
2.230592243120556,
2.5947649227299547,
2.065161224687839,
2.2668115236051745,
2.083250791855044,
1.8220136440972399,
1.78633874391315,
1.8418117099632867,
1.8747422129023499,
1.56898376419711,
1.8114741264850749,
1.6850030337175428,
1.6469801566439943,
1.413412117217328,
1.1517225947976613,
1.2048537911887356,
1.1749698883099515,
1.4792965649928864,
1.274473161411588,
1.0552724866487355,
1.095383374657857,
0.6218753745272292,
1.126529321091678,
0.9379957065304115,
1.066942242548534,
1.0527666207138757,
1.0566082323367465,
0.7744623450664437,
0.9764330734009883,
0.7507793776882276,
0.8104532693277038,
0.599173363360422,
0.4935566964655351,
0.5520988027165603,
0.7587992829254306,
0.32356305600709034,
0.6168872094325119,
0.5596248974908146,
0.32030496947350917,
0.5856379095264607,
0.4431205633921064,
0.48805695295599894,
0.6618772722452989,
0.4615747450353673,
0.08659599126732487,
0.270833772459754,
0.30808689316712534,
0.10569851309417974,
0.36314261284125016,
0.29892245669533124,
0.2955184450733182,
0.4928502639589154,
0.39366727621181924,
0.1927381393182026,
0.1272374839994576,
0.16520082947405715,
0.42536802119058775,
0.34863764862314983,
0.43443976876542717,
0.15213973458388788,
0.3106978351316271,
0.18203205354082658,
0.3150031306906286,
0.2176395893876707,
0.06147665211713431,
-0.15288661743694343,
-0.14834456578907668,
0.20078926249959456,
-0.03323407054499297,
0.2507267857200565,
-0.02435845093768929,
0.35675647061372284,
0.018441532474515444,
-0.044601156517043876,
0.032982744563187644,
-0.12736383908879145,
-0.09709590370360706,
0.016187720445118414
],
"expected": {
"Rf": 72.47485948140613,
"Rg": 119.38111304502854,
"CCT_K": 2167.402520413509,
"Duv": -0.05154116223532573,
"bins": [
{
"bin": 1,
"ref_a": 26.097046584192945,
"ref_b": 5.262013185119905,
"test_a": 25.674522880009597,
"test_b": 5.348032086407478,
"ref_a_norm": 0.980271716412549,
"ref_b_norm": 0.1976546533770335,
"test_a_norm": 0.9644006470412096,
"test_b_norm": 0.2008857429847045,
"Rcs_pct": -1.4935756911644607,
"Rhs": 0.006265297161262439,
"Rf_h": 88.7602554642485
},
{
"bin": 2,
"ref_a": 19.99148867160726,
"ref_b": 13.336293698479441,
"test_a": 17.397619030780568,
"test_b": 15.990499208814683,
"ref_a_norm": 0.8318844255981913,
"ref_b_norm": 0.554948918772861,
"test_a_norm": 0.7239485038826516,
"test_b_norm": 0.6653955324620491,
"Rcs_pct": -2.838458807880947,
"Rhs": 0.15179898824296614,
"Rf_h": 72.4946806437725
},
{
"bin": 3,
"ref_a": 15.798580936678434,
"ref_b": 23.360366678902114,
"test_a": 10.094369537063837,
"test_b": 29.972636942185535,
"ref_a_norm": 0.5602115672358245,
"ref_b_norm": 0.8283495638528345,
"test_a_norm": 0.3579424380760255,
"test_b_norm": 1.0628181089726627,
"Rcs_pct": 8.25787630879437,
"Rhs": 0.2984443786512616,
"Rf_h": 41.13579866563478
},
{
"bin": 4,
"ref_a": 3.146531186212088,
"ref_b": 19.060882498275234,
"test_a": -1.4719302203254956,
"test_b": 25.176957603310537,
"ref_a_norm": 0.16287364212010538,
"ref_b_norm": 0.9866469361947727,
"test_a_norm": -0.07619140626401004,
"test_b_norm": 1.3032328426692625,
"Rcs_pct": 26.38635197812351,
"Rhs": 0.2962343269539026,
"Rf_h": 48.38496153172893
},
{
"bin": 5,
"ref_a": -2.4505940362775136,
"ref_b": 14.920642761237048,
"test_a": -5.032891818984542,
"test_b": 19.389092154577252,
"ref_a_norm": -0.16207044417960473,
"ref_b_norm": 0.9867791906619361,
"test_a_norm": -0.33285113753470047,
"test_b_norm": 1.2823008344968356,
"Rcs_pct": 32.316093877461874,
"Rhs": 0.10984577756124964,
"Rf_h": 64.78775000507581
},
{
"bin": 6,
"ref_a": -10.94519856623889,
"ref_b": 14.279160991485774,
"test_a": -12.55374381808494,
"test_b": 19.658019467607552,
"ref_a_norm": -0.6083559908275689,
"ref_b_norm": 0.7936642794180716,
"test_a_norm": -0.697762147742459,
"test_b_norm": 1.0926319736046177,
"Rcs_pct": 29.8253952206866,
"Rhs": -0.0917590488970683,
"Rf_h": 62.05387683775908
},
{
"bin": 7,
"ref_a": -18.887590486968204,
"ref_b": 12.108529390866801,
"test_a": -20.389666308636563,
"test_b": 18.077980227598992,
"ref_a_norm": -0.8418568709253954,
"ref_b_norm": 0.5397008512830993,
"test_a_norm": -0.9088073298521124,
"test_b_norm": 0.8057709572620338,
"Rcs_pct": 20.348790290554188,
"Rhs": -0.18403352579691631,
"Rf_h": 58.227653655102216
},
{
"bin": 8,
"ref_a": -17.676278457063137,
"ref_b": 3.730409964368773,
"test_a": -16.64014799399707,
"test_b": 7.621544830274941,
"ref_a_norm": -0.9784482527772738,
"ref_b_norm": 0.206492170885726,
"test_a_norm": -0.9210945488458218,
"test_b_norm": 0.4218810673728879,
"Rcs_pct": -1.4231379418194028,
"Rhs": -0.22243941180570811,
"Rf_h": 71.7236050179908
},
{
"bin": 9,
"ref_a": -25.240362310520993,
"ref_b": -5.326442302591451,
"test_a": -25.677236330984186,
"test_b": -2.7109869751104525,
"ref_a_norm": -0.9784505664277444,
"ref_b_norm": -0.20648120751590468,
"test_a_norm": -0.995386124939977,
"test_b_norm": -0.10509226090900387,
"Rcs_pct": -0.3169855738211002,
"Rhs": -0.1027447499913118,
"Rf_h": 79.25917733394792
},
{
"bin": 10,
"ref_a": -18.887451181785476,
"ref_b": -13.477983766183426,
"test_a": -18.861781284167236,
"test_b": -12.611047646203557,
"ref_a_norm": -0.8139994526414126,
"ref_b_norm": -0.5808656394550126,
"test_a_norm": -0.8128931475921236,
"test_b_norm": -0.5435029736116072,
"Rcs_pct": -2.1677443999274915,
"Rhs": -0.030451291129381598,
"Rf_h": 88.59637321299031
},
{
"bin": 11,
"ref_a": -11.534689676218749,
"ref_b": -16.962905432667434,
"test_a": -10.150424849229037,
"test_b": -17.406770116402935,
"ref_a_norm": -0.562307153987059,
"ref_b_norm": -0.8269284519080075,
"test_a_norm": -0.49482531987809497,
"test_b_norm": -0.848566510154278,
"Rcs_pct": -1.949951039950089,
"Rhs": 0.06813055550601721,
"Rf_h": 79.12974784664695
},
{
"bin": 12,
"ref_a": -5.570355310815754,
"ref_b": -20.200226341048523,
"test_a": -3.3165685115860275,
"test_b": -20.816716018942753,
"ref_a_norm": -0.2658349376970278,
"ref_b_norm": -0.9640185609725662,
"test_a_norm": -0.1582771177869946,
"test_b_norm": -0.9934393942891887,
"Rcs_pct": 0.7872030532539134,
"Rhs": 0.11123084640574482,
"Rf_h": 73.94053796085824
},
{
"bin": 13,
"ref_a": 2.6749094231080672,
"ref_b": -13.091038289684615,
"test_a": 4.233345387994121,
"test_b": -14.519171361961103,
"ref_a_norm": 0.20019487833533833,
"ref_b_norm": -0.9797560975509666,
"test_a_norm": 0.31683093923838995,
"test_b_norm": -1.0866400631092703,
"Rcs_pct": 12.758478681097912,
"Rhs": 0.09354290443879752,
"Rf_h": 81.88317342598697
},
{
"bin": 14,
"ref_a": 12.159807539783609,
"ref_b": -16.70440659445249,
"test_a": 14.524173271445989,
"test_b": -18.724553882770692,
"ref_a_norm": 0.5885245453747189,
"ref_b_norm": -0.808479350071157,
"test_a_norm": 0.7029578752422843,
"test_b_norm": -0.9062527943101107,
"Rcs_pct": 14.487139951457966,
"Rhs": 0.040827821220509354,
"Rf_h": 78.93369770369928
},
{
"bin": 15,
"ref_a": 17.439839937726205,
"ref_b": -10.687211010005196,
"test_a": 19.04510799466717,
"test_b": -13.100788393503155,
"ref_a_norm": 0.8526387845138872,
"ref_b_norm": -0.5225008164038415,
"test_a_norm": 0.9311208009645248,
"test_b_norm": -0.6405013080335954,
"Rcs_pct": 13.081297242210354,
"Rhs": -0.05451155085957221,
"Rf_h": 79.56678114445705
},
{
"bin": 16,
"ref_a": 18.265731510644432,
"ref_b": -3.300552476297597,
"test_a": 18.524190891086302,
"test_b": -3.4047325447185064,
"ref_a_norm": 0.9840636118556848,
"ref_b_norm": -0.1778167816083292,
"test_a_norm": 0.99798807315018,
"test_b_norm": -0.18342946754723663,
"Rcs_pct": 1.4751887382382232,
"Rhs": -0.002788312114562408,
"Rf_h": 91.86380075337156
}
]
}
}