%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']
...
