pyoptics.microscopy¶
Microscopy: partially coherent bright field imaging, phase contrast, DIC, confocal microscopy and Fourier ptychography.
All functions describe a scalar microscope with a thin object (transmission
function t(x, y), complex) in object space: lengths are object space lengths,
the magnification is left out. The objective is a band limited (Debye)
system with the numerical aperture NA = n*sin(alpha) in the immersion medium
n, so the pupil passes the transverse wave vectors |k_perp| <= k0*NA
(k0 = 2*pi/wavelength). Its pupil is sampled on the centered frequency grid
of x, y (utils.freq_grid(), as in imaging and fft.FT()).
Bright field imaging after Abbe and Köhler:
source_points(): the condenser aperture (disk, annulus, off-axis point or any list of points) as plane wave directions on the frequency grid, with weights. sigma = NA_condenser/NA is the partial coherence factor.
pupil(): the objective pupil with defocus (exact k_z in the medium), aberrations and masks (e.g. a phase ring).
abbe_image(): the partially coherent image as the incoherent sum of the coherent images for all source points (Abbe’s method).
weak_object_transfer(): amplitude and phase transfer functions of weak objects for a given condenser and pupil (Hopkins’ transmission cross coefficient with one argument at zero).
grating_cutoff(): the smallest period of a grating that is still imaged, wavelength/(NA + NA_condenser).
Phase contrast methods:
phase_ring(): Zernike’s phase plate as a pupil mask, an annulus that shifts the phase of the direct light and attenuates it; with the annular condenser of source_points() it gives positive or negative phase contrast with its halo and shade-off.
dic_object(): Nomarski differential interference contrast, the effective object of two copies sheared by a Wollaston prism, with a bias, between crossed polarizers (for a compensated condenser prism); image it with abbe_image().
Confocal microscopy:
psf_3d(): the 3D amplitude PSF from the pupil by angular spectrum propagation, uniform or aplanatic (sine condition) pupil.
airy_unit(): the Airy disk diameter 1.22*wavelength/NA used for pinholes.
confocal_psf(): the fluorescence confocal PSF, the product of the excitation PSF and the detection PSF convolved with the pinhole.
plane_response(): the signal of a thin fluorescent plane vs. defocus, the measure of optical sectioning.
mirror_response(): the axial response of a reflection confocal microscope to a plane mirror (point pinhole).
Fourier ptychography:
led_array(): illumination wave vectors of an LED matrix below the sample.
fpm_pupil(): the objective pupil on the camera’s frequency grid.
fpm_images(): the low resolution images of a thin object under each LED.
fpm_reconstruct(): the object spectrum stitched together in k-space by alternating projections (quasi-Newton or EPRY updates) with embedded pupil recovery.
circle_overlap(): the overlap of two pupil circles in k-space (FPM needs roughly 40 to 60 % between neighbouring LEDs).
Conventions: fields vary as exp(i(k.r - omega*t)); the object phase is phi = k0*OPD with OPD = integral (n_s - n_m) dz, so optically denser objects have positive phase. A tilted plane wave exp(i*(k_sx*x + k_sy*y)) shifts the object spectrum by (k_sx, k_sy). abbe_image() samples the source on the frequency grid, so these shifts are exact integer shifts; the grid must resolve k0*(NA + NA_condenser) (dx <= wavelength/(2*(NA + NA_condenser))), and wavelength/(4*NA) to sample the image intensity.
References¶
E. Abbe, “Beiträge zur Theorie des Mikroskops und der mikroskopischen Wahrnehmung”, Arch. Mikrosk. Anat. 9, 413-468 (1873).
H. H. Hopkins, “On the diffraction theory of optical images”, Proc. R. Soc. Lond. A 217, 408-432 (1953).
M. Born and E. Wolf, “Principles of Optics”, 7th ed., Cambridge University Press (1999), chapters 8.6 (phase contrast) and 10.5 (partially coherent imaging).
F. Zernike, “Phase contrast, a new method for the microscopic observation of transparent objects”, Physica 9, 686-698 (1942).
G. Nomarski, “Microinterféromètre différentiel à ondes polarisées”, J. Phys. Radium 16, 9S-13S (1955).
C. Preza, D. L. Snyder and J.-A. Conchello, “Theoretical development and experimental evaluation of imaging models for differential-interference- contrast microscopy”, J. Opt. Soc. Am. A 16, 2185-2199 (1999).
N. Streibl, “Three-dimensional imaging by a microscope”, J. Opt. Soc. Am. A 2, 121-127 (1985).
T. Wilson and C. Sheppard, “Theory and Practice of Scanning Optical Microscopy”, Academic Press (1984).
J. B. Pawley (ed.), “Handbook of Biological Confocal Microscopy”, 3rd ed., Springer (2006).
G. Zheng, R. Horstmeyer and C. Yang, “Wide-field, high-resolution Fourier ptychographic microscopy”, Nat. Photonics 7, 739-745 (2013).
X. Ou, G. Zheng and C. Yang, “Embedded pupil function recovery for Fourier ptychographic microscopy”, Opt. Express 22, 4960-4972 (2014).
L.-H. Yeh, J. Dong, J. Zhong, L. Tian, M. Chen, G. Tang, M. Soltanolkotabi and L. Waller, “Experimental robustness of Fourier ptychography phase retrieval algorithms”, Opt. Express 23, 33214-33240 (2015).
L. Tian, X. Li, K. Ramchandran and L. Waller, “Multiplexed coded illumination for Fourier ptychography with an LED array microscope”, Biomed. Opt. Express 5, 2376-2389 (2014).
J. Mertz, “Introduction to Optical Microscopy”, 2nd ed., Cambridge University Press (2019).
Functions
Partially coherent image of a thin object (Abbe's method). |
|
Diameter of the Airy disk (first dark ring), 1.22*wavelength/NA. |
|
Overlap area of two circles of radius R at distance d, relative to the area of one circle. |
|
Intensity PSF of a fluorescence confocal microscope. |
|
Effective object of Nomarski differential interference contrast. |
|
Low resolution images of a thin object under LED illumination. |
|
Objective pupil on the camera grid of Fourier ptychography. |
|
Fourier ptychographic reconstruction with embedded pupil recovery. |
|
Smallest grating period that the microscope still images. |
|
Illumination wave vectors of an LED matrix below the sample. |
|
Axial response of a reflection confocal microscope to a plane mirror. |
|
Zernike phase plate as a pupil mask. |
|
Signal of a thin, uniform fluorescent plane vs. its axial position. |
|
Scalar 3D amplitude point spread function of an objective. |
|
Objective pupil on the centered frequency grid of x, y. |
|
Condenser aperture sampled as plane waves on the frequency grid. |
|
Amplitude and phase transfer functions for weak objects. |
- pyoptics.microscopy.source_points(x, y, wavelength, NA_outer, NA_inner=0.0, center=(0.0, 0.0), step=1, points=None, weights=None)[source]¶
Condenser aperture sampled as plane waves on the frequency grid.
In Köhler illumination every point of the condenser aperture sends a plane wave through the object. The points are taken from the frequency grid of x, y, so that the tilts are exact shifts of the object spectrum in abbe_image().
- Parameters:
- x, y1d arrays
Object coordinates.
- wavelengthnumber
Vacuum wavelength.
- NA_outernumber
Outer numerical aperture of the condenser (sigma*NA). 0 gives a single plane wave (coherent illumination).
- NA_innernumber, optional
Inner numerical aperture for annular illumination (phase contrast, dark field). Defaults to 0 (disk).
- centertuple of numbers, optional
Center (NA_x, NA_y) of the aperture, e.g. for oblique illumination with a small off-axis disk. Defaults to (0, 0).
- stepint, optional
Take every step-th grid point in k_x and k_y (coarser source sampling, faster abbe_image()). Defaults to 1.
- pointsarray of shape (M, 2), optional
Explicit illumination directions (NA_x, NA_y) instead of an aperture; rounded to the grid.
- weightsarray of shape (M,), optional
Intensities of the explicit points. Defaults to equal weights.
- Returns:
- k_x, k_y1d arrays
Transverse wave vectors of the plane waves (on the grid).
- w1d array
Weights (intensities), normalized to sum 1.
- pyoptics.microscopy.pupil(x, y, wavelength, NA, n=1.0, defocus=0.0, phase=None, mask=None)[source]¶
Objective pupil on the centered frequency grid of x, y.
- Parameters:
- x, y1d arrays
Object coordinates.
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Numerical aperture n*sin(alpha), at most n.
- nnumber, optional
Refractive index of the immersion (and object) medium. Defaults to 1.
- defocusnumber, optional
Distance of the observed plane from the object along z, in the medium (positive: focus behind the object). The pupil gets the exact phase exp(i*(k_z - n*k0)*defocus). Defaults to 0.
- phasearray or callable, optional
Pupil aberration in radians, as array on the frequency grid or as callable phase(P_x, P_y) of the normalized pupil coordinates (k_x, k_y)/(k0*NA), e.g. a Zernike polynomial.
- maskarray or callable, optional
Complex pupil mask (apodization, phase ring, …), array or callable mask(P_x, P_y); multiplied with the circular pupil.
- Returns:
- P2d array
Complex pupil function.
- pyoptics.microscopy.abbe_image(obj, x, y, wavelength, NA, source=None, P=None, n=1.0, defocus=0.0, chunk=16)[source]¶
Partially coherent image of a thin object (Abbe’s method).
Each source point illuminates the object with a plane wave exp(i*(k_sx*x + k_sy*y)), which shifts the object spectrum; the objective passes the part inside its pupil, and the coherent images of all source points add up in intensity:
I(r) = sum_s w_s |inv_FT{ P(k) * T(k - k_s) }(r)|**2.
- Parameters:
- obj2d array
Complex transmission t(x, y) of the object.
- x, y1d arrays
Object coordinates (equidistant, as from utils.grid2d()).
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Numerical aperture of the objective.
- sourcetuple (k_x, k_y, w), optional
Source points from source_points(). Defaults to a single on-axis plane wave (coherent illumination).
- P2d array, optional
Pupil function from pupil() (with defocus, aberrations, phase ring, …). Defaults to the clear pupil of NA in the medium n with the given defocus.
- nnumber, optional
Index of the medium (for the default pupil). Defaults to 1.
- defocusnumber, optional
Defocus of the default pupil (see pupil()). Defaults to 0.
- chunkint, optional
Number of source points imaged per batch of FFTs. Defaults to 16.
- Returns:
- I2d array
Image intensity, normalized such that a clear object (t = 1) whose direct light passes the pupil gives I = 1.
- pyoptics.microscopy.weak_object_transfer(x, y, wavelength, NA, source=None, P=None, n=1.0, defocus=0.0)[source]¶
Amplitude and phase transfer functions for weak objects.
For a weak object t = 1 + a + i*phi (
|a|, |phi|<< 1) the image is linear in a and phi, relative to the backgroundI_0 = sum_s w_s |P(k_s)|**2:I = I_0 * (1 + inv_FT{ H_a * FT(a) + H_phi * FT(phi) })
with C(f) = sum_s w_s conj(P(k_s)) P(k_s + f) / I_0, H_a(f) = C(f) + conj(C(-f)) and H_phi(f) = i*(C(f) - conj(C(-f))). I_0 = 1 for a clear pupil; a phase ring of intensity transmission T gives I_0 = T and the relative phase transfer -2/sqrt(T). In focus with a symmetric condenser and pupil H_phi vanishes: bright field shows no phase. Defocus, oblique illumination, a phase ring or a DIC prism make H_phi nonzero.
- Parameters:
- x, y, wavelength, NA, source, P, n, defocus
As in abbe_image().
- Returns:
- H_a, H_phi2d arrays
Transfer functions (relative to the background) on the centered frequency grid of x, y (H_a(0) = 2). Both are real for real symmetric systems; in general they are Hermitian (H(-f) = conj(H(f))).
- pyoptics.microscopy.grating_cutoff(wavelength, NA, NA_condenser=0.0)[source]¶
Smallest grating period that the microscope still images.
Abbe: at least two diffraction orders must pass the pupil. With oblique illumination at NA_condenser the zero and first order fit in for periods down to wavelength/(NA + NA_condenser); for on-axis coherent illumination the limit is wavelength/NA.
- Parameters:
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Objective numerical aperture.
- NA_condensernumber, optional
Largest illumination NA. Defaults to 0.
- Returns:
- periodnumber
- pyoptics.microscopy.phase_ring(x, y, wavelength, NA_inner, NA_outer, phase=-1.5707963267948966, transmission=0.25)[source]¶
Zernike phase plate as a pupil mask.
The ring sits where the image of the condenser annulus falls in the objective pupil, so the direct (undiffracted) light passes it while most of the diffracted light misses it. It shifts the phase of the direct light by
phaseand attenuates its intensity totransmission. For a weak phase object t = 1 + i*phi whose diffracted light misses the ring, I = T - 2*sqrt(T)*sin(-phase)*phi: with phase = -pi/2 (the ring advances the direct light by a quarter wave) optically denser structures appear dark (positive phase contrast); +pi/2 gives negative (bright) contrast.- Parameters:
- x, y1d arrays
Object coordinates.
- wavelengthnumber
Vacuum wavelength.
- NA_inner, NA_outernumbers
Inner and outer edge of the ring in the pupil, as numerical apertures.
- phasenumber, optional
Phase added to the light that passes the ring (radians). Defaults to -pi/2 (positive phase contrast).
- transmissionnumber, optional
Intensity transmission of the ring. Defaults to 0.25.
- Returns:
- mask2d array
Complex pupil mask, 1 outside the ring; pass it to pupil(mask=…).
- pyoptics.microscopy.dic_object(obj, x, y, shear, bias, angle=0.0)[source]¶
Effective object of Nomarski differential interference contrast.
A Wollaston (Nomarski) prism splits the light into two orthogonal polarizations that pass the object shifted by the shear s against each other; a second prism recombines them, and the analyzer (crossed with the polarizer) makes them interfere with the bias phase beta between them. With a matching condenser prism every source point sees the same bias, and the image is the partially coherent image of the effective object:
t_DIC(r) = (t(r + s/2)*exp(i*beta/2) - t(r - s/2)*exp(-i*beta/2))/2.
A clear field appears with the intensity sin(beta/2)**2; for a phase object and small shear, I ~ sin(beta/2)**2 + sin(beta)/2 * s.grad(phi): the image shows the phase gradient along the shear (relief look), and beta = 0 (extinction) shows only its square.
- Parameters:
- obj2d array
Complex object transmission t(x, y).
- x, y1d arrays
Object coordinates.
- shearnumber
Shear distance s (object space), typically below the resolution.
- biasnumber
Bias retardation beta in radians.
- anglenumber, optional
Direction of the shear against the x axis, radians. Defaults to 0.
- Returns:
- t_dic2d array
Effective complex object for abbe_image().
- pyoptics.microscopy.psf_3d(x, y, z, wavelength, NA, n=1.0, apodization=None)[source]¶
Scalar 3D amplitude point spread function of an objective.
The focal field is the angular spectrum of the pupil, propagated to each plane z with the exact k_z in the medium (Debye integral):
h(x, y, z) = inv_FT{ P(k) * A(k) * exp(i*(k_z - n*k0)*z) }.
- Parameters:
- x, y1d arrays
Lateral coordinates (object space).
- znumber or 1d array
Axial positions relative to focus, in the medium.
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Numerical aperture n*sin(alpha).
- nnumber, optional
Immersion index. Defaults to 1.
- apodization{None, “aplanatic”}, optional
None: uniform pupil in k_x, k_y (the paraxial limit). “aplanatic”: an objective obeying the sine condition, A = (n*k0/k_z)**(1/2) (the plane wave amplitudes sqrt(cos(theta)) of Richards and Wolf times the Jacobian 1/cos(theta) of the angular spectrum integral). Defaults to None.
- Returns:
- harray
Complex amplitude PSF, shape (len(z), Ny, Nx) (or (Ny, Nx) for a scalar z), normalized such that
|h|**2= 1 in the focus.
- pyoptics.microscopy.airy_unit(wavelength, NA)[source]¶
Diameter of the Airy disk (first dark ring), 1.22*wavelength/NA.
Confocal pinholes are given in Airy units (AU), as back projected into object space.
- Parameters:
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Numerical aperture.
- Returns:
- dnumber
1 AU in object space.
- pyoptics.microscopy.confocal_psf(h_exc, h_det, x, y, pinhole)[source]¶
Intensity PSF of a fluorescence confocal microscope.
A fluorophore at r is excited with
|h_exc(r)|**2; its light, imaged back onto the pinhole D, is detected with the efficiency(|h_det|**2 * D)(r)(convolution, lateral only). The fluorescence is incoherent, so the confocal PSF is the product:PSF(r) = |h_exc(r)|**2 * ( |h_det|**2 (x) D )(r).
For a point pinhole it is
|h_exc|**2 |h_det|**2(about 1.4 times narrower than the wide field PSF), for a large pinhole it approaches|h_exc|**2(wide field resolution, no sectioning).- Parameters:
- h_excarray
Excitation amplitude PSF, (Ny, Nx) or (Nz, Ny, Nx) (psf_3d()).
- h_detarray
Detection amplitude PSF at the emission wavelength, same shape.
- x, y1d arrays
Lateral coordinates.
- pinholenumber or 2d array or None
Pinhole diameter in object space (e.g. in units of airy_unit()), or a 2d detector mask (Ny, Nx), or None or 0 for a point pinhole.
- Returns:
- psfarray
Confocal intensity PSF, shape of h_exc. Normalized such that its peak equals 1 for a point pinhole (
|h|**2= 1 in focus); a pinhole of area A collects up to A/(dx*dy) times more.
- pyoptics.microscopy.plane_response(psf_stack)[source]¶
Signal of a thin, uniform fluorescent plane vs. its axial position.
The integral of the intensity PSF over each plane. A wide field microscope collects the same light from every plane (no optical sectioning); a confocal one falls off as 1/z**2 far from focus.
- Parameters:
- psf_stackarray
Intensity PSF, shape (Nz, Ny, Nx).
- Returns:
- s1d array
Normalized to its maximum.
- pyoptics.microscopy.mirror_response(z, wavelength, NA, n=1.0, N_r=2000)[source]¶
Axial response of a reflection confocal microscope to a plane mirror.
A mirror at the distance z from focus returns the light with the defocus 2z; with a point pinhole the detected amplitude is the pupil average of exp(2i*(k_z - n*k0)*z) (uniform pupil in k_x, k_y). In the paraxial limit the intensity is sinc(u/(2*pi))**2 with u = k0*z*NA**2/n (numpy’s sinc(x) = sin(pi*x)/(pi*x)), the first zero at z = n*wavelength/NA**2.
- Parameters:
- znumber or array
Mirror position relative to focus, in the medium.
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Numerical aperture.
- nnumber, optional
Immersion index. Defaults to 1.
- N_rint, optional
Number of radial samples of the pupil. Defaults to 2000.
- Returns:
- Iarray
Detected intensity, 1 at focus.
- pyoptics.microscopy.led_array(n_side, pitch, distance, wavelength, center=(0.0, 0.0), n_x=None)[source]¶
Illumination wave vectors of an LED matrix below the sample.
- Parameters:
- n_sideint
Number of LEDs per row (n_side x n_side array, centred under the sample for odd n_side).
- pitchnumber
LED spacing.
- distancenumber
Distance between the LED plane and the sample.
- wavelengthnumber
Vacuum wavelength.
- centertuple of numbers, optional
Lateral position of the field point (x, y) relative to the array axis; LEDs at (X, Y) illuminate it from the direction (X - x, Y - y, distance). Defaults to (0, 0).
- n_xint, optional
Number of LEDs per column if different from n_side.
- Returns:
- k_x, k_y1d arrays
Transverse wave vectors k0*sin(theta) of the LEDs, row by row.
- NA_ill1d array
Illumination NA (sine of the angle to the axis) of each LED.
- pyoptics.microscopy.fpm_pupil(x, y, m, wavelength, NA, n=1.0)[source]¶
Objective pupil on the camera grid of Fourier ptychography.
The camera samples the m x m central part of the high resolution grid’s spectrum: its pixel pitch is dx*N/m.
- Parameters:
- x, y1d arrays
High resolution coordinates (N x N).
- mint
Camera pixels per side.
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Objective numerical aperture.
- nnumber, optional
Immersion index. Defaults to 1.
- Returns:
- P2d array
Clear pupil on the m x m frequency grid (multiply aberrations onto it for fpm_images(P=…)).
- x_lr, y_lr1d arrays
Camera pixel coordinates.
- pyoptics.microscopy.fpm_images(obj, x, y, wavelength, NA, k_x, k_y, m, P=None)[source]¶
Low resolution images of a thin object under LED illumination.
The LED with the transverse wave vector k_j shifts the object spectrum by k_j; the objective cuts out the disk of radius k0*NA, and the camera samples the image with the pitch dx*N/m (m x m pixels):
I_j = |inv_FT{ P(k) * T(k - k_j) }|**2 on the coarse grid.
LED directions are rounded to the frequency grid of the object.
- Parameters:
- obj2d array
Complex object transmission on the high resolution grid x, y (N x N).
- x, y1d arrays
High resolution coordinates.
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Objective numerical aperture.
- k_x, k_y1d arrays
LED wave vectors (from led_array()).
- mint
Number of camera pixels per side; the camera pitch is dx*N/m, which should fulfil dx*N/m <= wavelength/(4*NA) for unaliased images.
- P2d array, optional
Pupil on the m x m low resolution frequency grid (e.g. aberrated). Defaults to the clear pupil.
- Returns:
- images3d array
Intensities, shape (len(k_x), m, m); 1 for a clear object in bright field.
- x_lr, y_lr1d arrays
Camera pixel coordinates.
- pyoptics.microscopy.fpm_reconstruct(images, x, y, wavelength, NA, k_x, k_y, n_iter=20, P=None, update_pupil=True, method='quasi-newton', alpha=1.0, beta=1.0, delta=(0.001, 0.01), order=None, start=None, callback=None)[source]¶
Fourier ptychographic reconstruction with embedded pupil recovery.
The high resolution object spectrum is stitched together from the low resolution images by alternating projections (Zheng et al. 2013): for each LED, the part of the spectrum under the shifted pupil is propagated to the camera, its amplitude replaced by the measured one, and the change fed back into the spectrum and the pupil (embedded pupil function recovery, EPRY, after Ou et al. 2014):
dPsi = FT(sqrt(I_j)*psi/|psi|) - Psi T_j += alpha*conj(P)/max|P|**2 * dPsi P += beta*conj(T_j)/max|T_j|**2 * dPsi.
The default “quasi-newton” method (Tian et al. 2014) weights the updates with the magnitudes and regularizes them with delta = (d1, d2), relative to the maxima; it recovers aberrations faster and more reliably:
T_j += alpha*|P| conj(P)/(max|P| (|P|**2 + d1 max|P|**2)) * dPsi P += beta*|T_j| conj(T_j)/(max|T_j| (|T_j|**2 + d2 max|T_j|**2)) * dPsi.
- Parameters:
- images3d array
Measured intensities (L, m, m) as from fpm_images().
- x, y1d arrays
High resolution coordinates of the reconstruction (N x N), the same grid that relates the LED angles to spectrum shifts.
- wavelengthnumber
Vacuum wavelength.
- NAnumber
Objective numerical aperture.
- k_x, k_y1d arrays
LED wave vectors (L), rounded to the frequency grid of x, y.
- n_iterint, optional
Number of passes over all LEDs. Defaults to 20.
- P2d array, optional
Initial pupil on the m x m grid. Defaults to the clear pupil.
- update_pupilbool, optional
Recover the pupil (aberrations) along with the object. Defaults to True.
- method{“quasi-newton”, “epry”}, optional
Update rule, see above. Defaults to “quasi-newton”.
- alpha, betanumbers, optional
Step sizes of the object and pupil updates. Defaults to 1.
- deltatuple of two numbers, optional
Regularization (d1, d2) of the quasi-Newton updates. Defaults to (1e-3, 1e-2).
- orderarray of int, optional
Order in which the LEDs are processed. Defaults to increasing illumination angle (bright field first), which converges best.
- start2d array, optional
Initial high resolution object. Defaults to the up-sampled square root of the image with the smallest illumination angle (amplitude only).
- callbackcallable, optional
Called as callback(iteration, obj, P) after every pass.
- Returns:
- obj2d array
Complex high resolution object (N x N).
- P2d array
Recovered pupil (m x m), scaled to a mean magnitude of 1 inside the NA (pupil and object share a free factor, and a pupil tilt is an object shift).
- errors1d array
Normalized amplitude error
sum (|psi| - sqrt(I))**2 / sum Iper pass.
- pyoptics.microscopy.circle_overlap(d, R)[source]¶
Overlap area of two circles of radius R at distance d, relative to the area of one circle.
In Fourier ptychography the pupils of neighbouring LEDs must overlap in k-space for the phase retrieval to converge: about 40 % at least, 60 % is a common design value.
- Parameters:
- dnumber or array
Distance of the centres (e.g. the difference of the LED wave vectors).
- Rnumber
Radius (k0*NA).
- Returns:
- fnumber or array
Fraction between 0 and 1.