scippneutron.tof.diagram.TimeDistanceDiagram#

class scippneutron.tof.diagram.TimeDistanceDiagram(ax, *, tmax, frame_rate=None)#
__init__(ax, *, tmax, frame_rate=None)#

Methods

__init__(ax, *, tmax[, frame_rate])

add_detector(*, distance[, name])

add_neutron(*, time_offset, wavelength, L[, ...])

add_neutrons(*, lambda_min[, lambda_max, ...])

Draw a wavelength band to depict propagation of neutrons.

add_sample(*, distance)

add_source_pulse([pulse_length, ls])

annotate(text, *, xy, xytext, **kwargs)

to_distance(distance)

to_time(time)

Attributes

frame_length

add_neutrons(*, lambda_min, lambda_max=None, Lmin=<scipp.Variable> ()    float64              [m]  0, Lmax, time_offset, stride=1, frames=2)#

Draw a wavelength band to depict propagation of neutrons. Neutrons are assumed to be emitted from a single point, i.e., no resolution effects are taken into account.

Parameters:
  • Lmin (Variable, default: <scipp.Variable> ()    float64              [m]  0) – Distance where neutrons are “emitted”, such as the source pulse or a chopper. The default is at 0.0, i.e., the source position.

  • Lmax (Variable) – Distance where propagation of neutrons stops. This is typically set to the last detector (or after), but could be set to a chopper distance if a chopper extracts a smaller wavelength band.

  • lambda_min (Variable) – Minimum wavelength, defining fastest neutrons.

  • lambda_max (Optional[Variable], default: None) – Maximum wavelength, defining slowest neutrons. If lambda_max is None (the default) it is set such that there is no frame overlap at Lmax.

  • time_offset (Variable) – Offset time at which neutrons are emitted.

  • frames (default: 2) – The number of frames that should be drawn.