From a1fb476cbba80b9f39a9ce0094dd82466ff12b6b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Jul 2023 04:33:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- RefRed/about_dialog.py | 1 - .../populate_reduction_table_from_list_lrdata.py | 2 -- RefRed/autopopulatemaintable/reductiontable_auto_fill.py | 3 --- RefRed/browsing_runs.py | 1 - RefRed/calculations/add_list_nexus.py | 2 -- RefRed/calculations/check_if_same_nxs_property.py | 1 - .../check_list_run_compatibility_and_display.py | 1 - .../check_list_run_compatibility_and_display_thread.py | 2 -- RefRed/calculations/compare_two_lrdata.py | 1 - RefRed/calculations/load_list_nexus.py | 1 - RefRed/calculations/locate_list_run.py | 1 - RefRed/calculations/lr_data.py | 1 - RefRed/calculations/run_sequence_breaker.py | 2 -- RefRed/calculations/sort_lrdata_list.py | 1 - RefRed/calculations/update_reduction_table_metadata.py | 1 - RefRed/configuration/export_xml_config.py | 3 --- .../load_reduction_table_from_lconfigdataset.py | 1 - RefRed/configuration/loading_configuration.py | 1 - .../populate_reduction_table_from_lconfigdataset.py | 1 - RefRed/configuration/saving_configuration.py | 1 - RefRed/configuration/user_configuration.py | 1 - RefRed/export/export_plot_ascii.py | 1 - .../gui_handling/auto_tof_range_radio_button_handler.py | 1 - RefRed/gui_handling/data_norm_spinboxes.py | 8 -------- RefRed/gui_handling/first_angle_range_gui_handler.py | 1 - RefRed/gui_handling/gui_utility.py | 1 - RefRed/gui_handling/progressbar_handler.py | 1 - RefRed/gui_handling/refred_interface_handler.py | 1 - RefRed/gui_handling/scaling_factor_widgets_handler.py | 1 - RefRed/initialization/gui.py | 2 -- RefRed/interfaces/mplwidgets.py | 4 ---- RefRed/interfaces/mytablewidget.py | 1 - .../load_reduced_data_set_handler.py | 1 - .../load_reduced_data_set/reduced_ascii_table_handler.py | 1 - RefRed/load_reduced_data_set/stitching_ascii_widget.py | 8 -------- RefRed/low_res_finder_algorithms/low_res_finder.py | 1 - RefRed/metadata/display_metadata.py | 1 - RefRed/metadata/metadata_finder.py | 1 - RefRed/peak_finder_algorithms/peak_finder_derivation.py | 1 - RefRed/plot/all_plot_axis.py | 1 - RefRed/plot/clear_plots.py | 1 - RefRed/plot/display_plots.py | 3 --- RefRed/plot/home_plot_button_clicked.py | 3 --- RefRed/plot/launch_stitching_manual_axis.py | 4 ---- RefRed/plot/log_plot_toggle.py | 1 - RefRed/plot/mouse_leave_plot.py | 1 - RefRed/plot/popup_plot_1d.py | 2 -- RefRed/plot/popup_plot_2d.py | 2 -- RefRed/plot/single_click_plot.py | 2 -- RefRed/preview_config/preview_config.py | 1 - RefRed/reduction/calculate_sf_overlap_range.py | 1 - RefRed/reduction/global_reduction_settings_handler.py | 1 - RefRed/reduction/individual_reduction_settings_handler.py | 1 - RefRed/reduction/live_reduced_data_handler.py | 1 - RefRed/reduction/live_reduction_handler.py | 2 -- RefRed/reduction/reduced_data_handler.py | 2 -- .../check_list_run_compatibility.py | 1 - .../reduction_table_handling/reduction_table_check_box.py | 1 - .../reduction_table_handling/reduction_table_handler.py | 1 - RefRed/reduction_table_handling/update_reduction_table.py | 1 - RefRed/settings/list_settings.py | 1 - RefRed/settings/settings_editor.py | 1 - RefRed/settings/settings_password_editor.py | 1 - .../sf_calculator/check_sf_run_reduction_button_status.py | 1 - RefRed/sf_calculator/fill_sf_gui_table.py | 2 -- RefRed/sf_calculator/incident_medium_list_editor.py | 1 - RefRed/sf_calculator/sort_nxsdata.py | 1 - RefRed/sf_preview/sf_file_handler.py | 1 - RefRed/sf_preview/sf_preview.py | 1 - 69 files changed, 108 deletions(-) diff --git a/RefRed/about_dialog.py b/RefRed/about_dialog.py index 81beeb5f..f8ef3055 100644 --- a/RefRed/about_dialog.py +++ b/RefRed/about_dialog.py @@ -8,7 +8,6 @@ class AboutDialog(object): - parent = None def __init__(self, parent=None): diff --git a/RefRed/autopopulatemaintable/populate_reduction_table_from_list_lrdata.py b/RefRed/autopopulatemaintable/populate_reduction_table_from_list_lrdata.py index 1a418e96..5727c5d5 100644 --- a/RefRed/autopopulatemaintable/populate_reduction_table_from_list_lrdata.py +++ b/RefRed/autopopulatemaintable/populate_reduction_table_from_list_lrdata.py @@ -2,7 +2,6 @@ class PopulateReductionTableFromListLRData(object): - list_lrdata_sorted = None list_wks_sorted = None list_runs_sorted = None @@ -12,7 +11,6 @@ class PopulateReductionTableFromListLRData(object): THI_TOLERANCE = 0.015 def __init__(self, parent=None, list_lrdata=None, list_wks=None, list_run=None, list_nexus=None, is_data=True): - self.parent = parent self.list_run = list_run self.list_lrdata = list_lrdata diff --git a/RefRed/autopopulatemaintable/reductiontable_auto_fill.py b/RefRed/autopopulatemaintable/reductiontable_auto_fill.py index 134dcfbc..9a1ef695 100644 --- a/RefRed/autopopulatemaintable/reductiontable_auto_fill.py +++ b/RefRed/autopopulatemaintable/reductiontable_auto_fill.py @@ -19,7 +19,6 @@ class ReductionTableAutoFill(object): - list_full_file_name = [] list_nxs = [] list_lrdata = [] @@ -33,7 +32,6 @@ class ReductionTableAutoFill(object): o_auto_fill_widgets_handler = None def __init__(self, parent=None, list_of_run_from_input='', data_type_selected='data', reset_table=False): - self.parent = parent if data_type_selected == 'data': @@ -85,7 +83,6 @@ def __init__(self, parent=None, list_of_run_from_input='', data_type_selected='d self.run() def merge_list_of_runs(self, new_runs=None): - # manual entry of the runs self.raw_run_from_input = new_runs self.calculate_discrete_list_of_runs() # step1 -> list_of_runs_from_input diff --git a/RefRed/browsing_runs.py b/RefRed/browsing_runs.py index a47e0c80..5a741365 100644 --- a/RefRed/browsing_runs.py +++ b/RefRed/browsing_runs.py @@ -4,7 +4,6 @@ class BrowsingRuns(object): - list_files = None list_runs = None diff --git a/RefRed/calculations/add_list_nexus.py b/RefRed/calculations/add_list_nexus.py index 30f268cb..7ce26a79 100644 --- a/RefRed/calculations/add_list_nexus.py +++ b/RefRed/calculations/add_list_nexus.py @@ -5,7 +5,6 @@ class AddListNexus(object): - wks = None addition_worked = True prefix = 'data' @@ -40,7 +39,6 @@ def __init__( is_same_property = check_same_property.is_same_property else: # we force true - is_same_property = True if is_same_property: diff --git a/RefRed/calculations/check_if_same_nxs_property.py b/RefRed/calculations/check_if_same_nxs_property.py index b8c532f0..b0654628 100644 --- a/RefRed/calculations/check_if_same_nxs_property.py +++ b/RefRed/calculations/check_if_same_nxs_property.py @@ -2,7 +2,6 @@ class CheckIfSameNxsProperty(object): - is_same_property = False property_name = '' diff --git a/RefRed/calculations/check_list_run_compatibility_and_display.py b/RefRed/calculations/check_list_run_compatibility_and_display.py index 28e9269f..31b85538 100644 --- a/RefRed/calculations/check_list_run_compatibility_and_display.py +++ b/RefRed/calculations/check_list_run_compatibility_and_display.py @@ -10,7 +10,6 @@ class CheckListRunCompatibilityAndDisplay(object): - runs_are_compatible = False wks = None lrdata = None diff --git a/RefRed/calculations/check_list_run_compatibility_and_display_thread.py b/RefRed/calculations/check_list_run_compatibility_and_display_thread.py index 353fb4ac..374a613f 100644 --- a/RefRed/calculations/check_list_run_compatibility_and_display_thread.py +++ b/RefRed/calculations/check_list_run_compatibility_and_display_thread.py @@ -21,7 +21,6 @@ class CheckListRunCompatibilityAndDisplayThread(QtCore.QThread): - runs_are_compatible = False wks = None lrdata = None @@ -35,7 +34,6 @@ def setup( is_working_with_data_column=True, is_display_requested=False, ): - self.parent = parent self.list_run = list_run self.list_nexus = list_nexus diff --git a/RefRed/calculations/compare_two_lrdata.py b/RefRed/calculations/compare_two_lrdata.py index 53bd629f..387e127b 100644 --- a/RefRed/calculations/compare_two_lrdata.py +++ b/RefRed/calculations/compare_two_lrdata.py @@ -3,7 +3,6 @@ class CompareTwoLRData(object): def __init__(self, lrdata_1=None, lrdata_2=None): - self.lrdata_1 = lrdata_1 self.lrdata_2 = lrdata_2 self.result_comparison = 0 diff --git a/RefRed/calculations/load_list_nexus.py b/RefRed/calculations/load_list_nexus.py index e796f716..67a9463c 100644 --- a/RefRed/calculations/load_list_nexus.py +++ b/RefRed/calculations/load_list_nexus.py @@ -2,7 +2,6 @@ class LoadListNexus(object): - list_nexus = None list_run = None prefix = 'data' diff --git a/RefRed/calculations/locate_list_run.py b/RefRed/calculations/locate_list_run.py index e968726a..2e68265d 100644 --- a/RefRed/calculations/locate_list_run.py +++ b/RefRed/calculations/locate_list_run.py @@ -4,7 +4,6 @@ class LocateListRun(object): - list_run = [] list_nexus_found = [] list_run_found = [] diff --git a/RefRed/calculations/lr_data.py b/RefRed/calculations/lr_data.py index ac75ec41..fc6c6025 100644 --- a/RefRed/calculations/lr_data.py +++ b/RefRed/calculations/lr_data.py @@ -19,7 +19,6 @@ class LRData(object): - read_options = dict( is_auto_tof_finder=True, is_auto_peak_finder=True, back_offset_from_peak=3, bins=50, angle_offset=0.001 ) diff --git a/RefRed/calculations/run_sequence_breaker.py b/RefRed/calculations/run_sequence_breaker.py index 73414bb9..b17e2784 100644 --- a/RefRed/calculations/run_sequence_breaker.py +++ b/RefRed/calculations/run_sequence_breaker.py @@ -1,10 +1,8 @@ class RunSequenceBreaker(object): - final_list = None str_final_list = None def __init__(self, run_sequence=None): - self.final_list = [] self.str_final_list = [] diff --git a/RefRed/calculations/sort_lrdata_list.py b/RefRed/calculations/sort_lrdata_list.py index 1f95cbbe..729e4687 100644 --- a/RefRed/calculations/sort_lrdata_list.py +++ b/RefRed/calculations/sort_lrdata_list.py @@ -29,7 +29,6 @@ class SortLRDataList(object): def __init__( self, parent=None, list_lrdata=None, list_runs=None, list_wks=None, list_nexus=None, data_type_selected='data' ): - self.list_lrdata = list_lrdata self.list_runs = list_runs self.list_wks = list_wks diff --git a/RefRed/calculations/update_reduction_table_metadata.py b/RefRed/calculations/update_reduction_table_metadata.py index dc4c1b0d..ec06c8fe 100644 --- a/RefRed/calculations/update_reduction_table_metadata.py +++ b/RefRed/calculations/update_reduction_table_metadata.py @@ -10,7 +10,6 @@ def __init__(self, parent=None, lrdata=None, row=-1): self.update() def update(self): - lrdata = self.lrdata row = self.row parent = self.parent diff --git a/RefRed/configuration/export_xml_config.py b/RefRed/configuration/export_xml_config.py index f7afee7a..2ddbc5e4 100644 --- a/RefRed/configuration/export_xml_config.py +++ b/RefRed/configuration/export_xml_config.py @@ -9,7 +9,6 @@ class ExportXMLConfig(object): - parent = None filename = '' str_array = [] @@ -59,14 +58,12 @@ def header_part(self): self.str_array = str_array def main_part(self): - str_array = self.str_array _big_table_data = self.parent.big_table_data nbr_row = self.parent.nbr_row_table_reduction o_general_settings = GlobalReductionSettingsHandler(parent=self.parent) for row in range(nbr_row): - _data = _big_table_data[row, 0] if _data is None: break diff --git a/RefRed/configuration/load_reduction_table_from_lconfigdataset.py b/RefRed/configuration/load_reduction_table_from_lconfigdataset.py index a9e191fc..0aba245f 100644 --- a/RefRed/configuration/load_reduction_table_from_lconfigdataset.py +++ b/RefRed/configuration/load_reduction_table_from_lconfigdataset.py @@ -10,7 +10,6 @@ class LoadReductionTableFromLConfigDataSet(object): - parent = None def __init__(self, parent=None): diff --git a/RefRed/configuration/loading_configuration.py b/RefRed/configuration/loading_configuration.py index f43f51d0..3b55e14c 100644 --- a/RefRed/configuration/loading_configuration.py +++ b/RefRed/configuration/loading_configuration.py @@ -18,7 +18,6 @@ class LoadingConfiguration(object): - parent = None load_config_worked = True filename = '' diff --git a/RefRed/configuration/populate_reduction_table_from_lconfigdataset.py b/RefRed/configuration/populate_reduction_table_from_lconfigdataset.py index af1089cd..ab5b1922 100644 --- a/RefRed/configuration/populate_reduction_table_from_lconfigdataset.py +++ b/RefRed/configuration/populate_reduction_table_from_lconfigdataset.py @@ -1,5 +1,4 @@ class PopulateReductionTableFromLConfigDataSet(object): - parent = None def __init__(self, parent=None): diff --git a/RefRed/configuration/saving_configuration.py b/RefRed/configuration/saving_configuration.py index e386852a..b6be89d5 100644 --- a/RefRed/configuration/saving_configuration.py +++ b/RefRed/configuration/saving_configuration.py @@ -7,7 +7,6 @@ class SavingConfiguration(object): - parent = None def __init__(self, parent=None, filename=''): diff --git a/RefRed/configuration/user_configuration.py b/RefRed/configuration/user_configuration.py index a224b680..d0fb01c5 100644 --- a/RefRed/configuration/user_configuration.py +++ b/RefRed/configuration/user_configuration.py @@ -1,5 +1,4 @@ class UserConfiguration(object): - is_reduced_plot_stitching_tab_ylog = True is_reduced_plot_stitching_tab_xlog = False diff --git a/RefRed/export/export_plot_ascii.py b/RefRed/export/export_plot_ascii.py index fa074b20..8ddf7882 100644 --- a/RefRed/export/export_plot_ascii.py +++ b/RefRed/export/export_plot_ascii.py @@ -11,7 +11,6 @@ class ExportPlotAscii: - # NOTE: # figure layout as of 10-22-2021 # ------------ main window ------------| diff --git a/RefRed/gui_handling/auto_tof_range_radio_button_handler.py b/RefRed/gui_handling/auto_tof_range_radio_button_handler.py index 7d9a8ad7..1e5ca660 100644 --- a/RefRed/gui_handling/auto_tof_range_radio_button_handler.py +++ b/RefRed/gui_handling/auto_tof_range_radio_button_handler.py @@ -4,7 +4,6 @@ class AutoTofRangeRadioButtonHandler(object): - parent = None all_rows = [] row = -1 diff --git a/RefRed/gui_handling/data_norm_spinboxes.py b/RefRed/gui_handling/data_norm_spinboxes.py index b4d88617..c7b5fa74 100644 --- a/RefRed/gui_handling/data_norm_spinboxes.py +++ b/RefRed/gui_handling/data_norm_spinboxes.py @@ -3,7 +3,6 @@ class SpinBox(object): - parent = None def __init__(self, parent=None, is_data=True, entry_type='peak', value_min=-1, value_max=-1, flag=True): @@ -16,7 +15,6 @@ def __init__(self, parent=None, is_data=True, entry_type='peak', value_min=-1, v all_rows = gui_utility.get_other_row_with_same_run_number_as_row(row=row, is_data=is_data) for _row in all_rows: - if is_data: index = 0 else: @@ -82,7 +80,6 @@ def __init__(self, parent=None, entry_type='peak', value_min=-1, value_max=-1, f class DataPeakSpinbox(object): - parent = None def __init__(self, parent=None): @@ -93,7 +90,6 @@ def __init__(self, parent=None): class DataBackSpinbox(object): - parent = None def __init__(self, parent=None): @@ -105,7 +101,6 @@ def __init__(self, parent=None): class NormPeakSpinbox(object): - Parent = None def __init__(self, parent=None): @@ -116,7 +111,6 @@ def __init__(self, parent=None): class NormBackSpinbox(object): - parent = None def __init__(self, parent=None): @@ -128,7 +122,6 @@ def __init__(self, parent=None): class DataLowResSpinbox(object): - parent = None def __init__(self, parent=None): @@ -140,7 +133,6 @@ def __init__(self, parent=None): class NormLowResSpinbox(object): - parent = None def __init__(self, parent=None): diff --git a/RefRed/gui_handling/first_angle_range_gui_handler.py b/RefRed/gui_handling/first_angle_range_gui_handler.py index 6ea6a6d6..be00adfb 100644 --- a/RefRed/gui_handling/first_angle_range_gui_handler.py +++ b/RefRed/gui_handling/first_angle_range_gui_handler.py @@ -27,7 +27,6 @@ def is_sf_button_clicked(self): class NormalizationOrStitchingButtonStatus(ParentGuiHandler): - is_absolute_normalization = True is_auto_stitching = False is_manual_stitching = False diff --git a/RefRed/gui_handling/gui_utility.py b/RefRed/gui_handling/gui_utility.py index 973334cf..abed7978 100644 --- a/RefRed/gui_handling/gui_utility.py +++ b/RefRed/gui_handling/gui_utility.py @@ -3,7 +3,6 @@ class GuiUtility(object): - parent = None def __init__(self, parent=None): diff --git a/RefRed/gui_handling/progressbar_handler.py b/RefRed/gui_handling/progressbar_handler.py index d9dfc476..eac6cd08 100644 --- a/RefRed/gui_handling/progressbar_handler.py +++ b/RefRed/gui_handling/progressbar_handler.py @@ -4,7 +4,6 @@ class ProgressBarHandler(object): - nbr_reduction = 0 current_step = 0 diff --git a/RefRed/gui_handling/refred_interface_handler.py b/RefRed/gui_handling/refred_interface_handler.py index 876011c8..e4c397fd 100644 --- a/RefRed/gui_handling/refred_interface_handler.py +++ b/RefRed/gui_handling/refred_interface_handler.py @@ -2,7 +2,6 @@ class RefRedInterfaceHandler(object): - from_row = -1 to_row = -1 diff --git a/RefRed/gui_handling/scaling_factor_widgets_handler.py b/RefRed/gui_handling/scaling_factor_widgets_handler.py index 6883e69e..fc56b873 100644 --- a/RefRed/gui_handling/scaling_factor_widgets_handler.py +++ b/RefRed/gui_handling/scaling_factor_widgets_handler.py @@ -4,7 +4,6 @@ class ScalingFactorWidgetsHandler(object): - parent = None def __init__(self, parent=None): diff --git a/RefRed/initialization/gui.py b/RefRed/initialization/gui.py index ced2c7c0..a218a38d 100644 --- a/RefRed/initialization/gui.py +++ b/RefRed/initialization/gui.py @@ -8,7 +8,6 @@ class Gui(object): - parent = None vertical_header = [ "Plotted", @@ -26,7 +25,6 @@ class Gui(object): gui_size_coeff = 2.0 / 3.0 def __init__(self, parent): - self.parent = parent self.set_gui_title() self.set_gui_size() diff --git a/RefRed/interfaces/mplwidgets.py b/RefRed/interfaces/mplwidgets.py index ac37e118..54ac1d15 100644 --- a/RefRed/interfaces/mplwidgets.py +++ b/RefRed/interfaces/mplwidgets.py @@ -183,7 +183,6 @@ def setup_toolbar(self): self.adj_window = None def activate_widget(self, widget_name, activateIt): - if widget_name == "pan": if activateIt: self.isPanActivated = True @@ -286,7 +285,6 @@ def save_figure(self, *args): def toggle_ylog(self, *args): ax = self.canvas.ax if len(ax.images) == 0 and all([c.__class__.__name__ != "QuadMesh" for c in ax.collections]): - # logstate=ax.get_xscale() if self.ylog: ax.set_yscale("linear") @@ -310,7 +308,6 @@ def toggle_ylog(self, *args): def toggle_xlog(self, *args): ax = self.canvas.ax if len(ax.images) == 0 and all([c.__class__.__name__ != "QuadMesh" for c in ax.collections]): - if self.xlog: ax.set_xscale("linear") else: @@ -332,7 +329,6 @@ def toggle_xlog(self, *args): class MplCanvas(FigureCanvas): - trigger_click = QtCore.Signal(bool, bool, int, int) trigger_figure_left = QtCore.Signal() diff --git a/RefRed/interfaces/mytablewidget.py b/RefRed/interfaces/mytablewidget.py index ac6a63d1..3a720beb 100644 --- a/RefRed/interfaces/mytablewidget.py +++ b/RefRed/interfaces/mytablewidget.py @@ -3,7 +3,6 @@ class MyTableWidget(QtWidgets.QTableWidget): - parent = None ui = None diff --git a/RefRed/load_reduced_data_set/load_reduced_data_set_handler.py b/RefRed/load_reduced_data_set/load_reduced_data_set_handler.py index 50aca412..9577cb38 100644 --- a/RefRed/load_reduced_data_set/load_reduced_data_set_handler.py +++ b/RefRed/load_reduced_data_set/load_reduced_data_set_handler.py @@ -5,7 +5,6 @@ class LoadReducedDataSetHandler(object): - last_row_loaded = -1 def __init__(self, parent=None): diff --git a/RefRed/load_reduced_data_set/reduced_ascii_table_handler.py b/RefRed/load_reduced_data_set/reduced_ascii_table_handler.py index 2cece72e..e6e16207 100644 --- a/RefRed/load_reduced_data_set/reduced_ascii_table_handler.py +++ b/RefRed/load_reduced_data_set/reduced_ascii_table_handler.py @@ -2,7 +2,6 @@ class ReducedAsciiTableHandler(object): - list_filename_to_remove = [] total_number_of_rows_in_table = -1 diff --git a/RefRed/load_reduced_data_set/stitching_ascii_widget.py b/RefRed/load_reduced_data_set/stitching_ascii_widget.py index 2bc289bd..ab623f3d 100644 --- a/RefRed/load_reduced_data_set/stitching_ascii_widget.py +++ b/RefRed/load_reduced_data_set/stitching_ascii_widget.py @@ -6,7 +6,6 @@ class StitchingAsciiWidget(object): - loaded_ascii_array = [] tableUi = None stitchingPlot = None @@ -17,13 +16,11 @@ class StitchingAsciiWidget(object): row_of_this_file = 0 def __init__(self, parent=None): - self.parent = parent self.tableUi = parent.ui.reducedAsciiDataSetTable self.stitchingPlot = parent.ui.data_stitching_plot def add_data(self, newloaded_ascii): - row_of_this_file = self.get_row_of_this_file(newloaded_ascii) if row_of_this_file == -1: # add row @@ -58,7 +55,6 @@ def remove_all_data(self): self.loaded_ascii_array = [] def get_row_of_this_file(self, loaded_ascii): - newFilename = loaded_ascii.ascii_file_name nbrRow = len(self.loaded_ascii_array) @@ -71,10 +67,8 @@ def get_row_of_this_file(self, loaded_ascii): return -1 def update_status(self): - nbrRow = len(self.loaded_ascii_array) for i in range(nbrRow): - _data_object = self.loaded_ascii_array[i] _item_state = self.parent.ui.reducedAsciiDataSetTable.cellWidget(i, 1).checkState() @@ -100,13 +94,11 @@ def update_display(self): self.stitchingPlot.errorbar(_q_axis, _y_axis_red, yerr=_e_axis_red) def format_data_from_ymode_selected(self, q_axis, y_axis, e_axis): - data_type = self.get_selected_reduced_output() [final_y_axis, final_e_axis] = self.get_formated_output(data_type, q_axis, y_axis, e_axis) return [final_y_axis, final_e_axis] def get_formated_output(self, data_type, _q_axis, _y_axis, _e_axis): - try: # R vs Q selected if data_type == 'RvsQ': diff --git a/RefRed/low_res_finder_algorithms/low_res_finder.py b/RefRed/low_res_finder_algorithms/low_res_finder.py index b3a33191..5b12d00f 100644 --- a/RefRed/low_res_finder_algorithms/low_res_finder.py +++ b/RefRed/low_res_finder_algorithms/low_res_finder.py @@ -3,7 +3,6 @@ class LowResFinder(object): - low_res = [-1, -1] xdata_firstderi = [] ydata_firstderi = [] diff --git a/RefRed/metadata/display_metadata.py b/RefRed/metadata/display_metadata.py index e7d32f93..ee86d5d8 100644 --- a/RefRed/metadata/display_metadata.py +++ b/RefRed/metadata/display_metadata.py @@ -15,7 +15,6 @@ class DisplayMetadata(QMainWindow): - parent = None lrdata = None diff --git a/RefRed/metadata/metadata_finder.py b/RefRed/metadata/metadata_finder.py index 17b4a12f..11eb950f 100644 --- a/RefRed/metadata/metadata_finder.py +++ b/RefRed/metadata/metadata_finder.py @@ -23,7 +23,6 @@ class MetadataFinder(QMainWindow): - _open_instances = [] parent = None diff --git a/RefRed/peak_finder_algorithms/peak_finder_derivation.py b/RefRed/peak_finder_algorithms/peak_finder_derivation.py index a97465e3..4f8ffa0d 100644 --- a/RefRed/peak_finder_algorithms/peak_finder_derivation.py +++ b/RefRed/peak_finder_algorithms/peak_finder_derivation.py @@ -3,7 +3,6 @@ class PeakFinderDerivation(object): - peaks = [-1, -1] xdata_firstderi = [] ydata_firstderi = [] diff --git a/RefRed/plot/all_plot_axis.py b/RefRed/plot/all_plot_axis.py index c3252e37..ae514c3c 100644 --- a/RefRed/plot/all_plot_axis.py +++ b/RefRed/plot/all_plot_axis.py @@ -1,5 +1,4 @@ class AllPlotAxis(object): - yt_view_interval = None yt_data_interval = None is_yt_ylog = False diff --git a/RefRed/plot/clear_plots.py b/RefRed/plot/clear_plots.py index 336cb529..d8eaf2bb 100644 --- a/RefRed/plot/clear_plots.py +++ b/RefRed/plot/clear_plots.py @@ -1,5 +1,4 @@ class ClearPlots(object): - parent = None plot_yt = False diff --git a/RefRed/plot/display_plots.py b/RefRed/plot/display_plots.py index a90f6781..39b393ea 100644 --- a/RefRed/plot/display_plots.py +++ b/RefRed/plot/display_plots.py @@ -7,7 +7,6 @@ class DisplayPlots(object): - parent = None _data = None is_data = True @@ -297,7 +296,6 @@ def plot_it(self): self.it_plot_ui.canvas.draw_idle() def plot_yt(self): - _ytof = self.ytof _isLog = True _tof_axis = self.tofAxis @@ -382,7 +380,6 @@ def workWithData(self, update_reduction_table=True): self.ix_plot_ui = parent.ui.data_ix_plot if update_reduction_table: - [peak1, peak2] = self.peak parent.ui.dataPeakFromValue.setValue(peak1) parent.ui.dataPeakToValue.setValue(peak2) diff --git a/RefRed/plot/home_plot_button_clicked.py b/RefRed/plot/home_plot_button_clicked.py index ab999f77..e0d2e604 100644 --- a/RefRed/plot/home_plot_button_clicked.py +++ b/RefRed/plot/home_plot_button_clicked.py @@ -2,7 +2,6 @@ class HomePlotButtonClicked(object): - parent = None def __init__(self, parent=None, plot_type=None): @@ -21,7 +20,6 @@ def __init__(self, parent=None, plot_type=None): self.update_manual_axis_input_dialog(xmin, xmax, ymin, ymax) else: - o_gui_utility = GuiUtility(parent=self.parent) row = o_gui_utility.get_current_table_reduction_check_box_checked() column = 0 if o_gui_utility.is_data_tab_selected() else 1 @@ -73,7 +71,6 @@ def __init__(self, parent=None, plot_type=None): _plot_ui.draw() def update_manual_axis_input_dialog(self, xmin, xmax, ymin, ymax): - if self.parent.manual_x_axis_dialog is not None: _xmin = "%.4f" % xmin _xmax = "%.4f" % xmax diff --git a/RefRed/plot/launch_stitching_manual_axis.py b/RefRed/plot/launch_stitching_manual_axis.py index d8886fbb..6581408a 100644 --- a/RefRed/plot/launch_stitching_manual_axis.py +++ b/RefRed/plot/launch_stitching_manual_axis.py @@ -6,7 +6,6 @@ class ChangeStitchingDataInterval(object): def __init__(self, parent=None, yaxis_type='RvsQ', x_min=None, x_max=None, y_min=None, y_max=None): - self.parent = parent _lrdata = self.parent.big_table_data[0, 0] @@ -46,7 +45,6 @@ def plot(self): class LaunchStitchingManualXAxis(QMainWindow): - x_min = None x_max = None _lrdata = None @@ -77,7 +75,6 @@ def __init__(self, parent=None, mouse_x=0, mouse_y=0): self.init_widgets() def init_widgets(self): - o_gui_utility = GuiUtility(parent=self.parent) axis_type = o_gui_utility.get_reduced_yaxis_type() @@ -127,7 +124,6 @@ def validate_changes(self): class LaunchStitchingManualYAxis(QMainWindow): - y_min = None y_max = None _lrdata = None diff --git a/RefRed/plot/log_plot_toggle.py b/RefRed/plot/log_plot_toggle.py index 3caf718b..3819753e 100644 --- a/RefRed/plot/log_plot_toggle.py +++ b/RefRed/plot/log_plot_toggle.py @@ -3,7 +3,6 @@ class LogPlotToggle(object): def __init__(self, parent=None, status='log', plot_type=None, is_y_log=True): - status = str(status) if status == 'log': isLog = True diff --git a/RefRed/plot/mouse_leave_plot.py b/RefRed/plot/mouse_leave_plot.py index c23fcc32..ec1fd331 100644 --- a/RefRed/plot/mouse_leave_plot.py +++ b/RefRed/plot/mouse_leave_plot.py @@ -2,7 +2,6 @@ class MouseLeavePlot(object): - parent = None def __init__(self, parent=None, plot_type=None): diff --git a/RefRed/plot/popup_plot_1d.py b/RefRed/plot/popup_plot_1d.py index 4ce8e454..73976249 100644 --- a/RefRed/plot/popup_plot_1d.py +++ b/RefRed/plot/popup_plot_1d.py @@ -13,7 +13,6 @@ class PopupPlot1d(QDialog): - parent = None data_type = "data" data = None @@ -36,7 +35,6 @@ class PopupPlot1d(QDialog): nbr_pixel_y_axis = 304 def __init__(self, parent=None, data_type="data", data=None, row=0): - self.data_type = data_type self.parent = parent self.data = data diff --git a/RefRed/plot/popup_plot_2d.py b/RefRed/plot/popup_plot_2d.py index 1b8c890a..19b14797 100644 --- a/RefRed/plot/popup_plot_2d.py +++ b/RefRed/plot/popup_plot_2d.py @@ -15,7 +15,6 @@ class PopupPlot2d(QDialog): - parent = None _open_instances = [] data = None @@ -29,7 +28,6 @@ class PopupPlot2d(QDialog): auto_max_tof = None def __init__(self, parent=None, data_type="data", data=None, row=0): - self.parent = parent self.data = data self.data_type = data_type diff --git a/RefRed/plot/single_click_plot.py b/RefRed/plot/single_click_plot.py index 358b161b..dbe7b2d4 100644 --- a/RefRed/plot/single_click_plot.py +++ b/RefRed/plot/single_click_plot.py @@ -10,7 +10,6 @@ class SingleClickPlot(object): - parent = None data = None row = 0 @@ -26,7 +25,6 @@ def __init__( mouse_x=0, mouse_y=0, ): - self.parent = parent if plot_type == 'stitching': if is_manual_zoom_requested: diff --git a/RefRed/preview_config/preview_config.py b/RefRed/preview_config/preview_config.py index 8ab0e9f0..a8b160e3 100644 --- a/RefRed/preview_config/preview_config.py +++ b/RefRed/preview_config/preview_config.py @@ -7,7 +7,6 @@ class PreviewConfig(QtWidgets.QMainWindow): - system_name = ["instrument_name", "timestamp", "version", "mantid_version", "generator"] data_name = [ diff --git a/RefRed/reduction/calculate_sf_overlap_range.py b/RefRed/reduction/calculate_sf_overlap_range.py index abacb754..893e3c85 100644 --- a/RefRed/reduction/calculate_sf_overlap_range.py +++ b/RefRed/reduction/calculate_sf_overlap_range.py @@ -57,7 +57,6 @@ def applySFtoLconfig(self, lconfig): return lconfig def gitFittingOverlapRange(self, min_x, max_x, nbr_points): - step = (float(max_x) - float(min_x)) / float(nbr_points) _fit_range = np.arange(min_x, max_x + step, step) return _fit_range diff --git a/RefRed/reduction/global_reduction_settings_handler.py b/RefRed/reduction/global_reduction_settings_handler.py index 6af1236d..6cbdd65e 100644 --- a/RefRed/reduction/global_reduction_settings_handler.py +++ b/RefRed/reduction/global_reduction_settings_handler.py @@ -1,5 +1,4 @@ class GlobalReductionSettingsHandler(object): - incident_medium_selected = '' q_min = 0.005 q_step = 50 diff --git a/RefRed/reduction/individual_reduction_settings_handler.py b/RefRed/reduction/individual_reduction_settings_handler.py index 6cea1ecc..bfd6c1d8 100644 --- a/RefRed/reduction/individual_reduction_settings_handler.py +++ b/RefRed/reduction/individual_reduction_settings_handler.py @@ -9,7 +9,6 @@ class IndividualReductionSettingsHandler(object): - data = None norm = None output_workspace = '' diff --git a/RefRed/reduction/live_reduced_data_handler.py b/RefRed/reduction/live_reduced_data_handler.py index b45ef889..4d153835 100644 --- a/RefRed/reduction/live_reduced_data_handler.py +++ b/RefRed/reduction/live_reduced_data_handler.py @@ -7,7 +7,6 @@ class LiveReducedDataHandler(object): - big_table_data = None colors = None row_index = 0 diff --git a/RefRed/reduction/live_reduction_handler.py b/RefRed/reduction/live_reduction_handler.py index 875dd512..fd806487 100644 --- a/RefRed/reduction/live_reduction_handler.py +++ b/RefRed/reduction/live_reduction_handler.py @@ -17,7 +17,6 @@ class LiveReductionHandler(object): - big_table_data = None list_reduced_workspace = [] nbr_reduction_process = -1 @@ -160,7 +159,6 @@ def save_stitching_plot_view(self): self.parent.big_table_data = big_table_data def save_reduction(self, row=-1, refl=None, info=None): - big_table_data = self.big_table_data _config = big_table_data[row, 2] if _config is None: diff --git a/RefRed/reduction/reduced_data_handler.py b/RefRed/reduction/reduced_data_handler.py index d7d743e9..92c09388 100644 --- a/RefRed/reduction/reduced_data_handler.py +++ b/RefRed/reduction/reduced_data_handler.py @@ -4,7 +4,6 @@ class ReducedDataHandler(object): - big_table_data = None colors = None @@ -101,7 +100,6 @@ def get_current_color_plot(self, index_color): class ProducedSelectedOutputScaled(object): - parent = None axis_type = 'RvsQ' diff --git a/RefRed/reduction_table_handling/check_list_run_compatibility.py b/RefRed/reduction_table_handling/check_list_run_compatibility.py index b3e13e4c..9f922b62 100644 --- a/RefRed/reduction_table_handling/check_list_run_compatibility.py +++ b/RefRed/reduction_table_handling/check_list_run_compatibility.py @@ -3,7 +3,6 @@ class CheckListRunCompatibility(object): - list_wks = None runs_compatible = False diff --git a/RefRed/reduction_table_handling/reduction_table_check_box.py b/RefRed/reduction_table_handling/reduction_table_check_box.py index f80949c1..739366f6 100644 --- a/RefRed/reduction_table_handling/reduction_table_check_box.py +++ b/RefRed/reduction_table_handling/reduction_table_check_box.py @@ -8,7 +8,6 @@ class ReductionTableCheckBox(object): - row_selected = -1 prev_row_selected = -1 size_check_box_state_table = None diff --git a/RefRed/reduction_table_handling/reduction_table_handler.py b/RefRed/reduction_table_handling/reduction_table_handler.py index 391eadc9..80b4e910 100644 --- a/RefRed/reduction_table_handling/reduction_table_handler.py +++ b/RefRed/reduction_table_handling/reduction_table_handler.py @@ -7,7 +7,6 @@ class ReductionTableHandler(object): - from_row = -1 to_row = -1 diff --git a/RefRed/reduction_table_handling/update_reduction_table.py b/RefRed/reduction_table_handling/update_reduction_table.py index d585f1c7..4e206595 100644 --- a/RefRed/reduction_table_handling/update_reduction_table.py +++ b/RefRed/reduction_table_handling/update_reduction_table.py @@ -10,7 +10,6 @@ class UpdateReductionTable(object): - raw_runs = None is_data_displayed = True diff --git a/RefRed/settings/list_settings.py b/RefRed/settings/list_settings.py index 5b957e99..961c3240 100644 --- a/RefRed/settings/list_settings.py +++ b/RefRed/settings/list_settings.py @@ -1,6 +1,5 @@ class ListSettings(object): def __init__(self): - self.q_min = 0.005 self.d_q0 = 0.0 self.dq_over_q = 0.028 diff --git a/RefRed/settings/settings_editor.py b/RefRed/settings/settings_editor.py index a4654250..9102d9b0 100644 --- a/RefRed/settings/settings_editor.py +++ b/RefRed/settings/settings_editor.py @@ -6,7 +6,6 @@ class SettingsEditor(QtWidgets.QMainWindow): - is_super_user = False def __init__(self, parent=None, loadUI: bool = True): diff --git a/RefRed/settings/settings_password_editor.py b/RefRed/settings/settings_password_editor.py index 4c0cbc5c..1e68f3e1 100644 --- a/RefRed/settings/settings_password_editor.py +++ b/RefRed/settings/settings_password_editor.py @@ -3,7 +3,6 @@ class SettingsPasswordEditor(QtWidgets.QDialog): - password = '5' def __init__(self, parent=None): diff --git a/RefRed/sf_calculator/check_sf_run_reduction_button_status.py b/RefRed/sf_calculator/check_sf_run_reduction_button_status.py index 65840741..893598b7 100644 --- a/RefRed/sf_calculator/check_sf_run_reduction_button_status.py +++ b/RefRed/sf_calculator/check_sf_run_reduction_button_status.py @@ -2,7 +2,6 @@ class CheckSfRunReductionButtonStatus(object): - sf_gui = None def __init__(self, parent=None): diff --git a/RefRed/sf_calculator/fill_sf_gui_table.py b/RefRed/sf_calculator/fill_sf_gui_table.py index 503014f5..bd7e216c 100644 --- a/RefRed/sf_calculator/fill_sf_gui_table.py +++ b/RefRed/sf_calculator/fill_sf_gui_table.py @@ -4,13 +4,11 @@ class FillSFGuiTable(object): - tableData = None parent = None index_color = 0 def __init__(self, parent=None, table=None, is_using_si_slits=False): - self.parent = parent if is_using_si_slits: s2ih = 'SiH' diff --git a/RefRed/sf_calculator/incident_medium_list_editor.py b/RefRed/sf_calculator/incident_medium_list_editor.py index 640caa9e..6cc411ab 100644 --- a/RefRed/sf_calculator/incident_medium_list_editor.py +++ b/RefRed/sf_calculator/incident_medium_list_editor.py @@ -5,7 +5,6 @@ class IncidentMediumListEditor(QDialog): - sf_gui = None current_index = -1 diff --git a/RefRed/sf_calculator/sort_nxsdata.py b/RefRed/sf_calculator/sort_nxsdata.py index fe722c14..60c24edb 100644 --- a/RefRed/sf_calculator/sort_nxsdata.py +++ b/RefRed/sf_calculator/sort_nxsdata.py @@ -9,7 +9,6 @@ class Position(object): class SortNXSData(object): - sortedArrayOfNXSData = None sf_gui = None diff --git a/RefRed/sf_preview/sf_file_handler.py b/RefRed/sf_preview/sf_file_handler.py index e574e51c..4685bc13 100644 --- a/RefRed/sf_preview/sf_file_handler.py +++ b/RefRed/sf_preview/sf_file_handler.py @@ -3,7 +3,6 @@ class SFFileHandler(object): - full_sf_factor_table = [] full_sf_factor_labels = [] nbr_row = -1 diff --git a/RefRed/sf_preview/sf_preview.py b/RefRed/sf_preview/sf_preview.py index 25ad8d63..40257045 100644 --- a/RefRed/sf_preview/sf_preview.py +++ b/RefRed/sf_preview/sf_preview.py @@ -5,7 +5,6 @@ class SFPreview(QtWidgets.QMainWindow): - col_width = 100 col_width1 = col_width + 50 column_widths = [