Ejemplo n.º 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]);
            }
        }
        public MixedCalibratedDataSet(Calibration calibration, CalibratedDataSet firstData, CalibratedDataSet secondData)
        {
            this.calibration = calibration;
            this.firstData = firstData;
            this.secondData = secondData;

            calibratedData = new DataSet();

            RebuildData();

            this.calibration.CalibrationChanged += new Calibration.CalibrationChangedHandler(calibration_CalibrationChanged);
            this.firstData.DataSetChanged += new CalibratedDataSet.DataSetChangedHandler(firstData_DataSetChanged);
            this.secondData.DataSetChanged += new CalibratedDataSet.DataSetChangedHandler(secondData_DataSetChanged);
        }
Ejemplo n.º 3
0
        public MixedCalibratedDataSet(Calibration calibration, CalibratedDataSet firstData, CalibratedDataSet secondData)
        {
            this.calibration = calibration;
            this.firstData   = firstData;
            this.secondData  = secondData;

            calibratedData = new DataSet();

            RebuildData();

            this.calibration.CalibrationChanged += new Calibration.CalibrationChangedHandler(calibration_CalibrationChanged);
            this.firstData.DataSetChanged       += new CalibratedDataSet.DataSetChangedHandler(firstData_DataSetChanged);
            this.secondData.DataSetChanged      += new CalibratedDataSet.DataSetChangedHandler(secondData_DataSetChanged);
        }
Ejemplo n.º 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]);
        }