From 64aa5938b857124ce842ae8bd66b0ee0fccd05ec Mon Sep 17 00:00:00 2001
From: Pablo Corcho-Caballero
Date: Sat, 19 Oct 2024 10:26:36 +0100
Subject: [PATCH] replace akima by pchip
---
src/pst/models.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pst/models.py b/src/pst/models.py
index a970adf..aa902fd 100644
--- a/src/pst/models.py
+++ b/src/pst/models.py
@@ -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]
@@ -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]