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

Add units setter in framework, update readers to add units #1822

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hrobarts
Copy link
Contributor

@hrobarts hrobarts commented May 29, 2024

Changes

Formalise use of units in CIL

  • Use units.py to store accepted units and conversions (currently in Phase contribution #1737)
  • Add a units setter in framework
  • Set units in readers where the information is available

Some considerations

  • Need some thought about where unit conversions happen, we don't want conversion to happen repeatedly between functions as this could add computational cost in our algorithms
  • Conversions could only occur at user input or output
  • Allow no units/ custom units as a valid option

Testing you performed

Please add any demo scripts to https://github.com/TomographicImaging/CIL-Demos/tree/main/misc

Related issues/links

Checklist

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have updated the relevant documentation
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'Waiting for review'

Contribution Notes

Please read and adhere to the developer guide and local patterns and conventions.

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

@hrobarts hrobarts self-assigned this May 29, 2024
@hrobarts hrobarts requested a review from gfardell June 5, 2024 08:33
@hrobarts hrobarts mentioned this pull request Jun 25, 2024
9 tasks
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.

None yet

1 participant