77import pdb
88import warnings
99from astropy .table import Table , vstack , Column
10+ import astropy .constants as cs
11+ import astropy .units as un
1012from scipy import interpolate
1113import pylab as py
1214from spisea .utils import objects
@@ -1697,6 +1699,9 @@ def isochrone(self, filePath='', age=1 * 10 ** 8.1, metallicity=0.0,
16971699 as follows:
16981700 White dwarf -> 101
16991701 All other stars (no neutron stars or black holes) -> -1
1702+ Just to make sure, I do have word that neutron stars
1703+ and black holes are NOT INCLUDED in the BPASS
1704+ evolution grids.
17001705 If you are REALLY curious about black holes, try using TUI
17011706 with BPASS.
17021707 """
@@ -1739,10 +1744,8 @@ def isochrone(self, filePath='', age=1 * 10 ** 8.1, metallicity=0.0,
17391744 isWR = Column ([False ] * len (iso ), name = 'isWR' )
17401745 isWR2 = Column ([False ] * len (iso ), name = 'isWR2' )
17411746 colG = Column ([0.0 ] * len (iso ), name = 'logg' )
1742- currentMass = Column ([0.0 ] * len (iso ), name = 'mass_current' )
17431747 colP = Column ([- 1 ] * len (iso ), name = 'phase' )
17441748 colP2 = Column ([- 1 ] * len (iso ), name = 'phase2' )
1745- colTWR = Column ([np .nan ]* len (iso ), name = 'logT_WR' )
17461749 iso .add_column (colG )
17471750 iso .add_column (isWR )
17481751 iso .add_column (currentMass )
@@ -1752,20 +1755,18 @@ def isochrone(self, filePath='', age=1 * 10 ** 8.1, metallicity=0.0,
17521755 # We may as well delete a for loop here
17531756
17541757 iso ['age' ]= np .log10 (iso ['age' ])
1755- iso ['logg' ] = np .log10 (( iso ['M1' ] * cs .GM_sun / ((cs .R_sun ) ** 2 ))* un .s * un .s / un .m )
1756- iso ['logg2' ] = np .log10 (( iso ['M2' ] * cs .GM_sun / ((cs .R_sun ) ** 2 ))* un .s * un .s / un .m )
1758+ iso ['logg' ] = np .log10 (( iso ['M1' ] * cs .GM_sun / ((10 ** iso ['log(R1)' ]* cs .R_sun ) ** 2 ))* un .s * un .s / un .m )
1759+ iso ['logg2' ] = np .log10 (( iso ['M2' ] * cs .GM_sun / ((10 ** iso ['log(R2)' ]* cs .R_sun ) ** 2 ))* un .s * un .s / un .m )
1760+ iso .rename_column ('M1' , 'mass_current' )
17571761 for x in iso :
17581762 x ['age' ] = np .log10 (x ['age' ])
1759- x ['mass_current' ] = x ['M1' ]
17601763
17611764 # Using Stanway and Elridge Criterion for calculating whether
17621765 # a star is a WR star or not for using the PotsDam Atmospheres
17631766
17641767 x ['isWR' ] = x ['X' ] < 0.40 and x ['log(T1)' ] > 4.45
17651768 x ['isWR' ]= x ['isWR' ] and x ['secondary' ]
17661769 x ['isWR2' ]= x ['isWR' ]
1767- if x ['isWR' ]:
1768- x ['logT_WR' ]= x ['log(T1)' ]
17691770
17701771 # Calculated logg=log10(Mass*G/(Radius of the star)^2)
17711772 # I made one solar radius equal to 695508 * 10 ** 3 meters
0 commit comments