Skip to content

658 create device for pressure jump cell #673

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

Merged
merged 28 commits into from
Nov 14, 2024
Merged

Conversation

barnettwilliam
Copy link
Contributor

@barnettwilliam barnettwilliam commented Jul 15, 2024

closes #658
Ophyd device for pressure jump cell #658, required for pressure jump experiment.

Initial control PVs, TODO fast adc capture.

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@barnettwilliam barnettwilliam requested a review from stan-dot July 15, 2024 17:00
@barnettwilliam barnettwilliam self-assigned this Jul 15, 2024
@barnettwilliam barnettwilliam force-pushed the 658-pressure-jump-cell branch from 92f4c0a to 0d07c25 Compare July 17, 2024 09:52
Copy link
Contributor

@stan-dot stan-dot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment it's implemented as one large object hard to debug, should be split into components

@barnettwilliam barnettwilliam force-pushed the 658-pressure-jump-cell branch from 0d07c25 to 803b90a Compare July 25, 2024 09:09
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 98.62069% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.78%. Comparing base (ad6cc0d) to head (8bfd8ed).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dodal/devices/pressure_jump_cell.py 98.59% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #673      +/-   ##
==========================================
+ Coverage   95.70%   95.78%   +0.07%     
==========================================
  Files         132      133       +1     
  Lines        5334     5479     +145     
==========================================
+ Hits         5105     5248     +143     
- Misses        229      231       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stan-dot stan-dot force-pushed the 658-pressure-jump-cell branch from 07522bb to 431887c Compare July 30, 2024 11:25
@stan-dot stan-dot marked this pull request as ready for review July 30, 2024 12:21
@stan-dot stan-dot requested review from DiamondJoseph and d-perl July 30, 2024 12:30
Comment on lines 126 to 138
self.pump_forward_limit = epics_signal_r(
LimitSwitchState, prefix + "D74IN1"
)
self.pump_backward_limit = epics_signal_r(
LimitSwitchState, prefix + "D74IN0"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the limits settable and required to be Read signals or are they read-once Config signals?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to check that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're epics_signal_r read only from the ophyd layer, which means they're read-only from the ophyd layer. They could be derived from other signals, and therefore changing on the rate of every point of a scan, but I would infer from the name that they are hardware limits that don't change over the lifetime of the device, let alone within a scan. I would make them config signals.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These signals are the state of limit switches for the pump so they will change during a scan if the pump is driven for a some length of time (approx 50s) in one direction. The name could be improved to pump_..._limit_state

@stan-dot stan-dot force-pushed the 658-pressure-jump-cell branch from 7af5a66 to a6b8c74 Compare July 30, 2024 17:25
Copy link
Contributor

@stan-dot stan-dot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some small bits

Comment on lines 126 to 138
self.pump_forward_limit = epics_signal_r(
LimitSwitchState, prefix + "D74IN1"
)
self.pump_backward_limit = epics_signal_r(
LimitSwitchState, prefix + "D74IN0"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're epics_signal_r read only from the ophyd layer, which means they're read-only from the ophyd layer. They could be derived from other signals, and therefore changing on the rate of every point of a scan, but I would infer from the name that they are hardware limits that don't change over the lifetime of the device, let alone within a scan. I would make them config signals.

@stan-dot stan-dot force-pushed the 658-pressure-jump-cell branch 2 times, most recently from 1ce82ad to 7567b94 Compare August 22, 2024 09:06
@stan-dot stan-dot requested a review from DiamondJoseph August 22, 2024 11:03
@stan-dot stan-dot force-pushed the 658-pressure-jump-cell branch 2 times, most recently from 4a7b253 to cadd4d2 Compare August 27, 2024 10:16
@stan-dot stan-dot force-pushed the 658-pressure-jump-cell branch from 03dc7c7 to 1ed5229 Compare November 14, 2024 13:56
@stan-dot stan-dot dismissed stale reviews from DiamondJoseph and themself November 14, 2024 14:30

out of date

@stan-dot stan-dot self-requested a review November 14, 2024 14:31
Copy link
Contributor

@DiamondJoseph DiamondJoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval conditional on it connects with dodal connect p38 and the prefix is right for both devices, I'm happy to check tomorrow but no time today

@@ -312,7 +313,7 @@ def linkam(
return device_instantiation(
Linkam3,
"linkam",
"-EA-LINKM-02:",
f"{BeamlinePrefix(BL).insertion_prefix}-EA-LINKM-02:",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While device_factory is reverted, this isn't going to work and is unrelated: it'll cause merge issues when that change goes back in, so let's revert it for now.

Suggested change
f"{BeamlinePrefix(BL).insertion_prefix}-EA-LINKM-02:",
"-EA-LINKM-02:",

@stan-dot stan-dot merged commit 82d6afc into main Nov 14, 2024
19 checks passed
@stan-dot stan-dot deleted the 658-pressure-jump-cell branch November 14, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ophyd-async device for Pressure Jump Cell
4 participants