welltest_pta.deconvolve
- welltest_pta.deconvolve(events, rate_history=None, default_q=None, nu=1e-2, n_response_nodes=60, t_response_min=1e-3, t_response_max=None, p_initial=None, fit_p_initial=True, max_iter=200, verbose=False)[source]
Recover the unit-rate constant-rate response from multi-rate data.
Implements the encoded vSH04 formulation. Suitable for merging two or more buildups/drawdowns into a single equivalent buildup whose log–log derivative is the diagnostic “master plot” of the entire test.
- Parameters:
events – Iterable of
Event(orEventCollection). Both drawdowns and buildups are used. Each event must carry rate information (ev.ratein STB/D — or setdefault_q).rate_history (
DataFrame|dict|None) – Optional pre-built rate history. DataFrame with columnst_hr,q(rate at each step). IfNone, derived from events.default_q (
Optional[float]) – Fallback flow rate (STB/D) for drawdowns without an explicitev.rate. Buildups always get q=0.nu (
float) – Regularisation weight for curvature of \(z\). Larger ⇒ smoother response (more bias). Smaller ⇒ noisier (more variance). Typical \(10^{-3}\) (low noise) to \(10^{-1}\) (high noise).n_response_nodes (
int) – Number of log-spaced nodes on the recovered response grid.t_response_min (
float) – Time range (hr) of the recovered response.t_response_maxdefaults to the maximum observation time.t_response_max (
Optional[float]) – Time range (hr) of the recovered response.t_response_maxdefaults to the maximum observation time.p_initial (
Optional[float]) – Initial reservoir pressure (psi). IfNoneandfit_p_initial=True, it is solved as an additional unknown.fit_p_initial (
bool) – Whether to recover \(p_i\) simultaneously with \(z\).max_iter (
int) – Maximum solver iterations (Levenberg–Marquardt).verbose (
bool) – Print solver progress.
- Return type:
Notes
For best results: include both a long buildup and the immediately preceding drawdown; clean buildup tails (V8.1 detector does this); use consistent rate units throughout (typically STB/D).