-
Notifications
You must be signed in to change notification settings - Fork 12
Create hard-x-ray undulator for i09 branches #1531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1531 +/- ##
=======================================
Coverage 98.88% 98.88%
=======================================
Files 260 262 +2
Lines 9468 9526 +58
=======================================
+ Hits 9362 9420 +58
Misses 106 106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good, thanks for doing this. Just some minor typing improvements
name: str = "", | ||
poles: int | None = None, | ||
length: float | None = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: str = "", | |
poles: int | None = None, | |
length: float | None = None, | |
poles: int | None = None, | |
length: float | None = None, | |
name: str = "", |
The name should be last so that we can still provide other arguments otherwise we have to do this
with init_devices():
hu = HardUndulator(prefix, order, id_gap_lookup_table_path, calculate_gap_function, poles=poles, length=length)
await self._check_order_valid(value) | ||
await self._order.set(value) | ||
|
||
async def _check_order_valid(self, value: int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async def _check_order_valid(self, value: int): | |
async def _check_order_valid(self, value: int) -> None: |
await self._check_energy_limits(value) | ||
await self._set_undulator_gap(value) | ||
|
||
async def _check_energy_limits(self, value: float): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async def _check_energy_limits(self, value: float): | |
async def _check_energy_limits(self, value: float) -> None: |
undulator_period_mm=await self.undulator_period.get_value(), | ||
) | ||
|
||
async def _update_cached_lookup_table(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async def _update_cached_lookup_table(self): | |
async def _update_cached_lookup_table(self) -> None: |
Very sorry, I am moving it to Drafts as we discussed this needs some refactoring in terms of ID definition as we discussed today in our SMG meeting |
Hi @DominicOram and @oliwenmandiamond ,
|
…ce/dodal into add_undulator_i09
Fixes DiamondLightSource/sm-bluesky#124
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}