Example #1
0
        private void LoadFile(int index, string filename)
        {
            System.IO.StreamReader streamReader     = new System.IO.StreamReader(filename);
            LocateFileReader       locateFileReader = new LocateFileReader(streamReader);

            loadedFiles[index] = locateFileReader.Read();

            rawData3KHz[index]        = loadedFiles[index].Channel1Data;
            calibration3KHz[index]    = new Calibration(loadedFiles[index].Calibration3KHz);
            calibratedData3KHz[index] = new CalibratedDataSet(calibration3KHz[index], rawData3KHz[index]);

            rawData24KHz[index]        = loadedFiles[index].Channel2Data;
            calibration24KHz[index]    = new Calibration(loadedFiles[index].Calibration24KHz);
            calibratedData24KHz[index] = new CalibratedDataSet(calibration24KHz[index], rawData24KHz[index]);

            mixedCalibration[index]    = loadedFiles[index].CalibrationMixed;
            mixedCalibratedData[index] = new MixedCalibratedDataSet(mixedCalibration[index], calibratedData3KHz[index], calibratedData24KHz[index]);

            UpdateTrackBarsFromSelectedCalibration();
            UpdateCalibrationLabels();

            if (mixedCalibratedData[0] != null && mixedCalibratedData[1] != null)
            {
                subtractedData = new SubtractedDataSet(mixedCalibratedData[0], mixedCalibratedData[1]);
            }
        }
Example #2
0
        public SubtractedDataSet(MixedCalibratedDataSet firstData, MixedCalibratedDataSet secondData)
        {
            this.firstData  = firstData;
            this.secondData = secondData;

            data = new DataSet();

            firstData.DataSetChanged  += new MixedCalibratedDataSet.DataSetChangedHandler(firstData_DataSetChanged);
            secondData.DataSetChanged += new MixedCalibratedDataSet.DataSetChangedHandler(secondData_DataSetChanged);

            RebuildData();
        }
        public SubtractedDataSet(MixedCalibratedDataSet firstData, MixedCalibratedDataSet secondData)
        {
            this.firstData = firstData;
            this.secondData = secondData;

            data = new DataSet();

            firstData.DataSetChanged += new MixedCalibratedDataSet.DataSetChangedHandler(firstData_DataSetChanged);
            secondData.DataSetChanged += new MixedCalibratedDataSet.DataSetChangedHandler(secondData_DataSetChanged);

            RebuildData();
        }
Example #4
0
        private void LoadFile(int index, string filename)
        {
            System.IO.StreamReader streamReader = new System.IO.StreamReader(filename);
            LocateFileReader locateFileReader = new LocateFileReader(streamReader);
            loadedFiles[index] = locateFileReader.Read();

            rawData3KHz[index] = loadedFiles[index].Channel1Data;
            calibration3KHz[index] = new Calibration(loadedFiles[index].Calibration3KHz);
            calibratedData3KHz[index] = new CalibratedDataSet(calibration3KHz[index], rawData3KHz[index]);

            rawData24KHz[index] = loadedFiles[index].Channel2Data;
            calibration24KHz[index] = new Calibration(loadedFiles[index].Calibration24KHz);
            calibratedData24KHz[index] = new CalibratedDataSet(calibration24KHz[index], rawData24KHz[index]);

            mixedCalibration[index] = loadedFiles[index].CalibrationMixed;
            mixedCalibratedData[index] = new MixedCalibratedDataSet(mixedCalibration[index], calibratedData3KHz[index], calibratedData24KHz[index]);

            UpdateTrackBarsFromSelectedCalibration();
            UpdateCalibrationLabels();

            if (mixedCalibratedData[0] != null && mixedCalibratedData[1] != null)
                subtractedData = new SubtractedDataSet(mixedCalibratedData[0], mixedCalibratedData[1]);
        }