Data.__init__¶
- Data.__init__(*args, **kwargs)[source]¶
Initialise the Data from arrays, dictionaries and filenames.
Various forms are recognised:
- Data('filename', <optional filetype>, <args>)
Creates the new Data object and then executes the
Data.load method to load data from the given filename.
- Stoner.Data(array)[source]
Creates a new Data object and assigns the array to the
Data.dataattribute.
- Stoner.Data(dictionary)[source]
Creates the new Data 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.Data(array, dictionary)[source]
Creates the new Data object and does the combination of the previous two forms.
- Stoner.Data(Data)[source]
Creates the new Data object and initialises all data from the existing
Datainstance. This on the face of it does the same as the assignment operator, but is more useful when one or other of the Data objects is an instance of a sub - class of Data
- Parameters:
args (positional arguments) – Variable number of arguments that match one of the definitions above
kwargs (keyword Arguments) – All keyword arguments that match public attributes are used to set those public attributes.