SaveDspacemap v1

../_images/SaveDspacemap-v1_dlg.png

SaveDspacemap dialog.

Summary

Saves an OffsetsWorkspace into a POWGEN-format binary dspace map file.

Properties

Name Direction Type Default Description
InputWorkspace Input OffsetsWorkspace Mandatory An input OffsetsWorkspace to save.
DspacemapFile Input string Mandatory The DspacemapFile on output contains the d-space mapping. Allowed extensions: [‘.dat’]
PadDetID Input number 300000 Pad Data to this number of pixels

Description

The POWGEN d-space map file format is a binary list of the conversion. It needs to be a minimum size, determined by the PadDetID parameter.

Usage

Example - Save an OffsetsWorkspace to d-space map file:

import os

filepath = config["default.savedirectory"]
if filepath == "":
  filepath = config["defaultsave.directory"]
savefilename = os.path.join(filepath, "test_offset.dat")

LoadCalFile(InstrumentName='PG3',CalFilename=r'PG3_golden.cal',MakeGroupingWorkspace='0',MakeMaskWorkspace='0',WorkspaceName='PG3_gold')
SaveDspacemap(InputWorkspace="PG3_gold_offsets", DspacemapFile=savefilename)

print "File created = ", os.path.exists(savefilename), ", file size = ", os.path.getsize(savefilename)

Output:

File created =  True , file size =  8168616

Categories: Algorithms | DataHandling

Source

C++ source: SaveDspacemap.cpp

C++ header: SaveDspacemap.h