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:
__init__(source, choppers=None, detectors=None)[source]#

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.

remove(name)[source]#

Remove a component.

Parameters:

name (str) – The name of the component to remove.

run()[source]#

Run the simulation.