Package org.aavso.tools.vstar.util.model

Examples of org.aavso.tools.vstar.util.model.IModel


*/
public class TSPolynomialFitCreatorPlugin extends ModelCreatorPluginBase {

  @Override
  public IModel getModel(List<ValidObservation> obs) {
    IModel model = null;

    IPolynomialFitter polynomialFitter = new TSPolynomialFitter(obs);

    int minDegree = polynomialFitter.getMinDegree();
    int maxDegree = polynomialFitter.getMaxDegree();
View Full Code Here


      this.obs = obs;
    }

    // Create a model representing a polynomial fit of the requested degree.
    IModel createModel() {
      IModel model = null;

      final double zeroPoint = DescStats.calcTimeElementMean(obs,
          JDTimeElementEntity.instance);

      int minDegree = getMinDegree();
      int maxDegree = getMaxDegree();

      PolynomialDegreeDialog polyDegreeDialog = new PolynomialDegreeDialog(
          minDegree, maxDegree);

      if (!polyDegreeDialog.isCancelled()) {
        setDegree(polyDegreeDialog.getDegree());

        final AbstractLeastSquaresOptimizer optimizer = new LevenbergMarquardtOptimizer();

        final PolynomialFitter fitter = new PolynomialFitter(
            getDegree(), optimizer);

        model = new IModel() {
          boolean interrupted = false;
          List<ValidObservation> fit;
          List<ValidObservation> residuals;
          PolynomialFunction function;
          // ICoordSource coordSrc = JDCoordSource.instance;
View Full Code Here

        selectButton.setEnabled(true);
        deleteButton.setEnabled(true);

        // Does the model support displaying coefficients?
        String desc = (String) modelListModel.get(index);
        IModel model = modelMap.get(desc);
        showModelButton.setEnabled(model.hasFuncDesc());
      }
    }
  }
View Full Code Here

  private ActionListener createSelectButtonListener() {
    return new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        int selectedModelIndex = modelList.getSelectedIndex();
        String desc = (String) modelListModel.get(selectedModelIndex);
        IModel model = modelMap.get(desc);
        ModelSelectionMessage msg = new ModelSelectionMessage(this,
            model);
        Mediator.getInstance().getModelSelectionNofitier()
            .notifyListeners(msg);
      }
View Full Code Here

    final JDialog parent = this;
    return new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        int selectedModelIndex = modelList.getSelectedIndex();
        String desc = (String) modelListModel.get(selectedModelIndex);
        IModel model = modelMap.get(desc);
        new ModelInfoDialog(parent, model);
      }
    };
  }
View Full Code Here

          periods.add(dataPoint.getPeriod());
        }

        if (!periods.isEmpty()) {
          try {
            IModel periodModel = new WWZMultiperiodicModel(model
                .getWwt(), periods);
            Mediator.getInstance().performModellingOperation(
                periodModel);
          } catch (Exception ex) {
            MessageBox.showErrorDialog(parent, "Modelling", ex
View Full Code Here

    IModel createModel() {

      // TODO: create a dialog to permit entry of params for other
      // forms of ctor (Loess algorithm variants).

      return new IModel() {
        boolean interrupted = false;
        List<ValidObservation> fit;
        List<ValidObservation> residuals;
        PolynomialSplineFunction function;
        Map<String, String> functionStrMap = new LinkedHashMap<String, String>();
View Full Code Here

          SeriesType type = seriesDialog.getSeries();

          List<ValidObservation> obs = getSeriesInfoProvider()
              .getObservations(type);

          IModel model = plugin.getModel(obs);

          if (model != null) {
            ModellingTask task = new ModellingTask(model);

            this.currTask = task;
View Full Code Here

TOP

Related Classes of org.aavso.tools.vstar.util.model.IModel

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.