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

ExportGeometry v1

../_images/ExportGeometry-v1_dlg.png

ExportGeometry dialog.

Summary

Extract components from larger in-memory instrument, save as IDF style xml

See Also

LoadInstrument

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

Workspace

Mandatory

Workspace containing the instrument to be exported

EulerConvention

Input

string

YZY

Euler angles convention used when writing angles. Allowed values: [‘ZXZ’, ‘XYX’, ‘YZY’, ‘ZYZ’, ‘XZX’, ‘YXY’, ‘XYZ’, ‘YZX’, ‘ZXY’, ‘XZY’, ‘ZYX’, ‘YXZ’]

Components

Input

str list

Comma separated list of instrument component names to export

Filename

Input

string

Mandatory

Save file. Allowed extensions: [‘.xml’]

Description

This algorithm is intended to write out portions of an instrument’s geometry in the Instrument Definition File xml format. The resulting file is meant to be copied by-hand into a geometry file, the output is not a useable IDF as written.

The main use of this algorithm is if the instrument geometry is calibrated in mantid, this algorithm can be used to help get the information back into the initial instrument definition file.

Usage

LoadEmptyInstrument(Filename="NOMAD_Definition.xml",
                    OutputWorkspace="NOM_geom")
import mantid
filename=mantid.config.getString("defaultsave.directory")+"NOMgeometry.xml"
ExportGeometry(InputWorkspace="NOM_geom",
               Components="bank46,bank47",
               Filename=filename)
import os
if os.path.isfile(filename):
    print("File created: True")

Output:

File created: True

Categories: AlgorithmIndex | Utility\Instrument

Source

Python: ExportGeometry.py