Commit 2596c1fc authored by Ole Streicher's avatar Ole Streicher

New upstream version 2.3.0

parent 02eef203
2.3.0 (2018-11-28)
------------------
- Storage of arbitrary precision integers is now provided by
``asdf.IntegerType``. Reading a file with integer literals that are too
large now causes only a warning instead of a validation error. This is to
provide backwards compatibility for files that were created with a buggy
version of ASDF (see #553 below). [#566]
- Remove WCS tags. These are now provided by the `gwcs package
<https://github.com/spacetelescope/gwcs>`_. [#593]
- Deprecate the ``asdf.asdftypes`` module in favor of ``asdf.types``. [#611]
- Support use of ``pathlib.Path`` with ``asdf.open`` and ``AsdfFile.write_to``.
[#617]
- Update ASDF Standard submodule to version 1.3.0.
2.2.1 (2018-11-15)
------------------
......@@ -31,6 +50,9 @@
index before any others. This fixes a bug that was related to the way that
subclass tags were overwritten by external extensions. [#598]
- Remove WCS tags. These are now provided by the `gwcs package
<https://github.com/spacetelescope/gwcs>`_. [#593]
2.1.1 (2018-11-01)
------------------
......
Metadata-Version: 1.2
Name: asdf
Version: 2.2.1
Version: 2.3.0
Summary: Python tools to handle ASDF files
Home-page: http://github.com/spacetelescope/asdf
Author: Erik Bray, Dan D'Avella, Michael Droettboom
......
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/integer-1.0.0"
title: Arbitrary precision integer value.
description: |
Represents an arbitrarily large integer value.
examples:
-
- An integer value that is stored using an internal array
- |
!core/integer-1.0.0
sign: +
string: '1193942770599561143856918438330'
words: !core/ndarray-1.0.0
source: 0
datatype: uint32
byteorder: little
shape: [4]
-
- The same integer value is stored using an inline array
- |
!core/integer-1.0.0
sign: +
string: '1193942770599561143856918438330'
words: !core/ndarray-1.0.0
data: [1103110586, 1590521629, 299257845, 15]
datatype: uint32
shape: [4]
tag: "tag:stsci.edu:asdf/core/integer-1.0.0"
type: object
properties:
words:
$ref: "ndarray-1.0.0"
description: |
An array of unsigned 32-bit words representing the integer value, stored
as little endian (i.e. the first word of the array represents the least
significant bits of the integer value).
sign:
type: string
pattern: "^[+-]$"
description: |
String indicating whether the integer value is positive or negative.
string:
type: string
description: |
Optional string representation of the integer value. This field is only
intended to improve readability for humans, and therefore no assumptions
about format should be made by ASDF readers.
required: [words, sign]
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/add-1.2.0"
tag: "tag:stsci.edu:asdf/transform/add-1.2.0"
title: >
Perform a list of subtransforms in parallel and then
add their results together.
description: |
Each of the subtransforms must have the same number of inputs and
outputs.
examples:
-
- A list of transforms, performed in parallel and added together
- |
!transform/add-1.2.0
forward:
- !transform/generic-1.1.0
n_inputs: 1
n_outputs: 2
- !transform/generic-1.1.0
n_inputs: 1
n_outputs: 2
allOf:
- $ref: "transform-1.2.0"
- properties:
forward:
type: array
items:
$ref: "transform-1.2.0"
required: [forward]
\ No newline at end of file
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/affine-1.3.0"
tag: "tag:stsci.edu:asdf/transform/affine-1.3.0"
title: >
An affine transform.
description: |
Invertibility: All ASDF tools are required to be able to compute the
analytic inverse of this transform.
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
matrix:
description: |
An array of size (*n* x *n*), where *n* is the number of axes,
representing the linear transformation in an affine transform.
anyOf:
- $ref: "../core/ndarray-1.0.0"
- $ref: "../unit/quantity-1.1.0"
- type: array
items:
type: array
items:
type: number
minItems: 2
maxItems: 2
minItems: 2
maxItems: 2
translation:
description: |
An array of size (*n*,), where *n* is the number of axes,
representing the translation in an affine transform.
anyOf:
- $ref: "../core/ndarray-1.0.0"
- $ref: "../unit/quantity-1.1.0"
- type: array
items:
type: number
minItems: 2
maxItems: 2
required: [matrix]
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/compose-1.2.0"
tag: "tag:stsci.edu:asdf/transform/compose-1.2.0"
title: >
Perform a list of subtransforms in series.
description: |
The output of each subtransform is fed into the input of the next
subtransform.
The number of output dimensions of each subtransform must be equal
to the number of input dimensions of the next subtransform in list.
To reorder or add/drop axes, insert `remap_axes` transforms in the
subtransform list.
Invertibility: All ASDF tools are required to be able to compute the
analytic inverse of this transform, by reversing the list of
transforms and applying the inverse of each.
examples:
-
- A series of transforms
- |
!transform/compose-1.2.0
forward:
- !transform/generic-1.1.0
n_inputs: 1
n_outputs: 2
- !transform/generic-1.1.0
n_inputs: 2
n_outputs: 1
allOf:
- $ref: "transform-1.2.0"
- properties:
forward:
type: array
items:
$ref: "transform-1.2.0"
required: [forward]
\ No newline at end of file
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/concatenate-1.2.0"
tag: "tag:stsci.edu:asdf/transform/concatenate-1.2.0"
title: >
Send axes to different subtransforms.
description: |
Transforms a set of separable inputs by splitting the axes apart,
sending them through the given subtransforms in parallel, and
finally concatenating the subtransform output axes back together.
The input axes are assigned to each subtransform in order. If the
number of input axes is unequal to the sum of the number of input
axes of all of the subtransforms, that is considered an error case.
The output axes from each subtransform are appended together to make
up the resulting output axes.
For example, given 5 input axes, and 3 subtransforms with the
following orders:
1. transform A: 2 in -> 2 out
1. transform B: 1 in -> 2 out
1. transform C: 2 in -> 1 out
The transform is performed as follows:
```
: i0 i1 i2 i3 i4
: | | | | |
: +---------+ +---------+ +----------+
: | A | | B | | C |
: +---------+ +---------+ +----------+
: | | | | |
: o0 o1 o2 o3 o4
```
If reordering of the input or output axes is required, use in series
with the `remap_axes` transform.
Invertibility: All ASDF tools are required to be able to compute the
analytic inverse of this transform.
examples:
-
- The example in the description
- |
!transform/concatenate-1.2.0
forward:
- !transform/generic-1.1.0
n_inputs: 2
n_outputs: 2
- !transform/generic-1.1.0
n_inputs: 1
n_outputs: 2
- !transform/generic-1.1.0
n_inputs: 2
n_outputs: 1
allOf:
- $ref: "transform-1.2.0"
- properties:
forward:
type: array
items:
$ref: "transform-1.2.0"
required: [forward]
\ No newline at end of file
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/conic-1.3.0"
title: |
Base class of all conic projections.
description: |
In conic projections, the sphere is thought to be projected onto the
surface of a cone which is then opened out.
In a general sense, the pixel-to-sky transformation is defined as:
$$\phi &= \arg\left(\frac{Y_0 - y}{R_\theta}, \frac{x}{R_\theta}\right) / C \\
R_\theta &= \mathrm{sign} \theta_a \sqrt{x^2 + (Y_0 - y)^2}$$
and the inverse (sky-to-pixel) is defined as:
$$x &= R_\theta \sin (C \phi) \\
y &= R_\theta \cos (C \phi) + Y_0$$
where $C$ is the "constant of the cone":
$$C = \frac{180^\circ \cos \theta}{\pi R_\theta}$$
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
direction:
enum: [pix2sky, sky2pix]
default: pix2sky
sigma:
anyOf:
- $ref: "../unit/quantity-1.1.0"
- type: number
description: |
$(\theta_1 + \theta_2) / 2$ where $\theta_1$ and $\theta_2$
are the latitudes of the standard parallels, in degrees.
default: 0
delta:
anyOf:
- $ref: "../unit/quantity-1.1.0"
- type: number
description: |
$(\theta_1 - \theta_2) / 2$ where $\theta_1$ and $\theta_2$
are the latitudes of the standard parallels, in degrees.
default: 0
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/constant-1.3.0"
tag: "tag:stsci.edu:asdf/transform/constant-1.3.0"
title: >
A transform that takes no inputs and always outputs a constant
value.
description: |
Invertibility: All ASDF tools are required to be able to compute the
analytic inverse of this transform, which always outputs zero values.
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
value:
anyOf:
- $ref: "../unit/quantity-1.1.0"
- type: number
required: [value]
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/cylindrical-1.2.0"
title: |
Base class of all cylindrical projections.
description: |
The surface of cylindrical projections is a cylinder.
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
direction:
enum: [pix2sky, sky2pix]
default: pix2sky
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/divide-1.2.0"
tag: "tag:stsci.edu:asdf/transform/divide-1.2.0"
title: >
Perform a list of subtransforms in parallel and then
divide their results.
description: |
Each of the subtransforms must have the same number of inputs and
outputs.
Invertibility: This transform is not automatically invertible.
examples:
-
- A list of transforms, performed in parallel, and then combined
through division.
- |
!transform/divide-1.2.0
forward:
- !transform/generic-1.1.0
n_inputs: 1
n_outputs: 2
- !transform/generic-1.1.0
n_inputs: 1
n_outputs: 2
allOf:
- $ref: "transform-1.2.0"
- properties:
forward:
type: array
items:
$ref: "transform-1.2.0"
required: [forward]
\ No newline at end of file
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/generic-1.2.0"
tag: "tag:stsci.edu:asdf/transform/generic-1.2.0"
title: >
A generic transform.
description: >
This is used **entirely** for bootstrapping purposes so one can
create composite models including transforms that haven't yet been
written. **IT WILL NOT BE IN THE FINAL VERSION OF THE SPEC**.
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
n_inputs:
type: integer
n_outputs:
type: integer
required: [n_inputs, n_outputs]
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/healpix-1.2.0"
tag: "tag:stsci.edu:asdf/transform/healpix-1.2.0"
title: |
HEALPix projection.
description: |
Corresponds to the `XPH` projection in the FITS WCS standard.
Invertibility: All ASDF tools are required to provide the inverse of
this transform.
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
direction:
enum: [pix2sky, sky2pix]
default: pix2sky
H:
type: number
description: |
The number of facets in the longitude direction.
default: 4.0
X:
type: number
description: |
The number of facets in the latitude direction.
default: 3.0
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/healpix_polar-1.2.0"
tag: "tag:stsci.edu:asdf/transform/healpix_polar-1.2.0"
title: |
HEALPix polar, aka "butterfly", projection.
description: |
Corresponds to the `XPH` projection in the FITS WCS standard.
Invertibility: All ASDF tools are required to provide the inverse of
this transform.
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
direction:
enum: [pix2sky, sky2pix]
default: pix2sky
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/identity-1.2.0"
tag: "tag:stsci.edu:asdf/transform/identity-1.2.0"
title: >
The identity transform.
description: >
Invertibility: The inverse of this transform is also the identity
transform.
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
n_dims:
type: integer
default: 1
description: |
The number of dimensions.
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/label_mapper-1.2.0"
tag: "tag:stsci.edu:asdf/transform/label_mapper-1.2.0"
title: >
Represents a mapping from a coordinate value to a label.
description: |
A label mapper instance maps inputs to a label. It is used together
with
[regions_selector](ref:http://stsci.edu/schemas/asdf/transform/regions_selector-1.1.0). The
[label_mapper](ref:http://stsci.edu/schemas/asdf/transform/label_mapper-1.2.0)
returns the label corresponding to given inputs. The
[regions_selector](ref:http://stsci.edu/schemas/asdf/transform/regions_selector-1.1.0)
returns the transform corresponding to this label. This maps inputs
(e.g. pixels on a detector) to transforms uniquely.
examples:
-
- Map array indices are to labels.
- |
!transform/label_mapper-1.2.0
mapper: !core/ndarray-1.0.0
[[1, 0, 2],
[1, 0, 2],
[1, 0, 2]]
-
- Map numbers dictionary to transforms which return labels.
- |
!transform/label_mapper-1.2.0
mapper: !!omap
- !!omap
labels: [-1.67833272, -1.9580548, -1.118888]
- !!omap
models:
- !transform/compose-1.1.0
forward:
- !transform/remap_axes-1.1.0
mapping: [1]
- !transform/shift-1.1.0 {offset: 6.0}
- !transform/compose-1.1.0
forward:
- !transform/remap_axes-1.1.0
mapping: [1]
- !transform/shift-1.1.0 {offset: 2.0}
- !transform/compose-1.1.0
forward:
- !transform/remap_axes-1.1.0
mapping: [1]
- !transform/shift-1.1.0 {offset: 4.0}
inputs: [x, y]
inputs_mapping: !transform/remap_axes-1.1.0
mapping: [0]
n_inputs: 2
-
- Map a number wihtin a range of numbers to transforms which return labels.
- |
!transform/label_mapper-1.2.0
mapper: !!omap
- !!omap
labels:
- [3.2, 4.1]
- [2.67, 2.98]
- [1.95, 2.3]
- !!omap
models:
- !transform/compose-1.1.0
forward:
- !transform/remap_axes-1.1.0
mapping: [1]
- !transform/shift-1.1.0 {offset: 6.0}
- !transform/compose-1.1.0
forward:
- !transform/remap_axes-1.1.0
mapping: [1]
- !transform/shift-1.1.0 {offset: 2.0}
- !transform/compose-1.1.0
forward:
- !transform/remap_axes-1.1.0
mapping: [1]
- !transform/shift-1.1.0 {offset: 4.0}
inputs: [x, y]
inputs_mapping: !transform/remap_axes-1.1.0
mapping: [0]
n_inputs: 2
allOf:
- $ref: "transform-1.2.0"
- type: object
properties:
mapper:
description: |
A mapping of inputs to labels.
In the general case this is a `astropy.modeling.core.Model`.
It could be a numpy array with the shape of the detector/observation.
Pixel values are of type integer or string and represent
region labels. Pixels which are not within any region have value ``no_label``.
It could be a dictionary which maps tuples to labels or floating point numbers to labels.
anyOf:
- $ref: "../core/ndarray-1.0.0"
- $ref: "transform-1.2.0"
- type: object
properties:
labels:
type: array
items:
anyOf:
- type: number
- type: array
items:
type: number
minLength: 2
maxLength: 2
models:
type: array
items:
$ref: "transform-1.2.0"
inputs:
type: array
items:
type: string
description: |
Names of inputs.
inputs_mapping:
$ref: "transform-1.2.0"
description: |
[mapping](ref:http://stsci.edu/schemas/asdf/transform/remap-axes-1.1.0)
atol:
type: number
description: |
absolute tolerance to compare keys in mapper.
no_label:
description: |
Fill in value for missing output.
anyOf:
- type: number
- type: string
required: [mapper]
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/multiply-1.2.0"
tag: "tag:stsci.edu:asdf/transform/multiply-1.2.0"
title: >
Perform a list of subtransforms in parallel and then
multiply their results.
description: |
Each of the subtransforms must have the same number of inputs and
outputs.
Invertibility: This transform is not automatically invertible.