mcstasscript.instrument_diagnostics.view.View

mcstasscript.instrument_diagnostics.view.View

class mcstasscript.instrument_diagnostics.view.View(axis1, axis2=None, bins=100, same_scale=False, axis1_values=None, axis2_values=None, **kwargs)
__init__(axis1, axis2=None, bins=100, same_scale=False, axis1_values=None, axis2_values=None, **kwargs)

Plot view on one or two axis to be generated from event data

The possible specifiers are defined in McStasEvenData and are x : x position [m] y : x position [m] z : x position [m] vx : x velocity [m/s] vy : x velocity [m/s] vz : x velocity [m/s] speed : [m/s] dx : divergence x [deg] dy : divergence y [deg] t : time [s] l : wavelength [AA] e : energy [meV]

Parameters:

axis1str

Specifier for first axis to be shown

axis2str (optional)

Specifier for second axis to be shown

binsint or [int, int]

Number of bins for generation of histogram

axis1_valuesfloat or list of floats

Values that will be plotted as lines on plot

axis2_valuesfloat or list of floats

Values that will be plotted as lines on plot

same_scalebool

Controls whether all displays of this view is on same ranges

Methods

__init__(axis1[, axis2, bins, same_scale, ...])

Plot view on one or two axis to be generated from event data

clear_limits()

Clears all limits

set_axis1_limits(start, end)

Sets the axis1 limits

set_axis2_limits(start, end)

Sets the axis2 limits

clear_limits()

Clears all limits

set_axis1_limits(start, end)

Sets the axis1 limits

set_axis2_limits(start, end)

Sets the axis2 limits