//reading function for rmi files public void readData(string filePath) { StreamReader reader = new StreamReader(filePath); string line = reader.ReadLine(); while (line != null) { if (line.Equals("FILEDESCRIPTION")) //categorizes file by file headers { line = fileDescription.readFileDescription(reader); } else if (line.Equals("GEODATA")) { line = geoData.readGeoData(reader, fileDescription); } else if (line.Equals("FILENAMES")) { line = readFileNames(reader); //should read and store all filenames in theory } else if (line.Equals("PICKERDATA")) { RMIAmpData tempAmp = new RMIAmpData(); line = tempAmp.readAmpData(reader, fileDescription); if (tempAmp.graphData[0].Count != (fileDescription.numTraces)) { //throw error return; } ampData.Add(tempAmp); RMIPickData tempPick = new RMIPickData(); line = tempPick.readPickData(reader); if (tempPick.picks.Count != (fileDescription.numChans)) { //throw error return; } pickData.Add(tempPick); } else { line = reader.ReadLine(); } } reader.Close(); }
}//end of SeisData() public SeisData(RMIAmpData amp, RMIPickData picks, RMIFileDescription desc) { graphStorage = new List<GearedValues<float>>(); pickData = new List<Pick>(); Zeroed = new List<Boolean>(); this.numChannels = desc.numChans; this.pickData = picks.picks; this.graphStorage = amp.graphData; for (int i = 0; i < numChannels; i++) { this.Zeroed.Add(false); } }