Skip to content

Commit

Permalink
replace akima by pchip
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Corcho-Caballero committed Oct 19, 2024
1 parent cec3771 commit 64aa593
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 64aa593

Please sign in to comment.