pytuflow.ECF.pit_dbase

Contents

pytuflow.ECF.pit_dbase#

ECF.pit_dbase(context=None)#

Returns the PitInletDatabase database instance.

If more than one PitInletDatabase database instance exists, a Context object must be provided to resolve to the correct Pit Inlet Database.

Parameters:

context (Context, optional) – A context object to resolve the correct PitInletDatabase instance. Not required unless more than one PitInletDatabase file instance exists.

Returns:

The PitInletDatabase instance.

Return type:

PitInletDatabase

Raises:
  • KeyError – If the PitInletDatabase database is not found in the control file.

  • ValueError – If more than one PitInletDatabase database is found and no context is provided to resolve the correct, or if the context does not resolve into a single PitInletDatabase database.

Example

>>> tcf = ... # assuming is an instance of TCF
>>> bc_dbase = tcf.ecf().pit_dbase()