mcstasscript.data.data.McStasMetaData

mcstasscript.data.data.McStasMetaData

class mcstasscript.data.data.McStasMetaData

Class for holding metadata for McStas dataset, is to be read from mccode.sim file.

info

Contains read strings from mccode.sim in key, value

Type

dict

dimension

Int for 1d data set with lenght of data, Array for 2d with each length

Type

Int or List of Int

component_name

Name of component in McStas file

Type

str

filename

Name of data file to read

Type

str

limits

Limits for monitor, length=2 for 1d data and length=4 for 2d data, for example spatial or time limits for monitor

Type

List

title

Title of monitor when plotting, placed above plot

Type

str

xlabel

Text for xlabel when plotting

Type

str

ylabel

Text for ylabel when plotting

Type

str

add_info(key, value)

Adds an element to the info dictionary

extract_info()

Unpacks the information in info to class attributes

set_title(string)

Overwrites current title

set_xlabel(string)

Overwrites current xlabel

set_ylabel(string)

Overwrites current ylabel

__init__()

Creating a new instance, no parameters

Methods

__init__()

Creating a new instance, no parameters

add_info(key, value)

Adding information to info dict

extract_info()

Extracting information from info dict to class attributes

set_title(string)

Sets title for plotting

set_xlabel(string)

Sets xlabel for plotting

set_ylabel(string)

Sets ylabel for plotting

add_info(key, value)

Adding information to info dict

extract_info()

Extracting information from info dict to class attributes

set_title(string)

Sets title for plotting

set_xlabel(string)

Sets xlabel for plotting

set_ylabel(string)

Sets ylabel for plotting