Previous topic

Image raster

Next topic

Types

Data file

This is the main class to read, write and create HMSA data file.

class pyhmsa.datafile.DataFile(filepath=None, version='1.0', language='en-US')

Creates a new MSA hyper dimensional data file.

Conditions and data objects can be added using the attributes conditions and data, respectively. Note that conditions part of any datum object will also appear in the global conditions dictionary.

Parameters:
  • version – version of the data file (default: to most up-to-date version)
  • language – language of the data file (default and recommended language is en-US)
VERSION = '1.0'
conditions

Conditions

data

Data

filepath

Path where the data file was last saved. Always .hmsa extension used.

header

Header

language

Language

merge(datafile)
orphan_conditions

Conditions that are not associated to any data sets (read-only).

classmethod read(filepath)

Reads an existing MSA hyper dimensional data file and returns an object of this class.

Parameters:filepath – either the location of the XML or HMSA file. Note that both have to be present.
update(datafile)
version

Version

write(filepath=None)

Writes this data file to disk.

Parameters:filepath – either the location of the XML or HMSA file