Closed blakeaw closed 1 week ago
Or another approach might be to have units.SimulationUnits(...)
be applied outside of the model definition as in:
from mymodel import model
import pysb.units as units
units.SimulationUnits(model, concentration='uM', time='s')
Although, then we'd have to update parameters and expression units.
I will close this one as PR https://github.com/Borealis-BioModeling/pysb-units/pull/4 addresses this with the new SimulationUnits
object that can be included in the model definition.
Some type of class or function that allows users to set key units (at least concentration and time) for a model and then have automatic conversion of related parameters automatically.
Maybe something like:
units.ModelUnits(concentration='uM', time='s')
--> maybeunits.SimulationUnits(...)
might make more sense as a name. and then when you define parameters with units:the
Unit
would register thatR_0
has a concentration unit and automatically convert fromnM
touM
, the global concentration unit for that model.