diff --git a/pybamm/experiments/experiment.py b/pybamm/experiments/experiment.py index 865af8f321..67144db028 100644 --- a/pybamm/experiments/experiment.py +++ b/pybamm/experiments/experiment.py @@ -4,7 +4,7 @@ import numpy as np import re -import pybamm + examples = """ @@ -417,30 +417,12 @@ def convert_electric(self, electric): ) ) - def _detect_mistyped_temperatures(self, cond): - if "oC" in cond: - raise ValueError(f"Temperature not written correctly on step: '{cond}'") - def _read_and_drop_temperature(self, cond): matches = re.findall(r"at\s-*\d+\.*\d*\s*oC", cond) if len(matches) == 0: - self._detect_mistyped_temperatures(cond) - - if self.temperature is None: - pybamm.logger.warning( - "Temperature not found on step: " - f"'{cond}', using temperature " - "from parameter values." - ) - - else: - pybamm.logger.warning( - f"Temperature not found on step: '{cond}', " - f"using global temperature " - f"({self.temperature}oC) instead" - ) - + if "oC" in cond: + raise ValueError(f"Temperature not written correctly on step: '{cond}'") temperature = self.temperature reduced_cond = cond