Previous: Header File Include Specification
Up: Structure of the SDDS Header
Previous Page: Header File Include Specification
Next Page: Structure of SDDS ASCII Data Tables

Data Mode and Arrangement Defintion

&data
    STRING mode = "binary"
    long lines_per_row = 1
    long no_row_counts = 0
    long additional_header_lines = 0
    long do_line_padding = 1
&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 table is preceeded by 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-table 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 incomplete or 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.

Normally, if lines_per_row is greater than 1, the SDDS routines will read and concatenate all lines for a given row before scanning data from the row. In order to prevent merging data elements when the lines are concatenated, a space is inserted at the end of each line prior to concatenating the next line. For data with fixed field lengths, this addition of spaces may be confusing; it may be disabled by setting the no_line_padding field to a non-zero value.



Previous: Header File Include Specification
Up: Structure of the SDDS Header
Previous Page: Header File Include Specification
Next Page: Structure of SDDS ASCII Data Tables

borland@aps.anl.gov
Mon Jan 10 14:46:05 CST 1994