IQM_Vis.UI package

Submodules

IQM_Vis.UI.custom_widgets module

Custom SubClasses of PyQt6 widget to extent to the required functionality

class IQM_Vis.UI.custom_widgets.ClickLabel(name='clickable label')[source]

Bases: PyQt6.QtWidgets.QLabel

add a click mousePressEvent event to label (so can click on images)

clicked
mousePressEvent(self, ev: Optional[QMouseEvent])[source]
class IQM_Vis.UI.custom_widgets.ProgressBar(*args, **kwargs)[source]

Bases: PyQt6.QtWidgets.QProgressBar

IQM_Vis.UI.experiment_mode_2AFC module

create experiment window

class IQM_Vis.UI.experiment_mode_2AFC.make_experiment_2AFC(checked_transformation_params, data_store, image_display_size, rgb_brightness, display_brightness, default_save_dir='/home/matt/IQM-Vis', image_preprocessing='None', image_postprocessing='None', checked_metrics={})[source]

Bases: PyQt6.QtWidgets.QMainWindow

calc_max_comparisons(num_images)[source]
change_experiment_images(A_trans, B_trans)[source]
click_completed()[source]
clicked_image(image_name, widget_name)[source]
closeEvent(self, a0: Optional[QCloseEvent])[source]
experiment_layout()[source]

setup

finish_experiment()[source]
get_all_images()[source]

save image name

get_metric_scores()[source]

get IQM scores to save alongside the experiment for plotting/analysis purposes

get_single_transform_im(single_trans_dict)[source]
get_trans_funcs()[source]
get_unique_save_dir()[source]
init_style(style='light', css_file=None)[source]
partition(low, high)[source]

given an unsorted partition of the array between low and high, order elements lower than a given pivot point to the left and higher to the right

quick_sort()[source]
quit()[source]
reset_clicked_image
reset_experiment()[source]
save_experiment()[source]
saved_experiment
setup_experiment()[source]
show_all_images(tab='setup')[source]
start_experiment()[source]
swap_inds(i, j)[source]
toggle_experiment()[source]
class IQM_Vis.UI.experiment_mode_2AFC.reset_image_widget_to_black(time=0.1)[source]

Bases: PyQt6.QtCore.QObject

change clicked image to black and pause

change_to_solid(data)[source]
completed
stop()[source]
IQM_Vis.UI.experiment_mode_2AFC.sort_list(list1, list2)[source]

IQM_Vis.UI.experiment_mode_JND module

create experiment window JND

class IQM_Vis.UI.experiment_mode_JND.make_experiment_JND(checked_transformation_params, data_store, image_display_size, rgb_brightness, display_brightness, default_save_dir='/home/matt/IQM-Vis', dataset_name='dataset1', image_preprocessing='None', image_postprocessing='None', lower_im_num=1, upper_im_num=1, checked_metrics={})[source]

Bases: PyQt6.QtWidgets.QMainWindow

https://www.verywellmind.com/what-is-the-just-noticeable-difference-2795306

closeEvent(self, a0: Optional[QCloseEvent])[source]
experiment_layout()[source]

setup

finish_experiment()[source]
get_all_images()[source]
get_metric_scores(calc=False)[source]

get IQM scores to save alongside the experiment for plotting/analysis purposes

get_single_transform_im(single_trans_dict)[source]
get_trans_funcs()[source]
get_unique_save_dir()[source]

get directory that is unique based on if it’s the same experiment or not

init_style(style='light', css_file=None)[source]
quit()[source]
reset_clicked_image
reset_experiment()[source]
save_experiment()[source]
saved_experiment
setup_experiment()[source]
show_all_images(tab='setup')[source]
start_experiment()[source]
toggle_experiment()[source]
user_decision(decision)[source]
class IQM_Vis.UI.experiment_mode_JND.reset_image_widget_to_black(time=0.1)[source]

Bases: PyQt6.QtCore.QObject

change clicked image to black and pause

change_to_solid(data)[source]
completed
stop()[source]

IQM_Vis.UI.images module

UI image functions

class IQM_Vis.UI.images.images(**kwargs)[source]

Bases: object

change_data(ival, _redo_plots=True)[source]
change_data_click_im(widget_ind, *args)[source]
change_metric_correlations_graph(add=1)[source]
change_metric_range_graph(add=1)[source]
change_preview_images(ival)[source]
change_to_data_num(ind)[source]
change_to_specific_trans(trans_str)[source]
completed_range_results(results)[source]

data results sent from signal from thread worker

display_images()[source]
display_metric_JND_plot()[source]
display_metric_correlation_plot()[source]
display_metric_images(metric_images, i)[source]
display_metric_range_plot()[source]
display_metrics(metrics, i)[source]
display_metrics_graph(metrics, i)[source]
display_metrics_text(metrics, i, disp_len=5)[source]
display_radar_plots()[source]
get_export_dir(i)[source]
get_metrics_over_all_trans_with_init_values()[source]
init_worker_thread()[source]

set up thread for smoother range plot calculation

