Map<SeriesType, List<ValidObservation>> validObservationCategoryMap = starInfo
.getRetriever().getValidObservationCategoryMap();
// Table models.
ValidObservationTableModel validObsTableModel = null;
InvalidObservationTableModel invalidObsTableModel = null;
RawDataMeanObservationTableModel meanObsTableModel = null;
// Plot models.
obsAndMeanPlotModel = null;
// GUI table and chart components.
ObservationListPane obsListPane = null;
SyntheticObservationListPane<AbstractMeanObservationTableModel> meansListPane = null;
ObservationAndMeanPlotPane obsAndMeanChartPane = null;
if (!validObsList.isEmpty()) {
freeListeners();
// Create a message to notify whoever is listening that a new star
// has been loaded.
NewStarMessage newStarMsg = new NewStarMessage(newStarType,
starInfo, validObsList, validObservationCategoryMap,
starInfo.getRetriever().getMinMag(), starInfo
.getRetriever().getMaxMag(), starInfo
.getRetriever().getSourceName());
if (!addObs) {
newStarMessageList.clear();
}
newStarMessageList.add(newStarMsg);
// This is a specific fix for tracker 3007948.
this.discrepantObservationNotifier = new Notifier<DiscrepantObservationMessage>();
// Observation table and plot.
validObsTableModel = new ValidObservationTableModel(validObsList,
newStarType.getRawDataTableColumnInfoSource());
// Observation-and-mean table and plot.
obsAndMeanPlotModel = new ObservationAndMeanPlotModel(
validObservationCategoryMap, JDCoordSource.instance,
JDComparator.instance, JDTimeElementEntity.instance, null);
// Record initial ANOVA information and make the document manager
// listen to changes to ANOVA via new binning results.
documentManager.updateAnovaInfo(obsAndMeanPlotModel
.getBinningResult());
obsAndMeanPlotModel.getMeansChangeNotifier().addListener(
documentManager.createBinChangeListener());
documentManager
.addStatsInfo("Confidence Interval",
"Mean error bars denote 95% Confidence Interval (twice Standard Error)");
obsAndMeanChartPane = createObservationAndMeanPlotPane(LocaleProps
.get("LIGHT_CURVE")
+ " "
+ LocaleProps.get("FOR")
+ " "
+ starInfo.getDesignation(), null, obsAndMeanPlotModel,
starInfo.getRetriever());
obsAndMeanPlotModel.getMeansChangeNotifier().addListener(
createMeanObsChangeListener(obsAndMeanPlotModel
.getMeanSourceSeriesNum()));
// The mean observation table model must listen to the plot
// model to know when the means data has changed. We also pass
// the initial means data obtained from the plot model to
// the mean observation table model.
meanObsTableModel = new RawDataMeanObservationTableModel(
obsAndMeanPlotModel.getMeanObsList());
obsAndMeanPlotModel.getMeansChangeNotifier().addListener(
meanObsTableModel);
if (obsArtefactProgressAmount > 0) {
// Update progress.
getProgressNotifier().notifyListeners(
new ProgressInfo(ProgressType.INCREMENT_PROGRESS,
obsArtefactProgressAmount));
}
}
if (!invalidObsList.isEmpty()) {
invalidObsTableModel = new InvalidObservationTableModel(
invalidObsList);
}
// The observation table pane contains valid and potentially
// invalid data components. Tell the valid data table to have