tidy3d.Coords#

class tidy3d.Coords#

Holds data about a set of x,y,z positions on a grid.

Parameters
  • x (Array = None) – 1-dimensional array of x coordinates.

  • y (Array = None) – 1-dimensional array of y coordinates.

  • z (Array = None) – 1-dimensional array of z coordinates.

Example

>>> x = np.linspace(-1, 1, 10)
>>> y = np.linspace(-1, 1, 11)
>>> z = np.linspace(-1, 1, 12)
>>> coords = Coords(x=x, y=y, z=z)

Show JSON schema
{
   "title": "Coords",
   "description": "Holds data about a set of x,y,z positions on a grid.\n\nParameters\n----------\nx : Array = None\n    1-dimensional array of x coordinates.\ny : Array = None\n    1-dimensional array of y coordinates.\nz : Array = None\n    1-dimensional array of z coordinates.\n\nExample\n-------\n>>> x = np.linspace(-1, 1, 10)\n>>> y = np.linspace(-1, 1, 11)\n>>> z = np.linspace(-1, 1, 12)\n>>> coords = Coords(x=x, y=y, z=z)",
   "type": "object",
   "properties": {
      "x": {
         "title": "NumpyArray",
         "description": "Wrapper around numpy arrays that has a well defined json schema.",
         "type": "object",
         "properties": {
            "data_list": {
               "title": "Data List",
               "type": "array",
               "items": {}
            }
         },
         "required": [
            "data_list"
         ]
      },
      "y": {
         "title": "NumpyArray",
         "description": "Wrapper around numpy arrays that has a well defined json schema.",
         "type": "object",
         "properties": {
            "data_list": {
               "title": "Data List",
               "type": "array",
               "items": {}
            }
         },
         "required": [
            "data_list"
         ]
      },
      "z": {
         "title": "NumpyArray",
         "description": "Wrapper around numpy arrays that has a well defined json schema.",
         "type": "object",
         "properties": {
            "data_list": {
               "title": "Data List",
               "type": "array",
               "items": {}
            }
         },
         "required": [
            "data_list"
         ]
      },
      "type": {
         "title": "Type",
         "default": "Coords",
         "enum": [
            "Coords"
         ],
         "type": "string"
      }
   },
   "required": [
      "x",
      "y",
      "z"
   ],
   "additionalProperties": false
}

Fields
  • x (tidy3d.components.types.Array)

  • y (tidy3d.components.types.Array)

  • z (tidy3d.components.types.Array)

attribute x: tidy3d.components.types.Array [Required]#

1-dimensional array of x coordinates.

Constraints
  • title = NumpyArray

  • description = Wrapper around numpy arrays that has a well defined json schema.

  • type = object

  • properties = {‘data_list’: {‘title’: ‘Data List’, ‘type’: ‘array’, ‘items’: {}}}

  • required = [‘data_list’]

attribute y: tidy3d.components.types.Array [Required]#

1-dimensional array of y coordinates.

Constraints
  • title = NumpyArray

  • description = Wrapper around numpy arrays that has a well defined json schema.

  • type = object

  • properties = {‘data_list’: {‘title’: ‘Data List’, ‘type’: ‘array’, ‘items’: {}}}

  • required = [‘data_list’]

attribute z: tidy3d.components.types.Array [Required]#

1-dimensional array of z coordinates.

Constraints
  • title = NumpyArray

  • description = Wrapper around numpy arrays that has a well defined json schema.

  • type = object

  • properties = {‘data_list’: {‘title’: ‘Data List’, ‘type’: ‘array’, ‘items’: {}}}

  • required = [‘data_list’]

property to_list#

Return a list of the three Coord1D objects.