load_experiment_from_dir()[source]
load_experiment_from_dir_JND()[source]
load_human_experiment()[source]

change the image dataset we are using

load_new_images_folder()[source]

change the image dataset we are using

load_new_single_image()[source]

change the image we are using

plot_metric_range_mlp(i)[source]
plot_radar_graph(results, i)[source]
plot_radar_mlp(i)[source]
redo_plots(calc_range=False)[source]
request_range_work
set_preview_images(preview_num)[source]
set_save_dir_mpl(i=0)[source]
stopped_range_worker(signal=False)[source]
update_datastore_image_list(image_list, append_dataset=False)[source]
view_correlation_instance
IQM_Vis.UI.images.message_on_plot(widget_axes, message)[source]

IQM_Vis.UI.layout module

UI create layout

class IQM_Vis.UI.layout.layout(**kwargs)[source]

Bases: PyQt6.QtWidgets.QMainWindow

init_layout()[source]
init_style(style='light', css_file=None)[source]

IQM_Vis.UI.main module

main entry point to initialise the UI

class IQM_Vis.UI.main.make_app(app, data_stores: list, transformations: dict, metrics_info_format='graph', metrics_avg_graph=False, metric_range_graph=True, metric_params: dict = {}, image_display_size=300, default_save_dir='/home/matt/IQM-Vis', default_dataset_name='dataset1', restrict_options=None, num_steps_range=11, num_step_experiment=6, num_images_scroll_show=7, test=False)[source]

Bases: IQM_Vis.UI.widgets.widgets, IQM_Vis.UI.layout.layout, IQM_Vis.UI.images.images

change_save_folder()[source]

change the save folder we are using

clear_all_cache_data()[source]
closeEvent(self, a0: Optional[QCloseEvent])[source]
construct_UI()[source]
get_menu_checkboxes()[source]

list all trans/metrics in the menu drop downs

load_all_metric_images()[source]
load_all_metrics()[source]
load_all_transforms()[source]
make_menu()[source]
make_status_bar()[source]
quit()[source]
reset_correlation_data()[source]
IQM_Vis.UI.main.set_checked_menu_from_iterable(main_menu, iterable, name, action_store, connect_func, restrict_options=None)[source]

IQM_Vis.UI.threads module

thread and signal classes to makethe UI smoother useful info about PyQt6 threads: https://www.pythontutorial.net/pyqt/pyqt-qthread/

class IQM_Vis.UI.threads.get_range_results_worker[source]

Bases: PyQt6.QtCore.QObject

completed
current_image
do_work(data)[source]
progress
stop()[source]
stopped

IQM_Vis.UI.utils module

IQM_Vis.UI.utils.add_layout_to_tab(tab, layout, name)[source]

IQM_Vis.UI.widgets module

UI create widgets

class IQM_Vis.UI.widgets.custom_float_validator(parent=None)[source]

Bases: PyQt6.QtGui.QValidator

validate(self, a0: Optional[str], a1: int)[source]
IQM_Vis.UI.widgets.get_float_validator()[source]
IQM_Vis.UI.widgets.is_almost_float(input_string)[source]
IQM_Vis.UI.widgets.is_float(input_string)[source]
IQM_Vis.UI.widgets.make_float_from_text(txt)[source]
class IQM_Vis.UI.widgets.widgets[source]

Bases: object

JND_dataset_range_lower(txt)[source]

change the dataset_name we are using

JND_dataset_range_upper(txt)[source]

change the dataset_name we are using

change_dataset_name(txt)[source]

change the dataset_name we are using

change_display_im_display_brightness()[source]
change_display_im_rgb_brightness()[source]
change_display_im_size()[source]
change_graph_size()[source]
change_human_scores_after_exp_2AFC(path)[source]
change_human_scores_after_exp_JND(path)[source]
change_num_steps()[source]
change_plot_lims(state)[source]
change_post_processing(*args)[source]
change_pre_processing(*args)[source]
change_text_exp_trans(trans)[source]

change colour of text when checkbox is pressed

change_text_export_trans(trans)[source]

change colour of text when checkbox is pressed

colour_lineedit(widget, txt)[source]
disable_settings_button()[source]
display_slider_num(key, param_group, disp_len=5)[source]
edit_slider_vals(sliders_dict, key, info_item)[source]
enable_settings_button()[source]
export_trans_images()[source]
generic_value_change(key, param_group)[source]
init_widgets(**kwargs)[source]

create all the widgets we need and init params

launch_experiment_2AFC()[source]

Launch the 2 alternate forced choice experiment

launch_experiment_JND()[source]

launch the Just Noticable difference experiment

make_slider_range(sliders_dict, key, _min, _max, num_steps=None)[source]
open_mlp_new(mpl_canvas)[source]
reset_slider_group(param_group, redo_plots=False, display_images=True)[source]
reset_sliders()[source]
set_image_name_text()[source]
update_image_settings()[source]

button to apply new image settings

update_progress(v)[source]
update_status_bar(v, time=None)[source]

Module contents