Package org.aavso.tools.vstar.data

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


            * 2;
        double uncertainty = 0;

        ValidObservation ob = new ValidObservation();
        ob.setName("Cosine plus Noise");
        ob.setDateInfo(new DateInfo(jdBase + i));
        ob.setMagnitude(new Magnitude(mag, uncertainty));
        ob.setBand(Math.random() < 0.5 ? SeriesType.Visual
            : SeriesType.Johnson_V);
        ob.setRecordNumber(i);

View Full Code Here


      // TODO: handle "calendar" date format.
      if (!"JD".equals(dateType) && !"HJD".equals(dateType)) {
        throw new ObservationValidationError("Unsupported date type: "
            + dateType);
      } else {
        DateInfo dateInfo = julianDayValidator.validate(fields[1]
            .trim());
        observation.setDateInfo(dateInfo);
      }

      Magnitude magnitude = magnitudeFieldValidator.validate(fields[2]
View Full Code Here

              String name = datum.getNodeName();
              String value = datum.getTextContent();

              if (name.equals("jd")) {
                double jd = Double.parseDouble(value);
                DateInfo date = new DateInfo(jd);
                ob.setDateInfo(date);
              } else if (name.equals("magnitude")) {
                double magnitude = Double.parseDouble(value);
                double uncertainty = 0;
                Magnitude mag = new Magnitude(magnitude,
View Full Code Here

              double mag = yvals[i];

              double y = function.value(jd);

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

              ValidObservation resOb = new ValidObservation();
              resOb.setDateInfo(new DateInfo(jd));
              double residual = mag - y;
              resOb.setMagnitude(new Magnitude(residual, 0));
              resOb.setBand(SeriesType.Residuals);
              resOb.setComments(comment);
              residuals.add(resOb);
View Full Code Here

            break;

          ValidObservation phOb = new ValidObservation();

          double jd = ob.getDateInfo().getJulianDay();
          phOb.setDateInfo(new DateInfo(jd));

          Magnitude mag = new Magnitude(ob.getMagnitude()
              .getMagValue(), ob.getMagnitude().getUncertainty());
          phOb.setMagnitude(mag);
View Full Code Here

      String plateNum = fields[10];
      String versionID = fields[11];
      String flags = fields[12].trim();

      ValidObservation ob = new ValidObservation();
      ob.setDateInfo(new DateInfo(hjd));
      ob.setMagnitude(new Magnitude(mag, magErr));
      if (magErr >= magErrThreshold) {
        ob.setExcluded(true);
      }
      ob.setBand(series);
View Full Code Here

  public double getTimeElement(List<ValidObservation> obs, int index) {
    return obs.get(index).getJD();
  }

  public void setTimeElement(ValidObservation ob, double meanJD) {
    ob.setDateInfo(new DateInfo(meanJD));
  }
View Full Code Here

          double hjd = Double.parseDouble(fields[0]) + 2450000;
          double mag = Double.parseDouble(fields[1]);
          double magErr = Double.parseDouble(fields[6]);

          ValidObservation ob = new ValidObservation();
          ob.setDateInfo(new DateInfo(hjd));
          ob.setMagnitude(new Magnitude(mag, magErr));
          ob.setBand(seriesType);
          ob.setRecordNumber(lineNum);
          ob.addDetail("DESIGNATION", designation, "Designation");
          ob.addDetail("CLASS", dataClass, "Class");
View Full Code Here

      Magnitude mag = magnitudeFieldValidator.validate(fields[1]);
      double err = uncertaintyValueValidator.validate(fields[2]);
      mag.setUncertainty(err);

      DateInfo mjdDate = julianDayValidator.validate(fields[5]);
      DateInfo jdDate = new DateInfo(2400000 + mjdDate.getJulianDay());

      observation.setMagnitude(mag);
      observation.setDateInfo(jdDate);
      observation.setRecordNumber(obNum);
      observation.setBand(catalinaSeries);
View Full Code Here

    if (!wantAllData) {
      // Valid Julian Date range?
      try {
        String minJDText = minJDField.getText();
        minDate = new DateInfo(NumberParser.parseDouble(minJDText));
      } catch (NumberFormatException e) {
        MessageBox.showErrorDialog(Mediator.getUI().getComponent(),
            "Minimum Julian Day", e);
      }

      try {
        String maxJDText = maxJDField.getText();
        maxDate = new DateInfo(NumberParser.parseDouble(maxJDText));
      } catch (NumberFormatException e) {
        MessageBox.showErrorDialog(Mediator.getUI().getComponent(),
            "Maximum Julian Day", e);
      }
    }
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.