Chroma-GUI

Main

Main module for the chroma-gui.

class chroma_gui.main.CheckableComboBox(*args: Any, **kwargs: Any)[source]
class Delegate(*args: Any, **kwargs: Any)[source]
class chroma_gui.main.ChromaticityTableModel(*args: Any, **kwargs: Any)[source]
columnCount(parent=PyQt5.QtCore.QModelIndex) int[source]

Override method from QAbstractTableModel

Return column count of the pandas DataFrame

data(index: PyQt5.QtCore.QModelIndex, role=PyQt5.QtCore.Qt.ItemDataRole)[source]

Override method from QAbstractTableModel

Return data cell from the pandas DataFrame

headerData(section: int, orientation: PyQt5.QtCore.Qt.Orientation, role: PyQt5.QtCore.Qt.ItemDataRole)[source]

Override method from QAbstractTableModel

Return dataframe index as vertical header data and columns as horizontal header data.

rowCount(parent=PyQt5.QtCore.QModelIndex) int[source]

Override method from QAbstractTableModel

Return row count of the pandas DataFrame

class chroma_gui.main.Config(model_path: ~pathlib.Path = PosixPath('/user/slops/data/LHC_DATA/OP_DATA/Betabeat'), measurements_path: ~pathlib.Path = PosixPath('/user/slops/data/LHC_DATA/OP_DATA/Betabeat'), extract_raw_timber: bool = False, rf_beam: float = 1, qx_window: tuple[float, float] = (0.24, 0.31), qy_window: tuple[float, float] = (0.29, 0.34), quartiles: tuple[float, float] = (0.2, 0.8), plateau_length: int = 15, bad_tune_lines: list[tuple[float, float]] = <factory>, plot_dpp: bool = False, plot_delta_rf: bool = False, rcParams: str = None)[source]

Class for storing user preferences

save_field(field, data)[source]

Open the config file and change the given field

class chroma_gui.main.ExternalProgram(*args: Any, **kwargs: Any)[source]
progress

alias of float

class chroma_gui.main.MainWindow(*args: Any, **kwargs: Any)[source]
copyTableClicked()[source]

Copies the displayed chromaticity table into the clipboard Two formattings can be used: markdown and latex. The latex version is a bit more refined, is uses the math modes to nicely display the header.

correctionMethodComboBoxChanged(method: str)[source]

Set the available observables for the selected method. Greys out the unavailable options

getChromaticityOrders()[source]

Returns a list containing the checked chromaticity orders

rePlotCleaningClicked()[source]

This buttons allows to replot the plots in the cleaning tab without redoing the analysis

saveSettingsClicked()[source]

Save the settings into the measurement file

setChromaticityComboBox()[source]

Creates a combobox with clickable numbers for the chromaticity function

setCorrectionComboBox()[source]

This function replaces the ComboBox containing the observables by one with items that can be clicked

setInfoIcons()[source]

Iterate through all the labels in the class that have a tooltip, and place a proper info icon next to it

startThread(main_function, finish_function, *args)[source]

Simple wrapper to start a thread :param - main_function: method of the class ExternalProgram to be started as main function of the thread :param - finish_function: method of the class MainWindow to be called when the thread has finished :param - args: arguments to be passed to the instantiation of the ExternalProgram class, :param those are the main_function arguments:

timberVariableSelectionChanged(item)[source]

Function to be called when an element of the timber selection has been changed.

updateChromaPlots(measurement)[source]

Add a plot to show the Chromaticity for both axes and both beams

updateDppPlot(measurement)[source]

Add a plot to show the DPP / RF measurement

useNAFFCheckBoxClicked(value)[source]

Function called by the GUI when clicking the “Use NAFF” checkbox. This disables some functionalities only used for the raw bbq spectrogram

class chroma_gui.main.Measurement(path: ~pathlib.Path, model_path: dict[str, ~pathlib.Path] = <factory>, description: str = None, nominal_rf: float = None, start_time: ~datetime.datetime = None, end_time: ~datetime.datetime = None, cleaning_start_time: ~datetime.datetime = None, cleaning_end_time: ~datetime.datetime = None)[source]

holds measurement specific data such as paths and measurement times

classmethod from_folder(path: Path)[source]

Returns a Measurement object created via the “measurement.info” contained in the given folder

get_timber_status()[source]

Check if a timber extraction data exists and return a small message with details. Otherwise, just say there is nothing.

save_as_json()[source]

Saves the measurement fields as json

class chroma_gui.main.MplRcParamsDialog(*args: Any, **kwargs: Any)[source]
accept(buttonClicked)[source]

Saves the rcParams to the resource folder. Can be triggered by clicking “Save” and “Apply”. “Save” closes the window after having saved the file. “Apply” can be used to keep it open while tinkering with graphs

openRcParams()[source]

Opens the user rcParams or the default one for the GUI

class chroma_gui.main.NewMeasurementDialog(*args: Any, **kwargs: Any)[source]
chroma_gui.main.exceptHook(exc_type, exc_value, exc_tb)[source]

Function called when an exception occurs