Skip to content

xes

TODO

XesAnalysisAndPlots

TODO

__init__(*, parameters, time_resolved)

Data analysis and plot generation for x-ray emission spectroscopy data.

This class stores all the information required to compute energy spectra from detector data frames, and analyze them. Additionally, the class stores all the information needed to generate and update plots that summarize the state of an x-ray emission spectroscopy experiment. specifically.

After the class has been initialized, data event information can be added, and the updated plots can be retrieved and sent to external programs for visualization.

Parameters:

Name Type Description Default
parameters Dict[str, Any]

An object storing OM's configuration parameters. The set of OM's configuration parameters must include a parameter group called xes with the entries required to fine-tune the spectrum calculation. Please refer to the documentation of the EnergySpectrumRetrieval algorithm).

required

update_plots(*, detector_data, optical_laser_active)

Updates and recovers the x-ray emission spectroscopy data plots.

This function uses the provided information to update all the x-ray emission spectroscopy data plots generated by this class. The function assumes that all the provided information refers to the same data event.

After updating the data plots, the function returns all the information needed to display them in a graphical interface, in the format of a tuple containing the following entries:

  • The cumulative sum of all observed energy spectra.

  • The cumulative sum of the smoothed versions of all observed energy spectra.

  • The cumulative sum of all observed data frames.

  • For pump-probe experiments, the cumulative sum of all observed energy spectra for events with an active optical laser. Otherwise, just the value None.

  • For pump-probe experiments, the cumulative sum of all observed energy spectra for events without an active optical laser. Otherwise, just the value None.

  • For pump-probe experiments, the the difference between the cumulative sum of all observed energy spectra observed for events with and without an active optical laser. Otherwise, just the value None.

Parameters:

Name Type Description Default
detector_data Union[NDArray[numpy.float_], NDArray[numpy.int_]]

The detector data frame to analyze and to use for updating the plots.

required
optical_laser_active bool

Whether the optical laser is active or not in the data event to which the provided information is associated. This argument is only relevant for pump-probe experiments.

required

Returns:

Type Description
Tuple[Union[NDArray[numpy.float_], NDArray[numpy.int_], None], Union[NDArray[numpy.float_], None], Union[NDArray[numpy.float_], NDArray[numpy.int_], None], Union[NDArray[numpy.float_], None], Union[NDArray[numpy.float_], None], Union[NDArray[numpy.float_], None]]

The information needed to display the plots in a graphical interface.