def simulate(self, p, tindex=None, dt=1):
"""Simulates the head contribution.
Parameters
----------
p: 1D array
Parameters used for simulation.
tindex: pandas.Series, optional
Time indices to simulate the model.
Returns
-------
pandas.Series
The simulated head contribution.
"""
b = self.rfunc.block(p, dt)
stress = self.stress[0]
self.npoints = stress.index.size
h = pd.Series(fftconvolve(stress, b, 'full')[:self.npoints],
index=stress.index, name=self.name)
if tindex is not None:
h = h[tindex]
return h
评论列表
文章目录