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

Make Paganin processor work with one angle #1920

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

Conversation

hrobarts
Copy link
Contributor

@hrobarts hrobarts commented Aug 30, 2024

Changes

Make PaganinProcessor work if there is just one angle in the AcquisitionData

Testing you performed

Please add any demo scripts to https://github.com/TomographicImaging/CIL-Demos/tree/main/misc
Added test case in test_DataProcessor.py

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 linked an issue Aug 30, 2024 that may be closed by this pull request
@hrobarts hrobarts self-assigned this Sep 12, 2024
Copy link
Member

@gfardell gfardell left a comment

Choose a reason for hiding this comment

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

I feel like this has grown in complexity. I would try to avoid using DataContainer.fill, and instead look at dealing directly with the array i.e. numpy.copyto or equivalent. That means this whole block would condense in to one command.

You already have i and j defined so you should be able to access the array and copy the relevant portions in directly. You could either calculate the start and end indices of your data block, or reshape the array keeping singleton dimensions in.

If the data isn't in a defined order (maybe that's why you're using fill?) there's a strong argument to reorder it first as writing the memory back to the block will be significantly faster if it's a contiguous block you're writing out.

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.

PaganinProcessor doesn't work on data with one angle
2 participants