Skip to content

Commit

Permalink
Centre of rotation finder More points evaluated (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfardell authored Jun 18, 2021
1 parent a972bda commit b813262
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Wrappers/Python/cil/processors/CofR_image_sharpness.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def process(self, out=None):
self.search_range = width //4

if self.initial_binning is None:
self.initial_binning = int(np.ceil(width / 128))
self.initial_binning = min(int(np.ceil(width / 128)),16)

logger.debug("Initial search:")
logger.debug("search range is %d", self.search_range)
Expand Down Expand Up @@ -242,8 +242,9 @@ def process(self, out=None):
ig = data_processed.geometry.get_ImageGeometry()

#binned grid search
vox_rad = self.search_range //self.initial_binning
offsets = np.linspace(-vox_rad, vox_rad, int(2*vox_rad + 1)) * ig.voxel_size_x
vox_rad = np.ceil(self.search_range /self.initial_binning)
steps = int(4*vox_rad + 1)
offsets = np.linspace(-vox_rad, vox_rad, steps) * ig.voxel_size_x
obj_vals = []

for offset in offsets:
Expand Down
2 changes: 1 addition & 1 deletion Wrappers/Python/test/test_DataProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def test_CofR_image_sharpness_astra(self):
corr = CofR_image_sharpness(search_range=20, FBP=AstraFBP)
corr.set_input(self.data_DLS.clone())
ad_out = corr.get_output()
self.assertAlmostEqual(6.33, ad_out.geometry.config.system.rotation_axis.position[0],places=1)
self.assertAlmostEqual(6.48, ad_out.geometry.config.system.rotation_axis.position[0],places=1)


@unittest.skipUnless(False, "TIGRE not installed")
Expand Down

0 comments on commit b813262

Please sign in to comment.