mcstasscript.tests.test_instrument_diagnostics

mcstasscript.tests.test_instrument_diagnostics#

Functions

make_dummy_event_data([n_events, variables])

Creates a dummy McStasDataEvent object with random event data

setup_instr_no_path()

Sets up a neutron instrument without a package_path

setup_instr_with_dummy_path()

Sets up a populated instrument using the dummy McStas installation, so that Monitor_nD is available as a component type

setup_instr_with_flags()

Sets up a populated instrument with two extra variables usable as flags

setup_populated_instr()

Sets up a neutron instrument with parameters, declare vars and three components

Classes

TestBeamDiagnostics([methodName])

Tests for the BeamDiagnostics class which sets up event monitors at selected points along the beam path

TestCommonRangeLimits([methodName])

Tests for the common_range_limits helper function which computes matching log-scale axis limits for intensity and ray count plots

TestDiagnosticsInstrument([methodName])

Tests for the DiagnosticsInstrument base class which manages a deep-copied instrument for diagnostics modifications

TestDiagnosticsPoint([methodName])

Tests for the DiagnosticsPoint class which represents a beam diagnostics measurement point before or after a component

TestEventPlotter([methodName])

Tests for the EventPlotter class which wraps event data and produces plots from View specifications

TestIntensityDiagnostics([methodName])

Tests for the IntensityDiagnostics class which places 0D or 1D intensity monitors before each component

TestPlotOverview([methodName])

Tests for the PlotOverview class which coordinates plotting of multiple views across multiple event plotters

TestSanitiseCompName([methodName])

Tests for the sanitise_comp_name helper function

TestView([methodName])

Tests for the View class which defines plot axis specifications