-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* service always loads diffcal mask, use correct name * add hnew helpers, new test of diffcal mask only * changes from code review * simplify maskFromArray * remove * use preexisting add sample log helper * fixup! use preexisting add sample log helper
- Loading branch information
1 parent
ebe0d0b
commit 2eccb68
Showing
12 changed files
with
516 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# note: this runs the same checks as the calibrant_samples_script CIS test | ||
import unittest | ||
|
||
from snapred.backend.dao.state.DetectorState import DetectorState | ||
|
||
|
||
class TestDetectorstate(unittest.TestCase): | ||
def test_getLogValues(self): | ||
exp = { | ||
"det_lin1": "1.0", | ||
"det_lin2": "1.1", | ||
"det_arc1": "2.2", | ||
"det_arc2": "2.3", | ||
"BL3:Chop:Skf1:WavelengthUserReq": "3.4", | ||
"BL3:Det:TH:BL:Frequency": "4.5", | ||
"BL3:Mot:OpticsPos:Pos": "2", | ||
} | ||
detectorState = DetectorState.constructFromLogValues(exp) | ||
assert detectorState.arc[0] == float(exp["det_arc1"]) | ||
assert detectorState.arc[1] == float(exp["det_arc2"]) | ||
assert detectorState.lin[0] == float(exp["det_lin1"]) | ||
assert detectorState.lin[1] == float(exp["det_lin2"]) | ||
assert detectorState.wav == float(exp["BL3:Chop:Skf1:WavelengthUserReq"]) | ||
assert detectorState.freq == float(exp["BL3:Det:TH:BL:Frequency"]) | ||
assert detectorState.guideStat == float(exp["BL3:Mot:OpticsPos:Pos"]) | ||
assert exp == detectorState.getLogValues() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.