public I_DataSet processSNNS(String path)
    {
	// The input 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.
	//
	// Thanks to Dan Thornton for this explanation.

	// Variable to store the information.
	DataSet dataSet = new DataSet(path.replace("\\", "_"),0);

	// Now read each line of the file one by one.

	//Firstly try to create the file
	File file = new File(path);

	//if the file exists
	if(file.exists())
	{
	    // Variables used to store the line of the being read
	    // using the input stream, and an array list to store the input
	    // patterns into.
	    String line = "";

	    // Read the file and display it line by line. 
	    BufferedReader in = null;

	    try
	    {
		//open stream to file
		in = new BufferedReader(new FileReader(file));

		try
		{   
		    while ((line = in.readLine()) != null)
		    {
			if(line.startsWith("#"))
			{		
			    //Declare input pattern to store data
			    InputPattern pattern = new InputPattern();

			    pattern.setName(line.substring(2, line.length()));

			    line = in.readLine();

			    double[] patternData = StringOps.splitStringToDouble(line," ");
			    pattern.setData(patternData);

			    String value = Constants.RFI;

			    // 10 pulsar 01 not pulsar
			    line = in.readLine();
			    if(line.startsWith("1 0"))
				value = Constants.PULSAR;

			    pattern.setClassMembership(value);

			    dataSet.addRow(pattern);
			}
		    }
		}
		catch(IOException e){return null;}
		finally{in.close();}
	    }
	    catch (FileNotFoundException e) { return null; }
	    catch (IOException e) { return null; }
	}
	else{ return null; }

	// causes data set to validate itself.
	if(dataSet.validated())
	    return dataSet;
	else return null;
    }