-
Notifications
You must be signed in to change notification settings - Fork 120
Astra curved detector #1729
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
Open
NogginBops
wants to merge
7
commits into
odlgroup:master
Choose a base branch
from
NogginBops:astra-curved-detector
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Astra curved detector #1729
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
abaa1f0
Added support for ASTRA cylindrical detector geometry.
NogginBops c5f83c0
Fix permutation issue.
NogginBops 1e76c21
Switch to permute_dims.
NogginBops da505f5
Fix typo.
NogginBops 4a29b2d
Use proj_space.array_namespace.
NogginBops d5fefa5
Try and fix the dimention missmatch problem.
NogginBops 900090a
Fix typo
NogginBops File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the transpose issue. We store transpose info in
transpose_tupleto be able to do the transpose at a later time. But for pytorch tensors a transpose can only swap the positions of two dimensions and not arbitrarily rearrange them like we need to do in this case. With two transposes we can get the correct format, but I'm not sure what the best way to store that information is.I could make a
transpose_tuple2that only gets used for pytorch tensors and only iftranspose_tuple2 != Nonebut I'm not sure if this is a good solution, seems a little bit messy.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think permute_dims is now the preferred tool to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've managed to use
permute_dimsbut as I'm unfamiliar with the standardized python array API I might be doing something weird.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a glance, it looks reasonable. Though, better use
proj_space.array_namespaceand store it in a variable, instead of repeatedly looking upproj_data.__array_namespace__.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it matters enough that I should change it?
I don't know how expensive
__array_namespace__really is, but I expect that compared to the other operations in these functions I expect it to be negligible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance-wise the difference is likely negligible, but it's just a bit more structured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've fixed it now.