コード例 #1
0
  public void measureSetting1(MeasurementPlotter mPlot) {
    //        switch (layer) {
    //            case retarderA:
    //                targets = new double[]{0, 0, 0, 0, 0, 0, 0, 0, 0};
    //                break;
    //            case retarderB:
    //                targets = new double[]{0, 0, 0, 0, 0, 0, 0, 0, 0};
    //                break;
    //            case elliptical:
    //                targets = new double[]{0, 0, 0, 0, 0, 0, 0, 0};
    //                break;
    //            case circular:
    //                targets = new double[]{0, 0};
    //                break;
    //            }
    final MultiSectorMeasurer acquireImageAndMeasure = new MultiSectorMeasurer();
    System.out.println("measure setting 1");
    int step = (int) ((SLMModel.startMax - SLMModel.startMin) / SLMModel.numPoints);
    for (int s = 0; s < SLMModel.numPoints; s++) { // for each setting
      int setTo = (int) (SLMModel.startMin + s * step);
      for (int i = 0; i < numIDs; i++) { // for each sector
        settings[i] = setTo;
      }
      acquireImageAndMeasure.run();
      for (int i = 0; i < numIDs; i++) {
        mPlot.recordData(i, s, measurements[i]);
      }
    }

    //        TaskMeasureSetting1 task = new TaskMeasureSetting1(mPlot);
    //        task.execute();
  }
コード例 #2
0
    @Override
    public Object doInBackground() {
      int point = 0;
      System.out.println("measureResponseCurves for layer: " + layer);
      int step = (int) ((SLMModel.startMax - SLMModel.startMin) / SLMModel.numPoints);
      acqCtrl.start();
      for (int s = 0; s < SLMModel.numPoints; s++) { // for each setting
        int setTo = (int) (SLMModel.startMin + s * step);
        for (int i = 0; i < numIDs; i++) { // for each sector
          settings[i] = setTo;
        }
        // currentPoint = s;
        acquireImageAndMeasure.run();
        point++;
        for (int i = 0; i < numIDs; i++) {
          // mPlot.recordData(i, point, settings[i], measurements[i]);
          dataSets[i].addPoint(point, settings[i], measurements[i]);
        }
        System.out.println(">> point: " + point);
      }
      // code here never executes...

      System.out.println("doInBackground completed");
      return null;
    }