iodata.api module¶
Functions to be used by end users.
- dump_many(iodatas, filename, fmt=None, **kwargs)[source]¶
Write multiple IOData instances to a file.
This routine uses the extension or prefix of the filename to determine the file format. For each file format, a specialized function is called that does the real work.
- dump_one(iodata, filename, fmt=None, **kwargs)[source]¶
Write data to a file.
This routine uses the extension or prefix of the filename to determine the file format. For each file format, a specialized function is called that does the real work.
- Parameters:
iodata (
IOData
) – The object containing the data to be written.filename (
str
) – The file to write the data to.fmt (
Optional
[str
]) – The name of the file format module to use. When not given, it is guessed from the filename.**kwargs – Keyword arguments are passed on to the format-specific dump_one function.
- load_many(filename, fmt=None, **kwargs)[source]¶
Load multiple IOData instances from a file.
This function uses the extension or prefix of the filename to determine the file format. When the file format is detected, a specialized load function is called for the heavy lifting.
- Parameters:
- Yields:
out – An instance of IOData with data for one frame loaded for the file.
- Return type:
- load_one(filename, fmt=None, **kwargs)[source]¶
Load data from a file.
This function uses the extension or prefix of the filename to determine the file format. When the file format is detected, a specialized load function is called for the heavy lifting.
- Parameters:
- Returns:
The instance of IOData with data loaded from the input files.
- Return type:
out
- write_input(iodata, filename, fmt, template=None, **kwargs)[source]¶
Write input file using an instance of IOData for the specified software format.