[HepData-svn] r1769 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Mar 25 12:48:02 GMT 2014


Author: whalley
Date: Tue Mar 25 12:48:02 2014
New Revision: 1769

Log:
adding plus and minus errors etc..

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YodaFormatter.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YodaFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YodaFormatter.java	Mon Mar 24 12:35:43 2014	(r1768)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/YodaFormatter.java	Tue Mar 25 12:48:02 2014	(r1769)
@@ -69,8 +69,11 @@
                         path.setAttribute("xid", _padId(x.getId()));
                         path.setAttribute("yid", _padId(y.getId()));
                         s.append("# BEGIN YODA_SCATTER2D "  + path.toString() + "\n");
+                        s.append("Path="  + path.toString() + "\n");
+                        s.append("Type=Scatter2D\n");
+                        s.append("# xval   xerr-   xerr+   yval   yerr-   yerr+\n");
                         for (int r = 1; r <= d.getMaxPointId(); ++r) {
-                            StringTemplate row = new StringTemplate("$focus$\t$dplus$\t$dminus$\t$xlow$\t$xhigh$\t$yval$\t$yerr$");
+                            StringTemplate row = new StringTemplate("$focus$\t$dplus$\t$dminus$\t$xlow$\t$xhigh$\t$yval$\t$yerrminus$\t$yerrplus$");
                             Bin b = x.getBin(r);
                             Point p = y.getPoint(r);
                             if (b != null && p != null) {
@@ -88,8 +91,10 @@
 				else {
 				    row.setAttribute("yval", p.getValue());
 				}
-                                Double yerr = p.getQuadCombinedPlusMinusError();
-                                row.setAttribute("yerr", yerr);
+                                Double yerrminus = p.getQuadCombinedMinusError();
+                                row.setAttribute("yerrminus", yerrminus);
+                                Double yerrplus = p.getQuadCombinedPlusError();
+                                row.setAttribute("yerrplus", yerrplus);
                             }
                             s.append(row.toString() + "\n");
                         }


More information about the HepData-svn mailing list