{
  "title": "CustomGrid",
  "public_path": "flex_rf.tidy3d.CustomGrid",
  "lookup_path": "tidy3d.CustomGrid",
  "slug": "flex_rf/tidy3d/CustomGrid",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/customgrid/",
  "object_kind": "class",
  "introduction": "Custom 1D grid supplied as a list of grid cell sizes centered on the simulation center.",
  "notes": "",
  "examples": "```python\ngrid_1d = CustomGrid(dl=[0.2, 0.2, 0.1, 0.1, 0.1, 0.2, 0.2])\n```",
  "references": "",
  "signature": "class CustomGrid(GridSpec1d)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/grid/grid_spec.py",
    "url": "",
    "lineno": 582,
    "endlineno": 669
  },
  "bases": [
    "GridSpec1d"
  ],
  "parameter_rows": [
    {
      "name": "dl",
      "annotation": "tuple[PositiveFloat, ...]",
      "default": "",
      "description": "An array of custom nonuniform grid sizes. The resulting grid is centered on the simulation center such that it spans the region `(center - sum(dl)/2, center + sum(dl)/2)`, unless a `custom_offset` is given. Note: if supplied sizes do not cover the simulation size, the first and last sizes are repeated to cover the simulation domain.",
      "origin": "declared"
    },
    {
      "name": "custom_offset",
      "annotation": "float | None",
      "default": "None",
      "description": "The starting coordinate of the grid which defines the simulation center. If `None`, the simulation center is set such that it spans the region `(center - sum(dl)/2, center + sum(dl)/2)`.",
      "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": "estimated_min_dl",
      "kind": "function",
      "signature": "estimated_min_dl(wavelength: float, structure_list: list[Structure], sim_size: tuple[float, 3])",
      "description": "Minimal grid size from grid specification."
    }
  ],
  "group": "flex_rf.tidy3d"
}
