|
[HepData-svn] r1432 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/componentsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Jan 19 15:01:17 GMT 2011
Author: whalley Date: Wed Jan 19 15:01:17 2011 New Revision: 1432 Log: display error decimal places 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 Wed Jan 19 14:59:39 2011 (r1431) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Wed Jan 19 15:01:17 2011 (r1432) @@ -385,12 +385,11 @@ for (PointError e : pt2.getErrors()) { String stype = e.getSourceType().toShortString(); SignificantFigures vale = null; + if (e.getPlusLength() != null) { lsd = -e.getPlusLength(); } if (e.isSymmetric()) { vale = new SignificantFigures(e.getPlus()); writer.writeRaw(" ± "); // chosen to allow breaks *before* the +- sign only - if (e.getNormType() == ErrorNorm.PCT) { - lsd = vale.getLSD(); - } + if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); } msd = vale.getMSD(); if (msd <= 0) msd = 1; writer.write(Formats.forms(e.getPlus(), msd, -lsd)); @@ -398,9 +397,7 @@ } else if (e.isSymmetricReversed()) { vale = new SignificantFigures(e.getPlus()); writer.writeRaw(" ∓ "); // chosen to allow breaks *before* the +- sign only - if (e.getNormType() == ErrorNorm.PCT) { - lsd = vale.getLSD(); - } + if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); } msd = vale.getMSD(); if (msd <= 0) msd = 1; writer.write(Formats.forms(e.getMinus(), msd, -lsd)); @@ -409,9 +406,7 @@ vale = new SignificantFigures(e.getPlus()); if(e.getPlus() > e.getMinus()) { writer.write("+"); } else { writer.write("+"); } - if (e.getNormType() == ErrorNorm.PCT) { - lsd = vale.getLSD(); - } + if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); } msd = vale.getMSD(); if (msd <= 0) msd = 1; writer.write(Formats.forms(e.getPlus(), msd, -lsd)); @@ -420,9 +415,7 @@ if(e.getPlus() > e.getMinus()) { writer.writeRaw(",-");} // else { writer.write(",+"); } else { writer.write(",-"); } - if (e.getNormType() == ErrorNorm.PCT) { - lsd = vale.getLSD(); - } + if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); } msd = vale.getMSD(); if (msd <= 0) msd = 1; writer.write(Formats.forms(e.getMinus(), msd, -lsd));
More information about the HepData-svn mailing list |