Environment Application
Environment blocks bind execution conditions to enclosed steps.
with env(thermal = 37C, duration = 10min) {
hold(sample = reactor);
}Environment blocks describe operational conditions. They do not predict biological or chemical outcomes.
The public environment example is:
examples/minimal/public_env_readout.culsScalar Thermal Environment
Scalar thermal authoring uses a temperature and a duration.
with env(thermal = 37C, duration = 10min) {
hold(sample = reactor);
}For scalar thermal = ..., duration is required.
Pure Hold
Use hold(sample = ...) when the intended action is to keep a sample under the environment condition.
with env(thermal = 37C, duration = 10min) {
hold(sample = reactor);
}Rules:
hold(sample = ...)is only valid insidewith env.- A pure hold block must write
hold(...)explicitly. - An empty
with env(...) {}block is not valid. - In a pure hold block,
hold(...)is the only body statement.
Thermal Programs
For programmatic thermal control, use thermal_program(...).
let ramp = thermal_program(from = 60C, to = 95C, duration = 350s);
with env(thermal = ramp) {
hold(sample = reactor);
}Supported source shapes:
thermal_program(from = 37C, duration = 120min)
thermal_program(from = 60C, to = 95C, duration = 350s)thermal_program(...) defines a single thermal segment. It does not carry cycles or staged PCR logic by itself. Multi-segment workflows compose thermal programs with explicit control flow.
When thermal is a thermal_program(...), the outer with env(...) must not also define duration.
Field Environment
Environment can also bind a field condition:
with env(field = mz_separation) {
...
}Field environments do not use the scalar thermal duration rule.
Thermal Modifiers
co2 and rh are thermal-environment modifiers.
They require thermal and are not valid when thermal is a thermal_program(...).
Body Semantics
The body of with env(...) { ... } executes once in lexical order. If work must repeat, use an explicit repeat.
An environment block scopes execution conditions. It does not mean "simulate what happens biologically during this time."
