Functions:
angle = atan(y/x)
s2 = x*x + y*y
defocus_average = (defocus_max + defocus_min)/2
defocus_deviation = (defocus_max - defocus_min)/2
defocus = defocus_average + defocus_deviation*cos(2*(angle - astigmatism_angle))
phase = 0.5*PI*lambda*lambda*lambda*Cs*s2*s2 - PI*lambda*defocus*s2;
CTF = cos(phase) + i*sin(phase)
Note: Defocus is positive for underfocus and negative for overfocus.
| float defocus_avg | average defocus (angstrom). |
| float defocus_dev | defocus deviation (angstrom). |
| float ast_angle | astigmatism angle (radians). |
| float volt | accelerating voltage (volts). |
| float Cs | spherical abberation (angstrom). |
| float amp_fac | amplitude contribution. |
| Vector3 | new image size. |
| Vector3 | new image pixel size. |