next up previous contents
Next: Structure of SDDS ASCII Up: Structure of the SDDS Previous: Header File Include Specification   Contents

Data Mode and Arrangement Defintion

&data
    STRING mode = "binary"
    long lines_per_row = 1
    long no_row_counts = 0
    long additional_header_lines = 0
&end

This command is optional unless parameter commands without fixed_value fields, array commands, or column commands have been given.

The mode field is required, and may have one of the values ``ascii'' or ``binary''. If binary mode is specified, the other entries of the command are irrelevant and are ignored. In ASCII mode, these entries are optional.

In ASCII mode, each row of the tabular data occupies lines_per_row rows in the file. If lines_per_row is zero, however, the data is assumed to be in ``stream'' format, which means that line breaks are irrelevant. Each line is processed until it is consumed, at which point the next line is read and processed.

Normally, each data page includes an integer specifying the number of rows in the tabular data section. This allows for preallocation of arrays for data storage, and obviates the need for an end-of-page indicator. However, if no_row_counts is set to a non-zero value, the number of rows will be determined by looking for the occurence of an empty line. A comment line does not qualify as an empty line in this sense.

If additional_header_lines is set to a non-zero value, it gives the number of non-SDDS data lines that follow the data command. Such lines are treated as comments.


next up previous contents
Next: Structure of SDDS ASCII Up: Structure of the SDDS Previous: Header File Include Specification   Contents
Robert Soliday 2014-01-28