welltestpy.tools¶
welltestpy subpackage providing miscellaneous tools.
Included functions¶
The following functions are provided for point triangulation
|
Triangulate points by given distances. |
|
Get the symmetrized version of a lower or upper triangle-matrix A. |
The following plotting routines are provided
|
Plot an overview of the tests within the campaign. |
|
Fading line for matplotlib. |
|
Plot all well constellations and label the points with the names. |
|
Plot of the well constellation within the campaign. |
|
Plot of transient estimation fitting. |
|
Plot of steady estimation fitting. |
|
Plot of parameter interaction. |
|
Plot of parameter trace. |
|
Plot of sensitivity results. |
|
plot the derivative with the original data. |
-
campaign_plot
(campaign, select_test=None, fig=None, style='WTP', **kwargs)[source]¶ Plot an overview of the tests within the campaign.
- Parameters
campaign (
Campaign
) – The campaign to be plotted.select_test (dict, optional) – The selected tests to be added to the plot. The default is None.
fig (Figure, optional) – Matplotlib figure to plot on. The default is None.
style (str, optional) – Plot style. The default is “WTP”.
**kwargs (TYPE) – Keyword arguments forwarded to the tests plotting routines.
- Returns
fig – The created matplotlib figure.
- Return type
Figure
-
campaign_well_plot
(campaign, plot_tests=True, plot_well_names=True, fig=None, style='WTP')[source]¶ Plot of the well constellation within the campaign.
- Parameters
campaign (
Campaign
) – The campaign to be plotted.plot_tests (bool, optional) – DESCRIPTION. The default is True.
plot_well_names (TYPE, optional) – DESCRIPTION. The default is True.
fig (Figure, optional) – Matplotlib figure to plot on. The default is None.
style (str, optional) – Plot stlye. The default is “WTP”.
- Returns
ax – The created matplotlib axes.
- Return type
Axes
-
diagnostic_plot_pump_test
(observation, rate, method='bourdet', linthresh_time=1.0, linthresh_head=1e-05, fig=None, ax=None, plotname=None, style='WTP')[source]¶ plot the derivative with the original data.
- Parameters
observation (
welltestpy.data.Observation
) – The observation to calculate the derivative.rate (
float
) – Pumping rate.method (
str
, optional) – Method to calculate the time derivative. Default: “bourdet”linthresh_time – Range of time around 0 that behaves linear. Default: 1
linthresh_head – Range of head values around 0 that behaves linear. Default: 1e-5
fig (Figure, optional) – Matplotlib figure to plot on. Default: None.
ax (
Axes
) – Matplotlib axes to plot on. Default: None.plotname (str, optional) – Plot name if the result should be saved. Default: None.
style (str, optional) –
- Plot style.
Default: “WTP”.
- returns
- rtype
Diagnostic plot
-
fadeline
(ax, x, y, label=None, color=None, steps=20, **kwargs)[source]¶ Fading line for matplotlib.
This is a workaround to produce a fading line.
- Parameters
ax (axis) – Axis to plot on.
x (
list
) – start and end value of x components of the liney (
list
) – start and end value of y components of the linelabel (
str
, optional) – label for the legend. Default:None
color (MPL color, optional) – color of the line Default:
None
steps (
int
, optional) – steps of fading Default:20
**kwargs – keyword arguments that are forwarded to plt.plot
-
plot_well_pos
(well_const, names=None, title='', filename=None, plot_well_names=True, ticks_set='auto', fig=None, style='WTP')[source]¶ Plot all well constellations and label the points with the names.
- Parameters
well_const (list) – List of well constellations.
names (list of str, optional) – Names for the wells. The default is None.
title (str, optional) – Plot title. The default is “”.
filename (str, optional) – Filename if the result should be saved. The default is None.
plot_well_names (bool, optional) – Whether to plot the well-names. The default is True.
ticks_set (int or str, optional) – Tick spacing in the plot. The default is “auto”.
fig (Figure, optional) – Matplotlib figure to plot on. The default is None.
style (str, optional) – Plot stlye. The default is “WTP”.
- Returns
fig – The created matplotlib figure.
- Return type
Figure
-
plotfit_steady
(setup, data, para, rad, radnames, extra, plotname=None, ax_ins=True, fig=None, ax=None, style='WTP')[source]¶ Plot of steady estimation fitting.
-
plotfit_transient
(setup, data, para, rad, time, radnames, extra, plotname=None, fig=None, ax=None, style='WTP')[source]¶ Plot of transient estimation fitting.
-
plotparainteract
(result, paranames, plotname=None, fig=None, style='WTP')[source]¶ Plot of parameter interaction.
-
plotparatrace
(result, parameternames=None, parameterlabels=None, xticks=None, stdvalues=None, plotname=None, fig=None, style='WTP')[source]¶ Plot of parameter trace.
-
plotsensitivity
(paralabels, sensitivities, plotname=None, fig=None, ax=None, style='WTP')[source]¶ Plot of sensitivity results.
-
triangulate
(distances, prec, all_pos=False)[source]¶ Triangulate points by given distances.
try to triangulate points by given distances within a symmetric matrix ‘distances’ with
distances[i,j] = |pi-pj|
thereby
p0
will be set to the origin(0,0)
andp1
to(|p0-p1|,0)
- Parameters
distances (
numpy.ndarray
) –Given distances among the point to be triangulated. It hat to be a symmetric matrix with a vanishing diagonal and
distances[i,j] = |pi-pj|
If a distance is unknown, you can set it to
-1
.prec (
float
) – Given Precision to be used within the algorithm. This can be used to smooth away messure errorsall_pos (
bool
, optional) – If True all possible constellations will be calculated. Otherwise, the first possibility will be returned. Default: False