def setUp(self): """Init of the tests.""" super().setUp() # temporary hack (tests): activate_debug_for_tests() settings.RUN_TIME = True settings.SURFACE_TEMP = 12 self.ox1 = OxTox() self.ox2 = OxTox()
def __init__(self): """Init of Model class.""" # initiate class logger self.logger = logging.getLogger( "dipplanner.model.buhlmann.model.Model") self.logger.debug("creating an instance of Model") self.units = 'metric' self.tissues = [] self.ox_tox = OxTox() self.gradient = None self.init_gradient() # store water wapour pp self.pp_h2o = tools.calculate_pp_h2o_surf(settings.SURFACE_TEMP) for _ in range(self.COMPS): self.tissues.append(Compartment()) self.set_time_constants() for comp in self.tissues: comp.set_pp(pp_he=0.0, pp_n2=settings.DEFAULT_AIR_F_INNERT_GAS * (settings.AMBIANT_PRESSURE_SURFACE - self.pp_h2o)) self.metadata = "(none)"