Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java @ 3096:d7b0f52d6d04
FixA: Calculate Delta W(t) for reference points, too.
flys-artifacts/trunk@4695 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 18 Jun 2012 16:00:19 +0000 |
parents | 5642a83420f2 |
children | 23de6d678fba |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java Mon Jun 18 14:37:10 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java Mon Jun 18 16:00:19 2012 +0000 @@ -169,27 +169,28 @@ final double [] qs = new double[eventColumns.size()]; final double [] ws = new double[qs.length]; - Fitting.QWFactory qwFactory = new Fitting.QWFactory() { + Fitting.QWDFactory qwdFactory = new Fitting.QWDFactory() { @Override - public QW create(double q, double w) { + public QWD create(double q, double w) { // Check all the event columns for close match // and take the description and the date from meta. for (int i = 0; i < qs.length; ++i) { if (Math.abs(qs[i]-q) < EPSILON && Math.abs(ws[i]-w) < EPSILON) { Column column = eventColumns.get(i); - return new QW( + return new QWD( q, w, column.getDescription(), - column.getDate()); + column.getDate(), + 0d); } } log.warn("cannot find column for (" + q + ", " + w + ")"); - return new QW(q, w); + return new QWD(q, w); } }; - Fitting fitting = new Fitting(func, qwFactory, preprocessing); + Fitting fitting = new Fitting(func, qwdFactory, preprocessing); String [] parameterNames = func.getParameterNames(); @@ -202,8 +203,8 @@ log.debug("number of kms: " + kms.length); } - KMIndex<QW []> outliers = new KMIndex<QW []>(); - KMIndex<QW []> referenced = new KMIndex<QW []>(kms.length); + KMIndex<QW []> outliers = new KMIndex<QW []>(); + KMIndex<QWD []> referenced = new KMIndex<QWD []>(kms.length); int kmIndex = results.columnIndex("km"); int chiSqrIndex = results.columnIndex("chi_sqr");