From 8fc94f1125d70a14e8695313b0f2002f907b7d15 Mon Sep 17 00:00:00 2001 From: hposborn Date: Wed, 21 Aug 2024 14:14:45 +0200 Subject: [PATCH] Catching nan Teff errors and forcing them to be large fractions of the value --- MonoTools/fit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MonoTools/fit.py b/MonoTools/fit.py index 3de85ca..a6fb63c 100755 --- a/MonoTools/fit.py +++ b/MonoTools/fit.py @@ -922,16 +922,16 @@ def init_starpars(self,Rstar=None,Teff=None,logg=None,FeH=0.0,rhostar=None,Mstar if Mstar is None: self.Mstar=rhostar[0]*self.Rstar[0]**3 - if self.rhostar[0] is not None and (self.rhostar[1] is None or self.rhostar[0]==np.nan): + if self.rhostar[0] is not None and (self.rhostar[1] is None or self.rhostar[1]==np.nan): self.rhostar[1]=0.5*self.rhostar[0] self.rhostar[2]=0.5*self.rhostar[0] - if self.logg[0] is not None and (self.logg[1] is None or self.logg[0]==np.nan): + if self.logg[0] is not None and (self.logg[1] is None or self.logg[1]==np.nan): self.logg[1]=0.25 self.logg[2]=0.25 - if self.Rstar[0] is not None and (self.Rstar[1] is None or self.Rstar[0]==np.nan): + if self.Rstar[0] is not None and (self.Rstar[1] is None or self.Rstar[1]==np.nan): self.Rstar[1]=0.15*self.Rstar[0] self.Rstar[2]=0.15*self.Rstar[0] - if self.Teff[0] is not None and (self.Teff[1] is None or self.Teff[0]==np.nan): + if self.Teff[0] is not None and (self.Teff[1] is None or self.Teff[1]==np.nan): self.Teff[1]=300 self.Teff[2]=300