spherical_cartesian-1.1.0

Convert coordinates between spherical and Cartesian coordinates.

Description

This schema is for transforms which convert between spherical coordinates (on the unit sphere) and Cartesian coordinates.

Outline

Schema Definitions

This node must validate against all of the following:

  • This type is an object with the following properties:

    • wrap_lon_at

      integerRequired

      Angle at which to wrap the longitude angle.

      Only the following values are valid for this node:

      • 180

      • 360

      Default value: 360

    • transform_type

      stringRequired

      The type of transform/class to initialize.

      No length restriction

      Only the following values are valid for this node:

      • spherical_to_cartesian

      • cartesian_to_spherical

Examples

Convert spherical coordinates to Cartesian coordinates.:

!<tag:stsci.edu:gwcs/spherical_cartesian-1.1.0>
  transform_type: spherical_to_cartesian

Convert Cartesian coordinates to spherical coordinates.:

!<tag:stsci.edu:gwcs/spherical_cartesian-1.1.0>
  transform_type: cartesian_to_spherical

Original Schema

%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/gwcs/spherical_cartesian-1.1.0"

title: >
  Convert coordinates between spherical and Cartesian coordinates.

description: |
  This schema is for transforms which convert between spherical coordinates
  (on the unit sphere) and Cartesian coordinates.

examples:
  -
    - Convert spherical coordinates to Cartesian coordinates.
    - asdf-standard-1.5.0
    - |

        !<tag:stsci.edu:gwcs/spherical_cartesian-1.1.0>
          transform_type: spherical_to_cartesian

  -
    - Convert Cartesian coordinates to spherical coordinates.
    - asdf-standard-1.5.0
    - |
        !<tag:stsci.edu:gwcs/spherical_cartesian-1.1.0>
          transform_type: cartesian_to_spherical

allOf:
  - $ref:  "http://stsci.edu/schemas/asdf/transform/transform-1.2.0"
  - object:
    properties:
      wrap_lon_at:
        description: Angle at which to wrap the longitude angle.
        type: integer
        enum: [180, 360]
        default: 360
      transform_type:
        description: The type of transform/class to initialize.
        type: string
        enum: [spherical_to_cartesian, cartesian_to_spherical]

    required: [transform_type, wrap_lon_at]
...