3.2.6.18. A_FMM.Layer.get_input
- Layer.get_input(func: callable, args: tuple = None, Nxp: int = 1024, Nyp: int = None, fileprint: str = None) ndarray
Expands an arbitrary fieldd shape on the basis of the layer eigenmodes
- Parameters:
func (function) – Function describing the field. This function should be in the form (x,y,*args). It must be able to accept x and y as numpy array. It must return two values, expressing Ex and Ey
args (tuple, optional) – Eventual tuple of additional arguments for func. Defaults to None.
Nxp (int, optional) – Number of points to evaluate the function in the x direction. Defaults to 1024.
Nyp (int, optional) – Number of points to evaluate the function in the y direction. Defaults to None (1 if layer is 1D, Nxp if 2D).
fileprint (str, optional) – Filename on which to write the used function. Mainly for debug. Defaults to None.
- Returns:
Array of the modal coefficient of the expansion.
- Return type:
u (1darray)