class_docstr: A Fourier series field defined on a collocation grid.
class_docstr_tok: ["A","Fourier","series","field","defined","on","a","collocation","grid","."]
docstr: Uses the Fourier shift theorem to compute the value of the field
  at an arbitrary point. Requires N*2 one dimensional FFTs.
  
  Args:
    x (float): The point at which to evaluate the field.
  
  Returns:
    float, jnp.ndarray: The value of the field at the point.
docstr_tok: ["Uses","the","Fourier","shift","theorem","to","compute","the","value","of","the","field","at","an","arbitrary","point",".","Requires","N","*","2","one","dimensional","FFTs",".","Args",":","x","(","float",")",":","The","point","at","which","to","evaluate","the","field",".","Returns",":","float",",","jnp.ndarray",":","The","value","of","the","field","at","the","point","."]
code: def __call__(self, x):
      r"""Uses the Fourier shift theorem to compute the value of the field
      at an arbitrary point. Requires N*2 one dimensional FFTs.
  
      Args:
        x (float): The point at which to evaluate the field.
  
      Returns:
        float, jnp.ndarray: The value of the field at the point.
      """
      dx = jnp.asarray(self.domain.dx)
      domain_size = jnp.asarray(self.domain.N) * dx
      shift = x - domain_size / 2 + 0.5 * dx
  
      k_vec = [
          jnp.exp(-1j * k * delta)
          for k, delta in zip(self._freq_axis, shift)
      ]
      ffts = self._ffts
  
      new_params = self.params
  
      def single_shift(axis, u):
          u = jnp.moveaxis(u, axis, -1)
          Fx = ffts[0](u, axis=-1)
          iku = Fx * k_vec[axis]
          du = ffts[1](iku, axis=-1, n=u.shape[-1])
          return jnp.moveaxis(du, -1, axis)
  
      for ax in range(self.domain.ndim):
          new_params = single_shift(ax, new_params)
  
      origin = tuple([0] * self.domain.ndim)
      return new_params[origin]
  
imports: import warnings
  from typing import Callable, TypeVar
  import equinox
  from equinox import tree_equal
  from jax import eval_shape
  from jax import numpy
  from jax import vmap
  from jaxtyping import PyTree
  from jaxdf.core import Field
  from jaxdf.geometry import Domain
label_desc: Use image node_id 1 for calling the FourierSeries obj's underlying member method code with example usage: obj.__call__(x) and returns: new_params, jnp