Plot Helpers

Some helper functions for easy plotting.

class angcal.PlotHelper(anglecalibration)

Helper class for plotting diffraction patterns.

Attributes:
overwrite_plot

Methods

property overwrite_plot
plot_diffraction_pattern(photon_counts: ndarray, module_index=None, motor_position=None, axis=None)

Plot diffraction pattern.

Parameters:
  • photon_counts (numpy.ndarray) – 1D photon-count array.

  • module_index (int, optional) – Module index to restrict the plotted range.

  • motor_position (float, optional) – Detector motor position in degrees.

plot_base_peak(photon_counts: ndarray, module_index=None, axis=None)

Plot the base-peak ROI.

Parameters:
  • photon_counts (numpy.ndarray) – 1D photon-count array.

  • module_index (int, optional) – Module index for title/selection.

angcal.utils.select_base_peak(anglecalibration, mythen_file_reader, filelist: list[str], module_index=0)

select base peak by plotting module 0 redistributed to fixed angle-width bins for each frame in filelist with a detector angle between 6° and 33°