From aa6dfc8486e2ec949939fbee6641f2589ba91f67 Mon Sep 17 00:00:00 2001
From: JWu <j.wuttke@fz-juelich.de>
Date: Mon, 14 Jan 2013 17:29:18 +0100
Subject: [PATCH] debugging plot with intpol

---
 pub/src/curve.cpp  | 6 +++++-
 pub/src/zentry.cpp | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/pub/src/curve.cpp b/pub/src/curve.cpp
index af7581ca..69061ce6 100644
--- a/pub/src/curve.cpp
+++ b/pub/src/curve.cpp
@@ -178,6 +178,9 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
   // input: the function arguments vt[], and the context k, j
   // output: the curve evaluation result *ret[]
 {
+    cout << "DEB cvv: entry with size(vt)=" << vt.size() << "\n";
+    cout << "DEB cvv: ... vt = " << vt.front() << " .. " << vt.back() << "\n";
+    
     ret->resize( vt.size() );
     CResult val;
     if ( evaMode==_EXPR ) {
@@ -250,6 +253,7 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
             errmsg = "command '" + expr + pars + "'";
             system( cmd.c_str() );
         }
+        cout << "DEB cvv: called " << errmsg << "\n";
 
         FILE *F;
         if( !(F = fopen( ret_fifonam.c_str(), "r")) )
@@ -269,7 +273,7 @@ void COlc::curve_val_vec( vector<double>* ret, const vector<double>& vt,
             // interpolation:
             if ( S.size()<2 )
                 throw errmsg + " returns only " + S(S.size()) + " valid lines";
-            //cout << "DEB call intpol "<<vt.front()<<" .. "<<vt.back()<<"\n";
+            cout << "DEB cvv: intpol "<<vt.front()<<" .. "<<vt.back()<<"\n";
             S.intpol( vt, *ret );
         }
         fclose( F );
diff --git a/pub/src/zentry.cpp b/pub/src/zentry.cpp
index 52876da3..4fd44070 100644
--- a/pub/src/zentry.cpp
+++ b/pub/src/zentry.cpp
@@ -139,10 +139,10 @@ void CSpec::intpol( const vector<double>& xx, vector<double>& yy ) const
 {
     uint n = size();
     if( n<2 )
-        throw "BUG in intpol: less than two points to interpolate between";
+        throw "invalid interpolation request: old grid has size " + S(n);
     uint nn = xx.size();
     if( nn<1 )
-        throw "BUG in intpol: empty vector of points to interpolate for";
+        throw "invalid interpolation request: new grid is empty";
     yy.resize( nn, 0. );
 
     uint ii = 0;
-- 
GitLab