{
  "$defs": {
    "ArrayReferenceModel": {
      "$schema": "http://stsci.edu/schemas/yaml-schema/draft-01",
      "description": "Model for a subset of the ASDF 'ndarray' schema, in the case where the\narray data is stored elsewhere.",
      "id": "http://stsci.edu/schemas/asdf/core/ndarray-1.1.0",
      "properties": {
        "byteorder": {
          "const": "big",
          "default": "big",
          "description": "Byte order for the binary data.",
          "title": "Byteorder",
          "type": "string"
        },
        "datatype": {
          "$ref": "#/$defs/NumberType",
          "description": "Data type of the array."
        },
        "shape": {
          "description": "Size of the array in each dimension.",
          "items": {
            "type": "integer"
          },
          "title": "Shape",
          "type": "array"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ],
          "description": "Location of the underlying binary data.",
          "title": "Source"
        }
      },
      "required": [
        "source",
        "shape",
        "datatype"
      ],
      "tag": "!core/ndarray-1.1.0",
      "title": "ArrayReferenceModel",
      "type": "object"
    },
    "BoundsSerializationModel": {
      "anyOf": [
        {
          "properties": {
            "x": {
              "$ref": "#/$defs/_SerializedInterval"
            },
            "y": {
              "$ref": "#/$defs/_SerializedInterval"
            }
          },
          "required": [
            "y",
            "x"
          ],
          "title": "_SerializedBox",
          "type": "object"
        },
        {
          "$ref": "#/$defs/CellGridBounds"
        },
        {
          "$ref": "#/$defs/RegionSerializationModel"
        },
        {
          "$ref": "#/$defs/IntersectionBoundsSerializationModel"
        }
      ]
    },
    "ButlerInfo": {
      "description": "Information about a butler dataset.",
      "properties": {
        "dataset": {
          "$ref": "#/$defs/SerializedDatasetRef"
        },
        "provenance": {
          "$ref": "#/$defs/DatasetProvenance"
        }
      },
      "required": [
        "dataset"
      ],
      "title": "ButlerInfo",
      "type": "object"
    },
    "CellGrid": {
      "description": "A grid of rectangular cells with no overlaps or space between cells.",
      "properties": {
        "bbox": {
          "description": "Bounding box of the grid of cells (snapped to cell boundaries. The cell with index (i=0, j=0) always has a corner at ``(y=bbox.y.min, x=bbox.x.min)`` but there is no expectation that ``(y=bbox.y.min, x=bbox.x.min)`` be ``(y=0, x=0)``.",
          "properties": {
            "x": {
              "$ref": "#/$defs/_SerializedInterval"
            },
            "y": {
              "$ref": "#/$defs/_SerializedInterval"
            }
          },
          "required": [
            "y",
            "x"
          ],
          "title": "_SerializedBox",
          "type": "object"
        },
        "cell_shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/_SerializedYX_int_"
            },
            {
              "items": {
                "type": "integer"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            }
          ],
          "description": "Shape of each cell in pixels.",
          "title": "Cell Shape"
        }
      },
      "required": [
        "bbox",
        "cell_shape"
      ],
      "title": "CellGrid",
      "type": "object"
    },
    "CellGridBounds": {
      "description": "A region of pixels defined by a set of cells within a grid.",
      "properties": {
        "bbox": {
          "description": "Pixel bounding box of the region (snapped to cell boundaries).",
          "properties": {
            "x": {
              "$ref": "#/$defs/_SerializedInterval"
            },
            "y": {
              "$ref": "#/$defs/_SerializedInterval"
            }
          },
          "required": [
            "y",
            "x"
          ],
          "title": "_SerializedBox",
          "type": "object"
        },
        "grid": {
          "$ref": "#/$defs/CellGrid",
          "description": "Definition of the grid that defines the cells."
        },
        "missing": {
          "default": [],
          "description": "Indices of cells that are missing, where (i=0, j=0) is the cell that starts at grid.bbox.start.",
          "items": {
            "$ref": "#/$defs/CellIJ"
          },
          "title": "Missing",
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "grid",
        "bbox"
      ],
      "title": "CellGridBounds",
      "type": "object"
    },
    "CellIJ": {
      "description": "An index in a grid of cells.",
      "properties": {
        "i": {
          "title": "I",
          "type": "integer"
        },
        "j": {
          "title": "J",
          "type": "integer"
        }
      },
      "required": [
        "i",
        "j"
      ],
      "title": "CellIJ",
      "type": "object"
    },
    "DatasetProvenance": {
      "description": "Provenance of a single `DatasetRef`.",
      "properties": {
        "extras": {
          "additionalProperties": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "format": "uuid",
                  "type": "string"
                }
              ]
            },
            "type": "object"
          },
          "propertyNames": {
            "format": "uuid"
          },
          "title": "Extras",
          "type": "object"
        },
        "inputs": {
          "items": {
            "$ref": "#/$defs/SerializedDatasetRef"
          },
          "title": "Inputs",
          "type": "array"
        },
        "quantum_id": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Quantum Id"
        }
      },
      "title": "DatasetProvenance",
      "type": "object"
    },
    "InlineArray": {
      "$schema": "http://stsci.edu/schemas/yaml-schema/draft-01",
      "description": "Model for a subset of the ASDF 'ndarray' schema, in the case where the\narray data is stored inline.",
      "id": "http://stsci.edu/schemas/asdf/core/ndarray-1.1.0",
      "properties": {
        "data": {
          "items": {},
          "title": "Data",
          "type": "array"
        },
        "datatype": {
          "$ref": "#/$defs/NumberType"
        }
      },
      "required": [
        "data",
        "datatype"
      ],
      "tag": "!core/ndarray-1.1.0",
      "title": "InlineArrayModel",
      "type": "object"
    },
    "InlineArrayModel": {
      "$schema": "http://stsci.edu/schemas/yaml-schema/draft-01",
      "description": "Model for a subset of the ASDF 'ndarray' schema, in the case where the\narray data is stored inline.",
      "id": "http://stsci.edu/schemas/asdf/core/ndarray-1.1.0",
      "properties": {
        "data": {
          "items": {},
          "title": "Data",
          "type": "array"
        },
        "datatype": {
          "$ref": "#/$defs/NumberType"
        }
      },
      "required": [
        "data",
        "datatype"
      ],
      "tag": "!core/ndarray-1.1.0",
      "title": "InlineArrayModel",
      "type": "object"
    },
    "IntersectionBoundsSerializationModel": {
      "description": "Serialization model for `IntersectionBounds`.",
      "properties": {
        "a": {
          "$ref": "#/$defs/BoundsSerializationModel"
        },
        "b": {
          "$ref": "#/$defs/BoundsSerializationModel"
        }
      },
      "required": [
        "a",
        "b"
      ],
      "title": "IntersectionBoundsSerializationModel",
      "type": "object"
    },
    "MetadataValue": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "NumberType": {
      "description": "Enumeration of array values types supported by the library.",
      "enum": [
        "bool",
        "uint8",
        "uint16",
        "uint32",
        "uint64",
        "int8",
        "int16",
        "int32",
        "int64",
        "float32",
        "float64"
      ],
      "title": "NumberType",
      "type": "string"
    },
    "RegionSerializationModel": {
      "description": "Serialization model for `Region` and `Polygon`.\n\nThis model is a subset of the GeoJSON specification (IETF RFC 7946).",
      "properties": {
        "coordinates": {
          "description": "Vertices of the polygon or polygons.",
          "items": {
            "items": {
              "anyOf": [
                {
                  "maxItems": 2,
                  "minItems": 2,
                  "prefixItems": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "type": "array"
                },
                {
                  "items": {
                    "maxItems": 2,
                    "minItems": 2,
                    "prefixItems": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "number"
                      }
                    ],
                    "type": "array"
                  },
                  "type": "array"
                }
              ]
            },
            "type": "array"
          },
          "title": "Coordinates",
          "type": "array"
        },
        "type": {
          "description": "Geometry type.",
          "enum": [
            "Polygon",
            "MultiPolygon"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type",
        "coordinates"
      ],
      "title": "RegionSerializationModel",
      "type": "object"
    },
    "SerializedDataCoordinate": {
      "description": "Simplified model for serializing a `DataCoordinate`.",
      "properties": {
        "dataId": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "title": "Dataid",
          "type": "object"
        },
        "records": {
          "anyOf": [
            {
              "additionalProperties": {
                "$ref": "#/$defs/SerializedDimensionRecord"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Records"
        }
      },
      "required": [
        "dataId"
      ],
      "title": "SerializedDataCoordinate",
      "type": "object"
    },
    "SerializedDatasetRef": {
      "description": "Simplified model of a `DatasetRef` suitable for serialization.",
      "properties": {
        "component": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Component"
        },
        "dataId": {
          "anyOf": [
            {
              "$ref": "#/$defs/SerializedDataCoordinate"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "datasetType": {
          "anyOf": [
            {
              "$ref": "#/$defs/SerializedDatasetType"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "run": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Run"
        }
      },
      "required": [
        "id"
      ],
      "title": "SerializedDatasetRef",
      "type": "object"
    },
    "SerializedDatasetType": {
      "description": "Simplified model of a `DatasetType` suitable for serialization.",
      "properties": {
        "dimensions": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Dimensions"
        },
        "isCalibration": {
          "default": false,
          "title": "Iscalibration",
          "type": "boolean"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "parentStorageClass": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Parentstorageclass"
        },
        "storageClass": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Storageclass"
        }
      },
      "required": [
        "name"
      ],
      "title": "SerializedDatasetType",
      "type": "object"
    },
    "SerializedDimensionRecord": {
      "description": "Simplified model for serializing a `DimensionRecord`.",
      "examples": [
        {
          "definition": "detector",
          "record": {
            "full_name": "0_01",
            "id": 72,
            "instrument": "HSC",
            "name_in_raft": "01",
            "purpose": "SCIENCE",
            "raft": "0"
          }
        }
      ],
      "properties": {
        "definition": {
          "examples": [
            "exposure"
          ],
          "title": "Name of dimension associated with this record.",
          "type": "string"
        },
        "record": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "$ref": "#/$defs/Timespan"
              },
              {
                "type": "null"
              }
            ]
          },
          "examples": [
            {
              "definition": "exposure",
              "record": {
                "exposure": 2021050300044,
                "instrument": "LATISS",
                "obs_id": "AT_O_20210503_00044"
              }
            }
          ],
          "title": "Dimension record keys and values.",
          "type": "object"
        }
      },
      "required": [
        "definition",
        "record"
      ],
      "title": "SerializedDimensionRecord",
      "type": "object"
    },
    "Timespan": {
      "description": "A [begin, end) TAI timespan with bounds as integer nanoseconds since 1970-01-01 00:00:00.",
      "properties": {
        "nsec": {
          "maxItems": 2,
          "minItems": 2,
          "prefixItems": [
            {
              "type": "integer"
            },
            {
              "type": "integer"
            }
          ],
          "title": "Nsec",
          "type": "array"
        }
      },
      "required": [
        "nsec"
      ],
      "title": "Timespan",
      "type": "object"
    },
    "Unit": {
      "$schema": "http://stsci.edu/schemas/yaml-schema/draft-01",
      "id": "http://stsci.edu/schemas/asdf/unit/unit-1.0.0",
      "tag": "!unit/unit-1.0.0",
      "type": "string"
    },
    "_SerializedInterval": {
      "properties": {
        "start": {
          "title": "Start",
          "type": "integer"
        },
        "stop": {
          "title": "Stop",
          "type": "integer"
        }
      },
      "required": [
        "start",
        "stop"
      ],
      "title": "_SerializedInterval",
      "type": "object"
    },
    "_SerializedYX_int_": {
      "properties": {
        "x": {
          "title": "X",
          "type": "integer"
        },
        "y": {
          "title": "Y",
          "type": "integer"
        }
      },
      "required": [
        "y",
        "x"
      ],
      "title": "_SerializedYX",
      "type": "object"
    }
  },
  "$id": "https://images.lsst.io/schemas/spline_field-1.0.0",
  "description": "Serialization model for `SplineField`.",
  "properties": {
    "bounds": {
      "$ref": "#/$defs/BoundsSerializationModel",
      "description": "The region where this field can be evaluated."
    },
    "butler_info": {
      "anyOf": [
        {
          "$ref": "#/$defs/ButlerInfo"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Information about the butler dataset backed by this file."
    },
    "data": {
      "anyOf": [
        {
          "$ref": "#/$defs/ArrayReferenceModel"
        },
        {
          "$ref": "#/$defs/InlineArrayModel"
        }
      ],
      "description": "2-d data to interpolate.  NaNs indicate missing values.",
      "title": "Data"
    },
    "field_type": {
      "const": "SPLINE",
      "default": "SPLINE",
      "title": "Field Type",
      "type": "string"
    },
    "indirect": {
      "description": "Serialized nested objects that may be saved or read more than once.",
      "items": {},
      "title": "Indirect",
      "type": "array"
    },
    "metadata": {
      "additionalProperties": {
        "$ref": "#/$defs/MetadataValue"
      },
      "description": "Additional unstructured metadata.",
      "title": "Metadata",
      "type": "object"
    },
    "min_read_version": {
      "default": 1,
      "description": "Smallest reader major that can interpret this tree.",
      "title": "Min Read Version",
      "type": "integer"
    },
    "schema_version": {
      "default": "1.0.0",
      "description": "Data-model schema version of this tree (major.minor.patch).",
      "title": "Schema Version",
      "type": "string"
    },
    "unit": {
      "anyOf": [
        {
          "$ref": "#/$defs/Unit"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Units of the field."
    },
    "x": {
      "$ref": "#/$defs/InlineArray",
      "description": "Column positions of the data points."
    },
    "y": {
      "$ref": "#/$defs/InlineArray",
      "description": "Row positions of the data points."
    }
  },
  "required": [
    "bounds",
    "data",
    "y",
    "x"
  ],
  "title": "spline_field",
  "type": "object"
}
