To generate this plot we simply call the plot method of the PhaseRetrievalResult object (in this case pr_result).Īnd here the phase and magnitude have been fitted to 120 zernike polynomials. plot_named_coefs()īelow is a plot of the phase and magnitude of the retrieved pupil function from a PSF recorded from this instrument. time() - pr_start print( f" seconds were required to fit 120 Zernikes") Pr_result = retrieve_phase( data_prepped, params, 100, 1e-4, 1e-4) # prep data data_prepped = prep_data_for_PR( data, 256, 1.1) utils import prep_data_for_PR # read in data from fixtures with warnings. # phase retrieve a pupil from pathlib import Path import time import warnings import tifffile as tif from. al.Īn example for how to use these functions can be found at the end of the file: The phase retrieval algorithm implemented in this module is described by Hanser et. Note that it is assumed that z is the optical axis of the objective lens. the numerical aperature of the objectiveįor numerical calculations we'll also want to know the x/y resolution and number of points.The wavelength of operation (assume monochromatic light).To fully describe a PSF or OTF of an objective lens, assuming no abberation, we generally need a few parameters: When instantiating them the user must provide a set of model parameters. However, if the choosen z-planes are not equispaced then the field OTF ( OTFa) and intensity OTF ( OTFi) calculated from the model won't make physical sense.īoth the SheppardPSF and HanserPSF have much the same interface. A big benefit of HanserPSF is that it allows one to calculate selected z planes of the PSF. They are, in fact, mathematically equivalent but in practice each have their strengths and weaknesses. Two models of optical imaging systems are available in this module one described by Hanser et al and one described by Arnison and Sheppard. utils.py which contains various utility functions used throughout the package.zernike.py which contains functions for calculating Zernike Polynomials.phase_retrieval.py which contains functions and classes to perform iterative phase retrieval of the rear aperature of the optical system.otf.py which contains classes for generating different types of OTFs and PSFs.There are plenty more means, but that'll give you a couple to play with on your visit here today.The package is made up of four component modules: This is how you compute average speed, and is useful in a few other fields. Harmonic mean – the average you get when dividing the length of a set of (non-zero) numbers by the sum of their reciprocals.For financial returns, look to this type. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |