Package org.aavso.tools.vstar.data

Examples of org.aavso.tools.vstar.data.DateInfo


  public void testValidObsEpsAurAnova() {
    List<ValidObservation> obs = new ArrayList<ValidObservation>();

    for (double[] pair : jdMagData) {
      ValidObservation ob = new ValidObservation();
      ob.setDateInfo(new DateInfo(pair[0]));
      ob.setMagnitude(new Magnitude(pair[1], 0));
      obs.add(ob);
    }

    BinningResult result = DescStats.createSymmetricBinnedObservations(obs,
View Full Code Here


  public TSPolynomialFitterTest(String name) {
    super(name);
    obs = new ArrayList<ValidObservation>();
    for (double[] jd_mag_pair : jd_and_mag) {
      ValidObservation ob = new ValidObservation();
      ob.setDateInfo(new DateInfo(jd_mag_pair[0]));
      ob.setMagnitude(new Magnitude(jd_mag_pair[1], 0));
      obs.add(ob);
    }
  }
View Full Code Here

   
    for (int i=0;i < mags.length;i++) {
      ValidObservation obs = new ValidObservation();
      obs.setMagnitude(new Magnitude(mags[i], MagnitudeModifier.NO_DELTA,
          false));
      obs.setDateInfo(new DateInfo(jds[i]));
      observations.add(obs);
    }

    return observations;
  }
View Full Code Here

    List<ValidObservation> observations = new ArrayList<ValidObservation>();
    for (double mag : mags) {
      ValidObservation obs = new ValidObservation();
      obs.setMagnitude(new Magnitude(mag, MagnitudeModifier.NO_DELTA,
          false));
      obs.setDateInfo(new DateInfo(jd));
      observations.add(obs);
      jd += 0.5;
    }

    return observations;
View Full Code Here

    for (int i = 0; i < times.length; i++) {
      ValidObservation obs = new ValidObservation();
      obs.setMagnitude(new Magnitude(mags[i], MagnitudeModifier.NO_DELTA,
          false));
      obs.setDateInfo(new DateInfo(times[i]));
      observations.add(obs);
    }

    return observations;
  }
View Full Code Here

  public DataTestBase(String name, double[][] jdAndMagPairs) {
    super(name);
    this.obs = new ArrayList<ValidObservation>();
    for (double[] jdAndMag : jdAndMagPairs) {
      ValidObservation ob = new ValidObservation();
      ob.setDateInfo(new DateInfo(jdAndMag[0]));
      ob.setMagnitude(new Magnitude(jdAndMag[1], 0));
      obs.add(ob);
    }
  }
View Full Code Here

                  double y = function.value(ob.getJD()
                      - zeroPoint);

                  ValidObservation fitOb = new ValidObservation();
                  fitOb.setDateInfo(new DateInfo(ob.getJD()));
                  fitOb.setMagnitude(new Magnitude(y, 0));
                  fitOb.setBand(SeriesType.Model);
                  fitOb.setComments(comment);
                  fit.add(fitOb);

                  ValidObservation resOb = new ValidObservation();
                  resOb.setDateInfo(new DateInfo(ob.getJD()));
                  double residual = ob.getMag() - y;
                  resOb.setMagnitude(new Magnitude(residual,
                      0));
                  resOb.setBand(SeriesType.Residuals);
                  resOb.setComments(comment);
View Full Code Here

    int recordNum = source.getInt("unique_id");
    if (!source.wasNull())
      ob.setRecordNumber(recordNum);

    ob.setDateInfo(new DateInfo(source.getDouble("jd")));
    ob.setMagnitude(getNextMagnitude());
    ob.setHqUncertainty(getNextPossiblyNullDouble("hq_uncertainty"));
    SeriesType band = SeriesType.Unspecified;
    String bandNum = getNextPossiblyNullString("band");
    if (bandNum != null && !"".equals(bandNum)) {
      int num = Integer.parseInt(bandNum);
      band = SeriesType.getSeriesFromIndex(num);
    }
    ob.setBand(band);
    ob.setObsCode(getNextPossiblyNullString("observer_code"));
    ob.setCommentCode(getNextPossiblyNullString("comment_code"));
    ob.setCompStar1(getNextPossiblyNullString("comp_star_1"));
    ob.setCompStar2(getNextPossiblyNullString("comp_star_2"));
    ob.setCharts(getNextPossiblyNullString("charts"));
    ob.setComments(getNextPossiblyNullString("comments"));

    ob.setTransformed("yes"
        .equals(getNextPossiblyNullString("transformed")) ? true
        : false);

    ob.setAirmass(getNextPossiblyNullString("airmass"));
    ob.setValidationType(getNextValidationType());
    ob.setCMag(getNextPossiblyNullString("cmag"));
    ob.setKMag(getNextPossiblyNullString("kmag"));

    Double hjd = getNextPossiblyNullDouble("hjd");
    ob.setHJD(hjd != null ? new DateInfo(hjd) : null);

    ob.setName(getNextPossiblyNullString("name"));

    // If mtype is null or 0, we use the ValidObservation's
    // constructed default (standard magnitude type).
View Full Code Here

          double jd = Double.parseDouble(fields[0]);
          double mag = Double.parseDouble(fields[1]);
          double error = Double.parseDouble(fields[2]);

          ValidObservation ob = new ValidObservation();
          ob.setDateInfo(new DateInfo(jd));
          ob.setMagnitude(new Magnitude(mag, error));
          ob.setBand(series);
          ob.setRecordNumber(reader.getLineNumber());
          collectObservation(ob);
        }
View Full Code Here

        // write(9,250) tt+dt0,resid,obs(n),xvec(n),xm

        // Create model and residual "observations".

        ValidObservation modelOb = new ValidObservation();
        modelOb.setDateInfo(new DateInfo(tt + dt0));
        modelOb.setMagnitude(new Magnitude(xm, 0));
        modelOb.setComments(model.getDescription());
        modelOb.setBand(SeriesType.Model);
        modelObs.add(modelOb);

        ValidObservation residualOb = new ValidObservation();
        residualOb.setDateInfo(new DateInfo(tt + dt0));
        residualOb.setMagnitude(new Magnitude(resid, 0));
        residualOb.setComments(model.getDescription());
        residualOb.setBand(SeriesType.Residuals);
        residualObs.add(residualOb);
View Full Code Here

TOP

Related Classes of org.aavso.tools.vstar.data.DateInfo

Copyright © 2018 www.massapicom. 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.