|
[HepData-svn] r1771 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formatsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Mar 26 15:53:38 GMT 2014
Author: watt Date: Wed Mar 26 15:53:38 2014 New Revision: 1771 Log: Display STAT and suppress formatting of y values in InputFormatter Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java Wed Mar 26 14:58:12 2014 (r1770) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java Wed Mar 26 15:53:38 2014 (r1771) @@ -245,21 +245,23 @@ s.append(" " + f_desc); } else { - if(yax.getPoint(i+1).getValueLength() != null) { - int lsd = yax.getPoint(i+1).getValueLength(); - int msd = 0; - if(lsd > 0){ - msd = f_val.indexOf("."); - } else{ - msd = f_val.length() - 2; - } - f_val = Formats.forms(yax.getPoint(i+1).getValue(),msd,lsd); - } - if(f_val.contains("E-")){ - int lsd = Integer.parseInt(f_val.substring(f_val.indexOf("E")+2)); - int ldiff = f_val.length() + lsd; - f_val = Formats.forms(yax.getPoint(i+1).getValue(),1,ldiff-5); - } + // G.W. 26/03/2014 Keep formatting switched off for the moment. + // if(yax.getPoint(i+1).getValueLength() != null) { + // int lsd = yax.getPoint(i+1).getValueLength(); + // int msd = 0; + // if(lsd > 0){ + // msd = f_val.indexOf("."); + // } else{ + // msd = f_val.length() - 2; + // } + // if ( + // f_val = Formats.forms(yax.getPoint(i+1).getValue(),msd,lsd); + // } + // if(f_val.contains("E-")){ + // int lsd = Integer.parseInt(f_val.substring(f_val.indexOf("E")+2)); + // int ldiff = f_val.length() + lsd; + // f_val = Formats.forms(yax.getPoint(i+1).getValue(),1,ldiff-5); + // } s.append(" " + f_val); // s.append(" " + yax.getPoint(i+1).getValue()); } @@ -291,8 +293,13 @@ s.append(" +" + f_plus + norm + ",-" + f_minus + norm); } } - else if(nerr == 2) { - s.append(" (DSYS="); + else if(nerr == 2) { + if (err.getSourceType() == ErrorSource.STAT) { + s.append(" (STAT="); + } + else { + s.append(" (DSYS="); + } // if(err.isSymmetric()) {s.append(err.getPlus() + norm);} // else{s.append("+" + err.getPlus() + norm + ",-" + err.getMinus() + norm);} if(err.isSymmetric()) {s.append(f_plus + norm);}
More information about the HepData-svn mailing list |