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

ConvertPeaksWorkspace v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Bi-directional conversion between a regular PeaksWorkspace (with instrument) and a LeanElasticPeaksWorkspace (without instrument).

See Also

CreatePeaksWorkspace

Properties

Name

Direction

Type

Default

Description

PeakWorkspace

Input

IPeaksWorkspace

Mandatory

Workspace of Indexed Peaks

InstrumentWorkspace

Input

Workspace

Donor Workspace with instrument for conversion

OutputWorkspace

Output

IPeaksWorkspace

Mandatory

Converted Workspaces

Description

This algorithm provides bi-directional conversion between regular PeaksWorkspace and LeanElasticPeaksWorkspace.

When casting a PeaksWorkspace into a LeanElasticPeaksWorkspace, information related to detector (DetID, BankName, Row, Col) is discarded. However, other experiment information are retained in the LeanElasticPeaksWorkspace, including run, hkl, goniometer, sample, as well as the corresponding information at the individual Peak level.

When casting a LeanElasticPeaksWorkspace into a PeaksWorkspace, a donor PeaksWorkspace with proper instrument configuration is required. Incorrect goniometer setting will lead to a Peak with negative wavelength, which will be excluded from the output PeaksWorkspace.

Usage

  1. PeaksWorkspace to LeanElasticPeaksWorkspace

# pws is a regular PeaksWorkspace available in memroy
ConvertPeaksWorkspace(PeakWorkspace='pws', OutputWorkspace='lpws')
  1. LeanElasticPeaksWorkspace to PeaksWorkspace

ConvertPeaksWorkspace(
    PeakWorkspace='lpws',            # a LeanElasticPeaksWorkspace in memory
    InstrumentWorkpace="donor_pws",  # a PeaksWorkspace with correct Goniometer setting and other exp info
    OutputWorkspace='pws',           # output
    )

Categories: AlgorithmIndex | Crystal\Peaks | Utility\Workspaces

Source

C++ header: ConvertPeaksWorkspace.h

C++ source: ConvertPeaksWorkspace.cpp