Phyplot Data File Format

Phyplot data set source files were plain ASCII text files, in one of two alternative formats: numbers-only and annotated. In both cases, each line in the file is parsed separately, where a "line" must end with "\r" (carriage return character), "\n" (linefeed character), or "\r\n". One or more blank lines (whitespace and line termination characters only) terminates the definition of a data set. Thus, multiple data sets can easily be listed in one source file -- just insert at least one blank line between the last line of one set and the first line of the next. 

Numbers-only format

Each non-blank line in the file must contain 1 or more whitespace-separated floating-point numbers; each such line defines a single datum tuple in the set. This is an ambiguous format, because one cannot be sure of the data set's format -- ptset, series, mset, mseries, raster1d, xyzimg, xyzset. Each data set parsed from the source file is assigned a valid data format based on the minimum L and maximum M observed lengths of the datum tuples read in, and the total number N of datum tuples in the set. Here's the algorithm DataNav uses to guess the data format: 

The series, mseries, and xyzimg datasets require additional parameters that are not specified in the numbers-only format, so reasonable default parameter values are supplied. Note that the xyzset is never chosen in this algorithm, since it can never be distinguished from the ptset or series format.

Annotated format

The first non-blank line is a "data set header", starting with a colon and containing 1, 2, 3 or 5 string tokens. The first is always the data set ID, which must have at least one character and can contain no whitespace. For the raster1d dataset type, this is the only token present. For the xyzimg type, the header has the form :id x0 x1 y0 y1, where the last four tokens are floating-pt numbers specifying the contiguous ranges spanned by the data set along the x- and y-axes. For the xyset format, the header has exactly two tokens -- :id 2. For the other data set formats, all of which were supported in Phyplot, the header has the form :{id} {0|1} [dx]. The second token indicates whether the data set should be interpreted as a single point set or a collection of multiple point sets. The optional third token must be a floating-point number indicating the sample interval to be assigned to the data series. Thus, without the third token, the set format is ptset if the second token is 0 and mset otherwise. If the third token IS present, then the set format is series if the second token is 0 and mseries otherwise. Remaining lines must each contain one or more whitespace-separated floating-point numbers. In this case, the tuple length MUST be consistent with the specified set format. In the case of an xyzimg dataset, all tuples should have the same length (if not, they're padded with NaN). In the case of a raster1d dataset, each tuple is interpreted as a separate raster in the collection. (Note that an empty raster is not really possible in this format, but you can effectively get one by creating a tuple of length 1 in which the only token is "NaN".) Again, a blank line terminates each data set definition.

          Annotated                          Numbers-only

          :ptsetA 0

          1 38 15                            1 38 15

          5 57 11                            5 57 11

          ...                                ...

          81 17 5                            81 17 5

          :seriesB 0 2

          35 5                               35 5

          45 10 -1                           45 10 -1

          85 15                              85 15

          ...                                ...

          21 6 1                             21 6 1

          :mseriesC 1 5

          3.6 4.7 8.2 9.1                    3.6 4.7 8.2 9.1

          4.4 4.9 7.9 9.8                    4.4 4.9 7.9 9.8

          6.6 5.8 6.9 8.9                    6.6 5.8 6.9 8.9

          ...                                ...

          8.9 9.0 3.2 5.1                    8.9 9.0 3.2 5.1

Reading Phyplot data files in DataNav apps

For backwards compatibility, DataNav applications are capable of reading data source files that were generated for Figure Composer's predecessor, Phyplot. While we discourage using these legacy data files, some users prefer them for their simple, plain-text format. As of DataNav v3.1.1 (12 Dec 2008), provisions were made to read in the newer raster1d and xyzimg data sets from plain-text source files, even though the two data set formats did not exist in Phyplot. Another format, xyzset, was introduced in version 4.6.2 (Mar 2015). Keep in mind that the DataNav apps do not support exporting data in Phyplot format.