@@ -478,18 +478,6 @@ def to_complex(self, coef):
478478
479479 return ComplexCoef (self , complex_coef )
480480
481- # @abc.abstractmethod
482- # def expand_radial_vec(self, h_vals, **kwargs):
483- # """
484- # Expand a radial vector given by `h_vals` into a basis mat.
485-
486- # :param h_vals: Radial vector(s)
487- # :return: Basis representation (may be `BlkDiagMatrix`, or `DiagMatrix`) depending on basis.
488- # """
489- # # By default code can point here for a slow implementation.
490- # # A basis with a specialized solution should implementat that in the respective subclass.
491- # return basis_mat
492-
493481 def filter_to_basis_mat (self , f , ** kwargs ):
494482 """
495483 Convert a filter into a basis operator representation.
@@ -582,17 +570,3 @@ def _filter_to_basis_mat(self, f, expand_method=None, truncate=True, **kwargs):
582570 )
583571
584572 return filt
585-
586- #### xxx
587-
588- def _radial_ctf (self , voltage , cs , alpha , defocus , pixel_size , h , pts ):
589- wavelength = 12.2643247 / np .sqrt (voltage * 1e3 + 0.978466 * voltage ** 2 )
590- c2_vec = (- np .pi * wavelength * defocus ).reshape (- 1 , 1 )
591- c4_vec = (0.5 * np .pi * (cs * 1e7 ) * wavelength ** 3 ).reshape (- 1 , 1 )
592- r2 = (pts * h / (pixel_size * 2 * np .pi )) ** 2
593- r4 = r2 ** 2
594-
595- gamma = r2 @ c2_vec .T + r4 @ c4_vec .T
596- ctf_radial = np .sqrt (1 - alpha ** 2 ) * np .sin (gamma ) - alpha * np .cos (gamma )
597- # assert ctf_radial.shape == self.num_radial_nodes, f"ctf_radial_shape {ctf_radial.shape} != num_radial_nodes {self.num_radial_nodes}"
598- return ctf_radial
0 commit comments