welltest_pta.EventCollection

class welltest_pta.EventCollection[source]

Bases: object

An ordered, indexable container of Event objects.

Behaves like a list with extra convenience methods:

>>> wt.events           # EventCollection
>>> wt.events[0]        # first event
>>> wt.events["BU-2"]   # by event_id
>>> for e in wt.events: ...
>>> len(wt.events)
Parameters:

events (Iterable[Event])

__init__(events=())[source]
Parameters:

events (Iterable[Event])

Methods

__init__([events])

export(path[, format])

Export the catalogue (one row per event).

from_annotated_dataframe(df[, p_reservoir])

Build an EventCollection from a DataFrame annotated by the EventDetector (i.e. with an event column).

print()

to_dataframe()

Attributes

buildups

drawdowns

longest_buildup

__init__(events=())[source]
Parameters:

events (Iterable[Event])

property drawdowns: EventCollection
property buildups: EventCollection
property longest_buildup: Event | None
to_dataframe()[source]
Return type:

DataFrame

print()[source]
Return type:

None

export(path, format='auto')[source]

Export the catalogue (one row per event).

Parameters:
Return type:

None

classmethod from_annotated_dataframe(df, p_reservoir=None)[source]

Build an EventCollection from a DataFrame annotated by the EventDetector (i.e. with an event column).

Parameters:
Return type:

EventCollection