Table of Contents
Save a MDHistoWorkspace in HKL space to a HDF5 format for use with the ZODS analysis software.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | IMDHistoWorkspace | Mandatory | An input MDHistoWorkspace in HKL space. |
Filename | Input | string | Mandatory | The name of the HDF5 file to write, as a full or relative path. Allowed extensions: [‘.h5’] |
Saves a HDF5 file to the ZODS (Zurich Oak Ridge Disorder Simulation program) format. This format consists of a slice of a MDHistoWorkspace and some information about its location.
You must be in HKL space for the output of this algorithm to make sense!
From http://www.crystal.mat.ethz.ch/research/DiffuseXrayScattering.html:
In general it contains collection of grids with intensities and each grid is described by specifying origin, size of grid (in each direction) and grid base vectors (a1,a2,a3) so a point at node (i,j,k) of grid has coordinates r = origin+i*a1+j*a2+k*a3.
Please contact Michal Chodkiewicz (michal.chodkiewicz@gmail.com); Vickie Lynch (lynchve@ornl.gov) for more details.
This algorithm can be run on a pre-existing MDEventWorkspace or a newly created one. The example below will be done with newly created one using CreateMDWorkspace.
SaveZODS HKL MDHisto Example
ws = CreateMDHistoWorkspace(SignalInput='1,2,3,4,5,6,7,8', ErrorInput='1,1,1,1,1,1,1,1',
Dimensionality='3', Extents='-2, 2, -2, 2, -2, 2', Names=['[H,0,0]','[0,K,0]','[0,0,L]'],
NumberOfBins='2,2,2', Units='lattice,lattice,lattice')
import os
savefile = os.path.join(config["defaultsave.directory"], "ZODS.h5")
SaveZODS(InputWorkspace=ws, FileName=savefile)
print("File created: {}".format(os.path.exists(savefile)))
Output:
File created: True
Categories: AlgorithmIndex | MDAlgorithms\DataHandling
C++ source: SaveZODS.cpp (last modified: 2019-06-04)
C++ header: SaveZODS.h (last modified: 2018-10-05)