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

Phase contribution #1737

Merged
merged 67 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
f6dc0f4
First commit, phase retrieval changes
hrobarts Feb 19, 2024
3618c73
Update tests
hrobarts Feb 21, 2024
8f8ff6d
Tidy
hrobarts Feb 21, 2024
c8dd7e2
Add generalised paganin method
hrobarts Feb 29, 2024
cb28df4
Separate static method for filtering without -log
hrobarts Mar 1, 2024
5bc4ce8
Merge branch 'master' into phase_contribution
hrobarts Mar 1, 2024
b39b32c
Update tests
hrobarts Mar 1, 2024
95a6270
Update docstring
hrobarts Mar 4, 2024
ca1520b
Small changes
hrobarts Mar 5, 2024
d873007
Remove dask dependency
hrobarts Mar 6, 2024
5e1a2f2
More tests
hrobarts Mar 6, 2024
61d1971
Test update
hrobarts Mar 6, 2024
995735d
Merge branch 'master' into phase_contribution
hrobarts Mar 7, 2024
64a343d
Remove dask import
hrobarts Mar 7, 2024
60031c8
Merge branch 'phase_contribution' of github.com:TomographicImaging/CI…
hrobarts Mar 7, 2024
533a414
Documentation update
hrobarts Mar 8, 2024
162825f
Merge branch 'master' into phase_contribution
hrobarts Mar 11, 2024
1ce7180
Merge branch 'phase_contribution' of github.com:TomographicImaging/CI…
hrobarts Mar 11, 2024
b58da85
Don't require propagation distance for filter
hrobarts Mar 13, 2024
2695678
Merge branch 'master' into phase_contribution
hrobarts Mar 13, 2024
8d32470
Add tests
hrobarts Mar 15, 2024
5f645c8
Move division inside filter
hrobarts Mar 19, 2024
9268830
Updates from meeting
hrobarts Mar 20, 2024
a440654
Use Filter and PhaseRetriever classes
hrobarts Apr 10, 2024
44f5761
Update tests
hrobarts Apr 12, 2024
f5d5437
Merge branch 'master' into phase_contribution
hrobarts Apr 12, 2024
29ac9b2
Fix assertNoLogs error, add Filter tests
hrobarts Apr 15, 2024
4b66fc2
Merge branch 'phase_contribution' of github.com:TomographicImaging/CI…
hrobarts Apr 15, 2024
a577090
Update following UCL discussion
hrobarts Apr 26, 2024
258ac90
Merge branch 'master' into phase_contribution
hrobarts Apr 26, 2024
90c380d
Fix test name error
hrobarts Apr 26, 2024
5f43ab0
Clarify magnification
hrobarts May 1, 2024
eaf2ea7
Merge branch 'master' into phase_contribution
hrobarts May 7, 2024
7fee405
Merge branch 'master' into phase_contribution
hrobarts May 9, 2024
2ab2374
Get information from geometry, remove separate filter class
hrobarts May 14, 2024
3fdfbbe
Merge branch 'phase_contribution' of github.com:TomographicImaging/CI…
hrobarts May 14, 2024
7cc56c4
Update example
hrobarts May 14, 2024
0207ecb
Merge branch 'master' into phase_contribution
hrobarts May 14, 2024
0ada661
Documentation updates
hrobarts May 14, 2024
3df049c
Fix import error
hrobarts May 14, 2024
222b1a1
Update changelog
hrobarts May 14, 2024
138053d
Update warning message
hrobarts May 14, 2024
58aa4c7
Add pad option
hrobarts May 22, 2024
0bcca3b
Merge branch 'master' into phase_contribution
hrobarts May 22, 2024
3613435
Move update parameters to get_output
hrobarts May 24, 2024
94ecca5
Move update geometry/parameters to get_output
hrobarts May 28, 2024
45452c5
Merge branch 'phase_contribution' of github.com:TomographicImaging/CI…
hrobarts May 28, 2024
c2487ca
Merge branch 'master' into phase_contribution
hrobarts May 28, 2024
8eb3f32
Add return units default cm, move full_retrieval to init
hrobarts May 29, 2024
ddcb720
Changes from review
hrobarts May 31, 2024
32fdb3f
Documentation updates
hrobarts Jun 13, 2024
29db2d5
Merge branch 'master' into phase_contribution
hrobarts Jun 13, 2024
c2626d3
Merge branch 'master' into phase_contribution
hrobarts Jun 18, 2024
3bf2ce2
Updates from Gemma's review
hrobarts Jun 24, 2024
990d0dd
Merge branch 'master' into phase_contribution
hrobarts Jun 24, 2024
5a3e8e3
Update Wrappers/Python/cil/processors/PaganinProcessor.py
hrobarts Jun 25, 2024
6c74408
Revert to just accepting string in units
hrobarts Jun 27, 2024
570be48
Merge branch 'phase_contribution' of github.com:TomographicImaging/CI…
hrobarts Jun 27, 2024
4de6e0c
Update tests, remove units.py
hrobarts Jun 27, 2024
141f468
Merge branch 'master' into phase_contribution
hrobarts Jul 15, 2024
9a06038
Update channel calculation, tests, warn if order is not cil
hrobarts Jul 15, 2024
2e3ffc3
Typos
hrobarts Jul 15, 2024
b4f7b0e
Typo
hrobarts Jul 15, 2024
416f633
Merge branch 'master' into phase_contribution
hrobarts Jul 15, 2024
b9d0a43
Merge branch 'master' into phase_contribution
hrobarts Jul 16, 2024
a64082f
Typos
hrobarts Jul 16, 2024
ba3bf06
Merge branch 'master' into phase_contribution
hrobarts Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- New Features:
- Added method to plot filter in `GenericFilteredBackProjection` (#1667)
- Added wavelet operator, wrapping PyWavelets operator as a CIL operator (#1618)
- Added PaganinProcessor processor, to perform phase retrieval from phase contrast images (#1737)
- Added L1Sparsity function, allowing calculations of `|Ax-b|_1` and its proximal, in the case of orthogonal operators, `A` (#1618)
- Options in algorithms GD, ISTA and FISTA to pass a `cil.optimisation.utilities.StepSizeRule` or a `cil.optimisation.utilities.Preconditioner`(#1768)
- an implementation of the Armijo Rule as a child class of `cil.optimisation.utilities.StepSizeRule` (#1768)
Expand Down
34 changes: 32 additions & 2 deletions Wrappers/Python/cil/framework/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,22 @@ def get_centre_slice(self):
return self

def calculate_magnification(self):
hrobarts marked this conversation as resolved.
Show resolved Hide resolved
return [None, None, 1.0]
'''Method to calculate magnification and distance from the sample to
the detector using the detector positions and the rotation axis.
For parallel beam geometry magnification = 1

Returns
-------
list
A list containing the [0] distance from the source to the rotate
axis, [1] distance from the rotate axis to the detector,
[2] magnification of the system

'''
ab = (self.rotation_axis.position - self.detector.position)
dist_center_detector = float(numpy.sqrt(ab.dot(ab)))

return [None, dist_center_detector, 1.0]

class Parallel3D(SystemConfiguration):
r'''This class creates the SystemConfiguration of a parallel beam 3D tomographic system
Expand Down Expand Up @@ -1116,7 +1131,22 @@ def __eq__(self, other):
return False

def calculate_magnification(self):
jakobsj marked this conversation as resolved.
Show resolved Hide resolved
return [None, None, 1.0]
'''Method to calculate magnification and distance from the sample to
the detector using the detector positions and the rotation axis.
For parallel beam geometry magnification = 1

Returns
-------
list
A list containing the [0] distance from the source to the rotate
axis, [1] distance from the rotate axis to the detector,
[2] magnification of the system

'''
ab = (self.rotation_axis.position - self.detector.position)
dist_center_detector = float(numpy.sqrt(ab.dot(ab)))

return [None, dist_center_detector, 1.0]

def get_centre_slice(self):
"""Returns the 2D system configuration corresponding to the centre slice
Expand Down
Loading
Loading