mcstasscript.instrument_diagnostics.event_plotter.EventPlotter
mcstasscript.instrument_diagnostics.event_plotter.EventPlotter¶
- class mcstasscript.instrument_diagnostics.event_plotter.EventPlotter(name, data, flag_info=None)¶
Plots event data onto given views
- __init__(name, data, flag_info=None)¶
EventPlotter stores name and data, can produce plots given views
Parameters:
- namestr
Name of dataset
- dataMcStasEventData
Data object with event data
- flag_infolist of str
List of flag names in order U1 U2 U3
Methods
__init__
(name, data[, flag_info])EventPlotter stores name and data, can produce plots given views
add_view_limits
(view)Sets limits of View object from what is applicable to this data
get_view_limits_axis1
(view)Finds limits for axis1 of given view with the contained data
get_view_limits_axis2
(view)Finds limits for axis1 of given view with the contained data
plot
(view, fig, ax)Plots binned data generated from contained data on axis from view
scale_weights
(factor)Scales all weights in contained McStasEventData object
- add_view_limits(view)¶
Sets limits of View object from what is applicable to this data
Parameters: view : View
View for which limits should be set
- get_view_limits_axis1(view)¶
Finds limits for axis1 of given view with the contained data
Parameters: view : View
View for which limits should be retrieved
- get_view_limits_axis2(view)¶
Finds limits for axis1 of given view with the contained data
Parameters: view : View
View for which limits should be retrieved
- plot(view, fig, ax)¶
Plots binned data generated from contained data on axis from view
A view can also contain additional plot options which will be passed to the standard plotting tools.
- viewView
View defining onto which axis and what bins EventData should be binned
- figMatplotlib fig
Figure object for figure
- axMatplotlib ax
Axes object for figure
- scale_weights(factor)¶
Scales all weights in contained McStasEventData object
Parameters:
- factorfloat
Scale factor to be applied