Package org.aavso.tools.vstar.data

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


        DateInfo dateInfo = julianDayValidator.validate(fields[1]
            .trim());
        observation.setDateInfo(dateInfo);
      }

      Magnitude magnitude = magnitudeFieldValidator.validate(fields[2]
          .trim());
      observation.setMagnitude(magnitude);

      return observation;
    }
View Full Code Here


                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,
                    uncertainty);
                ob.setMagnitude(mag);
              }
            } catch (NumberFormatException e) {
              // TODO: create invalid od
View Full Code Here

              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);

              sumSqResiduals += (residual * residual);
 
View Full Code Here

          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);

          phObs.add(phOb);
        }
View Full Code Here

      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);
      ob.setRecordNumber(lineNum);
View Full Code Here

          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");
          ob.addDetail("FRAME", fields[12], "Frame");
View Full Code Here

    private ValidObservation readNextObservation(String[] fields, int obNum)
        throws ObservationValidationError {
      ValidObservation observation = new ValidObservation();

      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);
View Full Code Here

TOP

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

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.