src.GUI.utils package¶
Submodules¶
src.GUI.utils.bound_min_max module¶
- src.GUI.utils.bound_min_max.bound_min_max(value: float, min_value: float, max_value: float) float¶
src.GUI.utils.define_bram_widgets module¶
- src.GUI.utils.define_bram_widgets.define_invert_channel_polarity_checkbox(parent: QWidget, callback: Callable, width: int = 100, height: int = 28, name: str = 'invertChannelPolarityCheckbox', text: str = 'Invert Polarity') CheckBox¶
Creates and configures a ‘Invert Channel Polarity’ checkbox. :param parent: The parent widget for the checkbox. :type parent: QWidget :param width: The width of the checkbox. Defaults to BUTTON_WIDTH. :type width: int, optional :param height: The height of the checkbox. Defaults to int(scale_factor * BUTTON_HEIGHT). :type height: int, optional
- Returns:
The configured ‘Invert Channel Polarity’ checkbox.
- Return type:
- src.GUI.utils.define_bram_widgets.define_load_waveform_button(parent: QWidget, callback: Callable, width: int = 100, height: int = 28, name: str = 'loadWaveformButton', text: str = 'Load') PushButton¶
Creates and configures a ‘Load Waveform’ button. :param parent: The parent widget for the button. :type parent: QWidget :param width: The width of the button. Defaults to BUTTON_WIDTH. :type width: int, optional :param height: The height of the button. Defaults to int(scale_factor * BUTTON_HEIGHT). :type height: int, optional
- Returns:
The configured ‘Load Waveform’ button.
- Return type:
- src.GUI.utils.define_bram_widgets.define_save_bitmap_button(parent: QWidget, callback: Callable, width: int = 100, height: int = 28, name: str = 'saveBitmapButton', text: str = 'Save BMP') PushButton¶
Creates and configures a ‘Save Waveform’ button. :param parent: The parent widget for the button. :type parent: QWidget :param width: The width of the button. Defaults to BUTTON_WIDTH. :type width: int, optional :param height: The height of the button. Defaults to int(scale_factor * BUTTON_HEIGHT). :type height: int, optional
- Returns:
The configured ‘Save Waveform’ button.
- Return type:
- src.GUI.utils.define_bram_widgets.define_save_waveform_button(parent: QWidget, callback: Callable, width: int = 100, height: int = 28, name: str = 'saveWaveformButton', text: str = 'Save') PushButton¶
Creates and configures a ‘Save Waveform’ button. :param parent: The parent widget for the button. :type parent: QWidget :param width: The width of the button. Defaults to BUTTON_WIDTH. :type width: int, optional :param height: The height of the button. Defaults to int(scale_factor * BUTTON_HEIGHT). :type height: int, optional
- Returns:
The configured ‘Save Waveform’ button.
- Return type:
- src.GUI.utils.define_bram_widgets.define_send_data_button(parent: QWidget, callback: Callable, width: int = 100, height: int = 28, name: str = 'sendDataButton', text: str = 'Send Data') PushButton¶
Creates and configures a ‘Send Data’ button. :param parent: The parent widget for the button. :type parent: QWidget :param width: The width of the button. Defaults to BUTTON_WIDTH. :type width: int, optional :param height: The height of the button. Defaults to int(scale_factor * BUTTON_HEIGHT). :type height: int, optional
- Returns:
The configured ‘Send Data’ button.
- Return type:
- src.GUI.utils.define_bram_widgets.define_start_button(parent: QWidget, callback: Callable, width: int = 100, height: int = 28, name: str = 'startButton', text: str = 'Start') PushButton¶
Creates and configures a ‘Start’ button. :param parent: The parent widget for the button. :type parent: QWidget :param width: The width of the button. Defaults to BUTTON_WIDTH. :type width: int, optional :param height: The height of the button. Defaults to int(scale_factor * BUTTON_HEIGHT). :type height: int, optional
- Returns:
The configured ‘Start’ button.
- Return type:
- src.GUI.utils.define_bram_widgets.define_stop_button(parent: QWidget, callback: Callable, width: int = 100, height: int = 28, name: str = 'stopButton', text: str = 'Stop') PushButton¶
Creates and configures a stop button. :param parent: The parent widget for the stop button. :type parent: QWidget :param width: The width of the stop button. Defaults to BUTTON_WIDTH. :type width: int, optional :param height: The height of the stop button. Defaults to int(scale_factor * BUTTON_HEIGHT). :type height: int, optional
- Returns:
The configured stop button.
- Return type:
src.GUI.utils.get_bram_bytes_data module¶
- src.GUI.utils.get_bram_bytes_data.get_bram_bytes_data(channels: list[BRAMChannel], point_limit: int, override_to_one: bool = False) list[int]¶
Get data from BRAMChannel class and return the data in bytes format.
src.GUI.utils.get_widgies module¶
src.GUI.utils.init_interface_values module¶
- src.GUI.utils.init_interface_values.init_interface()¶
src.GUI.utils.plot_adc_channels module¶
src.GUI.utils.plot_bram_channels module¶
- src.GUI.utils.plot_bram_channels.plot_bram_channels(channels: list[BRAMChannel], plot_range: int) list[Plot]¶
src.GUI.utils.plot_waveform module¶
- src.GUI.utils.plot_waveform.plot_waveforms(channel_data: list[ChannelSettings], frequency: int, autoscale: bool, plot_range: int) list[Plot]¶
Get data from PulseParams class and plot the waveforms on the pulse graph. This helps the user to visualize the waveforms before sending the data to the FPGA.
src.GUI.utils.update_gui_settings module¶
- src.GUI.utils.update_gui_settings.update_gui_settings(value: str | int | bool, file: str = '/home/runner/work/FLC/FLC/src/configs/gui_settings.yaml', setting_group: str = '', setting_subgroups: list[str] = [], setting: str = '')¶
src.GUI.utils.update_pulse_params module¶
- src.GUI.utils.update_pulse_params.update_fpga_clock(file: str = '/home/runner/work/FLC/FLC/src/GUI/configs/pulse_params.yaml', freq: int = 100, source: str = 'int')¶
- src.GUI.utils.update_pulse_params.update_pulse_params(file: str = '/home/runner/work/FLC/FLC/src/GUI/configs/pulse_params.yaml', channel: int = 4, params: dict = {})¶