Commit 088436c3 authored by Pierre Paleo's avatar Pierre Paleo Committed by Pierre Paleo
Browse files

resources.cor: use CenterOfRotationAdaptiveSearch

parent 596e5039
import numpy as np import numpy as np
from silx.io import get_data from silx.io import get_data
from ..preproc.ccd import FlatField from ..preproc.ccd import FlatField
from ..preproc.alignment import CenterOfRotation from ..preproc.alignment import CenterOfRotation, CenterOfRotationAdaptiveSearch
class CORFinder: class CORFinder:
""" """
...@@ -32,6 +32,7 @@ class CORFinder: ...@@ -32,6 +32,7 @@ class CORFinder:
self._default_search_method = "centered" self._default_search_method = "centered"
if self.halftomo: if self.halftomo:
self._default_search_method = "global" self._default_search_method = "global"
self.cor = CenterOfRotationAdaptiveSearch()
def _get_angles(self, angles): def _get_angles(self, angles):
dataset_angles = self.dataset_info.rotation_angles dataset_angles = self.dataset_info.rotation_angles
...@@ -114,7 +115,7 @@ class CORFinder: ...@@ -114,7 +115,7 @@ class CORFinder:
shift = self.cor.find_shift( shift = self.cor.find_shift(
self.radios[0], self.radios[0],
np.fliplr(self.radios[1]), np.fliplr(self.radios[1]),
low_pass=1, high_pass=20, global_search=True low_pass=1, high_pass=20
) )
else: else:
shift = self.cor.find_shift( shift = self.cor.find_shift(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment