tof.Model#
- class tof.Model(source, choppers=None, detectors=None)[source]#
A class that represents a neutron instrument. It is defined by a list of choppers, a list of detectors, and a source.
- Parameters:
Methods
__init__
(source[, choppers, detectors])add
(component)Add a component to the instrument.
remove
(name)Remove a component.
run
()Run the simulation.
- add(component)[source]#
Add a component to the instrument. Component names must be unique across choppers and detectors.
- Parameters:
component – A chopper or detector.