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
37abfec7
Commit
37abfec7
authored
14 years ago
by
Steve Williams
Browse files
Options
Downloads
Patches
Plain Diff
Fix system tests broken by removing a function needed by the old beam center finder re #1811
parent
6d252e62
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Scripts/SANS/isis_instrument.py
+41
-1
41 additions, 1 deletion
Code/Mantid/Scripts/SANS/isis_instrument.py
with
41 additions
and
1 deletion
Code/Mantid/Scripts/SANS/isis_instrument.py
+
41
−
1
View file @
37abfec7
...
...
@@ -378,13 +378,13 @@ class ISISInstrument(instrument.Instrument):
class
LOQ
(
ISISInstrument
):
_NAME
=
'
LOQ
'
# Number of digits in standard file name
run_number_width
=
5
WAV_RANGE_MIN
=
2.2
WAV_RANGE_MAX
=
10.0
def
__init__
(
self
,
wrksp_name
=
None
):
self
.
_NAME
=
'
LOQ
'
super
(
LOQ
,
self
).
__init__
(
wrksp_name
)
...
...
@@ -640,6 +640,46 @@ class SANS2D(ISISInstrument):
def
get_marked_dets
(
self
):
return
self
.
_marked_dets
#TODO: remove load_detector_logs() once centre finding has been replaced
def
load_detector_logs
(
self
,
log_name
,
file_path
):
"""
Needed until centre finding is replaced
"""
self
.
_marked_dets
=
[]
log_name
=
log_name
[
0
:
6
]
+
'
0
'
+
log_name
[
7
:]
filename
=
os
.
path
.
join
(
file_path
,
log_name
+
'
.log
'
)
# Build a dictionary of log data
logvalues
=
{}
logvalues
[
'
Rear_Det_X
'
]
=
'
0.0
'
logvalues
[
'
Rear_Det_Z
'
]
=
'
0.0
'
logvalues
[
'
Front_Det_X
'
]
=
'
0.0
'
logvalues
[
'
Front_Det_Z
'
]
=
'
0.0
'
logvalues
[
'
Front_Det_Rot
'
]
=
'
0.0
'
try
:
file_handle
=
open
(
filename
,
'
r
'
)
except
IOError
:
mantid
.
sendLogMessage
(
"
::SANS::load_detector_logs: Log file
\"
"
+
filename
+
"
\"
could not be loaded.
"
)
return
None
for
line
in
file_handle
:
parts
=
line
.
split
()
if
len
(
parts
)
!=
3
:
mantid
.
sendLogMessage
(
'
::SANS::load_detector_logs: Incorrect structure detected in logfile
"'
+
filename
+
'"
for line
\n
"'
+
line
+
'"
\n
Entry skipped
'
)
component
=
parts
[
1
]
if
component
in
logvalues
.
keys
():
logvalues
[
component
]
=
parts
[
2
]
file_handle
.
close
()
self
.
FRONT_DET_Z
=
float
(
logvalues
[
'
Front_Det_Z
'
])
self
.
FRONT_DET_X
=
float
(
logvalues
[
'
Front_Det_X
'
])
self
.
FRONT_DET_ROT
=
float
(
logvalues
[
'
Front_Det_Rot
'
])
self
.
REAR_DET_Z
=
float
(
logvalues
[
'
Rear_Det_Z
'
])
self
.
REAR_DET_X
=
float
(
logvalues
[
'
Rear_Det_X
'
])
return
logvalues
if
__name__
==
'
__main__
'
:
pass
\ No newline at end of file
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