Skip to content

Commit

Permalink
Catching nan Teff errors and forcing them to be large fractions of th…
Browse files Browse the repository at this point in the history
…e value
  • Loading branch information
hposborn committed Aug 21, 2024
1 parent 1a76fb4 commit 8fc94f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MonoTools/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8fc94f1

Please sign in to comment.