unit/quantity-1.2.0¶
Represents a Quantity object from astropy
Description
A Quantity object represents a value that has some unit
associated with the number.
Outline
Schema Definitions ¶
This type is an object with the following properties:
- value
object Required A vector of one or more valuesThis node must validate against any of the following:
- number
- unit
unit-1.0.0 Required The unit corresponding to the values - datatype
../core/ndarray-1.1.0#definitions/scalar-datatype The datatype for scalar quantities
Examples ¶
A quantity consisting of a scalar value and unit:
asdf-standard-1.6.0
A quantity consisting of a scalar value with datatype and unit:
asdf-standard-1.6.0
A quantity consisting of a single value in an array:
asdf-standard-1.6.0
A quantity with an array of values:
asdf-standard-1.6.0
A quantity with an n-dimensional array of values:
asdf-standard-1.6.0
Original Schema ¶
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/unit/quantity-1.2.0"
title: >
Represents a Quantity object from astropy
description: |
A Quantity object represents a value that has some unit
associated with the number.
examples:
-
- A quantity consisting of a scalar value and unit
- asdf-standard-1.6.0
- |
!unit/quantity-1.2.0
value: 3.14159
unit: km
-
- A quantity consisting of a scalar value with datatype and unit
- asdf-standard-1.6.0
- |
!unit/quantity-1.2.0
value: 3.14159
unit: km
datatype: float32
-
- A quantity consisting of a single value in an array
- asdf-standard-1.6.0
- |
!unit/quantity-1.2.0
value: !core/ndarray-1.1.0 [2.71828]
unit: A
-
- A quantity with an array of values
- asdf-standard-1.6.0
- |
!unit/quantity-1.2.0
value: !core/ndarray-1.1.0 [1, 2, 3, 4]
unit: s
-
- A quantity with an n-dimensional array of values
- asdf-standard-1.6.0
- |
!unit/quantity-1.2.0
value: !core/ndarray-1.1.0
datatype: float64
data: [[1, 2, 3],
[4, 5, 6]]
unit: pc
type: object
properties:
value:
description: |
A vector of one or more values
anyOf:
- type: number
- $ref: "../core/ndarray-1.1.0"
unit:
description: |
The unit corresponding to the values
$ref: unit-1.0.0
datatype:
description: |
The datatype for scalar quantities
$ref: "../core/ndarray-1.1.0#definitions/scalar-datatype"
required: [value, unit]
...