mcstasscript.helper.beam_dump_database.BeamDump

mcstasscript.helper.beam_dump_database.BeamDump

class mcstasscript.helper.beam_dump_database.BeamDump(data_path, parameters, dump_point, run_name, time_loaded=None, comment='', tag=0, record_name='')
__init__(data_path, parameters, dump_point, run_name, time_loaded=None, comment='', tag=0, record_name='')

Class describing a beamdump made somewhere in an instrument

Inputs for class matches what can be read from json file describing dump to facilitate easy recreation from file. Strips complex parameters into simple dict with par name and value for easy storage.

data_pathstr

Path of MCPL datafile

parametersdict

Parameters used to run simulation

dump_pointstr

Name of component where beam was dumped

run_namestr

Specified run name for this dump

time_loadedstr

Optional, usually generated at first load, timestamp

commentstr

Comment for this beamdump

taginteger

Tag for this beamdump to differentiate similar dumps

record_namestr

Unique filename combining run_name and tag

Methods

__init__(data_path, parameters, dump_point, ...)

Class describing a beamdump made somewhere in an instrument

dump_from_JSON(filepath)

Load dump from json file

dump_to_JSON(folder_path)

Writes representation of the object to file

file_present(origin_path)

Checks whether the file is present and returns bool

print_all()

Print all entries in data for dump

classmethod dump_from_JSON(filepath)

Load dump from json file

filepathstr

Path to json file for load

dump_to_JSON(folder_path)

Writes representation of the object to file

folder_pathstr

Folder in which the dump will be placed

file_present(origin_path)

Checks whether the file is present and returns bool

print_all()

Print all entries in data for dump