io¶
-
javelin.io.
load_HDF5_to_xarray
(filename)[source]¶ Load HDF file into an xarray DataArray using pandas HDFStore
requries pytables
-
javelin.io.
numpy_to_vti
(array, origin, spacing, filename)[source]¶ This function write a VtkImageData vti file from a numpy array.
Parameters: - array (
numpy.ndarray
) – input array - origin (array like object of values) – the origin of the array
- spacing (array like object of values) – the step in each dimension
- filename (str) – output filename (.vti)
- array (
-
javelin.io.
read_mantid_MDHisto
(filename)[source]¶ Read the saved MDHisto from from Mantid and returns an xarray.DataArray object
-
javelin.io.
read_stru
(filename, starting_cell=(1, 1, 1))[source]¶ Read in a .stru file saved from DISCUS into a javelin Structure
If the line ncell is not present in the file all the atoms will be read into a single cell.
-
javelin.io.
read_stru_to_ase
(filename)[source]¶ This function read the legacy DISCUS stru file format into a ASE Atoms object.
Parameters: filename (str) – filename of DISCUS stru file Returns: ASE Atoms object Return type: ase.Atoms