Skip to content

Commit bca8880

Browse files
committed
add global_formula, heating_furnace_name, and precursor_powders to the schema
1 parent c857d37 commit bca8880

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

mpcontribs-lux/mpcontribs/lux/projects/alab/schemas/experiments.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,24 @@ class Experiment(BaseModel, extra="forbid"):
4444
default=None, description="Experiment subgroup (e.g., NSC_249, Na_123)"
4545
)
4646

47-
target_formula: str = Field(description="Target chemical formula")
47+
target_formula: str | None = Field(
48+
default=None,
49+
description=(
50+
"The formula used internally to determine precursor weights. "
51+
"May differ from the true intended formula (global_formula) due to experimental "
52+
"constraints (e.g. oxygen mass balancing corrections, excess "
53+
"alkali for battery materials). Not always a chemically meaningful "
54+
"representation of what was attempted."
55+
),
56+
)
57+
58+
global_formula: str | None = Field(
59+
default=None,
60+
description=(
61+
"The canonical formula for the target material, independent of per-run precursor adjustments. "
62+
"Represents what the experiment was ultimately trying to synthesize."
63+
),
64+
)
4865

4966
last_updated: datetime = Field(description="Last modification timestamp")
5067

@@ -56,6 +73,11 @@ class Experiment(BaseModel, extra="forbid"):
5673
default=None, description="Optional notes about the experiment"
5774
)
5875

76+
precursor_powders: list[str] | None = Field(
77+
default=None,
78+
description="List of precursor powder names used in the experiment"
79+
)
80+
5981
# === Heating fields (prefix: heating_) ===
6082
heating_method: Literal["standard", "atmosphere", "manual", "none"] | None = Field(
6183
default=None, description="Heating method used"
@@ -85,6 +107,10 @@ class Experiment(BaseModel, extra="forbid"):
85107
default=None, description="Whether low temperature calcination was used"
86108
)
87109

110+
heating_furnace_name: str | None = Field(
111+
default=None, description="Heating furnace type"
112+
)
113+
88114
# === Recovery fields (prefix: recovery_) ===
89115
recovery_total_dosed_mass_mg: float | None = Field(
90116
default=None, description="Total mass of all powders dosed in mg"

0 commit comments

Comments
 (0)