Commit 98ef166b authored by Ole Streicher's avatar Ole Streicher

Initial upstream version 1.0.1

parents
1.0.1 (2016-01-08)
------------------
- Fixed installation from the source tarball on Python 3. [#187]
- Fixed error handling when opening ASDF files not supported by the current
version of pyasdf. [#178]
- Fixed parse error that could occur sometimes when YAML data was read from
a stream. [#183]
1.0.0 (2015-09-18)
------------------
- Initial release.
Metadata-Version: 1.0
Name: asdf
Version: 1.0.1
Summary: Python tools to handle ASDF files
Home-page: http://github.com/spacetelescope/pyasdf
Author: Erik Bray, Michael Droettboom
Author-email: mdroe@stsci.edu
License: BSD
Description: UNKNOWN
Platform: UNKNOWN
pyasdf
======
Python library for reading and writing ASDF files.
.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org
:alt: Powered by Astropy Badge
Advanced Scientific Data Format (ASDF) is a next generation
interchange format for scientific data.
Installation
------------
To install::
python setup.py install
Testing
-------
To run the unit tests::
python setup.py test
Coverage
--------
.. image:: https://coveralls.io/repos/spacetelescope/pyasdf/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/spacetelescope/pyasdf?branch=master
This diff is collapsed.
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
data: !core/ndarray-1.0.0
data: ['', ascii]
datatype: [ascii, 5]
shape: [2]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
data: !core/ndarray-1.0.0
data: [0, 1, 2, 3, 4, 5, 6, 7]
datatype: int64
shape: [8]
...
This diff is collapsed.
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
bzp2: !core/ndarray-1.0.0
data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
datatype: int64
shape: [128]
zlib: !core/ndarray-1.0.0
data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127]
datatype: int64
shape: [128]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
data: !core/ndarray-1.0.0
source: exploded0000.asdf
datatype: int64
byteorder: little
shape: [8]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
data: !core/ndarray-1.0.0
data: [0, 1, 2, 3, 4, 5, 6, 7]
datatype: int64
shape: [8]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
datatype<f4: !core/ndarray-1.0.0
data: [0.0, -0.0, .nan, .inf, -.inf, -3.4028234663852886e+38, 3.4028234663852886e+38,
1.1920928955078125e-07, 5.960464477539063e-08, 1.1754943508222875e-38]
datatype: float32
shape: [10]
datatype<f8: !core/ndarray-1.0.0
data: [0.0, -0.0, .nan, .inf, -.inf, -1.7976931348623157e+308, 1.7976931348623157e+308,
2.220446049250313e-16, 1.1102230246251565e-16, 2.2250738585072014e-308]
datatype: float64
shape: [10]
datatype>f4: !core/ndarray-1.0.0
data: [0.0, -0.0, .nan, .inf, -.inf, -3.4028234663852886e+38, 3.4028234663852886e+38,
1.1920928955078125e-07, 5.960464477539063e-08, 1.1754943508222875e-38]
datatype: float32
shape: [10]
datatype>f8: !core/ndarray-1.0.0
data: [0.0, -0.0, .nan, .inf, -.inf, -1.7976931348623157e+308, 1.7976931348623157e+308,
2.220446049250313e-16, 1.1102230246251565e-16, 2.2250738585072014e-308]
datatype: float64
shape: [10]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
datatype<i1: !core/ndarray-1.0.0
data: [127, -128, 0]
datatype: int8
shape: [3]
datatype<i2: !core/ndarray-1.0.0
data: [32767, -32768, 0]
datatype: int16
shape: [3]
datatype<i4: !core/ndarray-1.0.0
data: [2147483647, -2147483648, 0]
datatype: int32
shape: [3]
datatype<u1: !core/ndarray-1.0.0
data: [255, 0]
datatype: uint8
shape: [2]
datatype<u2: !core/ndarray-1.0.0
data: [65535, 0]
datatype: uint16
shape: [2]
datatype<u4: !core/ndarray-1.0.0
data: [4294967295, 0]
datatype: uint32
shape: [2]
datatype>i1: !core/ndarray-1.0.0
data: [127, -128, 0]
datatype: int8
shape: [3]
datatype>i2: !core/ndarray-1.0.0
data: [32767, -32768, 0]
datatype: int16
shape: [3]
datatype>i4: !core/ndarray-1.0.0
data: [2147483647, -2147483648, 0]
datatype: int32
shape: [3]
datatype>u1: !core/ndarray-1.0.0
data: [255, 0]
datatype: uint8
shape: [2]
datatype>u2: !core/ndarray-1.0.0
data: [65535, 0]
datatype: uint16
shape: [2]
datatype>u4: !core/ndarray-1.0.0
data: [4294967295, 0]
datatype: uint32
shape: [2]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
data: !core/ndarray-1.0.0
data: [0, 1, 2, 3, 4, 5, 6, 7]
datatype: int64
shape: [8]
subset: !core/ndarray-1.0.0
data: [1, 3, 5, 7]
datatype: int64
shape: [4]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
my_stream: !core/ndarray-1.0.0
data:
- [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
- [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
- [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
- [3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0]
- [4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0]
- [5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0]
- [6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0]
- [7.0, 7.0, 7.0, 7.0, 7.0, 7.0, 7.0, 7.0]
datatype: float64
shape: [8, 8]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
datatype<U: !core/ndarray-1.0.0
data: ['', Æʩ]
datatype: [ucs4, 2]
shape: [2]
datatype>U: !core/ndarray-1.0.0
data: ['', Æʩ]
datatype: [ucs4, 2]
shape: [2]
...
#ASDF 1.0.0
#ASDF_STANDARD 1.0.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.0.0
asdf_library: !core/software-1.0.0 {author: Space Telescope Science Institute, homepage: 'http://github.com/spacetelescope/pyasdf',
name: pyasdf, version: 1.0.0}
datatype<U: !core/ndarray-1.0.0
data: ['', "\U00010020"]
datatype: [ucs4, 2]
shape: [2]
datatype>U: !core/ndarray-1.0.0
data: ['', "\U00010020"]
datatype: [ucs4, 2]
shape: [2]
...
%YAML 1.1
---
$schema: "http://json-schema.org/draft-04/schema"
id: "http://stsci.edu/schemas/asdf/asdf-schema-1.0.0"
title:
ASDF schema
description: |
A metaschema extending YAML Schema and JSON Schema to add support
for some ASDF-specific checks, related to nd-arrays.
allOf:
- $ref: "http://stsci.edu/schemas/yaml-schema/draft-01"
- type: object
properties:
max_ndim:
description: |
Specifies that the corresponding ndarray is at most the
given number of dimensions. If the array has fewer
dimensions, it should be logically treated as if it were
"broadcast" to the expected dimensions by adding 1's to the
front of the shape list.
type: integer
minimum: 0
ndim:
description: |
Specifies that the matching ndarray is exactly the given
number of dimensions.
type: integer
minimum: 0
datatype:
description: |
Specifies the datatype of the ndarray.
By default, an array is considered "matching" if the array
can be cast to the given datatype without data loss. For
exact datatype matching, set `exact_datatype` to `true`.
allOf:
- $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0#definitions/datatype-1.0.0"
exact_datatype:
description: |
If `true`, the datatype must match exactly.
type: boolean
default: false
...
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/asdf-1.0.0"
title: |
Top-level schema for every ASDF file.
description: |
This schema contains the top-level attributes for every ASDF file.
tag: "tag:stsci.edu:asdf/core/asdf-1.0.0"
type: object
properties:
asdf_library:
description: |
Describes the ASDF library that produced the file.
$ref: "software-1.0.0"
history:
description: |
A log of transformations that have happened to the file. May
include such things as data collection, data calibration
pipelines, data analysis etc.
type: array
items:
$ref: "history_entry-1.0.0"
data:
description: |
The data array corresponds to the main science data array in the
file. Oftentimes, the data model will be much more complex than
a single array, but this array will be used by applications that
just want to convert to a display an image or preview of the
file. It is recommended, but not required, that it is a
2-dimensional image array.
$ref: "ndarray-1.0.0"
fits:
description: |
A way to specify exactly how this ASDF file should be converted
to FITS.
$ref: "../fits/fits-1.0.0"
wcs:
description: |
The location of the main WCS for the main data.
$ref: "../wcs/wcs-1.0.0"
additionalProperties: true
\ No newline at end of file
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/column-1.0.0"
tag: "tag:stsci.edu:asdf/core/column-1.0.0"
title: >
A column in a table.
description: |
Each column contains a name and an array of data, and an optional description
and unit.
type: object
properties:
name:
description: |
The name of the column. Each name in a
[table](http://stsci.edu/schemas/asdf/core/table-1.0.0) must be
unique.
type: string
pattern: "[A-Za-z_][A-Za-z0-9_]*"
data:
description: |
The array data for the column.
allOf:
- $ref: ndarray-1.0.0
description:
description: |
An optional description of the column.
type: string
default: ''
unit:
description:
An optional unit for the column.
allOf:
- $ref: ../unit/unit-1.0.0
meta:
description:
Additional free-form metadata about the column.
type: object
default: {}
requiredProperties: [name, data]
additionalProperties: false
\ No newline at end of file
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/complex-1.0.0"
title: Complex number value.
description: |
Represents a complex number matching the following EBNF grammar
```
plus-or-minus = "+" | "-"
suffix = "J" | "j" | "I" | "i"
complex = [ieee754] [plus-or-minus ieee754 suffix]
```
Where `ieee754` is a floating point number in IEEE 754 decimal
format.
Though `J`, `j`, `I` and `i` must be supported on reading, it is
recommended to use `i` on writing.
examples:
-
- 1 real, -1 imaginary
- "!core/complex-1.0.0 1-1j"
-
- 0 real, 1 imaginary
- "!core/complex-1.0.0 1J"
-
- -1 real, 0 imaginary
- "!core/complex-1.0.0 -1"
tag: "tag:stsci.edu:asdf/core/complex-1.0.0"
type: string
pattern: "([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)?([-+][0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?[JjIi])?"
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/constant-1.0.0"
tag: "tag:stsci.edu:asdf/core/constant-1.0.0"
title: Specify that a value is a constant.
description: |
Used as a utility to indicate that value is a literal constant.
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/history_entry-1.0.0"
title: |
An entry in the file history.
tag: "tag:stsci.edu:asdf/core/history_entry-1.0.0"
type: object
properties:
description:
description: |
A description of the transformation performed.
type: string
time:
description: |
A timestamp for the operation, in UTC.
type: string
format: date-time
software:
description: |
One or more descriptions of the software that performed the
operation.
anyOf:
- $ref: "software-1.0.0"
- type: array
items:
$ref: "software-1.0.0"
requiredProperties: [description]
additionalProperties: true
\ No newline at end of file
This diff is collapsed.
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/software-1.0.0"
title: |
Describes a software package.
tag: "tag:stsci.edu:asdf/core/software-1.0.0"
type: object
properties:
name:
description: |
The name of the application or library.
type: string
author:
description: |