feat(datagen): add reserve grid positions and batch codes to lab config

- introduce reserve grid positions for QA witness pattern
- add batch codes to run entries in lab configuration
- update schedule with run start time and track interval
- enhance validation checks for run-batch mapping
This commit is contained in:
administrator
2026-07-11 14:15:59 -04:00
parent b173ac82a9
commit e3359383c0
9 changed files with 770 additions and 8 deletions

View File

@@ -136,6 +136,9 @@ LAB_CONFIG: dict = {
"tracks_per_friction_coupon": 3,
"counterfaces_per_holder": 3,
"fresh_counterface_per_track": True,
# QA witness pattern: rows 1/4/7 x cols 1/4/7 of the 7x7 grid stay
# unworn (reserve), sampling low/mid/high Au columns on every wafer.
"reserve_grid_positions": [1, 4, 7, 22, 25, 28, 43, 46, 49],
},
"volumes": {
"coupons_total": 588,
@@ -155,15 +158,17 @@ LAB_CONFIG: dict = {
"simtra_rows_per_batch": 1000,
},
"runs": [
{"run_code": "R1", "environment": "lab_air", "date": "2026-04-06", "operator": "A. Reyes"},
{"run_code": "R2", "environment": "lab_air", "date": "2026-04-13", "operator": "K. Patel"},
{"run_code": "R3", "environment": "dry_n2", "date": "2026-04-20", "operator": "A. Reyes"},
{"run_code": "R4", "environment": "dry_n2", "date": "2026-04-27", "operator": "M. Novak"},
{"run_code": "R1", "batch_code": "B721", "environment": "lab_air", "date": "2026-04-06", "operator": "A. Reyes"},
{"run_code": "R2", "batch_code": "B722", "environment": "lab_air", "date": "2026-04-13", "operator": "K. Patel"},
{"run_code": "R3", "batch_code": "B723", "environment": "dry_n2", "date": "2026-04-20", "operator": "A. Reyes"},
{"run_code": "R4", "batch_code": "B724", "environment": "dry_n2", "date": "2026-04-27", "operator": "M. Novak"},
],
"schedule": {
"deposition_start_date": "2026-03-02",
"batch_interval_days": 7,
"characterization_lag_days": 3,
"run_start_time": "09:00:00",
"track_interval_s": 2100,
},
"test_conditions": {
"normal_load_mN": 100,
@@ -228,6 +233,9 @@ LAB_CONFIG: dict = {
"k_floor_mm3_per_N_m": 1.0e-09,
"noise_sigma_log": 0.15,
},
"friction_loop": {
"force_noise_sd_mN": 0.3,
},
"nanoindentation": {
"max_load_mN": 10,
"indent_grid": [5, 5],
@@ -268,10 +276,16 @@ def validate_config(cfg: dict) -> None:
("profilometry_points_per_coupon", v["profilometry_points_per_coupon"], v["profilometry_grid"][0] * v["profilometry_grid"][1]),
("runs_count", f["runs"], len(cfg["runs"])),
("batches_count", h["batches"], len(cfg["deposition_matrix"])),
("reserve_total", f["reserve_coupons_total"], len(f["reserve_grid_positions"]) * h["wafers_per_batch"] * h["batches"]),
("friction_per_batch", f["coupons_per_run"], (h["coupons_per_wafer"] - len(f["reserve_grid_positions"])) * h["wafers_per_batch"]),
]
for name, declared, derived in checks:
if declared != derived:
raise ValueError(f"volume identity failed: {name}: declared {declared} != derived {derived}")
run_batches = [r["batch_code"] for r in cfg["runs"]]
matrix_batches = [b["batch_code"] for b in cfg["deposition_matrix"]]
if sorted(run_batches) != sorted(matrix_batches):
raise ValueError(f"run-batch mapping mismatch: runs cover {run_batches}, matrix has {matrix_batches}")
logger.info("all %d volume identities hold", len(checks))