tabular-1.1.0

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.

Outline

Schema Definitions

This node must validate against all of the following:

  • This type is an object with the following properties:

    • lookup_table

      objectRequired

      Table values.

      This node must validate against any of the following:

    • points

      array

      Grid values - each row in the array corresponds to a dimension in the lookup table. The grid does not have to be regular.

      No length restriction

      Items in the array must be any of the following types:

    • method

      string

      Method of interpolation. Supported are “linear” and “nearest”, and “splinef2d”. “splinef2d” is only supported for 2-dimensional data.

      No length restriction

      Only the following values are valid for this node:

      • linear

      • nearest

      • splinef2d

      Default value: linear

    • bounds_error

      boolean

      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.

      Default value:

      True
      
    • fill_value

      number

      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”.

Original Schema

%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/tabular-1.1.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.1.0"
  - type: object
    properties:
      lookup_table:
        description: >
          Table values.
        anyOf:
          - $ref: ../core/ndarray-1.0.0
          - type: array
      points:
        type: array
        items:
          anyOf:
            - type: array
            - $ref: ../core/ndarray-1.0.0
        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]
...