Skip to content
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

658 create device for pressure jump cell #673

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

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}

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

src/dodal/beamlines/p38.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 95.08197% with 6 lines in your changes missing coverage. Please review.

Project coverage is 94.47%. Comparing base (851a002) to head (26e46cd).

Files Patch % Lines
src/dodal/devices/pressure_jump_cell.py 94.95% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #673      +/-   ##
==========================================
+ Coverage   94.46%   94.47%   +0.01%     
==========================================
  Files         115      116       +1     
  Lines        4604     4726     +122     
==========================================
+ Hits         4349     4465     +116     
- Misses        255      261       +6     

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

@stan-dot stan-dot marked this pull request as ready for review July 30, 2024 12:21
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
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

src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
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

src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
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.

src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
@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
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
src/dodal/devices/pressure_jump_cell.py Outdated Show resolved Hide resolved
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