pytuflow.TCF.mat_file

Contents

pytuflow.TCF.mat_file#

TCF.mat_file(context=None)#

Returns the MatDatabase database instance.

If more than one MatDatabase database instance exists, a Context object must be provided to resolve to the correct MatDatabase.

Parameters:

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

Returns:

The MatDatabase database instance.

Return type:

MatDatabase

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

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

Example

>>> tcf = ... # assuming is an instance of TCF
>>> mat_file = tcf.mat_file()