Examples of DateInfo


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

    // By virtue of the regex pattern above,
    // this must parse as a double.
    double value = Double.parseDouble(fields[0]);

    return new DateInfo(value);
  }
View Full Code Here

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

      // Create a new valid observation, making the assumption
      // that validation will pass.
      observation = new ValidObservation();

      // Validate the fields.
      DateInfo dateInfo = julianDayValidator
          .validate(fields[fieldIndexMap.get("JD_FIELD")]);
      observation.setDateInfo(dateInfo);

      Magnitude magnitude = magnitudeFieldValidator
          .validate(fields[fieldIndexMap.get("MAGNITUDE_FIELD")]);
View Full Code Here

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

    String kMag = kMagValidator.validate(fields[fieldIndexMap
        .get("KMAG_FIELD")]);
    observation.setKMag(kMag);

    DateInfo hjdInfo = hjdValidator.validate(fields[fieldIndexMap
        .get("HJD_FIELD")]);
    observation.setHJD(hjdInfo);

    String name = nameFieldValidator.validate(fields[fieldIndexMap
        .get("NAME_FIELD")]);
View Full Code Here

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

    String comment = "From polynomial fit of degree " + degree;

    for (n = 1; n <= numred; n++) {
      // write(1,222)tfit(n)+dt0,xfit(n),ds9*sfit(n)
      ValidObservation fitOb = new ValidObservation();
      fitOb.setDateInfo(new DateInfo(tfit[n] + dt0));
      // double uncertainty = ds9*sfit[n]; // TODO: ask Matt about this;
      // uncertainty?
      fitOb.setMagnitude(new Magnitude(xfit[n], 0));
      fitOb.setComments(comment);
      fitOb.setBand(SeriesType.Model);
      fit.add(fitOb);
    }

    if (fit.isEmpty()) {
      throw new AlgorithmError("No observations in fit list.");
    }

    // Note: save residuals (to list)

    // 40 write(6,*) 'Residuals filename?'
    // read*,ftmp;
    // 41 open(unit=9,file=ftmp,status='unknown',err=42);
    // 42 write(6,*) 'Could not open file.'

    // Store the residuals resulting from the polynomial fit operation as
    // "residual observations".
    residuals = new ArrayList<ValidObservation>();

    for (n = nlolim; n <= nuplim; n++) {
      if (wvec[n] > 0.0) {
        dtime = tvec[n];
        dx = smooth(dtime);
        res = xvec[n] - dx;
        for (nb = 1; nb <= nbias; nb++) {
          if (obs[n] == obias[nb])
            res = res - dcoef[npoly + nb];
        }
        // write(9,240) tvec(n)+dt0,res
        ValidObservation residualOb = new ValidObservation();
        residualOb.setDateInfo(new DateInfo(tvec[n] + dt0));
        residualOb.setMagnitude(new Magnitude(res, 0));
        residualOb.setComments(comment);
        residualOb.setBand(SeriesType.Residuals);
        residuals.add(residualOb);
      }
View Full Code Here

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

              + NumericPrecisionPrefs.formatOther(period);

          // Create a fit observation from the average magnitude for
          // this time-frequency/period combination.
          ValidObservation fitOb = new ValidObservation();
          fitOb.setDateInfo(new DateInfo(stat.getTau()));
          fitOb.setMagnitude(new Magnitude(stat.getMave(), 0));
          fitOb.setBand(SeriesType.Model);
          fitOb.setComments(comment);
          fit.add(fitOb);

          // Create a residual observation for each observation since
          // the previous period. TODO: sanity check this approach,
          // i.e. does it actually make sense for a tau value to
          // represent a range of observation time values for the
          // purpose of residual creation?
          while (i < obs.size()
              && obs.get(i).getJD() <= stat.getTau()) {
            double residual = obs.get(i).getMag() - stat.getMave();
            ValidObservation residualOb = new ValidObservation();
            residualOb
                .setDateInfo(new DateInfo(obs.get(i).getJD()));
            residualOb.setMagnitude(new Magnitude(residual, 0));
            residualOb.setBand(SeriesType.Residuals);
            residualOb.setComments(comment);
            residuals.add(residualOb);
            i++;
View Full Code Here

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

                } else if (magErr > maxMagErr) {
                  maxMagErr = magErr;
                }

                ValidObservation ob = new ValidObservation();
                ob.setDateInfo(new DateInfo(hjd));
                ob.setMagnitude(new Magnitude(mag, magErr));
                ob.setBand(keplerSeries);
                ob.setRecordNumber(row);
                collectObservation(ob);
              }
View Full Code Here

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

                } else if (magErr > maxMagErr) {
                  maxMagErr = magErr;
                }

                ValidObservation ob = new ValidObservation();
                ob.setDateInfo(new DateInfo(hjd));
                ob.setMagnitude(new Magnitude(mag, magErr));
                ob.setBand(superWaspSeries);
                ob.setRecordNumber(row);
                ob.addDetail("IMAGE_ID", imageId, "Image ID");
                ob.addDetail("CCDX", ccdX + "", "CCD X");
View Full Code Here

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

      double mag = Double.parseDouble(fields[1].trim());
      double magErr = Double.parseDouble(fields[2].trim());
      String flags = fields[3];

      ValidObservation ob = new ValidObservation();
      ob.setDateInfo(new DateInfo(jd));
      ob.setMagnitude(new Magnitude(mag, magErr));
      ob.setBand(series);
      ob.setRecordNumber(lineNum);
      ob.addDetail("FLAGS", flags, "Flags");
      collectObservation(ob);
View Full Code Here

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

          Matcher magMatcher = VSOLJ_MAG.matcher(magStr);
          if (magMatcher.matches()) {
            ValidObservation ob = new ValidObservation();
            ob.setName(name);
            ob.setDateInfo(new DateInfo(jd));
            ob.setMagnitude(getMag(magMatcher));
            ob.setBand(getBand(magMatcher));
            ob.setObsCode(fields[3]);
            ob.addDetail("SOURCE", "VSOLJ", "Source");
View Full Code Here

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

      double mag = Double.parseDouble(fields[1].trim());
      double magErr = Double.parseDouble(fields[2].trim());
      String flags = fields[3].trim();

      ValidObservation ob = new ValidObservation();
      ob.setDateInfo(new DateInfo(bjd));
      ob.setMagnitude(new Magnitude(mag, magErr));
      ob.setBand(series);
      ob.setRecordNumber(lineNum);
      ob.addDetail("FLAGS", flags, "Flags");
      collectObservation(ob);
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.