fouriax.MetaAtomLibrary#
- class MetaAtomLibrary(wavelengths_um, parameter_axes, transmission_real, transmission_imag)#
Bases:
objectRegular-grid meta-atom transmission library over wavelength and geometry axes.
Stores complex transmission coefficients on a structured grid of wavelengths and one or more geometry parameter axes (e.g. pillar width, height). Transmission at arbitrary geometry/wavelength points is obtained by multilinear interpolation.
- Parameters:
wavelengths_um (Array) – 1-D array of library wavelengths in micrometers, used as the spectral interpolation axis.
parameter_axes (tuple[Array, ...]) – Tuple of 1-D arrays, each defining a strictly increasing geometry axis in physical units.
transmission_real (Array) – Real part of the complex transmission with shape
(num_wavelengths, p1, p2, ..., pk).transmission_imag (Array) – Imaginary part, same shape as
transmission_real.
- __init__(wavelengths_um, parameter_axes, transmission_real, transmission_imag)#
- Parameters:
wavelengths_um (Array)
parameter_axes (tuple[Array, ...])
transmission_real (Array)
transmission_imag (Array)
- Return type:
None
Methods
__init__(wavelengths_um, parameter_axes, ...)from_complex(wavelengths_um, parameter_axes, ...)Build a library from a complex-valued transmission array.
interpolate_complex(geometry_params, ...)Interpolate complex transmission at arbitrary geometry and wavelength points.
Reconstruct the full complex transmission array.
validate()Validate wavelength axes, geometry axes, and transmission tensor shapes.
Attributes
Number of geometry parameters spanned by the library.
Grid size along each geometry-parameter axis.
- wavelengths_um: Array#
- parameter_axes: tuple[Array, ...]#
- transmission_real: Array#
- transmission_imag: Array#
- classmethod from_complex(wavelengths_um, parameter_axes, transmission_complex)#
Build a library from a complex-valued transmission array.
- Parameters:
wavelengths_um (Array) – 1-D wavelength array in micrometers.
parameter_axes (tuple[Array, ...]) – Tuple of 1-D geometry axes.
transmission_complex (Array) – Complex array with shape
(num_wavelengths, p1, p2, ..., pk).
- Returns:
Validated library contents split into real and imaginary tensors.
- Return type:
- property num_parameters: int#
Number of geometry parameters spanned by the library.
- property parameter_shape: tuple[int, ...]#
Grid size along each geometry-parameter axis.
- validate()#
Validate wavelength axes, geometry axes, and transmission tensor shapes.
- Raises:
ValueError – If axis dimensionality, monotonicity, or transmission shapes do not match the library definition.
- Return type:
None
- transmission_complex()#
Reconstruct the full complex transmission array.
- Returns:
Complex array with shape
(num_wavelengths, p1, p2, ..., pk).- Return type:
Array
- interpolate_complex(geometry_params, wavelengths_um)#
Interpolate complex transmission at arbitrary geometry and wavelength points.
Geometry interpolation is multilinear over the library’s parameter grid; spectral interpolation is linear between library wavelengths.
- Parameters:
geometry_params (Array) – Geometry coordinates with trailing dimension equal to
num_parameters. Spatial maps of shape(ny, nx, num_parameters)are supported.wavelengths_um (Array) – 1-D array of query wavelengths in micrometers.
- Returns:
Complex transmission with shape
(*spatial_dims, num_query_wavelengths).- Return type:
Array