From f32f89a999c2a9f29261a59f33665d4695f7d897 Mon Sep 17 00:00:00 2001 From: Morgan Fouesneau Date: Mon, 9 Dec 2024 17:23:32 +0100 Subject: [PATCH] minor len(star) replace by len(logT) for robustness to data types. Change suggested by Joanne Bogart Allows to use more flexible types for `star` --- pystellibs/stellib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pystellibs/stellib.py b/pystellibs/stellib.py index 2eb9074..44a424f 100644 --- a/pystellibs/stellib.py +++ b/pystellibs/stellib.py @@ -283,8 +283,8 @@ def generate_individual_spectra(self, stars, **kwargs): null_value = kwargs.pop('null', np.nan) dlogT = kwargs.pop('dlogT', self._dlogT) dlogg = kwargs.pop('dlogg', self._dlogg) - ndata = len(stars) logT, logg, logL, Z = stars['logT'], stars['logg'], stars['logL'], stars['Z'] + ndata = len(logT) # weights to apply during the interpolation (note that radii must be in cm) weights = self.get_weights(logT, logg, logL)