CSVFile.__init__

CSVFile.__init__(*args, **kargs)

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.formats.generic.DataFile(array)[source]

Creates a new DataFile object and assigns the array to the DataFile.data attribute.

Stoner.formats.generic.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.formats.generic.DataFile(array, dictionary)[source]

Creates the new DataFile object and does the combination of the previous two forms.

Stoner.formats.generic.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.