unit/defunit-1.0.0
Define a new physical unit.
Description
Defines a new unit. It can be used to either:
Define a new base unit.
Create a new unit name that is a equivalent to a given unit.
The new unit must be defined before any unit tags that use it.
Outline
Schema Definitions ¶
This type is an object with the following properties:
- name
string Required The name of the new unit.No length restrictionMust match the following pattern:[A-Za-z_][A-Za-z0-9_]+
- unit
object The unit that the new name is equivalent to. It is optional, and if not provided, ornull
, thisdefunit
defines a new base unit.This node must validate against any of the following:
- null
Original Schema ¶
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/unit/defunit-1.0.0"
title: Define a new physical unit.
description: |
Defines a new unit. It can be used to either:
- Define a new base unit.
- Create a new unit name that is a equivalent to a given unit.
The new unit must be defined before any unit tags that use it.
type: object
properties:
name:
description: The name of the new unit.
type: string
pattern: "[A-Za-z_][A-Za-z0-9_]+"
unit:
description: |
The unit that the new name is equivalent to. It is optional,
and if not provided, or ``null``, this ``defunit`` defines a new
base unit.
anyOf:
- $ref: "unit-1.0.0"
- type: "null"
required: [name]
...