[HepData-svn] r1438 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Feb 8 15:23:40 GMT 2011


Author: whalley
Date: Tue Feb  8 15:23:39 2011
New Revision: 1438

Log:
more tweaking of x bin display

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Mon Feb  7 11:15:54 2011	(r1437)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Tue Feb  8 15:23:39 2011	(r1438)
@@ -208,7 +208,7 @@
                     // Format as "<focus> (bin: <low>--<high>)" if showmean is true ==
                     // at least one bin has a focus which significantly differs from the mean
                     // ..force it to be true so that we always output the mean
-                    boolean asymmfocus = true;
+                    boolean asymmfocus = false;
                     boolean haswidth = false;
                     for (Bin b : x.getBins()) {
                         if (b.getLowValue() != null && b.getHighValue() != null && b.getFocus() != null) {
@@ -220,7 +220,7 @@
                         if (b.getLowValue() != null && b.getHighValue() != null){
                             double diff = b.getHighValue() - b.getLowValue();
                             double mean = (b.getHighValue() + b.getLowValue())/2.0;
-                            if(diff/mean > 1E-6){
+                            if(Math.abs(diff/mean) > 1E-6){
                                 haswidth = true;
                             }
                         }


More information about the HepData-svn mailing list