fix_inputs-1.2.0

Set to a constant selected input arguments of a model.

Description

This operation takes as the right hand side a dict equivalent that consists of key:value pairs where the key identifies the input argument to be set, either by position number (0 based) or name, and the value is the floating point value that should be assigned to that input. The result is a compound model with n fewer input arguments where n is the number of input values to be set (i.e., the number of keys in the dict).

Outline

Schema Definitions

This node must validate against all of the following:

  • This type is an object with the following properties:

    • forward

      arrayRequired

      Minimum length: 2

      Maximum length: 2

      The first 2 items in the list must be the following types:

        This type is an object with the following properties:

        • keys

          array
          No length restriction

          Items in the array are restricted to the following types:

          [‘string’, ‘integer’]

        • values

          array
          No length restriction

          The first 1 item in the list must be the following types:

            number

Examples

Fix the 0-th coordinate.:

!transform/fix_inputs-1.2.0
  forward:
  - !transform/compose-1.2.0
      forward:
      - !transform/gnomonic-1.2.0 {direction: pix2sky}
      - !transform/rotate2d-1.3.0 {angle: 23.0}
  - keys: [0]
    values: [2]

Fix the “x” coordinate.:

!transform/fix_inputs-1.2.0
  forward:
  - !transform/compose-1.2.0
      forward:
      - !transform/gnomonic-1.2.0 {direction: pix2sky}
      - !transform/rotate2d-1.3.0 {angle: 23.0}
  - keys: [x]
    values: [2]

Original Schema

%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/fix_inputs-1.2.0"
title: >
  Set to a constant selected input arguments of a model.

description: |
  This operation takes as the right hand side a dict equivalent
  that consists of key:value pairs where the key identifies
  the input argument to be set, either by position number
  (0 based) or name, and the value is the floating point value
  that should be assigned to that input. The result is a
  compound model with n fewer input arguments where n is
  the number of input values to be set (i.e., the number
  of keys in the dict).

examples:
  -
    - Fix the 0-th coordinate.
    - |
      !transform/fix_inputs-1.2.0
        forward:
        - !transform/compose-1.2.0
            forward:
            - !transform/gnomonic-1.2.0 {direction: pix2sky}
            - !transform/rotate2d-1.3.0 {angle: 23.0}
        - keys: [0]
          values: [2]
  -
    - Fix the "x" coordinate.
    - |
      !transform/fix_inputs-1.2.0
        forward:
        - !transform/compose-1.2.0
            forward:
            - !transform/gnomonic-1.2.0 {direction: pix2sky}
            - !transform/rotate2d-1.3.0 {angle: 23.0}
        - keys: [x]
          values: [2]

allOf:
  - $ref: "transform-1.2.0"
  - properties:
      forward:
        type: array
        items:
          - $ref: "transform-1.2.0"
          - type: object
            properties:
              keys:
                type: array
                items:
                  type: [string, integer]
              values:
                type: array
                items:
                  - type: number
        minItems: 2
        maxItems: 2
    required: [forward]
...