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.
This commit is contained in:
grabowski committed 2026-10-22 17:26:14 +07:00
commit 2a3f28001c
241 files changed
+46390

No files matched your search

@@ -0,0 +1,725 @@
{
"name": "irregular_grid_FL11",
"source": "FL11 linearly resampled on 242 random wavelengths 371-802 nm",
"generator": "crates/tm30/tools/golden.py (tm30.py + colour-science 0.4.7, numpy 2.5.1)",
"wavelengths": [
371.3,
372.9504299008177,
373.2058235432587,
376.75918502565406,
378.08281655531016,
387.61860585499056,
389.5711781607729,
395.47811691210933,
399.09085032146936,
399.1668677102434,
399.858430991484,
401.49187544695565,
401.52574932915405,
401.7045117444466,
403.4241530886501,
403.8147549201823,
404.3734124078725,
404.88909196827336,
410.54958639281483,
419.36206720877726,
420.23750508615274,
420.3210426758975,
421.0164959126884,
422.778614736642,
424.9212547517555,
426.2680756552127,
426.38295810165465,
429.94636403328406,
430.03475333875576,
430.8631685140244,
430.9115063531931,
431.9166496648927,
432.4791267262809,
433.4153914201698,
437.586303689894,
442.7937017540068,
444.0429543828449,
451.0364619832037,
451.1395600295637,
453.1969317344829,
460.9467581170085,
461.97404988161156,
462.95533170350683,
465.7493690695069,
467.1377478130718,
468.90120580590457,
470.93919824425257,
470.94404633098907,
472.2268729101304,
475.1391683899389,
476.12263269325035,
477.7457231166851,
478.4378788441262,
478.53469875542794,
481.95625626997133,
486.0678745122259,
486.63971420626626,
487.2482652499527,
488.5136577705397,
488.7008857005593,
492.0340407869246,
494.07213771525073,
495.2191529590522,
497.9257865018447,
501.1509145435751,
504.718621213073,
509.7101054993036,
513.1611274899385,
519.1829606026839,
521.9127837910586,
528.3150354523273,
531.6682901606104,
532.6770852106112,
534.3693550583184,
537.3762224213162,
538.1696284149767,
538.3901544351032,
543.1375670317677,
545.115536206241,
547.5756627961905,
548.2616040955212,
549.6971139960992,
550.598005265101,
551.1449133162538,
551.6664833845444,
552.183738160428,
554.6578312185911,
559.0982398775617,
559.8502542014201,
560.0608359770372,
560.3531855222863,
562.1816475148237,
563.91607892094,
565.6933193147017,
566.2620243107182,
567.6104431045709,
567.6311260078608,
567.8055803299711,
568.9456104573702,
574.1010000098895,
576.6003890813972,
578.6516385722188,
578.9761080483956,
585.5329387560205,
586.6224846469131,
586.931800663485,
590.4269551928875,
590.9081661291888,
591.4028868026352,
594.4582570794829,
596.5777731800044,
598.8814451830968,
599.8385460080918,
600.0541244655792,
600.8346429710026,
602.4148583700207,
605.1319142898639,
608.0921472841856,
608.6091835565767,
608.9062173522493,
608.9832168550242,
609.1565276454867,
610.1796300191984,
610.5790923893072,
612.3710186745159,
616.0902367578576,
617.7237032623264,
619.8182038390822,
620.2245123140096,
621.596462764196,
622.1205761759152,
622.3217210902766,
622.730762136432,
624.5335888609615,
625.1853218721221,
625.8954032232227,
626.105152380921,
626.9366480160973,
638.2780430730476,
639.4340773926688,
641.5898515990751,
641.6894813817698,
642.412510846948,
644.6182290239494,
648.3460108360891,
650.3081462648961,
650.4306827647507,
650.713663002283,
653.8600333346312,
654.1367128563472,
655.8387805758991,
658.332341123019,
659.0059304932754,
660.8337397037441,
665.4052557028617,
669.5535397074433,
670.5541359128842,
670.8413630910087,
671.0642482763017,
671.7210592750607,
673.6497151523331,
678.0357195369772,
680.1030273709496,
681.4013398193317,
684.3013406866214,
684.8326782180138,
685.6442823315845,
685.7572811758837,
686.115205232604,
687.6871908441477,
691.4025574279735,
692.9791096034353,
696.5272125819374,
696.623065990856,
703.4894151159467,
703.6240376483363,
703.8201967916989,
703.8432734369869,
704.3182795082396,
705.7714316944893,
705.9031568603323,
707.5388217281156,
707.9405842490481,
711.8373683117082,
712.6366132542089,
713.64564053455,
713.8631349375546,
713.8691161544749,
716.4040867773415,
716.693013996249,
718.1493016249794,
718.188631425209,
722.6130551321405,
724.2152821551273,
724.3578676015433,
725.0465925064889,
726.679809773023,
727.5278878819435,
732.7616384812284,
733.8331133723198,
736.5330075868198,
738.4231267075122,
739.2978467827945,
739.5074612577816,
740.2300597007898,
743.0840691544008,
743.1956423514264,
743.2581599055206,
743.6390733564888,
745.7791691009413,
751.0440152203769,
751.1692297136415,
751.3696813153622,
751.4268564953088,
751.8706076894669,
752.1972891782683,
754.7053913004863,
755.661532988286,
757.3566731576427,
761.0436020771874,
762.082330568681,
762.8071654666967,
762.9669489976877,
763.5258560958436,
765.4819285198992,
768.892406435308,
770.9929547735538,
771.1026904097172,
774.8270294170727,
776.8395609352353,
777.0787054004427,
777.1045461788945,
779.3722728354419,
782.4526339827135,
784.9835687548078,
785.7303946301881,
788.7439594726859,
793.8272347634781,
794.117869948665,
794.3997398048172,
796.8069085217464,
801.7
],
"values": [
0.91,
0.91,
0.91,
0.91,
0.91,
0.5409674009303209,
0.4745799425337218,
0.4579735118281164,
1.1227164591503624,
1.1367036586847898,
1.263951302433056,
4.688492268164962,
4.765656971812932,
5.1728777538494,
9.090220735944898,
9.980011708175237,
11.252633465133506,
12.427351503726719,
1.6119834557125934,
2.374517005976153,
2.5013258849905764,
2.515861425606165,
2.636870288807784,
2.9434789641757075,
3.3162983268054567,
3.6241935520093524,
3.650846279583879,
4.477556455721901,
4.694697165271446,
9.5740625476036,
9.8587724203073,
15.779066526218013,
19.09205641779464,
24.60665546480002,
22.658543304682333,
9.235724982848952,
7.941499259372658,
7.175489532235148,
7.1740461595861085,
7.145242955717239,
6.608282542192994,
6.487062113969835,
6.371270858986194,
6.029584544686077,
5.8435417930483755,
5.607238422008788,
5.334147435270157,
5.333497791647465,
5.1615990300425265,
4.814215299849369,
4.985338088625562,
5.267755822303207,
5.388190918877959,
5.405037583444462,
9.036498321970523,
14.43309518463827,
14.509721703639679,
14.59126754349366,
14.760830141252317,
14.785918683874947,
12.523219137264322,
10.081579017129624,
8.783719984805611,
6.483081473432007,
4.1698628481711095,
2.4644990601511094,
1.5198618541197795,
1.2360765657445505,
0.9243156546872754,
0.8670465945072969,
1.0620524816629084,
2.4212078794941037,
3.1717513966946984,
4.4308001633889145,
21.38623115909209,
26.89088194310854,
28.42089147074619,
60.45482076125541,
71.91039568458477,
52.11621714185124,
46.59713344743648,
35.04702078738557,
29.609209579722926,
26.864824979038474,
24.247586376355954,
21.65200191097233,
9.237002945109722,
3.675850994847129,
2.970461559067986,
2.8194145399955297,
2.768545719122192,
2.4503933324206795,
2.148602267756443,
1.9197874797472991,
1.8868025899783458,
1.8085942999348883,
1.807394691544076,
1.797276340861675,
1.7311545934725279,
3.9337520054590054,
6.622533041514197,
9.432744843939698,
9.877268026302033,
14.543626865055684,
14.101271233353279,
13.975688930625099,
12.47468079465329,
12.186916654745115,
11.891073692024163,
10.063962266469222,
8.979513327237859,
7.869143421747321,
7.407820824099733,
7.355871494546861,
7.728959340139247,
8.484302300869913,
10.921739180659742,
37.88946175893043,
42.59966220041357,
45.30564007899125,
46.00710554927082,
47.58596685038363,
54.8140990112745,
53.800263515938276,
49.2523546040787,
36.16940786379725,
26.564624817521043,
14.248961426196487,
13.179101950743961,
13.173614148943216,
13.17151769529634,
13.170713115638893,
13.169076951454272,
13.161865644556155,
13.126642063018016,
12.998827419819909,
12.961072571434215,
12.811403357102495,
3.1169498115870775,
2.4140809452573886,
2.155851986350057,
2.161231994615571,
2.200275585735189,
2.319384367293269,
3.1698106873501057,
3.544871325801845,
3.5309021648184187,
3.4986424177397315,
3.13995619985204,
3.1084147343764155,
2.9210892589546913,
2.6567718409599883,
2.5853713677128076,
2.423305700145403,
2.0913693156565936,
1.593575235106805,
1.5167262916588615,
1.5046627501776346,
1.49530157239533,
1.4677155104474495,
1.3867119636020098,
1.4089287079614081,
1.4698906276111592,
1.5945286226558455,
1.8729287059156559,
1.9239371089293271,
1.9477313879790135,
1.9490873741106043,
1.9533824627912482,
1.9722462901297726,
1.7755908115242347,
1.5233424634503536,
1.2458163774581226,
1.2486919797256815,
3.2691783137706922,
3.3432207065849635,
3.45110823543439,
3.4638003903428056,
3.725053729531771,
4.328343781568818,
4.367334430658353,
4.851491231522228,
4.970412937718246,
4.451855856611137,
3.9611194619157377,
3.3415767117862925,
3.208035148341472,
3.2043626811524053,
1.9652143303915015,
1.8531105694554015,
1.2880709695079755,
1.2728110070189094,
0.41321669207156897,
0.317083070692363,
0.3085279439074043,
0.269627259948089,
0.2565615218158164,
0.24977689694445235,
0.21895344607508652,
0.21466754651072095,
0.2191980455209191,
0.23053876024507325,
0.23578708069676713,
0.23704476754668985,
0.24,
0.24,
0.24,
0.24,
0.24,
0.23376664719246945,
0.20835212176301504,
0.20935383770913177,
0.2109574505228975,
0.2114148519624705,
0.21496486151573482,
0.21757831342614645,
0.2376431304038906,
0.2505845278125762,
0.2777067705222835,
0.30747677507375104,
0.29501203317582847,
0.28631401439963977,
0.28439661202774735,
0.2776897268498774,
0.2503614296020169,
0.18215187129384047,
0.15205636181156934,
0.15117847672226253,
0.12138376466341833,
0.10896263438858796,
0.10752776759734388,
0.10737272292663329,
0.09376636298734865,
0.09,
0.09,
0.09,
0.09,
0.09,
0.09,
0.09,
0.09,
0.09
],
"expected": {
"Rf": 80.08402265614828,
"Rg": 100.46420953966124,
"CCT_K": 4033.9621179352316,
"Duv": 0.0014197711913853366,
"bins": [
{
"bin": 1,
"ref_a": 21.52118049843812,
"ref_b": 5.032043903438641,
"test_a": 19.875652040941773,
"test_b": 3.861818357769575,
"ref_a_norm": 0.9737366285342227,
"ref_b_norm": 0.22767735559516064,
"test_a_norm": 0.899283866406425,
"test_b_norm": 0.17472991260767604,
"Rcs_pct": -8.335170688266608,
"Rhs": -0.03740505937861187,
"Rf_h": 81.3611044794709
},
{
"bin": 2,
"ref_a": 20.628124786139086,
"ref_b": 14.402242814341895,
"test_a": 20.49267229234165,
"test_b": 14.199917740839185,
"ref_a_norm": 0.8199305374874851,
"ref_b_norm": 0.5724630238674667,
"test_a_norm": 0.8145465465918135,
"test_b_norm": 0.564420969246208,
"Rcs_pct": -0.8944550982553693,
"Rhs": -0.003695538961570137,
"Rf_h": 92.62911964514306
},
{
"bin": 3,
"ref_a": 14.618926698489487,
"ref_b": 22.31358444454619,
"test_a": 12.155858196351945,
"test_b": 23.02357361052235,
"ref_a_norm": 0.5480179092643133,
"ref_b_norm": 0.8364665989300295,
"test_a_norm": 0.4556851629036882,
"test_b_norm": 0.8630818755753917,
"Rcs_pct": -2.9167531657267993,
"Rhs": 0.09155852826704322,
"Rf_h": 80.92138995077234
},
{
"bin": 4,
"ref_a": 3.7520881885548776,
"ref_b": 22.131437658133944,
"test_a": 0.24510190244750069,
"test_b": 23.84727162022984,
"ref_a_norm": 0.16715140749984644,
"ref_b_norm": 0.9859312384597723,
"test_a_norm": 0.010919020533674908,
"test_b_norm": 1.062369756796099,
"Rcs_pct": 4.449034695752298,
"Rhs": 0.16814284061535226,
"Rf_h": 72.65283898154053
},
{
"bin": 5,
"ref_a": -2.224562066998667,
"ref_b": 19.11874775652138,
"test_a": -4.702960328093524,
"test_b": 20.905375225029335,
"ref_a_norm": -0.11557528190418888,
"ref_b_norm": 0.9932987235533766,
"test_a_norm": -0.24433841328462752,
"test_b_norm": 1.0861214756778728,
"Rcs_pct": 11.615962973503837,
"Rhs": 0.10818016331417031,
"Rf_h": 75.59923381392525
},
{
"bin": 6,
"ref_a": -11.168404959756822,
"ref_b": 17.132569815077623,
"test_a": -12.288235621035236,
"test_b": 18.69189854515506,
"ref_a_norm": -0.5460958944508755,
"ref_b_norm": 0.8377226713321648,
"test_a_norm": -0.600851692508691,
"test_b_norm": 0.9139683859765527,
"Rcs_pct": 9.381668628125455,
"Rhs": 0.0031679327307197426,
"Rf_h": 85.82578875583691
},
{
"bin": 7,
"ref_a": -18.246606034399527,
"ref_b": 11.190364969189984,
"test_a": -17.028661479288967,
"test_b": 13.034520628921637,
"ref_a_norm": -0.8524563216307074,
"ref_b_norm": 0.5227984503724583,
"test_a_norm": -0.7955556282391617,
"test_b_norm": 0.6089548647349734,
"Rcs_pct": 0.05547417295014111,
"Rhs": -0.10324877193389595,
"Rf_h": 83.00169246242548
},
{
"bin": 8,
"ref_a": -22.82456785237659,
"ref_b": 3.507181808526478,
"test_a": -21.63991069467708,
"test_b": 5.017564587087921,
"ref_a_norm": -0.9883996020299787,
"ref_b_norm": 0.15187569491850886,
"test_a_norm": -0.9370989740932163,
"test_b_norm": 0.21728160958460493,
"Rcs_pct": -3.755483980185119,
"Rhs": -0.0741574143796294,
"Rf_h": 85.33166065112488
},
{
"bin": 9,
"ref_a": -19.360915219717157,
"ref_b": -2.198108324622839,
"test_a": -17.99612151574314,
"test_b": -1.1342347582645769,
"ref_a_norm": -0.9936167398686655,
"ref_b_norm": -0.11280857348962796,
"test_a_norm": -0.9235744998533325,
"test_b_norm": -0.058209781405624945,
"Rcs_pct": -7.93480939428685,
"Rhs": -0.03988512844446431,
"Rf_h": 87.61595711108521
},
{
"bin": 10,
"ref_a": -20.10558195316891,
"ref_b": -11.341741347552945,
"test_a": -15.52805828709372,
"test_b": -12.3529545944959,
"ref_a_norm": -0.8709760389785688,
"ref_b_norm": -0.491325492443861,
"test_a_norm": -0.6726772063312285,
"test_b_norm": -0.5351313623976135,
"Rcs_pct": -14.054221612349872,
"Rhs": 0.1465921783684203,
"Rf_h": 67.48644961844725
},
{
"bin": 11,
"ref_a": -11.99274199580292,
"ref_b": -17.393305446239598,
"test_a": -8.413008517799293,
"test_b": -18.415444269782636,
"ref_a_norm": -0.5676482368791935,
"ref_b_norm": -0.8232712063275036,
"test_a_norm": -0.3982099718020887,
"test_b_norm": -0.8716517435918786,
"Rcs_pct": -5.390790984912549,
"Rhs": 0.1677615549344586,
"Rf_h": 73.67499586333705
},
{
"bin": 12,
"ref_a": -7.9371892138337845,
"ref_b": -24.360929234164896,
"test_a": -4.6512576257552105,
"test_b": -25.72399585202873,
"ref_a_norm": -0.3097880315391565,
"ref_b_norm": -0.9508056455002224,
"test_a_norm": -0.18153831353205432,
"test_b_norm": -1.0040060560018154,
"Rcs_pct": 2.7157900746888446,
"Rhs": 0.1361643208533769,
"Rf_h": 74.63408810225636
},
{
"bin": 13,
"ref_a": 3.3315090028219907,
"ref_b": -17.984068881310172,
"test_a": 3.2473466311976047,
"test_b": -19.648941933384325,
"ref_a_norm": 0.18214877564676776,
"ref_b_norm": -0.9832709817392067,
"test_a_norm": 0.17754723534358244,
"test_b_norm": -1.0742971767114338,
"Rcs_pct": 8.837943618035625,
"Rhs": -0.02227145268558106,
"Rf_h": 82.3491833157033
},
{
"bin": 14,
"ref_a": 10.315243897932653,
"ref_b": -14.479133053472603,
"test_a": 13.140544620690243,
"test_b": -14.6899239820823,
"ref_a_norm": 0.5802323151008204,
"ref_b_norm": -0.8144510178720032,
"test_a_norm": 0.7391554385327547,
"test_b_norm": -0.8263080044560983,
"Rcs_pct": 9.815168075543665,
"Rhs": 0.12555235902642392,
"Rf_h": 80.60852157645995
},
{
"bin": 15,
"ref_a": 15.488426190478814,
"ref_b": -10.977235282075705,
"test_a": 15.050570570742625,
"test_b": -12.946757895600088,
"ref_a_norm": 0.8158687481007793,
"ref_b_norm": -0.5782371363657538,
"test_a_norm": 0.7928042538823379,
"test_b_norm": -0.6819837617033303,
"Rcs_pct": 3.846111074803298,
"Rhs": -0.09907611277455092,
"Rf_h": 82.55473847657916
},
{
"bin": 16,
"ref_a": 20.14195778368154,
"ref_b": -3.5311523424250546,
"test_a": 20.11559673947661,
"test_b": -5.638109970619553,
"ref_a_norm": 0.9849780286861712,
"ref_b_norm": -0.1726797122000848,
"test_a_norm": 0.9836889261255395,
"test_b_norm": -0.27571373666942733,
"Rcs_pct": 1.8836608195944,
"Rhs": -0.10130574601390284,
"Rf_h": 80.88596355611779
}
]
}
}