Skip to content

Add linear interpolation and reverse to directed segment - #2285

Merged
CoePaul merged 1 commit into
mainfrom
dodal_2123g
Nov 19, 2026
Merged

CoePaul merged 1 commit into
mainfrom
dodal_2123g

Conversation

@CoePaul

@CoePaul CoePaul commented Nov 18, 2026

Copy link
Copy Markdown
Contributor
  • Also add inversion operator ~ which flips the directional sense

Contributes towards #2123

Instructions to reviewer on how to test:

( might need to read https://en.wikipedia.org/wiki/Linear_interpolation -
although we're not using the function for such widely general purposes;
rather than the general piecewise interpolation of arbitrary functions,
here instead it is strictly used to map a range of floats [start,end] to a normalised [0,1] range and back )

  1. See the names for added functions and test conditions added seem plausible
  2. Confirm tests pass

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}

@CoePaul
CoePaul requested a review from a team as a code owner November 18, 2026 20:37
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.31%. Comparing base (6510238) to head (aaf61c2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2285   +/-   ##
=======================================
  Coverage   99.31%   99.31%           
=======================================
  Files         380      380           
  Lines       14966    14978   +12     
=======================================
+ Hits        14863    14875   +12     
  Misses        103      103           

☔ 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.

@CoePaul
CoePaul force-pushed the dodal_2123g branch 2 times, most recently from 768439a to a5bd125 Compare November 19, 2026 13:54
@CoePaul CoePaul added python Pull requests that update Python code i19-1 i19-2 labels Nov 19, 2026
@CoePaul CoePaul self-assigned this Nov 19, 2026
@CoePaul
CoePaul requested a review from noemifrisina November 19, 2026 13:57
* Also add
   inversion operator ~ which flips the directional sense
   test that interval and segment endpoints are unmodifiable
@CoePaul
CoePaul merged commit fc60327 into main Nov 19, 2026
11 checks passed
@CoePaul
CoePaul deleted the dodal_2123g branch November 19, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i19-1 i19-2 python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants