\(\renewcommand\AA{\unicode{x212B}}\)
SaveAscii v1¶
Summary¶
Saves a 2D workspace to a ascii file.
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
The name of the workspace containing the data you want to save to a Ascii file. |
|
Filename |
Input |
string |
Mandatory |
The filename of the output Ascii file. Allowed extensions: [‘.dat’, ‘.txt’, ‘.csv’] |
WorkspaceIndexMin |
Input |
number |
0 |
The starting workspace index. |
WorkspaceIndexMax |
Input |
number |
Optional |
The ending workspace index. |
SpectrumList |
Input |
int list |
List of workspace indices to save. |
|
Precision |
Input |
number |
Optional |
Precision of output double values. |
WriteXError |
Input |
boolean |
False |
If true, the error on X will be written as the fourth column. |
CommentIndicator |
Input |
string |
Character(s) to put in front of comment lines. |
|
Separator |
Input |
string |
CSV |
Character(s) to put as separator between X, Y, E values. Allowed values: [‘CSV’, ‘Tab’, ‘Space’, ‘Colon’, ‘SemiColon’, ‘UserDefined’] |
CustomSeparator |
Input |
string |
If present, will override any specified choice given to Separator. |
|
ColumnHeader |
Input |
boolean |
True |
If true, put column headers into file. |
ICEFormat |
Input |
boolean |
False |
If true, special column headers for ICE in file. |
Description¶
The workspace data are stored in the file in columns: the first column contains the X-values, followed by pairs of Y and E values. Columns are separated by commas. The resulting file can normally be loaded into a workspace by the LoadAscii v2 algorithm.
As far as we are aware, this algorithm is only used by the ISIS Indirect group (including within the Indirect Diffraction GUI). Please see the new version: SaveAscii v2.
Limitations¶
The algorithm assumes that the workspace has common X values for all spectra (i.e. is not a ragged workspace). Only the X values from the first spectrum in the workspace are saved out.
Categories: AlgorithmIndex | DataHandling\Text
Source¶
C++ header: SaveAscii.h
C++ source: SaveAscii.cpp