torchcell.metabolism.media.media_to_bounds

media_to_bounds(media: Media, model: cobra.Model, policy: UptakePolicy | None = None, index: ExchangeIndex | None = None) → MediaBounds[source]

Map an ontology Media onto exchange bounds for model.

Pure: reads the model’s structure and annotations, mutates nothing. When two components land on the same exchange (a shared ion), the LARGER uptake wins, because the medium contains both sources and availability is additive rather than limiting.