Exemplo n.º 1
0
  private void publishResult() throws IOException {
    try {
      outPlot =
          (Plot)
              PlotFactory.createPlot(
                  yType.name() + "_vs_" + xType.name(), DataDimensionType.pattern);

      PlotFactory.addDataToPlot(
          outPlot,
          "data",
          resultEData.getData(),
          yAxisName + " vs " + xAxisName,
          "",
          resultEData.getVariance());

      PlotFactory.addAxisToPlot(outPlot, xType.name(), xAxis, xAxisName, "", 0);

      IDataItem notes = inPlot.findDataItem(DataLib.KEY_NOTES);
      if (null != notes) {
        outPlot.addDataItem(notes);
      }

    } catch (PlotFactoryException e) {
      throw new IOException("Cannot create new Plot for result");
    }
  }
Exemplo n.º 2
0
 private void stampProcessLog() {
   ((NcGroup) outPlot).setLocation(inPlot.getLocation());
   outPlot.addProcessingLog(
       "ProcessClass/Version/ID: ["
           + processClass
           + ";"
           + processClassVersion
           + ";"
           + processClassID
           + "]");
 }
Exemplo n.º 3
0
 private void stampProcessEntry(String logEntry) {
   ((NcGroup) outPlot).setLocation(inPlot.getLocation());
   outPlot.addProcessingLog("[" + processClassID + "]: " + logEntry);
 }
Exemplo n.º 4
0
 private void stampProcessSkip() {
   ((NcGroup) outPlot).setLocation(inPlot.getLocation());
   outPlot.addProcessingLog("[" + processClassID + "]:" + "SKIP process");
 }
Exemplo n.º 5
0
  private void formatXAxis() throws IOException {
    try {
      xType = XAxisType.getInstance(xAxisName);
      switch (xType) {
        case Q:
          pattern = inPlot;
          xAxis = pattern.getAxisArrayList().get(0);
          break;
        case LogQ:
          pattern = (Plot) inPlot.findGroup("IvsLogQ");
          xAxis = pattern.getAxisArrayList().get(0);
          break;
        case Q2:
          pattern = inPlot;
          xAxis = pattern.getAxisArrayList().get(0).getArrayMath().toPower(2).getArray();
          break;
        case Qc:
          pattern = inPlot;
          xAxis = pattern.getAxisArrayList().get(0).getArrayMath().toPower(par_c).getArray();
          break;
        case r:
          pattern = (Plot) inPlot.findGroup("Ivsr");
          xAxis = pattern.getAxisArrayList().get(0);
          break;
        case TwoThetaRad:
          pattern = (Plot) inPlot.findGroup("IvsTwoTheta");
          xAxis = pattern.getAxisArrayList().get(0);
          break;
        case TwoThetaDeg:
          pattern = (Plot) inPlot.findGroup("IvsTwoThetaDeg");
          xAxis = pattern.getAxisArrayList().get(0);
          break;
        default:
          pattern = inPlot;
          xAxis = pattern.getAxisArrayList().get(0);
          break;
      }

      inputEdata = new EData<IArray>(pattern.findSignalArray(), pattern.findVarianceArray());

    } catch (SignalNotAvailableException e) {
      throw new IOException("X-Axis Array not found");
    }
  }