{
  "$defs": {
    "BodyPaint": {
      "description": "Where a body's color comes from.",
      "enum": [
        "field",
        "colormap",
        "solid"
      ],
      "title": "BodyPaint",
      "type": "string"
    },
    "BodyStyle": {
      "description": "A body's own look: where its color comes from, a solid color when it has one, and its opacity.",
      "properties": {
        "body": {
          "description": "The body's ``entities.json`` name.",
          "title": "Body",
          "type": "string"
        },
        "paint": {
          "$ref": "#/$defs/BodyPaint",
          "default": "field",
          "description": "Where the body's color comes from."
        },
        "color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Any color pyvista resolves (a name or a hex triplet); a SOLID body needs one, the others ignore it.",
          "title": "Color"
        },
        "opacity": {
          "default": 1.0,
          "description": "`[-]`: The body's own opacity, multiplied by the display's.",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Opacity",
          "type": "number"
        }
      },
      "required": [
        "body"
      ],
      "title": "BodyStyle",
      "type": "object"
    },
    "Colormap": {
      "description": "Perceptually-uniform matplotlib colormaps for the ``|B|`` magnitude scale.",
      "enum": [
        "viridis",
        "plasma",
        "magma",
        "turbo",
        "coolwarm"
      ],
      "title": "Colormap",
      "type": "string"
    },
    "DisplayMode": {
      "description": "How a field array is reduced to the value that drives the color.",
      "enum": [
        "value",
        "absolute_value",
        "x",
        "y",
        "z",
        "magnitude",
        "polar_xy"
      ],
      "title": "DisplayMode",
      "type": "string"
    },
    "FieldLineOptions": {
      "description": "Typed options for the 3D field-line render.",
      "properties": {
        "seed_placement": {
          "$ref": "#/$defs/SeedPlacement",
          "default": "volume",
          "description": "Where to seed the streamlines within the domain bounding box."
        },
        "seed_grid": {
          "default": true,
          "description": "Seed the streamlines on a grid (``True``) or at random points (``False``).",
          "title": "Seed Grid",
          "type": "boolean"
        },
        "line_count": {
          "default": 12,
          "description": "Seed points per axis: ``CENTER_PLANE`` seeds ``line_count\u00b2``, ``VOLUME`` ``line_count\u00b3``, ``GAP_LINE`` ``line_count``.",
          "exclusiveMinimum": 0,
          "title": "Line Count",
          "type": "integer"
        },
        "max_length": {
          "default": 0.75,
          "description": "`[-]`: Fraction of the domain diagonal a streamline may integrate along, keeping the picture framed on the magnets.",
          "exclusiveMinimum": 0.0,
          "maximum": 1.0,
          "title": "Max Length",
          "type": "number"
        },
        "colormap": {
          "anyOf": [
            {
              "$ref": "#/$defs/Colormap"
            },
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ],
          "default": "viridis",
          "description": "The ``|B|`` colormap: a [`Colormap`][] member, any matplotlib or colorcet colormap name, or a list of colors interpolated across the scalar range.",
          "title": "Colormap"
        },
        "invert": {
          "default": false,
          "description": "Reverse the colormap.",
          "title": "Invert",
          "type": "boolean"
        },
        "log_scale": {
          "default": false,
          "description": "Map ``|B|`` to colors logarithmically.",
          "title": "Log Scale",
          "type": "boolean"
        },
        "clim": {
          "anyOf": [
            {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`[?]`: The ``|B|`` color limits, or None for the lines' own range.",
          "title": "Clim"
        },
        "opacity_map": {
          "anyOf": [
            {
              "maxItems": 2,
              "minItems": 2,
              "prefixItems": [
                {
                  "maximum": 1.0,
                  "minimum": 0.0,
                  "type": "number"
                },
                {
                  "maximum": 1.0,
                  "minimum": 0.0,
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`[-]`: The opacity at the low and high color limits, linear in the color mapping between them; it replaces an [`OpacityTransfer`][].",
          "title": "Opacity Map"
        },
        "opacity": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "$ref": "#/$defs/OpacityTransfer"
            }
          ],
          "default": 1.0,
          "description": "`[-]`: Line or tube opacity: a constant in ``[0, 1]``, or an [`OpacityTransfer`][] that maps ``|B|`` to opacity like the color.",
          "title": "Opacity"
        },
        "interpolator": {
          "$ref": "#/$defs/InterpolatorType",
          "default": "cell",
          "description": "The integrator's cell-location strategy. ``CELL`` (default) fixes the straight \"spike\" streamlines a point locator produces near the air\u2194magnet interface."
        },
        "seed_fraction": {
          "default": 0.6,
          "description": "`[-]`: Fraction of the bounding box, centered, that the seed grid spans, keeping seeds out of the outer air shell where B \u2248 0.",
          "exclusiveMinimum": 0.0,
          "maximum": 1.0,
          "title": "Seed Fraction",
          "type": "number"
        },
        "region_array": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Name of a cell-data region-id array (e.g. Elmer's ``\"GeometryIds\"``) identifying each cell's body. Used with [`region_id`][] and [`clip_to_region`][].",
          "title": "Region Array"
        },
        "region_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The single region id to confine integration to when [`clip_to_region`][] is set (e.g. the air body id).",
          "title": "Region Id"
        },
        "clip_to_region": {
          "default": false,
          "description": "Confine streamline integration to [`region_id`][] (needs [`region_array`][] and [`region_id`][]), which keeps elemental B from averaging across the air\u2194magnet interface.",
          "title": "Clip To Region",
          "type": "boolean"
        },
        "tube_radius": {
          "anyOf": [
            {
              "exclusiveMinimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`r_tube` `[m]`: Streamline tube radius; None draws the streamlines as plain poly-lines.",
          "title": "Tube Radius"
        },
        "initial_step_length": {
          "default": 0.5,
          "description": "`[-]`: The integrator's initial step, in cell lengths; smaller values follow tight curves.",
          "exclusiveMinimum": 0.0,
          "title": "Initial Step Length",
          "type": "number"
        },
        "min_step_length": {
          "default": 0.01,
          "description": "`[-]`: The integrator's smallest step, in cell lengths.",
          "exclusiveMinimum": 0.0,
          "title": "Min Step Length",
          "type": "number"
        },
        "max_step_length": {
          "default": 1.0,
          "description": "`[-]`: The integrator's largest step, in cell lengths.",
          "exclusiveMinimum": 0.0,
          "title": "Max Step Length",
          "type": "number"
        },
        "show_outline": {
          "default": true,
          "description": "Draw the domain bounding-box outline for spatial context.",
          "title": "Show Outline",
          "type": "boolean"
        },
        "vectors": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The 3-component array the lines follow; None picks the magnetic flux density.",
          "title": "Vectors"
        }
      },
      "title": "FieldLineOptions",
      "type": "object"
    },
    "InterpolatorType": {
      "description": "The cell-location strategy the streamline integrator uses (pyvista's ``interpolator_type``).\n\nBoth integrate the same point vector field; this only changes how each step finds its containing cell.",
      "enum": [
        "cell",
        "point"
      ],
      "title": "InterpolatorType",
      "type": "string"
    },
    "OpacityTransfer": {
      "description": "A pyvista opacity transfer function that maps the ``|B|`` scalar to per-element opacity; the ``_r`` variants reverse the ramp.",
      "enum": [
        "linear",
        "linear_r",
        "geom",
        "geom_r",
        "sigmoid",
        "sigmoid_r"
      ],
      "title": "OpacityTransfer",
      "type": "string"
    },
    "SeedPlacement": {
      "description": "Where the streamline seed points are placed within the domain bounding box.",
      "enum": [
        "center_plane",
        "volume",
        "gap_line"
      ],
      "title": "SeedPlacement",
      "type": "string"
    }
  },
  "description": "The complete, serializable state of one field display: which array is colored, how it reduces, and how the colors map.",
  "properties": {
    "field": {
      "default": "",
      "description": "Name of the VTU array to color by; empty means \"whichever the run offers first\".",
      "title": "Field",
      "type": "string"
    },
    "mode": {
      "$ref": "#/$defs/DisplayMode",
      "default": "value",
      "description": "How the array is reduced to the displayed value."
    },
    "colormap": {
      "default": "viridis",
      "description": "Colormap name, resolved through pyvista's ``get_cmap_safe`` (matplotlib and colorcet names both work).",
      "title": "Colormap",
      "type": "string"
    },
    "log_scale": {
      "default": false,
      "description": "Map the color range logarithmically; only the strictly positive values take part.",
      "title": "Log Scale",
      "type": "boolean"
    },
    "invert": {
      "default": false,
      "description": "Reverse the colormap.",
      "title": "Invert",
      "type": "boolean"
    },
    "clim": {
      "anyOf": [
        {
          "maxItems": 2,
          "minItems": 2,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "`[?]`: Pinned color limits in the displayed value's unit, or None to recompute them from the data on every apply.",
      "title": "Clim"
    },
    "robust": {
      "default": true,
      "description": "Clamp the automatic limits to the 2-98 percentiles so a few outlier cells cannot flatten the picture.",
      "title": "Robust",
      "type": "boolean"
    },
    "hidden_bodies": {
      "default": [],
      "description": "Body names to hide, by their ``entities.json`` name.",
      "items": {
        "type": "string"
      },
      "title": "Hidden Bodies",
      "type": "array"
    },
    "outline": {
      "default": true,
      "description": "Draw the black feature-edge wireframe over the visible bodies.",
      "title": "Outline",
      "type": "boolean"
    },
    "opacity": {
      "default": 1.0,
      "description": "`[-]`: Multiplies every body's own opacity.",
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Opacity",
      "type": "number"
    },
    "opacity_map": {
      "anyOf": [
        {
          "maxItems": 2,
          "minItems": 2,
          "prefixItems": [
            {
              "maximum": 1.0,
              "minimum": 0.0,
              "type": "number"
            },
            {
              "maximum": 1.0,
              "minimum": 0.0,
              "type": "number"
            }
          ],
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "`[-]`: The opacity at the low and high color limits, linear in the color mapping between them; None draws ``opacity`` throughout.",
      "title": "Opacity Map"
    },
    "body_styles": {
      "default": [],
      "description": "Bodies with a color source or an opacity of their own; the rest take the field colormap at full opacity.",
      "items": {
        "$ref": "#/$defs/BodyStyle"
      },
      "title": "Body Styles",
      "type": "array"
    },
    "body_colormap": {
      "default": "batlow",
      "description": "The colormap the COLORMAP bodies share, in ``body_styles`` order.",
      "title": "Body Colormap",
      "type": "string"
    },
    "streamlines": {
      "anyOf": [
        {
          "$ref": "#/$defs/FieldLineOptions"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Options for the field-line overlay, or None to draw none."
    }
  },
  "title": "DisplaySpec",
  "type": "object"
}
