Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
861eee10
Commit
861eee10
authored
9 years ago
by
Zhou, Wenduo
Browse files
Options
Downloads
Patches
Plain Diff
Refs #12122. Killed pylint warnings.
parent
173e44c7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/HFIR_4Circle_Reduction/guiutility.py
+11
-11
11 additions, 11 deletions
scripts/HFIR_4Circle_Reduction/guiutility.py
scripts/HFIR_4Circle_Reduction/hfctables.py
+5
-5
5 additions, 5 deletions
scripts/HFIR_4Circle_Reduction/hfctables.py
with
16 additions
and
16 deletions
scripts/HFIR_4Circle_Reduction/guiutility.py
+
11
−
11
View file @
861eee10
...
@@ -43,12 +43,12 @@ def parse_integer_list(array_str):
...
@@ -43,12 +43,12 @@ def parse_integer_list(array_str):
array_str
=
array_str
.
replace
(
'
\t
'
,
''
)
array_str
=
array_str
.
replace
(
'
\t
'
,
''
)
int_str_list
=
array_str
.
split
(
'
,
'
)
int_str_list
=
array_str
.
split
(
'
,
'
)
int_list
=
list
()
int
eger
_list
=
list
()
for
int_str
in
int_str_list
:
for
int_str
in
int_str_list
:
try
:
try
:
int_value
=
int
(
int_str
)
int_value
=
int
(
int_str
)
int_list
.
append
(
int_value
)
int
eger
_list
.
append
(
int_value
)
except
ValueError
:
except
ValueError
:
num_dash
=
int_str
.
count
(
'
-
'
)
num_dash
=
int_str
.
count
(
'
-
'
)
if
num_dash
==
1
:
if
num_dash
==
1
:
...
@@ -57,35 +57,35 @@ def parse_integer_list(array_str):
...
@@ -57,35 +57,35 @@ def parse_integer_list(array_str):
start_value
=
int
(
terms
[
0
])
start_value
=
int
(
terms
[
0
])
end_value
=
int
(
terms
[
1
])
end_value
=
int
(
terms
[
1
])
except
ValueError
:
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
(
'
-
'
):
elif
num_dash
==
2
and
int_str
.
startswith
(
'
-
'
):
terms
=
int_str
[
1
:].
split
(
'
-
'
)
terms
=
int_str
[
1
:].
split
(
'
-
'
)
try
:
try
:
start_value
=
int
(
terms
[
0
])
*-
1
start_value
=
int
(
terms
[
0
])
*-
1
end_value
=
int
(
terms
[
1
])
end_value
=
int
(
terms
[
1
])
except
ValueError
:
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
:
elif
num_dash
==
3
:
terms
=
int_str
.
split
(
'
-
'
)
terms
=
int_str
.
split
(
'
-
'
)
try
:
try
:
start_value
=
-
1
*
int
(
terms
[
1
])
start_value
=
-
1
*
int
(
terms
[
1
])
end_value
=
-
1
*
int
(
terms
[
3
])
end_value
=
-
1
*
int
(
terms
[
3
])
except
ValueError
:
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
:
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
:
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
))
int
eger
_list
.
extend
(
xrange
(
start_value
,
end_value
+
1
))
# END-FOR
# END-FOR
return
int_list
return
int
eger
_list
def
parse_float_editors
(
line_edits
):
def
parse_float_editors
(
line_edits
):
"""
"""
:param line_edit
_list
:
:param line_edit
s
:
:return: (True, list of floats); (False, error message)
:return: (True, list of floats); (False, error message)
"""
"""
# Set flag
# Set flag
...
@@ -124,7 +124,7 @@ def parse_float_editors(line_edits):
...
@@ -124,7 +124,7 @@ def parse_float_editors(line_edits):
def
parse_integers_editors
(
line_edits
):
def
parse_integers_editors
(
line_edits
):
"""
"""
:param line_edit
_list
:
:param line_edit
s
:
:return: (True, list of integers); (False, error message)
:return: (True, list of integers); (False, error message)
"""
"""
# Set flag
# Set flag
...
...
This diff is collapsed.
Click to expand it.
scripts/HFIR_4Circle_Reduction/hfctables.py
+
5
−
5
View file @
861eee10
...
@@ -58,7 +58,7 @@ class UBMatrixTable(tableBase.NTableWidget):
...
@@ -58,7 +58,7 @@ class UBMatrixTable(tableBase.NTableWidget):
def
_set_to_table
(
self
):
def
_set_to_table
(
self
):
"""
"""
TODO/DOC
Set values in holder
'
_matrix
'
to TableWidget
:return:
:return:
"""
"""
for
i_row
in
xrange
(
3
):
for
i_row
in
xrange
(
3
):
...
@@ -77,7 +77,7 @@ class UBMatrixTable(tableBase.NTableWidget):
...
@@ -77,7 +77,7 @@ class UBMatrixTable(tableBase.NTableWidget):
def
set_from_list
(
self
,
element_array
):
def
set_from_list
(
self
,
element_array
):
"""
"""
TODO/DOC
Set table value including holder and QTable from a 1D numpy array
:param element_array:
:param element_array:
:return:
:return:
"""
"""
...
@@ -99,7 +99,7 @@ class UBMatrixTable(tableBase.NTableWidget):
...
@@ -99,7 +99,7 @@ class UBMatrixTable(tableBase.NTableWidget):
def
set_from_matrix
(
self
,
matrix
):
def
set_from_matrix
(
self
,
matrix
):
"""
"""
TODO - DOC
Set value to both holder and QTable from a numpy 3 x 3 matrix
:param matrix:
:param matrix:
:return:
:return:
"""
"""
...
@@ -311,7 +311,7 @@ class ProcessTableWidget(tableBase.NTableWidget):
...
@@ -311,7 +311,7 @@ class ProcessTableWidget(tableBase.NTableWidget):
def
set_status
(
self
,
scan_no
,
status
):
def
set_status
(
self
,
scan_no
,
status
):
"""
"""
TODO/Doc
Set the status for merging scan to QTable
:param status:
:param status:
:return:
:return:
"""
"""
...
@@ -335,7 +335,7 @@ class ProcessTableWidget(tableBase.NTableWidget):
...
@@ -335,7 +335,7 @@ class ProcessTableWidget(tableBase.NTableWidget):
def
set_ws_names
(
self
,
scan_num
,
merged_md_name
,
ws_group_name
):
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 merged_md_name:
:param ws_group_name:
:param ws_group_name:
:return:
:return:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment