\(\renewcommand\AA{\unicode{x212B}}\)

LoadGaussCube v1

Summary

Algorithm to load gauss cube files and output a 3D MDHistoWorkspace.

Properties

Name

Direction

Type

Default

Description

Filename

Input

string

Mandatory

Path to gauss cube file (with extension .cube). Note algorithm assumes XYZ ordering. Allowed extensions: [‘.cube’]

OutputWorkspace

Output

IMDHistoWorkspace

Mandatory

3D MDHistoWorkspace containing the data in the .cube file.

Names

Input

str list

Mandatory

A comma separated list of the name of each dimension. e.g. (‘[H,0,0]’,’[0,K,0]’,’[0,0,L]’)

Frames

Input

str list

A comma separated list of the frames of each dimension. The frames can be General Frame: Any frame which is not a Q-based frame. QLab: Wave-vector converted into the lab frame. QSample: Wave-vector converted into the frame of the sample. HKL: Wave-vector converted into the crystal’s HKL indices. Note if nothing is specified then the General Frame is being selected. Also note that if you select a frame then this might override your unit selection if it is not compatible with the frame.

Units

Input

str list

Mandatory

A comma separated list of the units of each dimension.

Description

Algorithm to load Gaussian Cube files (for volumetric data) into a 3D MDHistoWorkspace. The file is assumed to follow the XYZ order for flattening (i.e. the outer loop is over X coordinate and inner loop is over Z).

Usage

Example - LoadGaussCube

from mantid.simpleapi import *

ws = LoadGaussCube(Filename="gauss_cube_example.cube", Names=['[H,0,0]','[0,K,0]','[0,0,L]'], Frames='HKL,HKL,HKL', Units='rlu,rlu,rlu')

print(f"ws has {ws.getNumDims()} dimensions")
for idim in range(ws.getNumDims()):
    dim = ws.getDimension(0)
    print(f"dimension {idim} has {dim.getNBins()} bins between {dim.getMinimum()} and {dim.getMaximum()}")

Output:

ws has 3 dimensions
dimension 0 has 3 bins between -10.0 and 10.0
dimension 1 has 3 bins between -10.0 and 10.0
dimension 2 has 3 bins between -10.0 and 10.0

Categories: AlgorithmIndex | MDAlgorithms

Source

C++ header: LoadGaussCube.h

C++ source: LoadGaussCube.cpp