module headsdif¶
Class Headsdif has methods for calculating and plotting heads differences between multiple groundwater series
-
acequia.headsdif.
headsdif_from_gwseries
(heads=None, locname=None, refcol=None)¶ Return HeadsDif object with data or None for invalid data
- Parameters
heads (list of GwSeries objects) – measured heads of multiple groundwater series
locname (str) – location name for annotating graphs
refcol (str, optional) – series name to use as reference
- Returns
- Return type
HeadsDif object or None
Examples
- >>>hd = headsdif_from_gwseries(heads=<heads>,locname=<locname>,
refcol=<refcol>)
-
class
acequia.headsdif.
HeadsDif
(heads=None, locname=None, refcol=None)¶ Calculates head differences and descriptive statistics for multiple groundwater head series
- Parameters
heads (list,pd.DataFrame) – measured heads of multiple groundwater series
locname (str) – location name for annotating graphs
refcol (str) – series name to use as reference
Notes
Class HeadsDif requires input of a list of multiple GwSeries objects or pd.Series objects with valid head data. No checking is performed.
To check input data before creating a HeadsDif object, us the custom function headsdif_from_gwseries(). This function returns None when no valid heads could be calculated.
Examples
Create headdiff object without checking input: >>>hd = acequia.headsdif(heads=<list>,locname=<str>, refcol=<str>)
Call function headsdif_from_gwseires() and clean up data before creating a headsdiff object: >>>hd = headsdif_from_gwseries(heads=<heads>,locname=<locname>,
refcol=<refcol>)
>>>if hd is None: >>> continue
-
table_headsdif
(ref=None)¶ Return table with head differences relative to series ref. If ref is not set, first series is taken as reference.
- Returns
- Return type
pd.DataFrame
-
table_headsref
()¶ Return table with heads relative to mean of entire series
-
difsums
(period='quarter')¶ Return table with head differences by season
- Parameters
seasons ({'quarter','half-year'}) – aggregation level
- Returns
- Return type
pd.DataFrame
-
date_seasons
(dtindex, period='quarter')¶ Return list with seasons for each datetime in index
- Parameters
dtindex (pd.Datarame,pd.DateTimeIndex) – index with dates
seasons ({'quarter','half-year'}) – aggregation level
- Returns
- Return type
list with season for each datetime
-
plot_time
(figpath=None, figsize=None, colors=None)¶ Plot al heads in one graph and all head differences below that in one figure
-
plot_head
(figpath=None, color='season')¶ Plot head difference by reference head value
-
plot_freq
()¶ Plot head differences as grid of frequency plots
- Returns
- Return type
fig,ax