diff --git a/scripts/HFIR_4Circle_Reduction/guiutility.py b/scripts/HFIR_4Circle_Reduction/guiutility.py index 386141d4e449338b0db1adfa1e0b14dd3fcf3e99..0f29c314ad19c6a9948ca56d9d0ee945f900cdb5 100644 --- a/scripts/HFIR_4Circle_Reduction/guiutility.py +++ b/scripts/HFIR_4Circle_Reduction/guiutility.py @@ -43,12 +43,12 @@ def parse_integer_list(array_str): array_str = array_str.replace('\t ', '') int_str_list = array_str.split(',') - int_list = list() + integer_list = list() for int_str in int_str_list: try: int_value = int(int_str) - int_list.append(int_value) + integer_list.append(int_value) except ValueError: num_dash = int_str.count('-') if num_dash == 1: @@ -57,35 +57,35 @@ def parse_integer_list(array_str): start_value = int(terms[0]) end_value = int(terms[1]) except ValueError: - raise 'Unable to parse %s due to value error' % int_str + raise RuntimeError('Unable to parse %s due to value error' % int_str) elif num_dash == 2 and int_str.startswith('-'): terms = int_str[1:].split('-') try: start_value = int(terms[0])*-1 end_value = int(terms[1]) except ValueError: - raise 'Unable to parse %s due to value error' % int_str + raise RuntimeError('Unable to parse %s due to value error' % int_str) elif num_dash == 3: terms = int_str.split('-') try: start_value = -1*int(terms[1]) end_value = -1*int(terms[3]) except ValueError: - raise 'Unable to parse %s due to value error' % int_str + raise RuntimeError('Unable to parse %s due to value error' % int_str) except IndexError: - raise 'Unable to parse %s due to value error' % int_str + raise RuntimeError('Unable to parse %s due to value error' % int_str) else: - raise 'Unable to parse %s due to value error' % int_str + raise RuntimeError('Unable to parse %s due to value error' % int_str) - int_list.extend(xrange(start_value, end_value+1)) + integer_list.extend(xrange(start_value, end_value+1)) # END-FOR - return int_list + return integer_list def parse_float_editors(line_edits): """ - :param line_edit_list: + :param line_edits: :return: (True, list of floats); (False, error message) """ # Set flag @@ -124,7 +124,7 @@ def parse_float_editors(line_edits): def parse_integers_editors(line_edits): """ - :param line_edit_list: + :param line_edits: :return: (True, list of integers); (False, error message) """ # Set flag diff --git a/scripts/HFIR_4Circle_Reduction/hfctables.py b/scripts/HFIR_4Circle_Reduction/hfctables.py index cb1b45624fc8b78a0a6578dcb184175aa9237168..5f321dc4c5dd1114a9bf9693acd75609446d4441 100644 --- a/scripts/HFIR_4Circle_Reduction/hfctables.py +++ b/scripts/HFIR_4Circle_Reduction/hfctables.py @@ -58,7 +58,7 @@ class UBMatrixTable(tableBase.NTableWidget): def _set_to_table(self): """ - TODO/DOC + Set values in holder '_matrix' to TableWidget :return: """ for i_row in xrange(3): @@ -77,7 +77,7 @@ class UBMatrixTable(tableBase.NTableWidget): def set_from_list(self, element_array): """ - TODO/DOC + Set table value including holder and QTable from a 1D numpy array :param element_array: :return: """ @@ -99,7 +99,7 @@ class UBMatrixTable(tableBase.NTableWidget): def set_from_matrix(self, matrix): """ - TODO - DOC + Set value to both holder and QTable from a numpy 3 x 3 matrix :param matrix: :return: """ @@ -311,7 +311,7 @@ class ProcessTableWidget(tableBase.NTableWidget): def set_status(self, scan_no, status): """ - TODO/Doc + Set the status for merging scan to QTable :param status: :return: """ @@ -335,7 +335,7 @@ class ProcessTableWidget(tableBase.NTableWidget): def set_ws_names(self, scan_num, merged_md_name, ws_group_name): """ - TODO/DOC + Set the output workspace and workspace group's names to QTable :param merged_md_name: :param ws_group_name: :return: