torchcell.datamodels.identity.environment_identity

environment_identity(environment: Environment) → dict[str, Any][source]

Project an environment onto medium, temperature, edits, oxygen, duration and rate.

dilution_rate_per_hour is projected because it is a CONTROLLED variable, not a protocol detail: in a chemostat it sets the specific growth rate and the residual concentration of the growth-limiting substrate, so two cultures differing only in it are two environments and must be two environment nodes. Measured on Ishii 2007, which is the reason the field exists: its recovered wild-type series holds four records differing ONLY here, and without this line all four collapse onto one environment node (#753).

provenance_gaps is dropped, but what a gap MEANS is kept: the gapped field is None, and a None temperature projects as None, so a record that never carried a temperature does not merge with one measured at 30 C. A CultureEnvironment’s protocol fields (ENVIRONMENT_OPTIONAL_IDENTITY_FIELDS) are added only when set, and so is growth_phase, which the base class carries (lane X): a culture HELD in stationary phase is a different condition from the same medium in exponential growth, and before this a store could serve both as one environment node.