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

Added reader base class and reworked nikon reader to use it #1462

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

Conversation

gfardell
Copy link
Member

Describe your changes

  • Added a reader base class with new functionality

    • metadata and geometry as properties of the object
    • get_raw_flatfield - returns the flatfields as a numpy ndarray (no processing/casting/cropping)
    • get_raw_darkfield - returns the darkfields as a numpy ndarray (no processing/casting/cropping)
    • get_raw_data - returns the data as a numpy ndarray (no processing/casting/cropping)
    • set_panel_roi - set the ROI in the horizontal and vertical directions, allows cropping and binning
    • set_projections - set the projections to read in by index as a slice or list
    • get_geometry - returns a CIL AcquisitionGeometry describing the data respecting ROI and angle selection
    • read - returns a CIL AcquisitionData the normalised data respecting ROI and angle selection
  • Methods marked as abstract that must be defined by a child before the class can be instantiated - Is this what we want?

  • Updated the NikonDataReader to use the base class

Describe any testing you have performed

Please add any demo scripts to CIL-Demos/misc/

Link relevant issues

closes #1020
closes #1144

Checklist when you are ready to request a review

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • 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

@casperdcl casperdcl force-pushed the master branch 3 times, most recently from a910556 to f8b513b Compare September 2, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ToDo
Development

Successfully merging this pull request may close these issues.

Nikon Image Geometry and Metadata Reader Base class for Readers
1 participant