Table of Contents
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 |
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.
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")
ws = LoadEmptyInstrument(Filename="POWGEN_Definition_2015-08-01.xml")
LoadCalFile(InputWorkspace=ws,CalFilename=r'PG3_golden.cal',MakeGroupingWorkspace='0',MakeMaskWorkspace='0',WorkspaceName='PG3_gold')
SaveDspacemap(InputWorkspace="PG3_gold_offsets", DspacemapFile=savefilename)
print("File created = {} , file size = {}".format(os.path.exists(savefilename), os.path.getsize(savefilename)))
Output:
File created = True , file size = 8168616
Categories: AlgorithmIndex | DataHandling\Text
C++ source: SaveDspacemap.cpp (last modified: 2019-06-05)
C++ header: SaveDspacemap.h (last modified: 2018-10-05)