mcstasscript.helper.mcstas_objects.MetadataBlock#

class mcstasscript.helper.mcstas_objects.MetadataBlock(name, type, value, source='instrument')#

A single METADATA block attached to a component instance.

Mirrors the McStas METADATA keyword which allows attaching arbitrary named text (JSON, Python, plain text, etc.) to a component.

name#

Name of the metadata entry.

Type:

str

type#

Free-form type string (e.g. "JSON", "txt").

Type:

str

value#

The metadata body text.

Type:

str

source#

Where the metadata was defined. Use "component" for metadata read from a component file and "instrument" for metadata defined on an instrument component instance.

Type:

str, default “instrument”

__init__(name, type, value, source='instrument')#

Methods

__init__(name, type, value[, source])