ogstools.materiallib.core.material module#

class ogstools.materiallib.core.material.Material[source]#

Bases: object

Represents a single material.

  • Can be constructed directly from YAML raw data.

  • Provides access to all properties.

  • Supports filtering by process schemas or property names.

__init__(name, raw_data)[source]#
property_names()[source]#

Returns a list of all property names of this material.

Return type:

list[str]

filter_process(process_schema)[source]#

Return a new Material containing only properties required by a given process schema.

Return type:

Material

filter_properties(allowed)[source]#

Return a new Material containing only the properties in ‘allowed’, preserving all extra fields (e.g. scope, unit).

Return type:

Material