Examples of PeriodAnalysisDataPoint


Examples of org.aavso.tools.vstar.util.period.dcdft.PeriodAnalysisDataPoint

    double[] values = new double[columnTypes.length];
    for (int i=0;i<columnTypes.length;i++) {
      values[i] = data.get(columnTypes[i]).get(rowIndex);
    }
       
    return new PeriodAnalysisDataPoint(columnTypes, values);
  }
View Full Code Here

Examples of org.aavso.tools.vstar.util.period.dcdft.PeriodAnalysisDataPoint

  public void chartMouseClicked(ChartMouseEvent event) {
    if (event.getEntity() instanceof XYItemEntity) {
      XYItemEntity entity = (XYItemEntity) event.getEntity();
      int item = entity.getItem();
      PeriodAnalysisDataPoint dataPoint = null;

      for (int modelNum = 0; modelNum < chart.getXYPlot()
          .getDatasetCount(); modelNum++) {
        if (dataPoint == null) {
          XYDataset dataset = chart.getXYPlot().getDataset(modelNum);
View Full Code Here

Examples of org.aavso.tools.vstar.util.period.dcdft.PeriodAnalysisDataPoint

      public void actionPerformed(ActionEvent e) {
        List<Double> userSelectedFreqs = new ArrayList<Double>();
        int[] selectedTableRowIndices = table.getSelectedRows();
        for (int row : selectedTableRowIndices) {
          int modelRow = table.convertRowIndexToModel(row);
          PeriodAnalysisDataPoint dataPoint = model
              .getDataPointFromRow(modelRow);
          userSelectedFreqs.add(dataPoint.getFrequency());
        }

        HarmonicInputDialog dialog = new HarmonicInputDialog(parent,
            userSelectedFreqs, freqToHarmonicsMap);
View Full Code Here

Examples of org.aavso.tools.vstar.util.period.dcdft.PeriodAnalysisDataPoint

        int[] selectedTableRowIndices = table.getSelectedRows();
        List<PeriodAnalysisDataPoint> inputDataPoints = new ArrayList<PeriodAnalysisDataPoint>();

        for (int row : selectedTableRowIndices) {
          int modelRow = table.convertRowIndexToModel(row);
          PeriodAnalysisDataPoint dataPoint = model
              .getDataPointFromRow(modelRow);

          if (!refinedDataPoints.contains(dataPoint)) {
            inputDataPoints.add(dataPoint);
            freqs.add(dataPoint.getFrequency());
          } else {
            String msg = String.format("Top Hit with frequency %s"
                + " and power %s"
                + " has previously been used.",
                NumericPrecisionPrefs.formatOther(dataPoint
                    .getFrequency()), NumericPrecisionPrefs
                    .formatOther(dataPoint.getPower()));
            MessageBox.showErrorDialog(parent, algorithm
                .getRefineByFrequencyName(), msg);
            freqs.clear();
            break;
          }

          if (resultantDataPoints.contains(dataPoint)) {
            String msg = String.format("Top Hit with frequency %s"
                + " and power %s"
                + " was generated by %s so cannot be used.",
                dataPoint.getFrequency(), dataPoint.getPower(),
                algorithm.getRefineByFrequencyName());
            MessageBox.showErrorDialog(parent, algorithm
                .getRefineByFrequencyName(), msg);
            freqs.clear();
            break;
View Full Code Here

Examples of org.aavso.tools.vstar.util.period.dcdft.PeriodAnalysisDataPoint

   *            The item number in the sequence of data.
   * @return A data point object corresponding to that point in the sequence.
   *         May return null if item is out of range.
   */
  public PeriodAnalysisDataPoint getDataPointFromItem(int item) {
    PeriodAnalysisDataPoint dataPoint = null;

    // This may be a top-hits model and the item may be selected from the
    // full data-set. If so, ignore.
    if (item < domainValues.size()) {
     
      // TODO: why not just use a map rather than PeriodAnalysisDataPoint?
     
      double[] values = new double[coordTypes.length];
      for (int i=0;i<coordTypes.length;i++) {
        values[i] = analysisValues.get(coordTypes[i]).get(item);
      }
         
      dataPoint = new PeriodAnalysisDataPoint(coordTypes, values);
    }

    return dataPoint;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.