xfel.cxi.gfx package¶
Submodules¶
xfel.cxi.gfx.status_plot module¶
- class xfel.cxi.gfx.status_plot.RunNumberEvent(run_id)¶
Bases:
PyEvent
Sets the current run ID, which will appear in the frame title bar and the plot.
- class xfel.cxi.gfx.status_plot.SaveImageEvent¶
Bases:
PyEvent
Signals that an image of the current plot should be saved to disk (the file name will be something like rID_status.png, where ID is the run number.
- class xfel.cxi.gfx.status_plot.StatusFrame(*args, **kwds)¶
Bases:
plot_frame
- OnSaveImage(event)¶
- OnSetRunNumber(event)¶
- OnUpdate(event)¶
- create_plot_panel()¶
- show_controls_default = False¶
- class xfel.cxi.gfx.status_plot.StatusPlot(parent, figure_size=(8, 6), font_size=12, title_font_size=10, facecolor='white', transparent=False, handle_left_click=False, show_data_points=True, point_types=('o', '^', '+', 's', 'D'), title_alignment='right', toolbar_position=None)¶
Bases:
plot_container
- show_plot(*args, **kwds)¶
- class xfel.cxi.gfx.status_plot.UpdateEvent(t, det_z, laser01, laser04, laser04_power, si_foil, wavelength)¶
Bases:
PyEvent
Contains new data for plotting (one x series and three y series).
- xfel.cxi.gfx.status_plot.draw_plot(figure, t, det_z, laser01, laser04, laser04_power, si_foil, wavelength, bragg=None, run_id=None)¶
- xfel.cxi.gfx.status_plot.draw_plot_to_file(file_name, *args, **kwds)¶
For offline plotting, which turns out to be necessary when running the status plot through pyana.
- xfel.cxi.gfx.status_plot.format_time(x, pos=None)¶
xfel.cxi.gfx.trials_plot module¶
- class xfel.cxi.gfx.trials_plot.Run(runId)¶
Bases:
object
- cull_braggs(count)¶
- max()¶
- min()¶
- recalc_hits(windowLen, hit_cutoff)¶
- width()¶
- class xfel.cxi.gfx.trials_plot.TrialsPlot(parent, figure_size=(8, 6), font_size=12, title_font_size=10, facecolor='white', transparent=False, handle_left_click=False, show_data_points=True, point_types=('o', '^', '+', 's', 'D'), title_alignment='right', toolbar_position=None)¶
Bases:
plot_container
- show_plot()¶
We assume that the runs are sorted in ascending order and that they do not overlap in time
The final graph will have a number of time units displayed equal to a percentage of the total number of time units in all the runs, not including gaps. Each run may or may not be displayed depending on the zoom and pan.
total_width: how many time units total in these runs, not including gaps xmin: smallest time value in the earliest run xmax: largest time value in the lastest run newwidth: number of time units to display on xaxis total over all runs newmid: a point on the total time units scale within the zoom and pan limits. Usually
the center, but since it could cause x to fall out of bounds it is adjusted
- newxmin: how many time units on the left of the graph are not displayed, OR, the first
time unit to be displayed
newxmax: the first time unit not to be displayed
- class xfel.cxi.gfx.trials_plot.TrialsPlotFrame(*args, **kwds)¶
Bases:
plot_frame
- OnPan(event)¶
- OnTimeLockCheck(event)¶
- OnTimer(event)¶
- OnZoom(event)¶
- create_plot_panel()¶
- cull_braggs()¶
- load_data()¶
- set_params(params)¶
- show_controls_default = False¶
- show_plot()¶
- xfel.cxi.gfx.trials_plot.run(args)¶
xfel.cxi.gfx.wx_detectors module¶
- class xfel.cxi.gfx.wx_detectors.DetectorPlot(parent, figure_size=(8, 6), font_size=12, title_font_size=10, facecolor='white', transparent=False, handle_left_click=False, show_data_points=True, point_types=('o', '^', '+', 's', 'D'), title_alignment='right', toolbar_position=None)¶
Bases:
plot_container
- save_png()¶
- set_run_id(run_id)¶
- show_plot(t1, bragg, t2, skewness, t3, hit_rate, t4, photon_counts)¶
- class xfel.cxi.gfx.wx_detectors.DetectorPlotFrame(*args, **kwds)¶
Bases:
plot_frame
- OnSave(event)¶
- OnTimer(event)¶
- create_plot_panel()¶
- find_logs()¶
- set_run_id(run_id)¶
- set_watch_dir(dir_name, params)¶
- show_controls_default = False¶
- update_from_logs(force_update_hits=False)¶
- update_hit_rate()¶
- xfel.cxi.gfx.wx_detectors.run(args)¶