core/externalarray-1.0.0

Point to an array-like object in an external file.

Description

Allow referencing of array-like objects in external files. These files can be any type of file and in any absolute or relative location to the asdf file. Loading of these files into arrays is not handled by asdf.

Outline

Schema Definitions

This type is an object with the following properties:
  • fileuri
    stringRequired
    No length restriction
  • target
    objectRequired

    This node must validate against any of the following:

    • integer
    • string
      No length restriction
  • datatype
    stringRequired
    No length restriction
  • shape
    arrayRequired
    No length restriction

    Items in the array must be any of the following types:

    • integer
      Minimum value: 0

Examples

Example external reference:

!core/externalarray-1.0.0
  datatype: int16
  fileuri: aia.lev1_euv_12s.2017-09-06T120001Z.94.image_lev1.fits
  shape: [4096, 4096]
  target: 1

Original Schema

%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/externalarray-1.0.0"
title: Point to an array-like object in an external file.
description: |
  Allow referencing of array-like objects in external files. These files can be
  any type of file and in any absolute or relative location to the asdf file.
  Loading of these files into arrays is not handled by asdf.
examples:
  -
    - Example external reference
    - |
      !core/externalarray-1.0.0
        datatype: int16
        fileuri: aia.lev1_euv_12s.2017-09-06T120001Z.94.image_lev1.fits
        shape: [4096, 4096]
        target: 1

type: object
properties:
  fileuri:
    type: string
  target:
    anyOf:
      - type: integer
      - type: string
  datatype:
    type: string
  shape:
    type: array
    items:
      anyOf:
      - type: integer
        minimum: 0

required: [fileuri, target, datatype, shape]
additionalProperties: true
...