Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { // Library is the information about the software library used to create the ASDF file. // See https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/core/software-1.0.0.html Library *Software // History is the list of extensions used to create the ASDF file. // See https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/core/asdf-1.1.0.html#history History *History // Tree is the contents of the ASDF file. It is mapped to a JSON object model. // Please refer to https://godoc.org/github.com/Jeffail/gabs Tree *gabs.Container }
Document carries the ASDF object tree with its metadata.
func (Document) IterArrays ¶
IterArrays visits all the contained ndarray-s in the document.
type ExtensionMetadata ¶
type ExtensionMetadata struct { // Class is the value of `extension_class` property. Class string // Package indicates the name and the version of the extension. Package schema.Tag }
ExtensionMetadata is defined in https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/core/extension_metadata-1.0.0.html
type History ¶
type History struct { // Extensions is the list of transformations applied to the document. Extensions []*ExtensionMetadata // File change history. Entries []*HistoryEntry }
History is defined in https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/core/asdf-1.1.0.html#history
type HistoryEntry ¶
type HistoryEntry struct { // Description is the description of the transformation performed. Description string // Time is the timestamp of the transformation, in UTC. Time string // Software is the list of https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/core/software-1.0.0.html // It may contain one or more elements. Software []*Software }
HistoryEntry is defined in https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/core/history_entry-1.0.0.html
type NDArray ¶
type NDArray struct { // DataType is the tensor element type. DataType *types.Basic // Shape is the tensor shape: a one-dimensional integer sequence. Shape []int // ByteOrder is the byte order if the tensor contains integers. ByteOrder binary.ByteOrder // Data is the raw tensor buffer, similar to `numpy.ndarray.data`. Data []byte }
NDArray is defined in https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/core/ndarray-1.0.0.html It is similar to `numpy.ndarray` in Python.
func (NDArray) CountBytes ¶
CountBytes returns the size of the tensor in bytes.
func (NDArray) CountElements ¶
CountElements returns the total number of elements in the tensor.
func (NDArray) ElementSize ¶
ElementSize returns the data type size in bytes.
func (*NDArray) EnsureHostEndianness ¶
func (arr *NDArray) EnsureHostEndianness()
EnsureHostEndianness changes the endianness to host as needed.
func (NDArray) ReflectedDataType ¶
ReflectedDataType returns the data type as a reflect.Type.