{
  "title": "Coords",
  "public_path": "flex_rf.tidy3d.Coords",
  "lookup_path": "tidy3d.Coords",
  "slug": "flex_rf/tidy3d/Coords",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/coords/",
  "object_kind": "class",
  "introduction": "Holds data about a set of x,y,z positions on a grid.",
  "notes": "",
  "examples": "```python\nx = np.linspace(-1, 1, 10)\ny = np.linspace(-1, 1, 11)\nz = np.linspace(-1, 1, 12)\ncoords = Coords(x=x, y=y, z=z)\n```",
  "references": "",
  "signature": "class Coords(Tidy3dBaseModel)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/grid/grid.py",
    "url": "",
    "lineno": 48,
    "endlineno": 330
  },
  "bases": [
    "Tidy3dBaseModel"
  ],
  "parameter_rows": [
    {
      "name": "x",
      "annotation": "Coords1D",
      "default": "",
      "description": "1-dimensional array of x coordinates.",
      "origin": "declared"
    },
    {
      "name": "y",
      "annotation": "Coords1D",
      "default": "",
      "description": "1-dimensional array of y coordinates.",
      "origin": "declared"
    },
    {
      "name": "z",
      "annotation": "Coords1D",
      "default": "",
      "description": "1-dimensional array of z coordinates.",
      "origin": "declared"
    },
    {
      "name": "attrs",
      "annotation": "dict",
      "default": "factory: dict",
      "description": "Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, `attrs` are mutable. For example, the following is allowed for setting an `attr` `obj.attrs['foo'] = bar`. Also note that Tidy3D will raise a `TypeError` if `attrs` contain objects that can not be serialized. One can check if `attrs` are serializable by calling `obj.model_dump_json()`.",
      "origin": "inherited"
    }
  ],
  "members": [
    {
      "name": "cell_size_meshgrid",
      "kind": "function",
      "signature": "cell_size_meshgrid()",
      "description": "Returns an N-dimensional grid where N is the number of coordinate arrays that have more than one element. Each grid element corresponds to the size of the mesh cell in N-dimensions and 1 for N=0."
    },
    {
      "name": "cell_sizes",
      "kind": "function",
      "signature": "cell_sizes()",
      "description": "Returns the sizes of the cells in each coordinate array as a dictionary."
    },
    {
      "name": "get_bounding_indices",
      "kind": "function",
      "signature": "get_bounding_indices(coordinate: Coordinate, side: Literal['left', 'right'], buffer: int = 0)",
      "description": "Find the bounding indices up to a buffer corresponding to the supplied coordinate. For x, y, z values supplied in coordinate, look for index into the x, y, and z coordinate arrays such that the value at that index bounds the supplied coordinate entry on either the 'right' or 'left' side specified by the side parameter. An optional buffer of number of indices can be specified with the default 0. All indices are bound by 0 and the length of each coordinate array so that they can be directly used to index into the coordinate arrays without going out of bounds."
    },
    {
      "name": "get_bounding_values",
      "kind": "function",
      "signature": "get_bounding_values(coordinate: Coordinate, side: Literal['left', 'right'], buffer: int = 0)",
      "description": "Find the bounding values corresponding to the supplied coordinate. The bounding values extract the values out of the coordinate arrays for the indices found in `get_bounding_indices`."
    },
    {
      "name": "spatial_interp",
      "kind": "function",
      "signature": "spatial_interp(array: SpatialDataArray | ScalarFieldDataArray | UnstructuredGridDatasetType, interp_method: InterpMethod, fill_value: Literal['extrapolate'] | float = 'extrapolate')",
      "description": "Similar to `xarrray.DataArray.interp` with 2 enhancements:"
    },
    {
      "name": "to_dict",
      "kind": "attribute",
      "signature": "to_dict: dict[str, Any]",
      "description": "Return a dict of the three Coord1D objects as numpy arrays."
    },
    {
      "name": "to_list",
      "kind": "attribute",
      "signature": "to_list: list[NDArray]",
      "description": "Return a list of the three Coord1D objects as numpy arrays."
    }
  ],
  "group": "flex_rf.tidy3d"
}
