mantidimaging.gui.windows.spectrum_viewer.view module#

class mantidimaging.gui.windows.spectrum_viewer.view.SpectrumViewerWindowView(main_window: MainWindowView)[source]#

Bases: BaseMainWindowView

add_roi_table_row(name: str, colour: tuple[int, int, int, int]) None[source]#

Add a new row to the ROI table

@param name: The name of the ROI @param colour: The colour of the ROI

auto_range_image() None[source]#
property chi2_threshold: float#
cleanup() None[source]#

Runs when the window is closed.

clear() None[source]#

Clear spectrum viewer data and reset the UI states: - Spectrum data and plots - Export table data - Normalisation checkbox

property colour_range_mode: str#
disable_roi_properties() None[source]#
display_normalise_error() None[source]#
display_parameter_map(map_array: ndarray, binner: ROIBinner, levels: tuple[float, float]) None[source]#

Display the parameter map on the image tab of the export view.

display_shuttercount_error() None[source]#
experimentSetupFormWidget: ExperimentSetupFormWidget#
experimentSetupGroupBox: QGroupBox#
exportLayout: QVBoxLayout#
property export_full_sample: bool#
fittingLayout: QVBoxLayout#
get_binner() ROIBinner[source]#
get_csv_filename() Path | None[source]#
get_export_background_image() ndarray | None[source]#
get_fitting_region() FittingRegion[source]#
get_load_csv_filename() Path | None[source]#
get_map_export_filename() Path | None[source]#

Open a save-file dialog for the parameter map export

@return: path.tiff or None is cancelled

get_normalise_stack() UUID | None[source]#
get_open_beam_roi() SensibleROI | None[source]#
get_open_beam_roi_choice() str[source]#
get_rits_export_directory() Path | None[source]#

Get the path to save the RITS file too

get_rits_export_filename() Path | None[source]#
handle_change_tab(tab_index: int)[source]#
handle_export_change_tab(tab_index: int)[source]#
handle_shuttercount_change() None[source]#
handle_table_click(index: QModelIndex) None[source]#
imageLayout: QVBoxLayout#
property image_output_mode: str#
initial_setup() None[source]#
normalisation_enabled() bool[source]#
normaliseCheckBox: QCheckBox#
normaliseErrorIcon: QLabel#
normaliseStackSelector: DatasetSelectorWidgetView#
normalise_ShutterCount_CheckBox: QCheckBox#
normalise_error_issue: str = ''#
on_visibility_change() None[source]#

When the visibility of an ROI is changed, update the visibility of the ROI in the spectrum widget

property overlay_opacity: float#
remove_roi() None[source]#

Clear the selected ROI in the table view

roi_form: ROIFormWidget#
sampleStackSelector: DatasetSelectorWidgetView#
property selected_param_name: str#
set_image(image_data: ndarray, autoLevels: bool = True) None[source]#
set_new_roi() None[source]#

Set a new ROI on the image

set_normalise_error(norm_issue: str) None[source]#
set_roi_properties() None[source]#
set_roi_visibility_flags(roi_name: str, visible: bool) None[source]#

Set the visibility for the selected ROI and update the spectrum to reflect the change. A check is made on the spectrum to see if it exists as it may not have been created yet. @param visible: Whether the ROI is visible.

set_shuttercount_error(shuttercount_issue: str) None[source]#
set_spectrum(name: str, spectrum_data: ndarray) None[source]#

Try to set the spectrum data for a given ROI assuming the roi may not exist in the spectrum widget yet depending on when method is called

set_spectum_roi_color(roi_name: str) None[source]#
setup_roi_properties_spinboxes() None[source]#
show(self)[source]#
show_image_tab() None[source]#

Switch the export display to the Image tab.

show_visible_spectrums() None[source]#
shuttercountErrorIcon: QLabel#
shuttercount_error_issue: str = ''#
shuttercount_norm_enabled() bool[source]#
spectrum_widget: SpectrumWidget#
sync_unit_menus(unit_name: str) None[source]#

Sync the checked unit in both the image and fitting tab unit menus.

property table_view: ROITableWidget#
property tof_units_mode: str#
property transmission_error_mode: str#
try_to_select_relevant_normalise_stack(name: str) None[source]#
update_roi_dropdown() None[source]#

Updates the ROI dropdown menus with the available ROIs.