Package org.aavso.tools.vstar.data

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


   *
   * @param validOb
   *            A valid observation.
   */
  protected void categoriseValidObservation(ValidObservation validOb) {
    SeriesType category = null;

    if (validOb.getMagnitude().isFainterThan()) {
      category = SeriesType.FAINTER_THAN;
    } else if (validOb.isDiscrepant()) {
      category = SeriesType.DISCREPANT;
View Full Code Here


      reader.retrieveObservations();
      List<ValidObservation> obs = reader.getValidObservations();

      boolean found = false;
      for (ValidObservation ob : obs) {
        SeriesType band = ob.getBand();
        if (band == SeriesType.Johnson_V) {
          double jd = ob.getDateInfo().getJulianDay();
          assertEquals(2454001.8325, jd);
          double mag = ob.getMag();
          assertEquals(3.0544, mag);
View Full Code Here

      ITimeElementEntity timeElementEntity, double timeElementsInBin) {

    // Pre-conditions.
    assert (!observations.isEmpty());

    SeriesType series = SeriesType.Unknown;
    List<ValidObservation> binnedObs = Collections.EMPTY_LIST;
    List<double[]> magnitudeBins = Collections.EMPTY_LIST;

    // Are there sufficient (size > 1) observations to create
    // binned mean observations?
View Full Code Here

    int id = entry.getIdentifier();
    IOrderedObservationSource model = entry.getModel();
    ValidObservation ob = model.getObservations().get(id);

    SeriesType series = ob.getBand();

    if (ob.isDiscrepant()) {
      series = SeriesType.DISCREPANT;
    } else if (ob.isExcluded()) {
      series = SeriesType.Excluded;
View Full Code Here

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

  private final static ObservationMatcherOp[] ops = {
      ObservationMatcherOp.EQUALS, ObservationMatcherOp.NOT_EQUALS };

  @Override
  protected SeriesType getValueUnderTest(ValidObservation ob) {
    SeriesType band = ob.getBand();
    return (band == null) ? SeriesType.getDefault() : band;
  }
View Full Code Here

      ObservationMatcherOp op) {
    IObservationFieldMatcher matcher = null;

    // Currently requires long band name to be specified.
    if (!"".equals(fieldValue)) {
      SeriesType type = SeriesType.getSeriesFromDescription(fieldValue);
      matcher = new SeriesTypeFieldMatcher(type, op);

      // Check that we didn't classify something else as "unspecified".
      if (type == SeriesType.Unspecified
          && !fieldValue.equalsIgnoreCase("unspecified")) {
View Full Code Here

  @Override
  public boolean matches(ValidObservation ob) {
    boolean result = false;

    SeriesType value = getValueUnderTest(ob);

    switch (op) {
    case EQUALS:
      result = value == testValue;
      break;
View Full Code Here

      // SeriesType.delete(SeriesType
      // .getSeriesFromDescription(description));
      // }

      // Create the series type and send out a notification.
      SeriesType type = null;
      Color color = colorChooser.getColor();

      type = SeriesType.create(description, description, color, false,
          true);
View Full Code Here

      // Create a new series with the adjusted magnitude.
      if (!magDeltaDlg.isCancelled()) {
        magDelta = magDeltaField.getValue();

        SeriesType type = seriesSelector.getSeries();
        List<ValidObservation> obs = seriesInfo.getObservations(type);

        String description = String.format("%s shifted by %s", type
            .getDescription(), NumericPrecisionPrefs
            .formatMag(magDelta));
        String shortName = String.format("%s + %s",
            type.getShortName(), NumericPrecisionPrefs
                .formatMag(magDelta));
        Color color = type.getColor();

        // SeriesType newType = SeriesType.create(description,
        // shortName,
        // color, true, true);

        // TODO: why does plot zoom cause a shift series to disappear?

        SeriesType newType = type;

        List<ValidObservation> newObs = new ArrayList<ValidObservation>(
            obs);
        for (ValidObservation newOb : newObs) {
          Magnitude newMag = new Magnitude(newOb.getMag() + magDelta,
View Full Code Here

TOP

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

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.