public boolean toSNSS(I_DataSet ds, String path) 
    {
	// The output file is of the form:
	//
	// 1. # input pattern 2009-01-13-07:54:15_08.fil_147.phcx.gz
	// 2. 78.9045991099 2.8927618807 8.0 4357.0 33.8000282795 0.729217101493
	// 3. 0 1
	//
	// Line 1. is the name of the file, which has format
	// XXXX-XX-XX-XX:XX:XX_YY.fil_ZZZ.phcx.gz where
	// X is the UTC of the observation.
	// Y is the beam number - we do 13 simultaneous beams per UTC (01-13)
	// ZZZ is the candidate number from that beam.
	//
	// Line 2. has the 22 scores which are generated as diagnostics of the candidate.
	//
	// The third line is the YES NO scores which go into the net, so "1 0" for a pulsar
	// and "0 1" for something we want to reject.

	String className = "";
	String rowData = "";
	String rawData = "";
	I_InputPattern p;

	for(int r = 0; r < ds.getRows();r++)
	{
	    if (r % 100 == 0) { System.out.println("Row:"+r); }

	    p = ds.getDataRow(r);
	    rowData = "";
	    className = "";
	    className = p.getName();

	    if(!StringOps.isAStringsEmpty(className))
		rowData = "# input pattern " + className + "\r";
	    else
		rowData = "# input pattern UNKOWN\r";

	    double[] d = p.getData();

	    rawData = "";
	    rawData = Double.toString(d[0]);

	    for(int k = 1; k < d.length;k++)
		rawData = rawData + " " + d[k];

	    rowData = rowData + rawData + "\r";

	    if(p.getClassMembership().equals(Constants.PULSAR))
		rowData = rowData + "1 0\r";
	    else
		rowData = rowData + "0 1\r";

	    Writer.write(path, rowData);
	}

	return true;
    }