Skip to content

Commit

Permalink
Merge pull request #46 from paranoya/feature/tabularCEM_interpolator
Browse files Browse the repository at this point in the history
Change TabularCEM interpolator
  • Loading branch information
PabloCorcho authored Oct 28, 2024
2 parents 1e3df60 + 64aa593 commit bab22e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pst/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def stellar_mass_formed(self, times: u.Gyr):
integral : astropy.Quantity
The cumulative stellar mass formed at each input time.
"""
interpolator = interpolate.Akima1DInterpolator(
interpolator = interpolate.PchipInterpolator(
self.table_t, self.table_mass)
integral = interpolator(times) << self.table_mass.unit
integral[times > self.table_t[-1]] = self.table_mass[-1]
Expand All @@ -515,7 +515,7 @@ def ism_metallicity(self, times: u.Gyr):
z_t: astropy.units.Quantity
Vector with the ISM metallicity at each input time.
"""
interpolator = interpolate.Akima1DInterpolator(
interpolator = interpolate.PchipInterpolator(
self.table_t, self.table_metallicity)
integral = interpolator(times)
integral[times > self.table_t[-1]] = self.table_metallicity[-1]
Expand Down

0 comments on commit bab22e6

Please sign in to comment.