Extend monochrometer to get energy from y position#2072
Conversation
DominicOram
left a comment
There was a problem hiding this comment.
Great, thanks. Could you pin to the correct version of the daq config server so that the tests pass, with a comment saying to remove the pin once there's a release?
| return self.config_client.get_file_contents( | ||
| self.crystal_lut_path, | ||
| XpdfCrystalLookupTable, | ||
| # Remove once new config server is released + deployed |
There was a problem hiding this comment.
Should: Can you link to which PR the release needs for this
| self.roll = Motor(prefix + "ROLL") | ||
| self.yaw = Motor(prefix + "YAW") | ||
| self.y = Motor(prefix + "Y") | ||
| self.energy_kev = derived_signal_r(self._get_energy, y=self.y) |
There was a problem hiding this comment.
Should: I think this needs to be a hinted signal with the others being config
There was a problem hiding this comment.
All the other signals being config? Or _config_client and _crystal_lut_path (which are now not signals)
There was a problem hiding this comment.
I think what you've got is correct. Basically the one signal that is the most scientifically relevant should be hinted, everything else config
| self.config_client = config_client | ||
| self.crystal_lut_path = crystal_lut_path |
There was a problem hiding this comment.
Should: These aren't signals so don't need to be added as readables
There was a problem hiding this comment.
Also, they should probably be private
| laue_monochrometer: LaueMonochrometer, y, expected_energy | ||
| ): | ||
| await laue_monochrometer.y.set(y) | ||
| assert await laue_monochrometer.energy_kev.get_value() == expected_energy |
There was a problem hiding this comment.
Could: Can you test that read in here also gives the energy? Should be able to use assert_reading
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2072 +/- ##
=======================================
Coverage 99.14% 99.14%
=======================================
Files 341 341
Lines 13275 13287 +12
=======================================
+ Hits 13161 13173 +12
Misses 114 114 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes DiamondLightSource/crystallography-bluesky#47
Requires DiamondLightSource/daq-config-server#183
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}