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,403 @@
{
"name": "illuminant_LED_BH1",
"source": "colour.SDS_ILLUMINANTS['LED-BH1'] (380.0, 780.0, 5.0)",
"generator": "crates/tm30/tools/golden.py (tm30.py + colour-science 0.4.7, numpy 2.5.1)",
"wavelengths": [
380.0,
385.0,
390.0,
395.0,
400.0,
405.0,
410.0,
415.0,
420.0,
425.0,
430.0,
435.0,
440.0,
445.0,
450.0,
455.0,
460.0,
465.0,
470.0,
475.0,
480.0,
485.0,
490.0,
495.0,
500.0,
505.0,
510.0,
515.0,
520.0,
525.0,
530.0,
535.0,
540.0,
545.0,
550.0,
555.0,
560.0,
565.0,
570.0,
575.0,
580.0,
585.0,
590.0,
595.0,
600.0,
605.0,
610.0,
615.0,
620.0,
625.0,
630.0,
635.0,
640.0,
645.0,
650.0,
655.0,
660.0,
665.0,
670.0,
675.0,
680.0,
685.0,
690.0,
695.0,
700.0,
705.0,
710.0,
715.0,
720.0,
725.0,
730.0,
735.0,
740.0,
745.0,
750.0,
755.0,
760.0,
765.0,
770.0,
775.0,
780.0
],
"values": [
0.0,
0.01,
0.02,
0.04,
0.08,
0.17,
0.41,
0.93,
1.84,
3.05,
4.29,
5.69,
7.06,
7.91,
7.74,
6.62,
5.13,
3.85,
2.94,
2.34,
1.99,
1.92,
2.19,
2.87,
4.03,
5.64,
7.49,
9.25,
10.82,
12.11,
13.08,
13.66,
14.01,
14.19,
14.28,
14.27,
14.19,
14.03,
13.82,
13.59,
13.35,
13.2,
13.19,
13.46,
14.31,
16.15,
19.49,
25.07,
33.87,
40.75,
35.59,
21.59,
11.11,
7.27,
5.58,
4.64,
3.98,
3.48,
3.07,
2.73,
2.42,
2.15,
1.91,
1.7,
1.5,
1.33,
1.18,
1.05,
0.93,
0.83,
0.74,
0.65,
0.57,
0.51,
0.46,
0.41,
0.37,
0.34,
0.3,
0.28,
0.25
],
"expected": {
"Rf": 85.31784179689399,
"Rg": 106.6361658372705,
"CCT_K": 2852.284747502689,
"Duv": -0.000256706396738265,
"bins": [
{
"bin": 1,
"ref_a": 24.140776024095125,
"ref_b": 5.234806618950599,
"test_a": 23.573737359877473,
"test_b": 4.223572753317501,
"ref_a_norm": 0.97728705740769,
"ref_b_norm": 0.21191981366408003,
"test_a_norm": 0.9543317246115717,
"test_b_norm": 0.17098219973198533,
"Rcs_pct": -3.05007847977746,
"Rhs": -0.035672645892246585,
"Rf_h": 88.86415071710879
},
{
"bin": 2,
"ref_a": 20.638242835218424,
"ref_b": 15.118091397173526,
"test_a": 20.00505574827513,
"test_b": 15.257280059398003,
"ref_a_norm": 0.8067146888335136,
"ref_b_norm": 0.5909411229727098,
"test_a_norm": 0.7819644555944127,
"test_b_norm": 0.5963817769679212,
"Rcs_pct": -1.755640142781422,
"Rhs": 0.018274231316007413,
"Rf_h": 92.75084947189922
},
{
"bin": 3,
"ref_a": 14.885523157662371,
"ref_b": 22.811800609279544,
"test_a": 13.145214489794041,
"test_b": 24.12092214001679,
"ref_a_norm": 0.5464805642737008,
"ref_b_norm": 0.8374717863134838,
"test_a_norm": 0.4825899738823551,
"test_b_norm": 0.8855325407285467,
"Rcs_pct": 0.44653466489802246,
"Rhs": 0.07982420895194728,
"Rf_h": 84.12080929110567
},
{
"bin": 4,
"ref_a": 2.731708079217902,
"ref_b": 20.269495617997322,
"test_a": 0.9088716272519188,
"test_b": 22.020150801726306,
"ref_a_norm": 0.13356194456866122,
"ref_b_norm": 0.9910404668645161,
"test_a_norm": 0.04443764061854087,
"test_b_norm": 1.0766355977596862,
"Rcs_pct": 6.656315529907835,
"Rhs": 0.10411058708981291,
"Rf_h": 82.160360397079
},
{
"bin": 5,
"ref_a": -2.9163657689999822,
"ref_b": 16.643356631691354,
"test_a": -4.924413115575524,
"test_b": 18.26037922565339,
"ref_a_norm": -0.17259729496680484,
"ref_b_norm": 0.9849924739662439,
"test_a_norm": -0.29143819752720335,
"test_b_norm": 1.0806916241156281,
"Rcs_pct": 11.704502776281009,
"Rhs": 0.09788742992176025,
"Rf_h": 81.70059359527377
},
{
"bin": 6,
"ref_a": -12.789759845180335,
"ref_b": 16.66972610776782,
"test_a": -14.726376818146237,
"test_b": 18.769461128920675,
"ref_a_norm": -0.608720361660172,
"ref_b_norm": 0.7933848506874261,
"test_a_norm": -0.7008923960416674,
"test_b_norm": 0.8933203832493101,
"Rcs_pct": 13.430139713369629,
"Rhs": 0.021117038579974996,
"Rf_h": 79.87518811738217
},
{
"bin": 7,
"ref_a": -18.862907066475543,
"ref_b": 12.819040994451226,
"test_a": -19.52499031676473,
"test_b": 16.000634241309534,
"ref_a_norm": -0.8270841905930927,
"ref_b_norm": 0.562078056564183,
"test_a_norm": -0.8561146357541095,
"test_b_norm": 0.7015817643490259,
"Rcs_pct": 10.164204042412464,
"Rhs": -0.09986464264386202,
"Rf_h": 77.9981509736698
},
{
"bin": 8,
"ref_a": -21.430640966894444,
"ref_b": 5.387386789324544,
"test_a": -22.079935439156618,
"test_b": 7.75394841439785,
"ref_a_norm": -0.9698251447194983,
"ref_b_norm": 0.24380153541313926,
"test_a_norm": -0.9992084051875348,
"test_b_norm": 0.35089823747024645,
"Rcs_pct": 4.971219944849075,
"Rhs": -0.0993064792107481,
"Rf_h": 83.36910188101163
},
{
"bin": 9,
"ref_a": -22.60654944357702,
"ref_b": -4.106743824167885,
"test_a": -22.71003706741167,
"test_b": -2.164085075107313,
"ref_a_norm": -0.9838969990224046,
"ref_b_norm": -0.17873638497716846,
"test_a_norm": -0.9884010549280173,
"test_b_norm": -0.09418672302650856,
"Rcs_pct": -1.2077309041970758,
"Rhs": -0.08380376162128095,
"Rf_h": 86.77115143403682
},
{
"bin": 10,
"ref_a": -17.984393328268244,
"ref_b": -12.159891547151208,
"test_a": -17.009879500392845,
"test_b": -11.208606635497745,
"ref_a_norm": -0.8284121179111416,
"ref_b_norm": -0.5601190613592585,
"test_a_norm": -0.7835232495824543,
"test_b_norm": -0.5163001827340298,
"Rcs_pct": -6.166819455442944,
"Rhs": -0.011495146984696248,
"Rf_h": 88.68102435068458
},
{
"bin": 11,
"ref_a": -10.724850850023985,
"ref_b": -15.93075988407564,
"test_a": -8.814907794398415,
"test_b": -16.052967310804735,
"ref_a_norm": -0.5584560659842472,
"ref_b_norm": -0.8295340995796363,
"test_a_norm": -0.4590030013203034,
"test_b_norm": -0.8358975893586141,
"Rcs_pct": -4.996211393044294,
"Rhs": 0.08622756661775388,
"Rf_h": 85.58525852513188
},
{
"bin": 12,
"ref_a": -6.388784713627041,
"ref_b": -21.195500557943014,
"test_a": -5.646092305839782,
"test_b": -22.296025886440038,
"ref_a_norm": -0.2885964932653947,
"ref_b_norm": -0.9574508154860578,
"test_a_norm": -0.2550473232636165,
"test_b_norm": -1.007164143574347,
"Rcs_pct": 4.221298204982975,
"Rhs": 0.04260312129272747,
"Rf_h": 84.1834946668356
},
{
"bin": 13,
"ref_a": 3.4636514496480357,
"ref_b": -17.93773869594088,
"test_a": 2.991494328748695,
"test_b": -19.517841370129513,
"ref_a_norm": 0.18959088814623756,
"ref_b_norm": -0.9818631753619855,
"test_a_norm": 0.16374628767266136,
"test_b_norm": -1.0683537110630041,
"Rcs_pct": 7.9786612880980945,
"Rhs": -0.04222147018364505,
"Rf_h": 85.4817170756592
},
{
"bin": 14,
"ref_a": 9.660527074954043,
"ref_b": -13.845797523925203,
"test_a": 9.599959281573414,
"test_b": -15.259592383369144,
"ref_a_norm": 0.5722082220435429,
"ref_b_norm": -0.8201083773659233,
"test_a_norm": 0.5686206963221686,
"test_b_norm": -0.9038496718708681,
"Rcs_pct": 6.763521917475189,
"Rhs": -0.04950708912215173,
"Rf_h": 85.04355420014745
},
{
"bin": 15,
"ref_a": 19.093513185395555,
"ref_b": -13.197164519294256,
"test_a": 19.630401646451606,
"test_b": -15.068270923894486,
"ref_a_norm": 0.8226238834213441,
"ref_b_norm": -0.5685859182434848,
"test_a_norm": 0.8457551566715628,
"test_b_norm": -0.6492005647939229,
"Rcs_pct": 6.402004877024328,
"Rhs": -0.0541775820435353,
"Rf_h": 85.05005757762021
},
{
"bin": 16,
"ref_a": 17.064179576759663,
"ref_b": -4.0626070029893375,
"test_a": 16.68883111176417,
"test_b": -5.743840998688215,
"ref_a_norm": 0.9728099769121091,
"ref_b_norm": -0.23160472538413757,
"test_a_norm": 0.9514117766690947,
"test_b_norm": -0.32745001329749,
"Rcs_pct": -0.22885517427249466,
"Rhs": -0.098178229357401,
"Rf_h": 86.21741370851278
}
]
}
}