1%YAML 1.1 2--- 3$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" 4id: "http://astropy.org/schemas/astropy/transform/units_mapping-1.0.0" 5tag: "tag:astropy.org:astropy/transform/units_mapping-1.0.0" 6 7title: | 8 Mapper that operates on the units of the input. 9 10description: | 11 This transform operates on the units of the input, first converting to 12 the expected input units, then assigning replacement output units without 13 further conversion. 14 15examples: 16 - 17 - Assign units of seconds to dimensionless input. 18 - | 19 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0> 20 inputs: 21 - name: x 22 unit: !unit/unit-1.0.0 23 outputs: 24 - name: x 25 unit: !unit/unit-1.0.0 s 26 - 27 - Convert input to meters, then assign dimensionless units. 28 - | 29 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0> 30 inputs: 31 - name: x 32 unit: !unit/unit-1.0.0 m 33 outputs: 34 - name: x 35 unit: !unit/unit-1.0.0 36 37 - 38 - Convert input to meters, then drop units entirely. 39 - | 40 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0> 41 inputs: 42 - name: x 43 unit: !unit/unit-1.0.0 m 44 outputs: 45 - name: x 46 47 - 48 - Accept any units, then replace with meters. 49 - | 50 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0> 51 inputs: 52 - name: x 53 outputs: 54 - name: x 55 unit: !unit/unit-1.0.0 m 56 57allOf: 58 - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" 59 - type: object 60 properties: 61 inputs: 62 description: | 63 Array of input configurations. 64 type: array 65 items: 66 $ref: "#/definitions/value_configuration" 67 outputs: 68 description: | 69 Array of output configurations. 70 type: array 71 items: 72 $ref: "#/definitions/value_configuration" 73 required: [inputs, outputs] 74 75definitions: 76 value_configuration: 77 description: | 78 Configuration of a single model value (input or output). 79 type: object 80 properties: 81 name: 82 description: | 83 Value name. 84 type: string 85 unit: 86 description: | 87 Expected unit. 88 $ref: "http://stsci.edu/schemas/asdf/unit/unit-1.0.0" 89 equivalencies: 90 description: | 91 Equivalencies to apply when converting value to expected unit. 92 $ref: "http://astropy.org/schemas/astropy/units/equivalency-1.0.0" 93 allow_dimensionless: 94 description: | 95 Allow this value to receive dimensionless data. 96 type: boolean 97 default: false 98 required: [name] 99... 100