We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I got a error when I trying to using the MultislicePtychographicOperator. The code are list below:
ptycho_operator=MultislicePtychographicOperator(measurements,energy=300e3,num_slices=3,slice_thicknesses=10.0) ptycho_operator.preprocess() rpie_objects, rpie_probes, rpie_positions, rpie_sse = ptycho_operator.reconstruct( max_iterations=5, return_iterations=True, random_seed=1, verbose=True )
The error reported are listed below:
AttributeError Traceback (most recent call last) Cell In[14], line 1 ----> 1 rpie_objects, rpie_probes, rpie_positions, rpie_sse = ptycho_operator.reconstruct( 2 max_iterations=5, return_iterations=True, random_seed=1, verbose=True 3 )
File C:\ProgramData\anaconda3\Lib\site-packages\abtem\reconstruct.py:4843, in MultislicePtychographicOperator.reconstruct(self, max_iterations, return_iterations, fix_com, random_seed, verbose, parameters, measurement_output_view, functions_queue, **kwargs) 4829 fix_probe = ( 4830 global_iteration_i 4831 < self._reconstruction_parameters[ 4832 "pre_probe_correction_update_steps" 4833 ] 4834 ) 4836 ( 4837 _overlap_projection, 4838 _fourier_projection, 4839 _update_function, 4840 _position_correction, 4841 ) = update_step -> 4843 self._probes, exit_wave = _overlap_projection( 4844 self._objects, 4845 self._probes, 4846 position, 4847 old_position, 4848 propagator=propagator, 4849 slice_thicknesses=self._slice_thicknesses, 4850 sampling=self.sampling, 4851 wavelength=wavelength, 4852 xp=xp, 4853 ) 4855 modified_exit_wave, self._sse = _fourier_projection( 4856 exit_wave, diffraction_pattern, self._sse, xp=xp 4857 ) 4859 ( 4860 self._objects, 4861 self._probes, (...) 4878 xp=xp, 4879 )
File C:\ProgramData\anaconda3\Lib\site-packages\abtem\reconstruct.py:4342, in MultislicePtychographicOperator._overlap_projection(objects, probes, position, old_position, propagator, slice_thicknesses, sampling, wavelength, xp, **kwargs) 4340 exit_waves[s] = objects[s][object_indices] * probes[s] 4341 if s + 1 < num_slices: -> 4342 probes[s + 1] = _propagate_array( 4343 propagator, 4344 exit_waves[s], 4345 sampling, 4346 wavelength, 4347 slice_thicknesses[s], 4348 overwrite=False, 4349 xp=xp, 4350 ) 4352 return probes, exit_waves
File C:\ProgramData\anaconda3\Lib\site-packages\abtem\reconstruct.py:160, in _propagate_array(propagator, waves_array, sampling, wavelength, thickness, overwrite, xp) 126 def _propagate_array( 127 propagator: FresnelPropagator, 128 waves_array: np.ndarray, (...) 133 xp=np, 134 ): 135 """ 136 Propagates complex wave function array through free space distance dz. 137 (...) 158 Propagated array 159 """ --> 160 propagator_array = propagator._evaluate_propagator_array( 161 waves_array.shape, sampling, wavelength, thickness, None, xp 162 ) 163 return fft2_convolve(waves_array, propagator_array, overwrite_x=overwrite)
AttributeError: 'FresnelPropagator' object has no attribute '_evaluate_propagator_array'
It seems there is no _evaluate_propagator_array function in the FresnelProgagator.
Thank you very much in advance for your help.
The text was updated successfully, but these errors were encountered:
Thank you for making us aware of this issue. It may take a little time to solve.
Sorry, something went wrong.
No branches or pull requests
Hi, I got a error when I trying to using the MultislicePtychographicOperator. The code are list below:
ptycho_operator=MultislicePtychographicOperator(measurements,energy=300e3,num_slices=3,slice_thicknesses=10.0)
ptycho_operator.preprocess()
rpie_objects, rpie_probes, rpie_positions, rpie_sse = ptycho_operator.reconstruct(
max_iterations=5, return_iterations=True, random_seed=1, verbose=True
)
The error reported are listed below:
AttributeError Traceback (most recent call last)
Cell In[14], line 1
----> 1 rpie_objects, rpie_probes, rpie_positions, rpie_sse = ptycho_operator.reconstruct(
2 max_iterations=5, return_iterations=True, random_seed=1, verbose=True
3 )
File C:\ProgramData\anaconda3\Lib\site-packages\abtem\reconstruct.py:4843, in MultislicePtychographicOperator.reconstruct(self, max_iterations, return_iterations, fix_com, random_seed, verbose, parameters, measurement_output_view, functions_queue, **kwargs)
4829 fix_probe = (
4830 global_iteration_i
4831 < self._reconstruction_parameters[
4832 "pre_probe_correction_update_steps"
4833 ]
4834 )
4836 (
4837 _overlap_projection,
4838 _fourier_projection,
4839 _update_function,
4840 _position_correction,
4841 ) = update_step
-> 4843 self._probes, exit_wave = _overlap_projection(
4844 self._objects,
4845 self._probes,
4846 position,
4847 old_position,
4848 propagator=propagator,
4849 slice_thicknesses=self._slice_thicknesses,
4850 sampling=self.sampling,
4851 wavelength=wavelength,
4852 xp=xp,
4853 )
4855 modified_exit_wave, self._sse = _fourier_projection(
4856 exit_wave, diffraction_pattern, self._sse, xp=xp
4857 )
4859 (
4860 self._objects,
4861 self._probes,
(...)
4878 xp=xp,
4879 )
File C:\ProgramData\anaconda3\Lib\site-packages\abtem\reconstruct.py:4342, in MultislicePtychographicOperator._overlap_projection(objects, probes, position, old_position, propagator, slice_thicknesses, sampling, wavelength, xp, **kwargs)
4340 exit_waves[s] = objects[s][object_indices] * probes[s]
4341 if s + 1 < num_slices:
-> 4342 probes[s + 1] = _propagate_array(
4343 propagator,
4344 exit_waves[s],
4345 sampling,
4346 wavelength,
4347 slice_thicknesses[s],
4348 overwrite=False,
4349 xp=xp,
4350 )
4352 return probes, exit_waves
File C:\ProgramData\anaconda3\Lib\site-packages\abtem\reconstruct.py:160, in _propagate_array(propagator, waves_array, sampling, wavelength, thickness, overwrite, xp)
126 def _propagate_array(
127 propagator: FresnelPropagator,
128 waves_array: np.ndarray,
(...)
133 xp=np,
134 ):
135 """
136 Propagates complex wave function array through free space distance dz.
137
(...)
158 Propagated array
159 """
--> 160 propagator_array = propagator._evaluate_propagator_array(
161 waves_array.shape, sampling, wavelength, thickness, None, xp
162 )
163 return fft2_convolve(waves_array, propagator_array, overwrite_x=overwrite)
AttributeError: 'FresnelPropagator' object has no attribute '_evaluate_propagator_array'
It seems there is no _evaluate_propagator_array function in the FresnelProgagator.
Thank you very much in advance for your help.
The text was updated successfully, but these errors were encountered: