Exemplo n.º 1
0
 //default constructor
 public RMI()
 {
     fileDescription = new RMIFileDescription();
     ampData         = new List <RMIAmpData>();
     pickData        = new List <RMIPickData>();
     geoData         = new RMIGeoData();
     fileNames       = new List <string>();
 }
Exemplo n.º 2
0
        //param constructor for when declared in main
        public RMI(IList <SeisData> src, GeometryData geoSrc)
        {
            fileNames = new List <string>();
            ampData   = new List <RMIAmpData>();
            pickData  = new List <RMIPickData>();

            fileDescription = new RMIFileDescription(src);
            geoData         = new RMIGeoData(geoSrc);
            foreach (var file in src)
            {
                ampData.Add(new RMIAmpData(file));
                pickData.Add(new RMIPickData(file));
            }
        }
Exemplo n.º 3
0
        }//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);
            }


        }
Exemplo n.º 4
0
        public string readGeoData(StreamReader reader, RMIFileDescription fileDesc)     //needs fileDesc to gain access to the numOfChannels
        {
            string line = reader.ReadLine();

            while (line != null)
            {
                line = line.Replace(" ", "");           //takes out unneccesary spaces
                string[] strArr = line.Split(':');
                if (strArr[0].Equals("NumOfChannelsGEODATA"))
                {
                    this.numChannelsGeoData = Int32.Parse(strArr[1]);
                }
                else if (strArr[0].Equals("GeoSpacing"))
                {
                    this.geoSpacing = float.Parse(strArr[1]);
                }
                else if (strArr[0].Equals("GeoOffset"))
                {
                    this.geoOffset = float.Parse(strArr[1]);
                }
                else if (strArr[0].Equals("GeoDistance"))
                {
                    this.geoDistance = float.Parse(strArr[1]);
                }
                else if (strArr[0].Equals("ShotElev"))
                {
                    readShotElevation(strArr[1]);
                }
                else if (strArr[0].Equals("ShotPos"))
                {
                    readShotPosition(strArr[1]);
                }
                else if (strArr[0].Equals("GeoElevation"))
                {
                    readGeoElevation(strArr[1]);
                }
                else
                {
                    return(line);
                }

                line = reader.ReadLine();
            }
            return(line);
        }
Exemplo n.º 5
0
        public String readAmpData(StreamReader reader, RMIFileDescription fileDesc)
        {
            string line = reader.ReadLine();

            string[] strArr = line.Split(':');  //splits at colon
            if (strArr[0].Equals("amps"))       //amps: is in front of all amp data (all amp data is displayed in one line)
            {
                strArr[1] = strArr[1].Trim();
                string[] ampArrString = strArr[1].Split(' ');
                for (int i = 0; i < fileDesc.numChans; i++)                 //usually < 12
                {
                    IList <float> temp      = new List <float>();           //instead of having to index between files, we create a new temp IList per channel
                    int           index     = i * fileDesc.numTraces;       //index will be at however many data points there are (ie 0*4000 -> 1*4000 -> 2*4000)
                    int           nextIndex = (i + 1) * fileDesc.numTraces; //this will be the next index (ie 1*4000 -> 2*4000)
                    for (int j = index; j < nextIndex; j++)                 //for loop that will read the amp data between channels (ie read data points 0 to 4000, then data points 4000 to 8000)
                    {
                        //Debug.WriteLine(ampArrString[j]);
                        temp.Add(float.Parse(ampArrString[j]));     //this will add the array from the specified range
                    }
                    graphData.Add(new GearedValues <float>(temp));  //adds temp
                }
            }
            return(line);
        }