From 27a3d661a663a70b8fbc06e003efbd9cb75918b4 Mon Sep 17 00:00:00 2001 From: markus Date: Thu, 25 Feb 2021 17:05:43 +0100 Subject: [PATCH] enforce equal qIDs --- cara/montecarlo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index 72c8c508..40d82de9 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -1043,6 +1043,9 @@ def plot_concentration_curve(model: MCExposureModel): def compare_concentration_curves(exp_models: typing.List[MCExposureModel], labels: typing.List[str], colors: typing.Optional[typing.List[str]] = None, show_qd: bool = True) -> None: assert len(exp_models) == len(labels), "Different numbers of exposure models and labels" + assert all(model.concentration_model.virus.qID == exp_models[0].concentration_model.virus.qID + for model in exp_models[1:]), \ + "Comparisons between viruses with different qID is not possible with this function" if colors is None: colors = ['blue', 'orange', 'green', 'red']