%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/tabular-1.4.0"
title: >
  A Tabular model.
description: |
  Tabular represents a lookup table with values corresponding to
  some grid points.
  It computes the interpolated values corresponding to the given
  inputs. Three methods of interpolation are supported -
  "linear", "nearest" and "splinef2d". It supports extrapolation.
allOf:
  - $ref: "transform-1.4.0"
  - type: object
    properties:
      lookup_table:
        description: >
          Table values.
        anyOf:
          - type: array
          - tag: "tag:stsci.edu:asdf/core/ndarray-1.*"
          - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
      points:
        type: array
        items:
          anyOf:
            - type: array
            - tag: "tag:stsci.edu:asdf/core/ndarray-1.*"
            - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
        description: |
          Grid values - each row in the array corresponds to a dimension
          in the lookup table. The grid does not have to be regular.
      method:
        description: |
          Method of interpolation. Supported are "linear" and
          "nearest", and "splinef2d". "splinef2d" is only supported for
          2-dimensional data.
        type: string
        enum: ["linear", "nearest", "splinef2d"]
        default: "linear"
      bounds_error:
        description: |
          If True, when interpolated values are requested outside of the
          domain of the input data, a ValueError is raised.
          If False, then "fill_value" is used.
        type: boolean
        default: true
      fill_value:
        description: |
          If provided, the value to use for points outside of the
          interpolation domain. If None, values outside the domain are
          extrapolated.  Extrapolation is not supported by method "splinef2d".
        type: number
    required: [lookup_table]
...
