DataFile.__init__¶
- DataFile.__init__(*args, **kargs)[source]¶
Initialise the DataFile from arrays, dictionaries and filenames.
Various forms are recognised:
- DataFile('filename', <optional filetype>, <args>)
Creates the new DataFile object and then executes the
DataFile
.load method to load data from the given filename.
- Stoner.Core.DataFile(array)[source]
Creates a new DataFile object and assigns the array to the
DataFile.data
attribute.
- Stoner.Core.DataFile(dictionary)[source]
Creates the new DataFile object. If the dictionary keys are all strigns and the values are all numpy D arrays of equal length, then assumes the dictionary represents columns of data and the keys are the column titles, otherwise initialises the metadata with :parameter: dictionary.
- Stoner.Core.DataFile(array, dictionary)[source]
Creates the new DataFile object and does the combination of the previous two forms.
- Stoner.Core.DataFile(DataFile)[source]
Creates the new DataFile object and initialises all data from the existing
DataFile
instance. This on the face of it does the same as the assignment operator, but is more useful when one or other of the DataFile objects is an instance of a sub - class of DataFile
- Parameters:
args (positional arguments) – Variable number of arguments that match one of the definitions above
kargs (keyword Arguments) – All keyword arguments that match public attributes are used to set those public attributes.