super.tearDown();
}
// Polynomial fit test using delta Cephei data.
public void testDegree2() {
TSPolynomialFitter fitter = new TSPolynomialFitter(obs);
fitter.setDegree(2);
try {
fitter.execute();
List<ValidObservation> fitObs = fitter.getFit();
assertEquals(polyfit_degree2.length, fitObs.size());
for (int i = 0; i < fitObs.size(); i++) {
ValidObservation ob = fitObs.get(i);
assertEquals(String.format("%1.4f", polyfit_degree2[i][0]),
String.format("%1.4f", ob.getJD()));
assertEquals(String.format("%1.4f", polyfit_degree2[i][1]),
String.format("%1.4f", ob.getMag()));
}
List<ValidObservation> residualObs = fitter.getResiduals();
assertEquals(polyfit_residuals_degree2.length, residualObs.size());
for (int i = 0; i < residualObs.size(); i++) {
ValidObservation ob = residualObs.get(i);