Ejemplo n.º 1
0
        public Vector Apply(Calibration calibration)
        {
            float x = (float)(calibration.Gain * (X * Math.Cos(calibration.Phase) - Y * Math.Sin(calibration.Phase)));
            float y = (float)(calibration.Gain * (Y * Math.Cos(calibration.Phase) + X * Math.Sin(calibration.Phase)));

            return new Vector(x, y);
        }
Ejemplo n.º 2
0
 public LocateFile()
 {
     Calibration3KHz = new Calibration();
     Calibration24KHz = new Calibration();
     CalibrationMixed = new Calibration();
     Channel1CalibratedData = new DataSet();
     Channel2CalibratedData = new DataSet();
     MixedCalibratedData = new DataSet();
 }
Ejemplo n.º 3
0
        public CalibratedDataSet(Calibration calibration, DataSet rawData)
        {
            this.calibration = calibration;
            this.rawData = rawData;

            calibratedData = new DataSet();
            RebuildCalibratedData();

            this.calibration.CalibrationChanged += new Calibration.CalibrationChangedHandler(calibration_CalibrationChanged);
        }
        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.º 5
0
 private void calibrationDropList_SelectedIndexChanged(object sender, EventArgs e)
 {
     switch (calibrationDropList.SelectedIndex)
     {
         case 0:
             selectedCalibration = calibration3KHz[0];
             break;
         case 1:
             selectedCalibration = calibration24KHz[0];
             break;
         case 2:
             selectedCalibration = mixedCalibration[0];
             break;
         case 3:
             selectedCalibration = calibration3KHz[1];
             break;
         case 4:
             selectedCalibration = calibration24KHz[1];
             break;
         case 5:
             selectedCalibration = mixedCalibration[1];
             break;
     }
     UpdateTrackBarsFromSelectedCalibration();
     UpdateCalibrationLabels();
 }
Ejemplo n.º 6
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            //LoadFile(0, "..\\..\\..\\..\\data\\u6good.dat");
            //LoadFile(1, "..\\..\\..\\..\\data\\u4bad.dat");

            //show3KHzRaw[0] = true;
            //show3KHzCalibrated[0] = true;
            first3KHzCheckbox.Checked = true;
            first3KHzCalibratedCheckbox.Checked = true;

            yChart.ChartAreas[0].CursorX.IsUserEnabled = true;
            yChart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;

            calibrationDropList.Items.Add("First 3KHz");
            calibrationDropList.Items.Add("First 24KHz");
            calibrationDropList.Items.Add("First Mixed");
            calibrationDropList.Items.Add("Second 3KHz");
            calibrationDropList.Items.Add("Second 24KHz");
            calibrationDropList.Items.Add("Second Mixed");
            calibrationDropList.SelectedIndex = 0;

            selectedCalibration = calibration3KHz[0];

            /*
            yChart.ChartAreas[0].Axes[1].Minimum = -10000;
            yChart.ChartAreas[0].Axes[1].Maximum= 10000;
            xChart.ChartAreas[0].Axes[1].Minimum = -10000;
            xChart.ChartAreas[0].Axes[1].Maximum = 10000;
            aggregateChart.ChartAreas[0].Axes[1].Minimum = -10000;
            aggregateChart.ChartAreas[0].Axes[1].Maximum= 10000;
             * */

            RebuildAllCharts();
        }
Ejemplo n.º 7
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]);
        }
Ejemplo n.º 8
0
 public Calibration(Calibration calibration)
 {
     gain = calibration.Gain;
     phase = calibration.Phase;
 }
Ejemplo n.º 9
0
 public Calibration(Calibration calibration)
 {
     gain  = calibration.Gain;
     phase = calibration.Phase;
 }
Ejemplo n.º 10
0
 public Datum Apply(Calibration calibration)
 {
     return new Datum(Data.Apply(calibration), AxialPosition);
 }
Ejemplo n.º 11
0
 public Datum Apply(Calibration calibration)
 {
     return(new Datum(Data.Apply(calibration), AxialPosition));
 }