# HG changeset patch # User Sascha L. Teichmann # Date 1338240864 0 # Node ID a2b265b9b2f7def74de12436ed5deaab8f938a43 # Parent 70469e3d34b9aae448b6936ac077531473a8efa0 FixA: corrected fitting (Q->W instead W->Q). flys-artifacts/trunk@4546 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 70469e3d34b9 -r a2b265b9b2f7 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Mon May 28 20:59:27 2012 +0000 +++ b/flys-artifacts/ChangeLog Mon May 28 21:34:24 2012 +0000 @@ -1,3 +1,13 @@ +2012-05-28 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java: + Fit from Q to W not from W to Q! + Delta w/t's are now in cm. + Slimmed down fitting error report. + + * src/main/java/de/intevation/flys/exports/DeltaWtExporter.java: + Changed default column header of delta W to cm. + 2012-05-28 Sascha L. Teichmann Made Delta W/t calculation work. diff -r 70469e3d34b9 -r a2b265b9b2f7 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java Mon May 28 20:59:27 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java Mon May 28 21:34:24 2012 +0000 @@ -311,7 +311,7 @@ continue; } - double deltaW = ow[0] - nw; + double deltaW = (ow[0] - nw)*100.0; // in cm DeltaWT deltaWT = new DeltaWT( deltaW, @@ -423,29 +423,9 @@ LevenbergMarquardtOptimizer lmo = new LevenbergMarquardtOptimizer(); CurveFitter cf = new CurveFitter(lmo); - boolean missingWs = false; - boolean missingQs = false; - for (int i = 0; i < ws.length; ++i) { - boolean ignore = false; - if (Double.isNaN(ws[i])) { - ignore = true; - if (!missingWs) { - missingWs = true; - // TODO: i18n - addProblem(km, "fix.missing.w"); - } - } - if (Double.isNaN(qs[i])) { - ignore = true; - if (!missingQs) { - missingQs = true; - // TODO: i18n - addProblem(km, "fix.missing.q"); - } - } - if (!ignore) { - cf.addObservedPoint(ws[i], qs[i]); + if (!Double.isNaN(ws[i]) && !Double.isNaN(qs[i])) { + cf.addObservedPoint(qs[i], ws[i]); } } diff -r 70469e3d34b9 -r a2b265b9b2f7 flys-artifacts/src/main/java/de/intevation/flys/exports/DeltaWtExporter.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DeltaWtExporter.java Mon May 28 20:59:27 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DeltaWtExporter.java Mon May 28 21:34:24 2012 +0000 @@ -49,7 +49,7 @@ public static final String DEFAULT_CSV_KM_HEADER = "km"; - public static final String DEFAULT_CSV_DELTA_W_HEADER = "\u0394 W"; + public static final String DEFAULT_CSV_DELTA_W_HEADER = "\u0394 W [cm]"; public static final String DEFAULT_CSV_T_HEADER = "Datum";