ortho_polynomial-1.0.0

Respresents various Orthogonal Polynomial models.

Description

A polynomial model represented by its coefficients stored in an ndarray of shape \((n+1)\) for univariate polynomials or \((n+1, n+1)\) for polynomials with 2 variables, where \(n\) is the highest total degree of the polynomial. The property polynomial_type defines what kind of polynomial is defined.

\[P = \sum_{i, j=0}^{i+j=n}c_{ij} * x^{i} * y^{j}\]

Invertibility: This transform is not automatically invertible.

Outline

Schema Definitions

This node must validate against all of the following:

  • This type is an object with the following properties:

    • polynomial_type

      stringRequired

      One of a selected set of polynomial types.

      No length restriction

      Only the following values are valid for this node:

      • chebyshev

      • legendre

      • hermite

    • coefficients

      objectRequired

      An array with coefficients.

      This node must validate against any of the following:

Examples

\(P = 1.2 + 0.3 * x + 56.1 * x^{2}\):

!transform/ortho_polynomial-1.0.0
  polynomial_type: hermite
  coefficients: !core/ndarray-1.0.0
                  [1.2, 0.3, 56.1]

\(P = 1.2 + 0.3 * x + 3 * x * y + 2.1 * y^{2}\):

!transform/ortho_polynomial-1.0.0
  polynomial_type: chebyshev
  coefficients: !core/ndarray-1.0.0
                  [[1.2, 0.0, 2.1],
                   [0.3, 3.0, 0.0],
                   [0.0, 0.0, 0.0]]

Original Schema

%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/ortho_polynomial-1.0.0"
title: >
  Respresents various Orthogonal Polynomial models.

description: |
  A polynomial model represented by its coefficients stored in
  an ndarray of shape $(n+1)$ for univariate polynomials or $(n+1, n+1)$
  for polynomials with 2 variables, where $n$ is the highest total degree
  of the polynomial. The property polynomial_type defines what kind of
  polynomial is defined.

  $$P = \sum_{i, j=0}^{i+j=n}c_{ij} * x^{i} * y^{j}$$

  Invertibility: This transform is not automatically invertible.

examples:
  -
    - $P = 1.2 + 0.3 * x + 56.1 * x^{2}$
    - |
        !transform/ortho_polynomial-1.0.0
          polynomial_type: hermite
          coefficients: !core/ndarray-1.0.0
                          [1.2, 0.3, 56.1]
  -
    - $P = 1.2 + 0.3 * x + 3 * x * y + 2.1 * y^{2}$
    - |
        !transform/ortho_polynomial-1.0.0
          polynomial_type: chebyshev
          coefficients: !core/ndarray-1.0.0
                          [[1.2, 0.0, 2.1],
                           [0.3, 3.0, 0.0],
                           [0.0, 0.0, 0.0]]

allOf:
  - $ref: "transform-1.2.0"
  - type: object
    properties:
      polynomial_type:
        description: |
          One of a selected set of polynomial types.
        type: string
        enum: [chebyshev, legendre, hermite]
      coefficients:
        description: |
          An array with coefficients.
        anyOf:
          - $ref: "../core/ndarray-1.0.0"
          - type: array
    required: [polynomial_type, coefficients]
...