visisipy.optiland.analysis.mtf#
MTF analyses for Optiland.
Functions#
|
Calculate the FFT Modulation Transfer Function (MTF). |
Module Contents#
- visisipy.optiland.analysis.mtf.fft_mtf(backend: visisipy.optiland.backend.OptilandBackend, field_coordinate: visisipy.types.FieldCoordinate | Literal['all'] = 'all', field_type: visisipy.types.FieldType = 'angle', wavelength: float | None = None, sampling: visisipy.types.SampleSize | str | int = 128, maximum_frequency: float | Literal['default'] = 'default') tuple[visisipy.analysis.mtf.MTFResult, optiland.mtf.ScalarFFTMTF | optiland.mtf.VectorialFFTMTF]#
Calculate the FFT Modulation Transfer Function (MTF).
- Parameters:
- backendOptilandBackend
Reference to the Optiland backend.
- field_coordinateFieldCoordinate | Literal[“all”]
The field coordinate(s) at which the MTF is calculated. Can be a specific coordinate (e.g., (0, 0)) or “all” to calculate for all fields in the backend. Defaults to “all”.
- field_typeFieldType
The field type to be used in the analysis. Can be either “angle” or “object_height”. Defaults to “angle”. This parameter is only used when field_coordinate is specified.
- wavelengthfloat | None
The wavelength at which the MTF is calculated. If None, the first wavelength in the backend is used.
- samplingSampleSize | str | int
The size of the ray grid used to sample the pupil. Can be an integer or a string in the format “NxN”, where N is an integer. Only symmetric sample sizes are supported. Defaults to 128.
- maximum_frequencyfloat | Literal[“default”]
The maximum frequency (in cycles per millimeter) to calculate the MTF up to. If “default”, the cutoff frequency is determined automatically. Defaults to “default”.
- Returns:
- MTFResult
The MTF data as an MTFResult object, which provides access to the tangential and sagittal MTF values for each field coordinate.
- ScalarFFTMTF | VectorialFFTMTF
The raw MTF result object from the optiland backend. If the optic has a polarization state, a VectorialFFTMTF is returned, otherwise a ScalarFFTMTF is returned.