Skip to content

add i10-1 and i06-1magnet temperature controller - #2121

Open
Relm-Arrowny wants to merge 44 commits into
mainfrom
2113-i10-1-high-field-magnetic-controllers
Open

add i10-1 and i06-1magnet temperature controller#2121
Relm-Arrowny wants to merge 44 commits into
mainfrom
2113-i10-1-high-field-magnetic-controllers

Conversation

@Relm-Arrowny

@Relm-Arrowny Relm-Arrowny commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #2113, #2124

Requires: ophyd-async(#1381)

added a new generic temperature_controller:

  • TemperatureController base class
  • BaseTemperatureSensor and BaseHeater
  • Shared PID component
  • Temperature movable logic with configurable tolerance and stop behaviour
  • Support for multiple sensor readbacks
  • Support switchable readback control sensor.

Added support for the I06-1 SCM Cryocon M32 temperature controller:

  • Heater configuration, ramp settings and PID controls

Added support for the I10-1 High Field Magnet temperature controllers:

  • New HighFieldMagnetTemperatureController device

Fixed historical typo in module naming:

  • temperture_controller → temperature_controller

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

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}

@Relm-Arrowny Relm-Arrowny linked an issue Jul 16, 2026 that may be closed by this pull request
5 tasks
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.17%. Comparing base (36e3b03) to head (089184b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2121    +/-   ##
========================================
  Coverage   99.16%   99.17%            
========================================
  Files         353      356     +3     
  Lines       13832    13988   +156     
========================================
+ Hits        13716    13872   +156     
  Misses        116      116            

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Relm-Arrowny Relm-Arrowny linked an issue Jul 20, 2026 that may be closed by this pull request
1 task
@Relm-Arrowny Relm-Arrowny changed the title add temperature controller add i10-1 and i06-1magnet temperature controller Jul 20, 2026
@Relm-Arrowny
Relm-Arrowny marked this pull request as ready for review July 20, 2026 15:19
@Relm-Arrowny
Relm-Arrowny requested a review from a team as a code owner July 20, 2026 15:19

@oliwenmandiamond oliwenmandiamond left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, looks good but have feedback to improve. As @Villtord mentioned in standup, could we please also make sure to add doc strings to the devices. Thanks!

Comment thread src/dodal/devices/beamlines/i06_1/magnet/temperature_controller.py Outdated
Comment thread src/dodal/devices/beamlines/i10_1/high_field_magnet/temperature_controller.py Outdated

@oliwenmandiamond oliwenmandiamond left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks. Some comments on class naming which I think needs to be updated to make support easier long term and movable_logic needs to be addressed.

Comment thread src/dodal/beamlines/i06_1.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnet/temperature_controller.py Outdated
Comment thread src/dodal/devices/beamlines/i06_1/magnet/temperature_controller.py Outdated
Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Relm-Arrowny and others added 10 commits July 27, 2026 13:44
Co-authored-by: oliwenmandiamond <136330507+oliwenmandiamond@users.noreply.github.com>
…roller.py

Co-authored-by: oliwenmandiamond <136330507+oliwenmandiamond@users.noreply.github.com>
…roller.py

Co-authored-by: oliwenmandiamond <136330507+oliwenmandiamond@users.noreply.github.com>

@oliwenmandiamond oliwenmandiamond left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, couple comments. Can we test to see if DeviceVector would work with it? If it doesn't work, happy to approve. It probably won't work but is a very natural fit for this and if find any issues with it we can raise with ophyd-async and then revisit this later

Comment thread src/dodal/devices/beamlines/i06_1/magnet/temperature_controller.py Outdated
Comment thread src/dodal/devices/beamlines/i10_1/high_field_magnet/temperature_controller.py Outdated
Comment thread src/dodal/devices/beamlines/i10_1/high_field_magnet/temperature_controller.py Outdated
Comment thread src/dodal/devices/beamlines/i10_1/high_field_magnet/temperature_controller.py Outdated
Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Comment thread tests/devices/beamlines/i10_1/high_field_magnet/test_temperature_controller.py Outdated
Comment thread tests/devices/temperature_controller/test_base_temperature_controller.py Outdated
@oliwenmandiamond

Copy link
Copy Markdown
Contributor

(We also need to up test coverage)

Relm-Arrowny and others added 4 commits July 29, 2026 14:46
* Use DeviceVector for TemperatureSensor

* update base controller

* add sensor typing

* add active sensor to config

* remove unused type

* add sensor switching test

* add typing and edge case

* update scm

* highFieldmagnet update

* Enhance High-Field Magnet Temperature Controller with sensor mapping and name setting functionality

* Refactor temperature controller tests to use active sensor names and comment out sensor assertion

* Comment out assert_reading in temperature controller readback test

* add test fir default_high_fieldMagnet

* rename sorb without cap

---------

Co-authored-by: Raymond Fan <raymond.fan@diamond.ac.uk>

@oliwenmandiamond oliwenmandiamond left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, this looks much better now. I have couple more comments and then once ophyd-async blocker added, looks great. Thank you!

Comment on lines +85 to +95
if sensor_map is None:
sensor_map = {"sensor1": ""}
sensor_map.update({f"sensor{i}": str(i) for i in range(2, 4)})
sensor = TemperatureSensor[HighFieldMagnetSensor](
DeviceMap(
{
name_key: HighFieldMagnetSensor(f"{prefix}STEMP{pv_suffix}")
for name_key, pv_suffix in sensor_map.items()
}
)
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I personally dislike this sensor_map. It looks quite awkward when you could just construct TemperatureSensor class outside this class and pass it directly in with the DeviceMap already configured.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the i10 sub class, we are efficiently doing what you are saying, think of it as a helper function so we do not have to do this x times in i10 config:

sensor = TemperatureSensor[HighFieldMagnetSensor](
    DeviceMap({
        "sensor1": BaseTemperatureSensor("BL01I-EA-HFM-01:STEMP"),
        "sensor2": BaseTemperatureSensor("BL01I-EA-HFM-01:STEMP2"),
        "sensor3": BaseTemperatureSensor("BL01I-EA-HFM-01:STEMP3"),
    })
)
hfm_temp = HighFieldMagnetTemperatureController(prefix="BL01I-EA-HFM-01:", sensor=sensor)

Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Comment thread src/dodal/devices/temperature_controller/base_temperature_controller.py Outdated
Removed comment explaining the need for non-cached property.
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.

Add support for I06-1 Magnet Temperature Controller I10-1 high field magnetic controllers

3 participants