mcstasscript.interface.reader.McStas_file#

class mcstasscript.interface.reader.McStas_file(filename)#

Reader of McStas files, can add to an existing McStasScript instrument instance or create a corresponding McStasScript python file.

add_to_instr(Instr)#

Add information from McStas file to McStasScript Instr instance

write_python_file(filename)#

Write python file named filename that reproduce the McStas instr

__init__(filename)#

Initialization of McStas_file class, needs McStas instr filename

Parameters:

(str) (filename) – Name of McStas instrument file to be read

Methods

__init__(filename)

Initialization of McStas_file class, needs McStas instr filename

add_to_instr(Instr)

Adds information from the McStas file to McStasScript instr

write_python_file(filename, **kwargs)

Writes python file that reproduces McStas instrument file

add_to_instr(Instr)#

Adds information from the McStas file to McStasScript instr

Parameters:

instance) (Instr (McStasScript McStas_instr) – McStas_instr instance to add instrument information to

write_python_file(filename, **kwargs)#

Writes python file that reproduces McStas instrument file

Parameters:

(str) (filename) – Filename of python file to be written