Azeret / galIMF

Based on : Yan, Jerabkova and Kroupa (2017, A&A) and Yan, Jerabkova, Kroupa and Vazdekis (2019, A&A): a Python3 module for computing the galaxy-wide initiall stellar mass function by integrating over a whole galaxy, parametrised by star formation rate and metallicity.
GNU General Public License v3.0
17 stars 8 forks source link

Minor issues: miss matches #4

Open jmao2014 opened 4 years ago

jmao2014 commented 4 years ago

Hi,

I found some miss matches of the text description and output arrays in galevo.py:

-5138 plt.plot(time_axis, total_gas_mass_list, lw=1.5, label='gas', ls='dotted', c='k') -5139 # plt.plot(time_axis, ejected_gas_mass_list, lw=2, label='ejected gas') -5140 plt.plot(time_axis, stellar_mass_list, lw=1.5, label='living stars', c='k') -5141 print('plot stellar_mass final', stellar_mass_list[-1]) -5142 plt.plot(time_axis, remnant_mass_list, lw=1.5, label='stellar remnants', ls='dashed', c='k') -5143 # plt.plot(time_axis, BH_mass_list, lw=2, label='black holes') -5144 # plt.plot(time_axis, NS_mass_list, lw=2, label='neutron stars') -5145 # plt.plot(time_axis, WD_masslist, lw=2, label='white dwarfs') -5146 plt.xlabel(r'log${10}$(time [yr])') -5155 plt.xlim(6.4, 10.1)

Either replace time_axis with log_time_axis in lines 5138 to 5145 or change lines 5146 & 5155 to Time [yr] & (106.4, 1010.1)

-5207 final_alive_and_remnant_stellar_mass = math.log((10 final_alive_stellar_mass + 10 final_remnant_stellar_mass), -5208 10)

final_alive_stellar_mass and final_remnant_stellar_mass are in linear scales. The above lines will lead final_alive_and_remnant_stellar_mass to be inf. It can be changed as following
final_alive_and_remnant_stellar_mass = np.log10(final_alive_stellar_mass + final_remnant_stellar_mass)

juzikong commented 3 years ago

Hi Junjie, thanks for your comments! Yes indeed. The energy patch should be commented out in the publicly-available version since it has not been used in our publication. I hope to update this part soon for our follow-up paper :)