From 8b82be0132a9c21af87ea10f5f39bc66a68ba665 Mon Sep 17 00:00:00 2001 From: William O Balmer <39763022+wbalmer@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:19:13 -0400 Subject: [PATCH] small bugfix in retri setup without spectra for cases where there is dense photometry but not spectroscopy, one may still want to run a retrieval. the bugfix patches an instance where a breaking error would be thrown by setup_retrieval when inc_spec=False --- species/fit/retrieval.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/species/fit/retrieval.py b/species/fit/retrieval.py index 880ca03..b32e578 100644 --- a/species/fit/retrieval.py +++ b/species/fit/retrieval.py @@ -3583,7 +3583,8 @@ def setup_retrieval( for spec_value in self.spectrum.values(): data_spec_res.append(spec_value[3]) - + if len(data_spec_res) == 0: + data_spec_res.append(40) # for photometry only retrievals max_spec_res = max(data_spec_res) if max_spec_res > 1000.0 and self.res_mode == "c-k":