box2d-1.0.0

Two dimensional box model.

Description

Two dimensional box.

Outline

Schema Definitions

This node must validate against all of the following:

  • This type is an object with the following properties:

    • amplitude

      objectRequired

      Amplitude.

      This node must validate against any of the following:

    • x_0

      objectRequired

      x position of the center of the box model.

      This node must validate against any of the following:

    • x_width

      objectRequired

      x width of box.

      This node must validate against any of the following:

    • y_0

      objectRequired

      y position of the center of the box model.

      This node must validate against any of the following:

    • y_width

      objectRequired

      y width of box.

      This node must validate against any of the following:

Examples

A 2D box with (x, y) dimensions (4.0, 2.0), centered at (0.5, 1.5) with amplitude 10.0.:

!transform/box2d-1.0.0
  amplitude: 10.0
  bounding_box:
  - [0.5, 2.5]
  - [-1.5, 2.5]
  x_0: 0.5
  x_width: 4.0
  y_0: 1.5
  y_width: 2.0

Original Schema

%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/box2d-1.0.0"
title: >
  Two dimensional box model.

description: >
  Two dimensional box.

examples:
  -
    - A 2D box with (x, y) dimensions (4.0, 2.0), centered at (0.5, 1.5) with amplitude 10.0.
    - |
      !transform/box2d-1.0.0
        amplitude: 10.0
        bounding_box:
        - [0.5, 2.5]
        - [-1.5, 2.5]
        x_0: 0.5
        x_width: 4.0
        y_0: 1.5
        y_width: 2.0

allOf:
  - $ref: "transform-1.2.0"
  - type: object
    properties:
      amplitude:
        anyOf:
          - $ref: "../unit/quantity-1.1.0"
          - type: number
        description: Amplitude.
      x_0:
        anyOf:
          - $ref: "../unit/quantity-1.1.0"
          - type: number
        description: x position of the center of the box model.
      x_width:
        anyOf:
          - $ref: "../unit/quantity-1.1.0"
          - type: number
        description: x width of box.
      y_0:
        anyOf:
          - $ref: "../unit/quantity-1.1.0"
          - type: number
        description: y position of the center of the box model.
      y_width:
        anyOf:
          - $ref: "../unit/quantity-1.1.0"
          - type: number
        description: y width of box.

    required: ['amplitude', 'x_0', 'x_width', 'y_0', 'y_width']
...