Index: sansrealspace/src/sans/realspace/test/coreshell_d=0.01_Iq.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/coreshell_d=0.01_Iq.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,52 +1,0 @@
-PARS: {'core_sld': 1.0, 'thickness': 5, 'solvent_sld': 0.0, 'scale': 1.0, 'radius': 15, 'background': 0.0, 'shell_sld': -0.7297297297297296}
-<q>  <ana>  <sim>  <err>
-0.001  546.461  9.78363e+006  1.51638e+009
-0.0213878  1.12037e+008  6.28976e+007  1.78903e+010
-0.0417755  1.5392e+009  1.69459e+009  4.9295e+010
-0.0621633  6.85689e+009  1.68046e+010  1.20691e+011
-0.082551  1.86312e+010  2.72164e+009  4.8322e+010
-0.102939  3.77797e+010  4.99703e+010  2.56606e+011
-0.123327  6.25086e+010  5.49159e+010  3.08699e+011
-0.143714  8.83525e+010  5.79293e+010  3.03282e+011
-0.164102  1.09375e+011  6.81951e+010  3.68556e+011
-0.18449  1.20102e+011  9.11503e+010  3.94774e+011
-0.204878  1.17429e+011  7.5517e+010  3.66396e+011
-0.225265  1.01772e+011  7.55982e+010  3.57809e+011
-0.245653  7.69907e+010  6.76884e+010  3.33057e+011
-0.266041  4.91381e+010  5.46391e+010  3.059e+011
-0.286429  2.4505e+010  2.91311e+010  2.09596e+011
-0.306816  7.70105e+009  1.50421e+010  1.55602e+011
-0.327204  4.46446e+008  7.73594e+009  1.16253e+011
-0.347592  1.44323e+009  6.61388e+009  1.09883e+011
-0.36798  7.26659e+009  2.67697e+010  2.10412e+011
-0.388367  1.38447e+010  6.69746e+009  1.06623e+011
-0.408755  1.79268e+010  3.57793e+010  2.45747e+011
-0.429143  1.80167e+010  1.74915e+010  1.64273e+011
-0.449531  1.45166e+010  4.17646e+010  2.77463e+011
-0.469918  9.15928e+009  1.74956e+010  1.65486e+011
-0.490306  4.06238e+009  1.68219e+010  1.68458e+011
-0.510694  8.28382e+008  1.17877e+010  1.43717e+011
-0.531082  2.58879e+007  1.31559e+010  1.47206e+011
-0.551469  1.17967e+009  3.78552e+010  2.485e+011
-0.571857  3.17457e+009  1.55803e+009  5.10627e+010
-0.592245  4.83142e+009  4.67277e+008  2.68516e+010
-0.612633  5.38985e+009  9.99761e+009  1.34718e+011
-0.63302  4.72163e+009  1.66971e+010  1.63231e+011
-0.653408  3.24255e+009  1.72664e+010  1.69255e+011
-0.673796  1.62119e+009  1.31521e+009  4.73275e+010
-0.694184  4.47037e+008  5.66857e+009  9.38055e+010
-0.714571  4.15178e+006  2.84074e+006  2.15692e+009
-0.734959  2.21749e+008  1.87719e+009  5.37223e+010
-0.755347  7.83703e+008  8.17585e+008  3.53672e+010
-0.775735  1.31559e+009  8.3075e+009  1.18316e+011
-0.796122  1.55288e+009  4.67401e+009  8.6085e+010
-0.81651  1.42344e+009  7.90246e+009  1.1491e+011
-0.836898  1.02948e+009  1.32814e+010  1.49737e+011
-0.857286  5.60678e+008  1.64135e+009  5.14098e+010
-0.877673  1.92343e+008  2.57106e+010  1.95691e+011
-0.898061  1.59082e+007  1.28795e+009  4.60586e+010
-0.918449  2.32131e+007  8.75344e+009  1.21031e+011
-0.938837  1.3713e+008  5.01801e+009  9.18403e+010
-0.959224  2.62821e+008  9.89061e+008  3.77781e+010
-0.979612  3.31767e+008  8.83918e+009  1.23905e+011
-1  3.21634e+008  1.11387e+010  1.3461e+011
Index: sansrealspace/src/sans/realspace/test/coreshell_d=0.01_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/coreshell_d=0.01_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,52 +1,0 @@
-PARS: {'core_sld': 1.0, 'thickness': 5, 'solvent_sld': 0.0, 'scale': 1.0, 'radius': 15, 'background': 0.0, 'shell_sld': -0.7297297297297296}
-<q>  <ana>  <sim>  <err>
-0.001  546.461  1.21638e+008  1.2016e+009
-0.0213878  1.12037e+008  1.2839e+009  1.59299e+010
-0.0417755  1.5392e+009  3.93595e+009  7.8457e+010
-0.0621633  6.85689e+009  5.88314e+009  5.73483e+010
-0.082551  1.86312e+010  1.98724e+010  1.35924e+011
-0.102939  3.77797e+010  3.44297e+010  2.06274e+011
-0.123327  6.25086e+010  6.59725e+010  3.26031e+011
-0.143714  8.83525e+010  8.7311e+010  4.15349e+011
-0.164102  1.09375e+011  1.09368e+011  4.35735e+011
-0.18449  1.20102e+011  1.19377e+011  4.69383e+011
-0.204878  1.17429e+011  1.53161e+011  4.83084e+011
-0.225265  1.01772e+011  1.46379e+011  4.89614e+011
-0.245653  7.69907e+010  9.38531e+010  3.94462e+011
-0.266041  4.91381e+010  4.74658e+010  2.91893e+011
-0.286429  2.4505e+010  3.21805e+010  2.38203e+011
-0.306816  7.70105e+009  2.36014e+010  1.97419e+011
-0.327204  4.46446e+008  1.07878e+009  4.06772e+010
-0.347592  1.44323e+009  6.93473e+009  1.02155e+011
-0.36798  7.26659e+009  3.49299e+009  7.28129e+010
-0.388367  1.38447e+010  3.30173e+009  7.40374e+010
-0.408755  1.79268e+010  1.39599e+009  4.57608e+010
-0.429143  1.80167e+010  4.60742e+010  2.8027e+011
-0.449531  1.45166e+010  1.72552e+010  1.69762e+011
-0.469918  9.15928e+009  3.05415e+009  6.99179e+010
-0.490306  4.06238e+009  5.27682e+009  9.70532e+010
-0.510694  8.28382e+008  2.06999e+010  1.83338e+011
-0.531082  2.58879e+007  3.40593e+009  7.47703e+010
-0.551469  1.17967e+009  3.18486e+008  2.27763e+010
-0.571857  3.17457e+009  1.49177e+010  1.60638e+011
-0.592245  4.83142e+009  6.36589e+008  3.27628e+010
-0.612633  5.38985e+009  1.05704e+010  1.30789e+011
-0.63302  4.72163e+009  3.47806e+009  7.35678e+010
-0.653408  3.24255e+009  1.51278e+010  1.5752e+011
-0.673796  1.62119e+009  1.49976e+009  4.91816e+010
-0.694184  4.47037e+008  5.02124e+009  9.0916e+010
-0.714571  4.15178e+006  7.49138e+008  3.53079e+010
-0.734959  2.21749e+008  9.49262e+008  4.19363e+010
-0.755347  7.83703e+008  2.54424e+008  2.09059e+010
-0.775735  1.31559e+009  1.64014e+010  1.63377e+011
-0.796122  1.55288e+009  2.75212e+009  6.93338e+010
-0.81651  1.42344e+009  1.74937e+010  1.58982e+011
-0.836898  1.02948e+009  6.4384e+009  1.00077e+011
-0.857286  5.60678e+008  2.88601e+009  6.78735e+010
-0.877673  1.92343e+008  1.37891e+010  1.48133e+011
-0.898061  1.59082e+007  2.32365e+009  6.28421e+010
-0.918449  2.32131e+007  3.88396e+009  7.84832e+010
-0.938837  1.3713e+008  2.61822e+008  1.96818e+010
-0.959224  2.62821e+008  5.22131e+009  9.49729e+010
-0.979612  3.31767e+008  7.55844e+009  1.10645e+011
-1  3.21634e+008  3.78722e+009  7.73818e+010
Index: sansrealspace/src/sans/realspace/test/coreshell_d=0.1_Iq.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/coreshell_d=0.1_Iq.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,52 +1,0 @@
-PARS: {'core_sld': 1.0, 'thickness': 5, 'solvent_sld': 0.0, 'scale': 1.0, 'radius': 15, 'background': 0.0, 'shell_sld': -0.7297297297297296}
-<q>  <ana>  <sim>  <err>
-0.001  546.461  -7.27421e+008  1.37292e+009
-0.0213878  1.12037e+008  -6.32851e+008  1.34853e+009
-0.0417755  1.5392e+009  7.67197e+008  1.28774e+009
-0.0621633  6.85689e+009  6.09968e+009  1.20977e+009
-0.082551  1.86312e+010  1.7983e+010  1.13673e+009
-0.102939  3.77797e+010  3.73566e+010  1.08398e+009
-0.123327  6.25086e+010  6.23996e+010  1.05461e+009
-0.143714  8.83525e+010  8.85733e+010  1.0418e+009
-0.164102  1.09375e+011  1.09848e+011  1.03577e+009
-0.18449  1.20102e+011  1.20672e+011  1.02889e+009
-0.204878  1.17429e+011  1.17916e+011  1.01729e+009
-0.225265  1.01772e+011  1.02032e+011  1.00024e+009
-0.245653  7.69907e+010  7.69709e+010  9.79426e+008
-0.266041  4.91381e+010  4.88967e+010  9.58013e+008
-0.286429  2.4505e+010  2.41902e+010  9.39492e+008
-0.306816  7.70105e+009  7.49699e+009  9.26413e+008
-0.327204  4.46446e+008  5.06758e+008  9.1963e+008
-0.347592  1.44323e+009  1.83859e+009  9.18199e+008
-0.36798  7.26659e+009  7.96467e+009  9.19939e+008
-0.388367  1.38447e+010  1.47281e+010  9.22303e+008
-0.408755  1.79268e+010  1.88388e+010  9.23283e+008
-0.429143  1.80167e+010  1.88151e+010  9.21956e+008
-0.449531  1.45166e+010  1.51141e+010  9.18572e+008
-0.469918  9.15928e+009  9.5374e+009  9.14181e+008
-0.490306  4.06238e+009  4.25686e+009  9.10058e+008
-0.510694  8.28382e+008  8.98016e+008  9.0716e+008
-0.531082  2.58879e+007  2.04037e+007  9.05812e+008
-0.551469  1.17967e+009  1.12139e+009  9.05703e+008
-0.571857  3.17457e+009  3.05995e+009  9.06142e+008
-0.592245  4.83142e+009  4.64842e+009  9.06414e+008
-0.612633  5.38985e+009  5.13989e+009  9.06068e+008
-0.63302  4.72163e+009  4.43349e+009  9.05041e+008
-0.653408  3.24255e+009  2.97061e+009  9.0359e+008
-0.673796  1.62119e+009  1.42853e+009  9.02118e+008
-0.694184  4.47037e+008  3.81628e+008  9.00963e+008
-0.714571  4.15178e+006  7.92793e+007  9.00274e+008
-0.734959  2.21749e+008  4.09993e+008  8.9998e+008
-0.755347  7.83703e+008  1.02708e+009  8.99873e+008
-0.775735  1.31559e+009  1.54726e+009  8.99722e+008
-0.796122  1.55288e+009  1.72101e+009  8.99377e+008
-0.81651  1.42344e+009  1.50737e+009  8.98811e+008
-0.836898  1.02948e+009  1.0424e+009  8.98107e+008
-0.857286  5.60678e+008  5.39156e+008  8.97389e+008
-0.877673  1.92343e+008  1.78489e+008  8.96765e+008
-0.898061  1.59082e+007  4.03444e+007  8.9628e+008
-0.918449  2.32131e+007  9.55129e+007  8.95919e+008
-0.938837  1.3713e+008  2.4636e+008  8.95622e+008
-0.959224  2.62821e+008  3.86108e+008  8.95324e+008
-0.979612  3.31767e+008  4.45768e+008  8.94984e+008
-1  3.21634e+008  4.11445e+008  8.94592e+008
Index: sansrealspace/src/sans/realspace/test/coreshell_d=0.1_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/coreshell_d=0.1_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,52 +1,0 @@
-PARS: {'core_sld': 1.0, 'thickness': 5, 'solvent_sld': 0.0, 'scale': 1.0, 'radius': 15, 'background': 0.0, 'shell_sld': -0.7297297297297296}
-<q>  <ana>  <sim>  <err>
-0.001  546.461  6.9305e+006  6.35698e+006
-0.0213878  1.12037e+008  1.68978e+008  3.70253e+008
-0.0417755  1.5392e+009  1.07256e+009  2.0699e+009
-0.0621633  6.85689e+009  3.87464e+009  5.10377e+009
-0.082551  1.86312e+010  1.90073e+010  1.22829e+010
-0.102939  3.77797e+010  3.87483e+010  2.21376e+010
-0.123327  6.25086e+010  6.47701e+010  3.26543e+010
-0.143714  8.83525e+010  9.2365e+010  4.20165e+010
-0.164102  1.09375e+011  1.01115e+011  4.31731e+010
-0.18449  1.20102e+011  1.00671e+011  4.34356e+010
-0.204878  1.17429e+011  1.30585e+011  4.69878e+010
-0.225265  1.01772e+011  1.15828e+011  4.29907e+010
-0.245653  7.69907e+010  6.55518e+010  3.18003e+010
-0.266041  4.91381e+010  4.86895e+010  2.84409e+010
-0.286429  2.4505e+010  2.54433e+010  2.05071e+010
-0.306816  7.70105e+009  3.90553e+009  8.0109e+009
-0.327204  4.46446e+008  1.80111e+009  5.47593e+009
-0.347592  1.44323e+009  2.19471e+009  5.98723e+009
-0.36798  7.26659e+009  1.60673e+010  1.60877e+010
-0.388367  1.38447e+010  8.31296e+009  1.19335e+010
-0.408755  1.79268e+010  1.87001e+010  1.7552e+010
-0.429143  1.80167e+010  1.53246e+010  1.5979e+010
-0.449531  1.45166e+010  8.46704e+009  1.19446e+010
-0.469918  9.15928e+009  1.00565e+010  1.31606e+010
-0.490306  4.06238e+009  6.87222e+009  1.07643e+010
-0.510694  8.28382e+008  1.84683e+009  5.53302e+009
-0.531082  2.58879e+007  4.88396e+009  8.81205e+009
-0.551469  1.17967e+009  1.42076e+009  4.90195e+009
-0.571857  3.17457e+009  1.04674e+009  4.10931e+009
-0.592245  4.83142e+009  5.16756e+009  9.36037e+009
-0.612633  5.38985e+009  4.74891e+009  8.97335e+009
-0.63302  4.72163e+009  5.0429e+009  9.17435e+009
-0.653408  3.24255e+009  3.08742e+009  7.21224e+009
-0.673796  1.62119e+009  9.22474e+008  3.83059e+009
-0.694184  4.47037e+008  2.73855e+009  6.84996e+009
-0.714571  4.15178e+006  1.72505e+009  5.33631e+009
-0.734959  2.21749e+008  8.84279e+008  3.82889e+009
-0.755347  7.83703e+008  2.01607e+008  1.8597e+009
-0.775735  1.31559e+009  9.57234e+008  3.9553e+009
-0.796122  1.55288e+009  7.10999e+008  3.44087e+009
-0.81651  1.42344e+009  3.59538e+009  7.65374e+009
-0.836898  1.02948e+009  2.65828e+009  6.6712e+009
-0.857286  5.60678e+008  9.80808e+008  3.98234e+009
-0.877673  1.92343e+008  2.0201e+009  5.84993e+009
-0.898061  1.59082e+007  7.41857e+008  3.52562e+009
-0.918449  2.32131e+007  1.37519e+009  4.77188e+009
-0.938837  1.3713e+008  4.37348e+008  2.69662e+009
-0.959224  2.62821e+008  3.00008e+009  7.22066e+009
-0.979612  3.31767e+008  1.17961e+009  4.38027e+009
-1  3.21634e+008  1.71936e+007  5.35703e+008
Index: sansrealspace/src/sans/realspace/test/coreshell_d=10_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/coreshell_d=10_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,52 +1,0 @@
-PARS: {'core_sld': 1.0, 'thickness': 5, 'solvent_sld': 0.0, 'scale': 1.0, 'radius': 15, 'background': 0.0, 'shell_sld': -0.7297297297297296}
-<q>  <ana>  <sim>  <err>
-0.001  546.461  1.8291e+006  11016.1
-0.0213878  1.12037e+008  1.42867e+008  1.05964e+006
-0.0417755  1.5392e+009  1.56655e+009  1.14044e+007
-0.0621633  6.85689e+009  6.92762e+009  4.75868e+007
-0.082551  1.86312e+010  1.86485e+010  1.18483e+008
-0.102939  3.77797e+010  3.75096e+010  2.15985e+008
-0.123327  6.25086e+010  6.21069e+010  3.19636e+008
-0.143714  8.83525e+010  8.81222e+010  4.03087e+008
-0.164102  1.09375e+011  1.09753e+011  4.5117e+008
-0.18449  1.20102e+011  1.18811e+011  4.60297e+008
-0.204878  1.17429e+011  1.1731e+011  4.44316e+008
-0.225265  1.01772e+011  1.0078e+011  4.04571e+008
-0.245653  7.69907e+010  7.7844e+010  3.54115e+008
-0.266041  4.91381e+010  5.09974e+010  2.87986e+008
-0.286429  2.4505e+010  2.43381e+010  2.01105e+008
-0.306816  7.70105e+009  7.90615e+009  1.14903e+008
-0.327204  4.46446e+008  4.35924e+008  2.68936e+007
-0.347592  1.44323e+009  1.31768e+009  4.65984e+007
-0.36798  7.26659e+009  7.2098e+009  1.08625e+008
-0.388367  1.38447e+010  1.416e+010  1.52243e+008
-0.408755  1.79268e+010  1.80501e+010  1.72569e+008
-0.429143  1.80167e+010  1.82662e+010  1.7423e+008
-0.449531  1.45166e+010  1.42902e+010  1.54731e+008
-0.469918  9.15928e+009  9.60124e+009  1.26591e+008
-0.490306  4.06238e+009  3.93192e+009  8.05645e+007
-0.510694  8.28382e+008  7.73975e+008  3.56698e+007
-0.531082  2.58879e+007  1.53155e+007  4.99069e+006
-0.551469  1.17967e+009  1.38782e+009  4.75815e+007
-0.571857  3.17457e+009  3.39492e+009  7.46843e+007
-0.592245  4.83142e+009  4.93922e+009  9.03765e+007
-0.612633  5.38985e+009  5.62586e+009  9.68723e+007
-0.63302  4.72163e+009  4.21189e+009  8.39065e+007
-0.653408  3.24255e+009  2.83436e+009  6.86054e+007
-0.673796  1.62119e+009  1.70737e+009  5.32202e+007
-0.694184  4.47037e+008  4.48008e+008  2.71052e+007
-0.714571  4.15178e+006  2.87201e+007  6.87056e+006
-0.734959  2.21749e+008  2.18013e+008  1.89799e+007
-0.755347  7.83703e+008  6.38498e+008  3.24592e+007
-0.775735  1.31559e+009  1.36715e+009  4.76742e+007
-0.796122  1.55288e+009  1.55422e+009  5.0809e+007
-0.81651  1.42344e+009  1.17056e+009  4.40303e+007
-0.836898  1.02948e+009  1.30272e+009  4.64514e+007
-0.857286  5.60678e+008  5.85392e+008  3.10908e+007
-0.877673  1.92343e+008  2.47972e+008  2.01745e+007
-0.898061  1.59082e+007  1.01612e+007  4.0982e+006
-0.918449  2.32131e+007  5.18427e+007  9.24602e+006
-0.938837  1.3713e+008  1.54162e+008  1.59867e+007
-0.959224  2.62821e+008  3.74191e+008  2.48221e+007
-0.979612  3.31767e+008  2.79885e+008  2.15031e+007
-1  3.21634e+008  2.75996e+008  2.13277e+007
Index: sansrealspace/src/sans/realspace/test/coreshell_d=20_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/coreshell_d=20_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,52 +1,0 @@
-PARS: {'core_sld': 1.0, 'thickness': 5, 'solvent_sld': 0.0, 'scale': 1.0, 'radius': 15, 'background': 0.0, 'shell_sld': -0.7297297297297296}
-<q>  <ana>  <sim>  <err>
-0.001  546.461  1.15222e+006  5725.74
-0.0213878  1.12037e+008  1.22579e+008  972912
-0.0417755  1.5392e+009  1.65915e+009  5.90146e+006
-0.0621633  6.85689e+009  7.03626e+009  2.4005e+007
-0.082551  1.86312e+010  1.88339e+010  5.95793e+007
-0.102939  3.77797e+010  3.80021e+010  1.08655e+008
-0.123327  6.25086e+010  6.26906e+010  1.60378e+008
-0.143714  8.83525e+010  8.87598e+010  2.02532e+008
-0.164102  1.09375e+011  1.08325e+011  2.244e+008
-0.18449  1.20102e+011  1.20458e+011  2.31223e+008
-0.204878  1.17429e+011  1.17239e+011  2.22381e+008
-0.225265  1.01772e+011  1.03154e+011  2.04254e+008
-0.245653  7.69907e+010  7.80216e+010  1.77101e+008
-0.266041  4.91381e+010  4.94439e+010  1.41966e+008
-0.286429  2.4505e+010  2.50411e+010  1.01809e+008
-0.306816  7.70105e+009  7.51734e+009  5.59675e+007
-0.327204  4.46446e+008  4.36517e+008  1.3483e+007
-0.347592  1.44323e+009  1.47752e+009  2.46922e+007
-0.36798  7.26659e+009  7.39652e+009  5.49751e+007
-0.388367  1.38447e+010  1.41522e+010  7.6106e+007
-0.408755  1.79268e+010  1.7874e+010  8.58976e+007
-0.429143  1.80167e+010  1.80037e+010  8.65589e+007
-0.449531  1.45166e+010  1.42603e+010  7.717e+007
-0.469918  9.15928e+009  8.78846e+009  6.0712e+007
-0.490306  4.06238e+009  4.2486e+009  4.19399e+007
-0.510694  8.28382e+008  8.00143e+008  1.81116e+007
-0.531082  2.58879e+007  6.73064e+006  1.65766e+006
-0.551469  1.17967e+009  1.14883e+009  2.16792e+007
-0.571857  3.17457e+009  3.11495e+009  3.57412e+007
-0.592245  4.83142e+009  5.07361e+009  4.59031e+007
-0.612633  5.38985e+009  5.46415e+009  4.77128e+007
-0.63302  4.72163e+009  4.77654e+009  4.46111e+007
-0.653408  3.24255e+009  3.19319e+009  3.64724e+007
-0.673796  1.62119e+009  1.48657e+009  2.47478e+007
-0.694184  4.47037e+008  4.63526e+008  1.37879e+007
-0.714571  4.15178e+006  1.3219e+006  742295
-0.734959  2.21749e+008  2.16977e+008  9.44449e+006
-0.755347  7.83703e+008  8.60571e+008  1.88503e+007
-0.775735  1.31559e+009  1.42564e+009  2.42762e+007
-0.796122  1.55288e+009  1.52242e+009  2.51306e+007
-0.81651  1.42344e+009  1.25803e+009  2.28049e+007
-0.836898  1.02948e+009  1.23565e+009  2.26009e+007
-0.857286  5.60678e+008  5.01314e+008  1.43695e+007
-0.877673  1.92343e+008  1.57459e+008  8.05352e+006
-0.898061  1.59082e+007  2.31014e+007  3.09074e+006
-0.918449  2.32131e+007  4.63237e+006  1.3823e+006
-0.938837  1.3713e+008  1.50965e+008  7.91162e+006
-0.959224  2.62821e+008  3.0305e+008  1.11885e+007
-0.979612  3.31767e+008  3.22573e+008  1.15534e+007
-1  3.21634e+008  2.61916e+008  1.03893e+007
Index: sansrealspace/src/sans/realspace/test/coreshell_d=5_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/coreshell_d=5_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,52 +1,0 @@
-PARS: {'core_sld': 1.0, 'thickness': 5, 'solvent_sld': 0.0, 'scale': 1.0, 'radius': 15, 'background': 0.0, 'shell_sld': -0.7297297297297296}
-<q>  <ana>  <sim>  <err>
-0.001  546.461  47787.2  18653.3
-0.0213878  1.12037e+008  6.52179e+007  1.3764e+006
-0.0417755  1.5392e+009  1.44223e+009  2.21783e+007
-0.0621633  6.85689e+009  7.20904e+009  9.76105e+007
-0.082551  1.86312e+010  1.91008e+010  2.40753e+008
-0.102939  3.77797e+010  3.81118e+010  4.35188e+008
-0.123327  6.25086e+010  6.27312e+010  6.40772e+008
-0.143714  8.83525e+010  8.96516e+010  8.15055e+008
-0.164102  1.09375e+011  1.09255e+011  9.06679e+008
-0.18449  1.20102e+011  1.20694e+011  9.26622e+008
-0.204878  1.17429e+011  1.19804e+011  8.97211e+008
-0.225265  1.01772e+011  1.00669e+011  8.11389e+008
-0.245653  7.69907e+010  7.93911e+010  7.15105e+008
-0.266041  4.91381e+010  4.72989e+010  5.5592e+008
-0.286429  2.4505e+010  2.33427e+010  3.92859e+008
-0.306816  7.70105e+009  7.12407e+009  2.181e+008
-0.327204  4.46446e+008  6.25023e+008  6.43552e+007
-0.347592  1.44323e+009  1.33499e+009  9.376e+007
-0.36798  7.26659e+009  7.32794e+009  2.18939e+008
-0.388367  1.38447e+010  1.45087e+010  3.07687e+008
-0.408755  1.79268e+010  1.75176e+010  3.39799e+008
-0.429143  1.80167e+010  1.7349e+010  3.40499e+008
-0.449531  1.45166e+010  1.54066e+010  3.21199e+008
-0.469918  9.15928e+009  8.6321e+009  2.40258e+008
-0.490306  4.06238e+009  4.39657e+009  1.70859e+008
-0.510694  8.28382e+008  7.63671e+008  7.07651e+007
-0.531082  2.58879e+007  3.75936e+007  1.56903e+007
-0.551469  1.17967e+009  8.05605e+008  7.25129e+007
-0.571857  3.17457e+009  2.57005e+009  1.30117e+008
-0.592245  4.83142e+009  5.23706e+009  1.86784e+008
-0.612633  5.38985e+009  4.35429e+009  1.70916e+008
-0.63302  4.72163e+009  5.08359e+009  1.84484e+008
-0.653408  3.24255e+009  3.00826e+009  1.41533e+008
-0.673796  1.62119e+009  2.1508e+009  1.19144e+008
-0.694184  4.47037e+008  3.05289e+008  4.47605e+007
-0.714571  4.15178e+006  1.87591e+007  1.11599e+007
-0.734959  2.21749e+008  1.76982e+008  3.42118e+007
-0.755347  7.83703e+008  6.74246e+008  6.66859e+007
-0.775735  1.31559e+009  1.33327e+009  9.38255e+007
-0.796122  1.55288e+009  1.47054e+009  9.89272e+007
-0.81651  1.42344e+009  1.39127e+009  9.63056e+007
-0.836898  1.02948e+009  1.30233e+009  9.27107e+007
-0.857286  5.60678e+008  5.9545e+008  6.2795e+007
-0.877673  1.92343e+008  1.3826e+008  3.03185e+007
-0.898061  1.59082e+007  4.82192e+006  5.64448e+006
-0.918449  2.32131e+007  4.26263e+007  1.67843e+007
-0.938837  1.3713e+008  1.94705e+008  3.589e+007
-0.959224  2.62821e+008  2.70976e+008  4.2308e+007
-0.979612  3.31767e+008  3.48754e+008  4.80756e+007
-1  3.21634e+008  4.25282e+008  5.32365e+007
Index: sansrealspace/src/sans/realspace/test/cylinder_d=0.1_Iq.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/cylinder_d=0.1_Iq.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'length': 100, 'radius': 20, 'background': 0.0, 'cyl_theta': 1.0, 'contrast': 1.0, 'cyl_phi': 1.0}
-<q>  <ana>  <sim>  <err>
-0.001  1.2562e+013  1.25607e+013  3.67864e+009
-0.0217917  1.06945e+013  1.0691e+013  3.21973e+009
-0.0425833  6.98848e+012  6.98558e+012  2.39648e+009
-0.063375  3.89546e+012  3.89885e+012  1.75747e+009
-0.0841667  2.15182e+012  2.15808e+012  1.39268e+009
-0.104958  1.16773e+012  1.17248e+012  1.18625e+009
-0.12575  5.3522e+011  5.41059e+011  1.05731e+009
-0.146542  2.02193e+011  2.09984e+011  9.86651e+008
-0.167333  6.56338e+010  7.18402e+010  9.52195e+008
-0.188125  1.38312e+010  1.79966e+010  9.34606e+008
-0.208917  1.1972e+010  1.57779e+010  9.27539e+008
-0.229708  2.57696e+010  2.86744e+010  9.24382e+008
-0.2505  2.81981e+010  2.99685e+010  9.20381e+008
-0.271292  2.43503e+010  2.60824e+010  9.16284e+008
-0.292083  1.74679e+010  1.9053e+010  9.12237e+008
-0.312875  7.68598e+009  8.71654e+009  9.08067e+008
-0.333667  2.24612e+009  3.3301e+009  9.04986e+008
-0.354458  1.50351e+009  2.74945e+009  9.02909e+008
-0.37525  1.76444e+009  2.73377e+009  9.01113e+008
-0.396042  3.30229e+009  4.21174e+009  8.99704e+008
-0.416833  4.45731e+009  5.54871e+009  8.98392e+008
-0.437625  3.52632e+009  4.50585e+009  8.96801e+008
-0.458417  2.26254e+009  3.02617e+009  8.95224e+008
-0.479208  1.229e+009  1.96096e+009  8.93779e+008
-0.5  2.3872e+008  9.34726e+008  8.92399e+008
Index: sansrealspace/src/sans/realspace/test/cylinder_d=0.5_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/cylinder_d=0.5_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'length': 100, 'radius': 20, 'background': 0.0, 'cyl_theta': 1.5707963267948966, 'contrast': 1.0, 'cyl_phi': 1.5707963267948966}
-<q>  <ana>  <sim>  <err>
-0.001  1.25586e+013  1.25584e+013  5.24372e+008
-0.00929167  1.1909e+013  1.19119e+013  1.04128e+010
-0.0175833  1.0341e+013  1.03444e+013  3.11005e+010
-0.025875  8.16205e+012  8.19485e+012  5.13766e+010
-0.0341667  5.77306e+012  5.76297e+012  6.22366e+010
-0.0424583  3.56425e+012  3.54391e+012  5.90911e+010
-0.05075  1.82415e+012  1.8406e+012  4.53958e+010
-0.0590417  6.86403e+011  6.94445e+011  2.73011e+010
-0.0673333  1.26379e+011  1.26541e+011  1.08456e+010
-0.075625  1.69416e+009  1.95158e+009  1.23535e+009
-0.0839167  1.17674e+011  1.26397e+011  9.39118e+009
-0.0922083  2.93262e+011  2.85994e+011  1.40496e+010
-0.1005  4.06932e+011  4.13645e+011  1.72159e+010
-0.108792  4.1248e+011  4.28788e+011  1.82404e+010
-0.117083  3.26735e+011  3.25064e+011  1.63836e+010
-0.125375  2.00372e+011  1.90569e+011  1.27255e+010
-0.133667  8.63351e+010  8.94079e+010  8.63641e+009
-0.141958  1.76833e+010  1.23431e+010  3.16684e+009
-0.15025  2.29778e+008  1.37597e+008  3.31662e+008
-0.158542  1.83678e+010  2.03592e+010  4.03062e+009
-0.166833  4.78555e+010  4.76265e+010  6.15775e+009
-0.175125  6.83196e+010  6.19958e+010  7.01335e+009
-0.183417  7.03999e+010  7.12558e+010  7.51039e+009
-0.191708  5.61199e+010  5.79624e+010  6.79382e+009
-0.2  3.43293e+010  3.93938e+010  5.56512e+009
Index: sansrealspace/src/sans/realspace/test/cylinder_d=1_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/cylinder_d=1_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'length': 100, 'radius': 20, 'background': 0.0, 'cyl_theta': 1.0, 'contrast': 1.0, 'cyl_phi': 1.0}
-<q>  <ana>  <sim>  <err>
-0.001  1.25586e+013  1.25585e+013  2.62063e+008
-0.00929167  1.1909e+013  1.19112e+013  5.21255e+009
-0.0175833  1.0341e+013  1.03476e+013  1.55295e+010
-0.025875  8.16205e+012  8.14775e+012  2.58886e+010
-0.0341667  5.77306e+012  5.76393e+012  3.11733e+010
-0.0424583  3.56425e+012  3.5892e+012  2.95574e+010
-0.05075  1.82415e+012  1.84182e+012  2.26526e+010
-0.0590417  6.86403e+011  6.78248e+011  1.34722e+010
-0.0673333  1.26379e+011  1.24533e+011  5.37752e+009
-0.075625  1.69416e+009  2.00737e+009  6.27927e+008
-0.0839167  1.17674e+011  1.17611e+011  4.55543e+009
-0.0922083  2.93262e+011  2.99299e+011  7.16101e+009
-0.1005  4.06932e+011  4.18146e+011  8.68167e+009
-0.108792  4.1248e+011  4.01046e+011  8.84498e+009
-0.117083  3.26735e+011  3.16525e+011  8.09549e+009
-0.125375  2.00372e+011  2.01046e+011  6.51183e+009
-0.133667  8.63351e+010  8.55105e+010  4.22216e+009
-0.141958  1.76833e+010  2.01817e+010  2.02658e+009
-0.15025  2.29778e+008  2.30259e+008  2.14584e+008
-0.158542  1.83678e+010  2.06003e+010  2.01657e+009
-0.166833  4.78555e+010  4.6418e+010  3.03196e+009
-0.175125  6.83196e+010  6.62813e+010  3.62839e+009
-0.183417  7.03999e+010  7.04295e+010  3.76065e+009
-0.191708  5.61199e+010  5.71321e+010  3.38173e+009
-0.2  3.43293e+010  3.37377e+010  2.57894e+009
Index: sansrealspace/src/sans/realspace/test/early_test.py
===================================================================
--- sansrealspace/src/sans/realspace/test/early_test.py	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,294 +1,0 @@
-
-import VolumeCanvas
-from sans.models.SphereModel import SphereModel
-from sans.models.CoreShellModel import CoreShellModel
-
-import math, time
-    
-def form_factor(q, r):
-    qr = q*r
-    f = 3*( math.sin(qr) - qr*math.cos(qr) ) / (qr*qr*qr)
-    return f*f
-    
-def test_1():
-    
-    radius = 15
-    
-    density = .1
-    vol = 4/3*math.pi*radius*radius*radius
-    npts = vol*density
-     
-    canvas = VolumeCanvas.VolumeCanvas()
-    canvas.setParam('lores_density', density)
-    handle = canvas.add('sphere')
-    canvas.setParam('%s.radius' % handle, radius)
-    canvas.setParam('%s.contrast' % handle, 1.0)
-    
-    
-    if False:
-        # Time test
-        t_0 = time.time()
-        value_1 = 1.0e8*canvas.getIq(0.1)
-        print "density = 0.1:  output=%g  time=%g" % (value_1, time.time()-t_0)
-        
-        t_0 = time.time()
-        canvas.setParam('lores_density', 1)
-        value_1 = 1.0e8*canvas.getIq(0.1)
-        print "density = 1000:  output=%g  time=%g" % (value_1, time.time()-t_0)
-        
-        t_0 = time.time()
-        canvas.setParam('lores_density', 0.01)
-        value_1 = 1.0e8*canvas.getIq(0.1)
-        print "density = 0.00001:  output=%g  time=%g" % (value_1, time.time()-t_0)
-        print
-    
-    
-    sphere = SphereModel()
-    sphere.setParam('radius', radius)
-    sphere.setParam('scale', 1.0)
-    sphere.setParam('contrast', 1.0)
-        
-        
-    # Simple sphere sum(Pr) = (rho*V)^2    
-    # each p(r) point has a volume of 1/density    
-        
-    for i in range(35):
-        q = 0.001 + 0.01*i
-        
-        
-        
-        #sim_1 = 1.0e8*canvas.getIq(q)*4/3*math.pi/(density*density*density)
-        sim_1 = canvas.getIq(q)
-        ana_1 = sphere.run(q)
-        #ana_1 = form_factor(q, radius)
-        
-        print "q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1)
-    
-def test_2():
-    radius = 15.0
-    thickness = 5.0
-    
-    core_vol = 4.0/3.0*math.pi*radius*radius*radius
-    outer_radius = radius+thickness
-    shell_vol = 4.0/3.0*math.pi*outer_radius*outer_radius*outer_radius - core_vol
-    shell_sld = -1.0*core_vol/shell_vol
-    print "Shell SLD", shell_sld
-
-    
-    density = .1
-    vol = 4/3*math.pi*radius*radius*radius
-    npts = vol*density
-     
-    canvas = VolumeCanvas.VolumeCanvas()
-    canvas.setParam('lores_density', density)
-    handle = canvas.add('sphere')
-    canvas.setParam('%s.radius' % handle, outer_radius)
-    canvas.setParam('%s.contrast' % handle, shell_sld)
-   
-    handle2 = canvas.add('sphere')
-    canvas.setParam('%s.radius' % handle2, radius)
-    canvas.setParam('%s.contrast' % handle2, 1.0)
-   
-   
-   
-    # Core-shell
-    sphere = CoreShellModel()
-    # Core radius
-    sphere.setParam('radius', radius)
-    # Shell thickness
-    sphere.setParam('thickness', thickness)
-    sphere.setParam('core_sld', 1.0)
-    
-    
-    sphere.setParam('shell_sld', shell_sld)
-    sphere.setParam('solvent_sld',0.0)
-    sphere.setParam('background',0.0)
-    sphere.setParam('scale',1.0)
-   
-    out = open("lores_test.txt",'w')
-    out.write("<q> <sim> <ana>\n")
-    
-    for i in range(65):
-        q = 0.001 + 0.01*i
-        
-        # For each volume integral that we change to a sum,
-        # we must multiply by 1/density = V/N
-        # Since we want P(r)/V, we will need to multiply
-        # the sum by 1/(N*density), where N is the number of
-        # points without overlap. Since we already divide
-        # by N when calculating I(q), we only need to divide
-        # by the density here. We divide by N in the 
-        # calculation because it is difficult to estimate it here.
-        
-        
-        # Put the factor 2 in the simulation two...
-        sim_1 = canvas.getIq(q)
-        ana_1 = sphere.run(q)
-        
-        print "q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1)
-        out.write( "%g  %g  %g\n" % (q, sim_1, ana_1))
-
-    out.close()
-
-def test_4():
-    radius = 15
-    
-    density = .1
-    vol = 4/3*math.pi*radius*radius*radius
-    npts = vol*density
-
-    
-    canvas = VolumeCanvas.VolumeCanvas()
-    canvas.setParam('lores_density', density)
-    #handle = canvas.add('sphere')
-    #canvas.setParam('%s.radius' % handle, radius)
-    #canvas.setParam('%s.contrast' % handle, 1.0)
-    
-    pdb = canvas.add('test.pdb')
-    
-    
-    
-    sphere = SphereModel()
-    sphere.setParam('radius', radius)
-    sphere.setParam('scale', 1.0)
-    sphere.setParam('contrast', 1.0)
-        
-        
-    # Simple sphere sum(Pr) = (rho*V)^2    
-    # each p(r) point has a volume of 1/density    
-        
-    for i in range(35):
-        q = 0.001 + 0.01*i
-        
-        
-        
-        #sim_1 = 1.0e8*canvas.getIq(q)*4/3*math.pi/(density*density*density)
-        sim_1 = canvas.getIq(q)
-        ana_1 = sphere.run(q)
-        #ana_1 = form_factor(q, radius)
-        
-        print "q=%g  sim=%g  ana=%g   ratio=%g" % (q, sim_1, ana_1, sim_1/ana_1)
-
-def test_5():
-    from sans.models.SphereModel import SphereModel
-    model = VolumeCanvas.VolumeCanvas()
-    
-    handle = model.add('sphere')
-    
-    radius = 10
-    density = .1
-    
-    ana = SphereModel()
-    ana.setParam('scale', 1.0)
-    ana.setParam('contrast', 1.0)
-    ana.setParam('background', 0.0)
-    ana.setParam('radius', radius)
-    
-    model.setParam('lores_density', density)
-    model.setParam('%s.radius' % handle, radius)
-    model.setParam('scale' , 1.0)
-    model.setParam('%s.contrast' % handle, 1.0)
-    model.setParam('background' , 0.0)
-    
-    ana = ana.runXY([0.1, 0.1])
-    sim = model.getIq2D(0.1, 0.1)
-    print ana, sim, sim/ana, ana/sim
-
-def test_6():
-    from sans.models.CylinderModel import CylinderModel
-    radius = 5
-    length = 40
-    density = 20
-    
-    ana = CylinderModel()
-    ana.setParam('scale', 1.0)
-    ana.setParam('contrast', 1.0)
-    ana.setParam('background', 0.0)
-    ana.setParam('radius', radius)
-    ana.setParam('length', length)
-    
-    # Along Y
-    ana.setParam('cyl_theta', 1.57)
-    ana.setParam('cyl_phi', 1.57)
-    
-    # Along Z
-    #ana.setParam('cyl_theta', 0)
-    #ana.setParam('cyl_phi', 0)
-    
-    model = VolumeCanvas.VolumeCanvas()    
-    handle = model.add('cylinder')
-    model.setParam('lores_density', density)
-    model.setParam('%s.radius' % handle, radius)
-    model.setParam('%s.length' % handle, length)
-    model.setParam('scale' , 1.0)
-    model.setParam('%s.contrast' % handle, 1.0)
-    model.setParam('background' , 0.0)
-    
-    # Along Y
-    model.setParam('%s.orientation' % handle, [0,0,0])
-    
-    # Along Z
-    #model.setParam('%s.orientation' % handle, [1.57,0,0])
-    
-    
-    print model.npts
-    for i in range(40):
-        qmax = 0.5
-        anaX = ana.runXY([qmax*i/40.0, 0.0])
-        simX = model.getIq2D(qmax*i/40.0, 0.0)
-        
-        anaY = ana.runXY([0, qmax*i/40.0])
-        simY = model.getIq2D(0, qmax*i/40.0)
-        print anaX, simX, simX/anaX, '|', anaY, simY, simY/anaY
-    
-def test_7():
-    from sans.models.CoreShellModel import CoreShellModel
-    print "Testing core-shell"
-    radius = 15
-    thickness = 5
-    density = 5
-    
-    core_vol = 4.0/3.0*math.pi*radius*radius*radius
-    outer_radius = radius+thickness
-    shell_vol = 4.0/3.0*math.pi*outer_radius*outer_radius*outer_radius - core_vol
-    shell_sld = -1.0*core_vol/shell_vol
-
-    # Core-shell
-    sphere = CoreShellModel()
-    # Core radius
-    sphere.setParam('radius', radius)
-    # Shell thickness
-    sphere.setParam('thickness', thickness)
-    sphere.setParam('core_sld', 1.0)
-    sphere.setParam('shell_sld', shell_sld)
-    sphere.setParam('solvent_sld', 0.0)
-    sphere.setParam('background', 0.0)
-    sphere.setParam('scale', 1.0)
-    ana = sphere
-   
-    canvas = VolumeCanvas.VolumeCanvas()        
-    canvas.setParam('lores_density', density)
-    
-    handle = canvas.add('sphere')
-    canvas.setParam('%s.radius' % handle, outer_radius)
-    canvas.setParam('%s.contrast' % handle, shell_sld)
-   
-    handle2 = canvas.add('sphere')
-    canvas.setParam('%s.radius' % handle2, radius)
-    canvas.setParam('%s.contrast' % handle2, 1.0)
-           
-    canvas.setParam('scale' , 1.0)
-    canvas.setParam('background' , 0.0)
-    
-               
-    """ Testing default core-shell orientation """
-    qlist = [.0001, 0.002, .01, .1, 1.0, 5.]
-    for q in qlist:
-        ana_val = ana.runXY([q, 0.2])
-        sim_val, err = canvas.getIq2DError(q, 0.2)
-        print ana_val, sim_val, sim_val/ana_val, err, (sim_val-ana_val)/err
-    
-    
-    
-if __name__ == "__main__":
-    test_6()
Index: sansrealspace/src/sans/realspace/test/ellipsoid_d=0.05_Iq.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/ellipsoid_d=0.05_Iq.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'axis_theta': 1.5700000000000001, 'radius_b': 15, 'radius_a': 20, 'axis_phi': 0.0, 'background': 0.0, 'contrast': 1.0}
-<q>  <ana>  <sim>  <err>
-0.001  1.88485e+012  1.88189e+012  7.35402e+009
-0.0217917  1.83483e+012  1.83147e+012  7.18365e+009
-0.0425833  1.69985e+012  1.69545e+012  6.73107e+009
-0.063375  1.49672e+012  1.49089e+012  6.07014e+009
-0.0841667  1.24958e+012  1.24229e+012  5.30092e+009
-0.104958  9.8564e+011  9.77186e+011  4.52402e+009
-0.12575  7.30614e+011  7.21587e+011  3.81724e+009
-0.146542  5.05003e+011  4.96139e+011  3.22446e+009
-0.167333  3.21752e+011  3.13778e+011  2.76003e+009
-0.188125  1.85658e+011  1.79144e+011  2.41966e+009
-0.208917  9.43704e+010  8.96235e+010  2.18869e+009
-0.229708  4.04806e+010  3.75119e+010  2.04629e+009
-0.2505  1.40738e+010  1.2626e+010  1.96861e+009
-0.271292  5.08948e+009  4.7208e+009  1.93221e+009
-0.292083  5.04776e+009  5.24445e+009  1.91756e+009
-0.312875  7.9394e+009  8.22924e+009  1.91088e+009
-0.333667  1.033e+010  1.0371e+010  1.90448e+009
-0.354458  1.09014e+010  1.05292e+010  1.89551e+009
-0.37525  9.72349e+009  8.95211e+009  1.88421e+009
-0.396042  7.52237e+009  6.50489e+009  1.87219e+009
-0.416833  5.12122e+009  4.08427e+009  1.86111e+009
-0.437625  3.12049e+009  2.29207e+009  1.85209e+009
-0.458417  1.79654e+009  1.34508e+009  1.84545e+009
-0.479208  1.14661e+009  1.14435e+009  1.84089e+009
-0.5  9.98764e+008  1.41508e+009  1.83776e+009
Index: sansrealspace/src/sans/realspace/test/ellipsoid_d=0.5_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/ellipsoid_d=0.5_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'axis_theta': 1.5700000000000001, 'radius_b': 15, 'radius_a': 20, 'axis_phi': 0.0, 'background': 0.0, 'contrast': 1.0}
-<q>  <ana>  <sim>  <err>
-0.001  1.88485e+012  1.8847e+012  4.10542e+008
-0.0217917  1.83608e+012  1.83655e+012  3.06675e+009
-0.0425833  1.70412e+012  1.7055e+012  9.72073e+009
-0.063375  1.50455e+012  1.50079e+012  1.85184e+010
-0.0841667  1.26003e+012  1.25632e+012  2.61434e+010
-0.104958  9.96513e+011  9.90983e+011  3.1059e+010
-0.12575  7.39268e+011  7.36377e+011  3.15408e+010
-0.146542  5.09224e+011  5.10729e+011  2.90619e+010
-0.167333  3.2051e+011  3.07972e+011  2.32998e+010
-0.188125  1.7944e+011  1.84463e+011  1.76986e+010
-0.208917  8.49775e+010  8.71545e+010  1.18554e+010
-0.229708  3.04121e+010  2.86599e+010  6.56268e+009
-0.2505  5.71493e+009  6.81516e+009  3.12076e+009
-0.271292  8.04693e+006  9.03155e+007  3.61655e+008
-0.292083  3.62647e+009  3.03417e+009  2.08145e+009
-0.312875  9.43653e+009  1.08412e+010  3.95509e+009
-0.333667  1.32991e+010  1.67259e+010  5.05345e+009
-0.354458  1.37812e+010  1.21334e+010  4.3185e+009
-0.37525  1.13721e+010  1.17844e+010  4.23494e+009
-0.396042  7.51749e+009  7.34231e+009  3.35522e+009
-0.416833  3.75654e+009  6.72932e+009  3.19781e+009
-0.437625  1.14945e+009  2.84868e+008  6.53813e+008
-0.458417  5.78751e+007  9.3358e+007  3.75074e+008
-0.479208  2.29357e+008  1.40995e+009  1.44511e+009
-0.5  1.0643e+009  7.04596e+008  1.02303e+009
Index: sansrealspace/src/sans/realspace/test/helix_d=0.05_Iq.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/helix_d=0.05_Iq.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'q_max': 0.10000000000000001, 'lores_density': 0.050000000000000003, 'background': 0.0, 'scale': 1.0}
-<q>  <ana>  <sim>  <err>
-0.001  1  3.3589e+011  7.32709e+009
-0.0217917  1  2.88542e+011  6.46473e+009
-0.0425833  1  1.95952e+011  4.95096e+009
-0.063375  1  1.21406e+011  3.811e+009
-0.0841667  1  8.12728e+010  3.1642e+009
-0.104958  1  5.70219e+010  2.77326e+009
-0.12575  1  3.7538e+010  2.49052e+009
-0.146542  1  2.3773e+010  2.29431e+009
-0.167333  1  1.61515e+010  2.1751e+009
-0.188125  1  1.39993e+010  2.12225e+009
-0.208917  1  1.62402e+010  2.12553e+009
-0.229708  1  1.93111e+010  2.14395e+009
-0.2505  1  2.01724e+010  2.1398e+009
-0.271292  1  1.90299e+010  2.11382e+009
-0.292083  1  1.69669e+010  2.07787e+009
-0.312875  1  1.4305e+010  2.03583e+009
-0.333667  1  1.13903e+010  1.99203e+009
-0.354458  1  8.76787e+009  1.95283e+009
-0.37525  1  6.91759e+009  1.9236e+009
-0.396042  1  6.09987e+009  1.90724e+009
-0.416833  1  6.01727e+009  1.90011e+009
-0.437625  1  6.09422e+009  1.89539e+009
-0.458417  1  6.07945e+009  1.89004e+009
-0.479208  1  5.93162e+009  1.8835e+009
-0.5  1  5.57243e+009  1.87481e+009
Index: sansrealspace/src/sans/realspace/test/sim_validation.py
===================================================================
--- sansrealspace/src/sans/realspace/test/sim_validation.py	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,344 +1,0 @@
-"""
-    Validation tests for real-space simulation of I(q)
-    
-    @copyright: University of Tennessee, 2007
-    @license: This software is provided as part of the DANSE project
-"""
-import math, time, pylab
-
-try:
-    import VolumeCanvas
-    print "Testing local version"
-except:
-    print "Testing installed version"
-    import sans.realspace.VolumeCanvas as VolumeCanvas
-     
-class Validator:
- 
-    def __init__(self):
-        self.density = 0.1
-        self.canvas  = None
-        self.ana     = None
-        self.create()
-        
-    def create(self):
-        pass
-         
-    def run_sim2D(self, qx, qy, density=None):
-        """
-            Calculate the mean and error of the simulation
-            @param q: q-value to calculate at
-            @param density: point density of simulation
-            #return: mean, error
-        """
-        if not density == None:
-            self.density = density
-            self.create()
-        
-        return self.canvas.getIq2DError(qx, qy)
-    
-    def run_sim(self, q, density=None):
-        """
-            Calculate the mean and error of the simulation
-            @param q: q-value to calculate at
-            @param density: point density of simulation
-            #return: mean, error
-        """
-        if not density == None:
-            self.density = density
-            self.create()
-        
-        return self.canvas.getIqError(q)
-         
-    def run_ana2D(self, qx, qy):
-        """
-            Return analytical value
-            @param q: q-value to evaluate at [float]
-            @return: analytical output [float]
-        """
-        return self.ana.runXY([qx, qy]) 
-         
-    def run_ana(self, q):
-        """
-            Return analytical value
-            @param q: q-value to evaluate at [float]
-            @return: analytical output [float]
-        """
-        return self.ana.run(q)      
-    
-class SphereValidator(Validator):
-    
-    def __init__(self, radius=15, density = 0.01):
-        from sans.models.SphereModel import SphereModel
-        
-        self.name = 'sphere'
-        self.radius = radius
-        self.density = density
-        
-        self.ana = SphereModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius', radius)
-        self.create()
-       
-    def create(self):
-        canvas = VolumeCanvas.VolumeCanvas()
-        canvas.setParam('lores_density', self.density)
-        handle = canvas.add('sphere')
-        canvas.setParam('%s.radius' % handle, self.radius)
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('%s.contrast' % handle, 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas   
-           
-class CylinderValidator(Validator):
-    
-    def __init__(self, radius=15, length=100, density = 0.01):
-        from sans.models.CylinderModel import CylinderModel
-        
-        self.name = 'cylinder'
-        self.radius = radius
-        self.length = length
-        self.density = density
-        
-        self.ana = CylinderModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius', radius)
-        self.ana.setParam('length', length)
-        self.ana.setParam('cyl_theta', math.pi/2.0)
-        self.ana.setParam('cyl_phi', math.pi/2.0)
-        self.create()
-       
-    def create(self):
-        canvas = VolumeCanvas.VolumeCanvas()
-        canvas.setParam('lores_density', self.density)
-        handle = canvas.add('cylinder')
-        canvas.setParam('%s.radius' % handle, self.radius)
-        canvas.setParam('%s.length' % handle, self.length)
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('%s.contrast' % handle, 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas   
-           
-class EllipsoidValidator(Validator):
-    
-    def __init__(self, radius_a=60, radius_b=10, density = 0.01):
-        from sans.models.EllipsoidModel import EllipsoidModel
-        #from sans.models.SphereModel import SphereModel
-        
-        self.name = 'ellipsoid'
-        self.radius_a = radius_a
-        self.radius_b = radius_b
-        self.density = density
-        
-        self.ana = EllipsoidModel()
-        #self.ana = SphereModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius_a', radius_a)
-        self.ana.setParam('radius_b', radius_b)
-        #self.ana.setParam('radius', radius_a)
-        
-        # Default orientation is there=1.57, phi=0
-        # Radius_a is along the x direction
-
-        self.create()
-       
-    def create(self):
-        canvas = VolumeCanvas.VolumeCanvas()
-        canvas.setParam('lores_density', self.density)
-        handle = canvas.add('ellipsoid')
-        canvas.setParam('%s.radius_x' % handle, self.radius_a)
-        canvas.setParam('%s.radius_y' % handle, self.radius_b)
-        canvas.setParam('%s.radius_z' % handle, self.radius_b)
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('%s.contrast' % handle, 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas
-           
-class HelixValidator(Validator):
-    
-    def __init__(self, density = 0.01):
-        self.name = 'helix'
-        self.density = density
-        self.create()
-       
-    def create(self):
-        canvas = VolumeCanvas.VolumeCanvas()
-        canvas.setParam('lores_density', self.density)
-        handle = canvas.add('singlehelix')
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('%s.contrast' % handle, 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas
-        # just to write the parameters to the output file
-        self.ana = canvas
-        
-    def run_ana(self, q):
-        return 1
-
-           
-class CoreShellValidator(Validator):
-    
-    def __init__(self, radius=15, thickness=5, density = 0.01):
-        from sans.models.CoreShellModel import CoreShellModel
-        
-        self.name = 'coreshell'
-        self.radius = radius
-        
-        core_vol = 4.0/3.0*math.pi*radius*radius*radius
-        self.outer_radius = radius+thickness
-        shell_vol = 4.0/3.0*math.pi*self.outer_radius*self.outer_radius*self.outer_radius - core_vol
-        self.shell_sld = -1.0*core_vol/shell_vol
-
-        self.density = density
-           
-        # Core-shell
-        sphere = CoreShellModel()
-        # Core radius
-        sphere.setParam('radius', self.radius)
-        # Shell thickness
-        sphere.setParam('thickness', thickness)
-        sphere.setParam('core_sld', 1.0)
-        sphere.setParam('shell_sld', self.shell_sld)
-        sphere.setParam('solvent_sld', 0.0)
-        sphere.setParam('background', 0.0)
-        sphere.setParam('scale', 1.0)
-        self.ana = sphere
-        self.create()
-       
-    def create(self):
-        canvas = VolumeCanvas.VolumeCanvas()        
-        canvas.setParam('lores_density', self.density)
-        
-        handle = canvas.add('sphere')
-        canvas.setParam('%s.radius' % handle, self.outer_radius)
-        canvas.setParam('%s.contrast' % handle, self.shell_sld)
-       
-        handle2 = canvas.add('sphere')
-        canvas.setParam('%s.radius' % handle2, self.radius)
-        canvas.setParam('%s.contrast' % handle2, 1.0)
-               
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas 
-           
-def validate_model(validator, q_min, q_max, n_q):
-    """
-         Validate a model
-         An output file containing a comparison between
-         simulation and the analytical solution will be
-         produced.
-         
-         @param validator: validator object
-         @param q_min: minimum q
-         @param q_max: maximum q
-         @param n_q: number of q points
-         @param N: number of times to evaluate each simulation point
-    """
-    
-    q_list = pylab.arange(q_min, q_max*1.0001, (q_max-q_min)/(n_q-1))
-    
-    output = open('%s_d=%g_Iq.txt' % (validator.name, validator.density), 'w')
-    output.write("PARS: %s\n" % validator.ana.params)
-    output.write("<q>  <ana>  <sim>  <err>\n")
-    for q in q_list:
-        ana = validator.run_ana(q)
-        sim, err = validator.run_sim(q)
-        print "q=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%-g) %s" % (q, ana, sim, err, 
-                        (sim-ana), sim/ana, str(math.fabs(sim-ana)>err))
-        output.write("%g  %g  %g  %g\n" % (q, ana, sim, err))
-    output.close()
-       
-def validate_model_2D(validator, q_min, q_max, phi, n_q):
-    """
-         Validate a model
-         An output file containing a comparison between
-         simulation and the analytical solution will be
-         produced.
-         
-         @param validator: validator object
-         @param q_min: minimum q
-         @param q_max: maximum q
-         @param n_q: number of q points
-         @param N: number of times to evaluate each simulation point
-    """
-    
-    q_list = pylab.arange(q_min, q_max*1.0001, (q_max-q_min)/(n_q-1))
-    
-    output = open('%s_d=%g_Iq2D.txt' % (validator.name, validator.density), 'w')
-    output.write("PARS: %s\n" % validator.ana.params)
-    output.write("<q>  <ana>  <sim>  <err>\n")
-    t_0 = time.time()
-    for q in q_list:
-        ana = validator.run_ana2D(q*math.cos(phi), q*math.sin(phi))
-        sim, err = validator.run_sim2D(q*math.cos(phi), q*math.sin(phi))
-        print "q=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%-g) %s" % (q, ana, sim, err, 
-                        (sim-ana), sim/ana, str(math.fabs(sim-ana)>err))
-        output.write("%g  %g  %g  %g\n" % (q, ana, sim, err))
-    print "Time elapsed: ", time.time()-t_0
-    output.close()
-       
-def check_density(validator, q, d_min, d_max, n_d): 
-    """
-       Check simulation output as a function of the density
-       An output file containing a comparison between
-       simulation and the analytical solution will be
-       produced.
-       
-       @param validator: validator object
-       @param q: q-value to evaluate at
-       @param d_min: minimum density
-       @param d_max: maximum density
-       @param n_d: number of density points
-       @param N: number of times to evaluate each simulation point
-    """
-    d_list = pylab.arange(d_min, d_max*1.0001, (d_max-d_min)/(n_d-1.0))
-    
-    output = open('%s_%g_density.txt' % (validator.name, q), 'w')
-    output.write("PARS: %s\n" % validator.ana.params)
-    output.write("<density>  <ana_d>  <sim_d>  <err_d>\n")
-    ana = validator.run_ana(q)
-    for d in d_list:
-        sim, err = validator.run_sim(q, density=d)
-        print "d=%-g  ana=%-g  sim=%-g  err=%-g  diff=%-g (%g) %s" % \
-            (d, ana, sim, err, (sim-ana), (sim-ana)/ana, 
-             str(math.fabs(sim-ana)>err))
-        output.write("%g  %g  %g  %g \n" % (d, ana, sim, err))
-    output.close()
-
-    
-if __name__ == '__main__':
-    
-    # 2D: Density=5, 71.2 secs for 50 points
-    #vali = CoreShellValidator(radius = 15, thickness=5, density = 5.0)
-    #validate_model(vali, q_min=0.001, q_max=1, n_q=50)
-    #validate_model_2D(vali, q_min=0.001, q_max=1, phi=1.0, n_q=50)
-
-    # 2D: Density=2, 11.1 secs for 25 points
-    #vali = SphereValidator(radius = 20, density = 0.02)
-    #validate_model(vali, q_min=0.001, q_max=0.5, n_q=25)
-    #vali = SphereValidator(radius = 20, density = 2.0)
-    #validate_model_2D(vali, q_min=0.001, q_max=0.5, phi=1.0, n_q=25)
-    
-    # 2D: Density=1, 19.4 secs for 25 points
-    # 2D: Density=0.5, 9.8 secs for 25 points
-    #vali = CylinderValidator(radius = 20, length=100, density = 0.1)
-    #validate_model(vali, q_min=0.001, q_max=0.5, n_q=25)
-    vali = CylinderValidator(radius = 20, length=100, density = 0.5)
-    validate_model_2D(vali, q_min=0.001, q_max=0.2, phi=1.0, n_q=25)
-    
-    # 2D: Density=0.5, 2.26 secs for 25 points
-    #vali = EllipsoidValidator(radius_a = 20, radius_b=15, density = 0.05)
-    #validate_model(vali, q_min=0.001, q_max=0.5, n_q=25)
-    #vali = EllipsoidValidator(radius_a = 20, radius_b=15, density = 0.5)
-    #validate_model_2D(vali, q_min=0.001, q_max=0.5, phi=1.0, n_q=25)
-    
-    #vali = HelixValidator(density = 0.05)
-    #validate_model(vali, q_min=0.001, q_max=0.5, n_q=25)
-    
-    
Index: sansrealspace/src/sans/realspace/test/simulation_stimuli.py
===================================================================
--- sansrealspace/src/sans/realspace/test/simulation_stimuli.py	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,345 +1,0 @@
-"""Automated testing for simulation
-
-    To be compatible with testcase_generator, a simulus
-    class must have:
-        setup(self):  to initialize the test-case
-        getRandomStimulus(self): to get a random stimulus name
-        stimuli that inherit from the Stimulus class
-        
-    @copyright: University of Tennessee, 2007
-    @license: This software is provided as part of the DANSE project.
-
-"""
-
-import testcase_generator as generator
-from testcase_generator import Stimulus
-try:
-    import VolumeCanvas
-    print "Testing local VolumeCanvas\n"
-except:
-    import sans.realspace.VolumeCanvas as VolumeCanvas
-
-def randomModel():
-    """ Return a random model name """
-    from random import random
-    from math import floor
-    
-    model_list = ['sphere', 'cylinder', 'ellipsoid', 'singlehelix']
-    rnd_id = int(floor(random()*len(model_list)))
-    
-    return model_list[rnd_id]
-
-
-class Simulation:
-    """Simulation testing class"""
-    
-    # Probability of stopping a test case without
-    # adding additional stimuli
-    end_frequency = 0.1
-    
-    def __init__(self):
-        self.end_flag = False
-        
-    def reset(self):
-        self.end_flag = False
-    
-    def setup(self):
-        """Setup the canvas for stimuli application"""
-        volume = VolumeCanvas.VolumeCanvas()
-        volume.params['lores_density'] = 0.05
-        return volume
-    
-    def getRandomStimulus(self):
-        """Return the name of a random stimulus"""
-        
-        from random import random
-        
-        # If the end flag is up, compute I(q) one last time
-        if self.end_flag == True:
-            return None
-        
-        # Get the list of stimuli
-        attrs = dir(self)
-        stim_list = []
-        
-        # Get the list of simuli and 
-        # compute the total normalization
-        sum = 0
-        for item in attrs:
-            if item.endswith('Stimulus'):
-                obj = getattr(self, item)
-                if hasattr(obj, 'frequency'):
-                    stim_list.append(item)
-                    sum += getattr(self, item).frequency
-        
-        # Choose a stimulus
-        rnd = random()
-        
-        # Check if we need to stop
-        if rnd < self.end_frequency:
-            self.end_flag = True
-            return "GetIq"
-        
-        run_sum = 0
-        for item in stim_list:
-            run_sum += getattr(self, item).frequency/sum 
-            if run_sum >= rnd:
-                pos = item.index('Stimulus')
-                
-                return item[0:pos]
-        
-    class AddStimulus(Stimulus):
-        """Add an object to the canvas"""
-
-        frequency = 0.1
-        
-        def __call__(self, canvas):
-            """Apply stimulus"""
-            report = generator.StimulusReport(tag=self.name)
-        
-            # Select random model
-            add_model = randomModel()
-
-            # Add the model
-            handle = canvas.add(add_model)
-            
-            # Check that it is in the list of objects
-            if handle in canvas.getShapeList():
-                report.passed = 1
-            else:
-                report.log = "Add: tried to add %s" % add_model
-            
-            report.trace = "Added %s" % add_model
-            
-            return canvas, report
-    
-    class GetParamStimulus(Stimulus):
-        """Get the value of a canvas or shape parameter"""
-
-        frequency = 0.05
-        
-        def __call__(self, canvas):
-            """Apply stimulus"""
-            from random import random
-            import math
-            
-            report = generator.StimulusReport(tag=self.name)
-        
-            # Read a parameter
-            #TODO: access shape parameters
-            rnd = random()
-            i_rnd = int(math.floor(rnd*len(canvas.params)))
-            par_name = canvas.params.keys()[i_rnd]
-            value = canvas.getParam(par_name)
-            
-            # Check that it is in the list of objects
-            try:
-                float(value)
-                report.passed = 1
-            except:
-                report.log = "get: bad value for [%s]" % par_name
-            
-            report.trace = "Read %s" % par_name
-            
-            return canvas, report
-    
-    class GetIqStimulus(Stimulus):
-        """Calculate I(q)"""
-
-        frequency = 0.25
-        
-        def __call__(self, canvas):
-            report = generator.StimulusReport(tag=self.name)
-            
-            # Check that a float is returned
-            # Validation testing will be done elsewhere
-            value = canvas.getIq(0.1)
-            
-            # Check that it is in the list of objects
-            try:
-                float(value)
-                report.passed = 1
-            except:
-                report.log = "GetIq: bad value for Iq "+str(value)
-            
-            report.trace = "I(q) = %g" % value
-            return canvas, report
-    
-    class GetIq2DStimulus(Stimulus):
-        """Calculate I(q)"""
-
-        frequency = 0.25
-        
-        def __call__(self, canvas):
-            report = generator.StimulusReport(tag=self.name)
-            
-            # Check that a float is returned
-            # Validation testing will be done elsewhere
-            value = canvas.getIq2D(0.01,0.01)
-            
-            # Check that it is in the list of objects
-            try:
-                float(value)
-                report.passed = 1
-            except:
-                report.log = "GetIq2D: bad value for Iq "+str(value)
-            
-            report.trace = "I(q) = %g" % value
-            return canvas, report
-    
-    class SetCanvasParamStimulus(Stimulus):
-        """Set the value of a canvas parameter"""
-
-        frequency = 0.05
-        
-        def __call__(self, canvas):
-            """Apply stimulus"""
-            from random import random
-            import math
-            
-            report = generator.StimulusReport(tag=self.name)
-        
-            # Read a parameter
-            rnd = random()
-            i_rnd = int(math.floor(rnd*len(canvas.params)))
-            par_name = canvas.params.keys()[i_rnd]
-            
-            # Get current value
-            current = canvas.getParam(par_name)
-            
-            # Set new value
-            rnd2 = random()
-            new_value = current*(1.0+rnd2)
-            canvas.setParam(par_name, new_value)
-            
-            # Read it back
-            current = canvas.getParam(par_name)
-            
-            # Check that the new value is correct
-            if current == new_value:
-                report.passed = 1
-            else:
-                report.log = "get: bad value for [%s]" % par_name
-            
-            report.trace = "Read %s" % par_name
-            
-            return canvas, report
-    
-    class SetShapeParamStimulus(Stimulus):
-        """Set the value of a canvas parameter"""
-
-        frequency = 0.1
-        
-        def __call__(self, canvas):
-            """Apply stimulus"""
-            from random import random
-            import math
-            
-            report = generator.StimulusReport(tag=self.name)
-        
-            # Read a parameter
-            rnd = random()
-            shape_list = canvas.getShapeList()
-
-            if len(shape_list)==0:
-                # No object available, let's test an error condition
-                try:
-                    canvas.setParam("shape0.test-radius", 1.0)
-                    report.log = "SetShapeParam: set didn't throw exception"
-                except:
-                    report.passed = 1
-                report.trace = "SetShapeParam: testing failure behavior"
-                
-            else:  
-                i_rnd = int(math.floor(rnd*len(shape_list)))
-                shape_name = shape_list[i_rnd]
-                
-                found = False
-                while found==False:
-                    rnd2 = random()
-                    par_keys = canvas.shapes[shape_name].params.keys()
-                    i_rnd2 = int(math.floor(rnd2*(len(par_keys))))
-                    
-                    short_name = par_keys[i_rnd2]
-                    par_name = "%s.%s" % (shape_name, short_name)
-                    if not short_name.lower() == "type":
-                        found= True
-                
-                # Get current value
-                current = canvas.getParam(par_name)
-                
-                # Set new value
-                if short_name in ['orientation', 'center']:
-                    new_value = [random(), random(), random()]
-                else:
-                    new_value = current*(1.0+random())
-
-                canvas.setParam(par_name, new_value)
-                
-                # Read it back
-                current = canvas.getParam(par_name)
-                
-                # Check that the new value is correct
-                if current == new_value:
-                    report.passed = 1
-                else:
-                    report.log = "get: bad value for [%s]" % par_name
-                
-                report.trace = "Read %s" % par_name
-            
-            return canvas, report
-    
-
-    class RemoveStimulus(Stimulus):
-        """Calculate I(q)"""
-
-        frequency = 0.05
-        
-        def __call__(self, canvas):
-            from random import random
-            import math
-            
-            report = generator.StimulusReport(tag=self.name)
-            
-            # Get list of shapes
-            if len(canvas.shapes)>0:
-                rnd = random()
-                i_rnd = int(math.floor(rnd*len(canvas.shapes)))
-                shape_name = canvas.shapes.keys()[i_rnd]
-                
-                canvas.delete(shape_name)
-                if shape_name in canvas.shapes.keys() \
-                    or shape_name in canvas.getShapeList():
-                    report.log = "Remove: object was not removed"
-                else:
-                    report.passed = 1
-                
-            else:
-                # No shape to remove: test bad remove call
-                try:
-                    canvas.delete("test-shape")
-                    report.log = "Remove: delete didn't throw exception"
-                except:
-                    report.passed = 1
-                report.trace = "Remove: testing failure behavior"
-            
-            return canvas, report
-    
-
-
-if __name__ == '__main__':
-    import sys
-    
-    stimuli = Simulation()
-    
-    if len(sys.argv)>1:
-        #t = generator.TestCase(stimuli, filename = "test-case.xml")
-        t = generator.TestCase(stimuli, filename = sys.argv[1])
-        print "Test passed =", t.run() 
-    else:   
-        g = generator.TestCaseGenerator(stimuli)
-        g.generateAndRun(200)
-    
-
-    
-    
Index: sansrealspace/src/sans/realspace/test/sphere_d=0.02_Iq.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/sphere_d=0.02_Iq.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'radius': 20, 'contrast': 1.0, 'background': 0.0}
-<q>  <ana>  <sim>  <err>
-0.001  3.35076e+012  3.34473e+012  1.83791e+010
-0.0217917  3.22578e+012  3.22005e+012  1.77877e+010
-0.0425833  2.89407e+012  2.8891e+012  1.62491e+010
-0.063375  2.41141e+012  2.40742e+012  1.40968e+010
-0.0841667  1.85421e+012  1.85115e+012  1.1754e+010
-0.104958  1.30194e+012  1.29955e+012  9.59078e+009
-0.12575  8.20339e+011  8.18306e+011  7.82331e+009
-0.146542  4.50004e+011  4.4813e+011  6.51456e+009
-0.167333  2.02695e+011  2.0101e+011  5.63882e+009
-0.188125  6.53019e+010  6.40741e+010  5.12743e+009
-0.208917  9.08587e+009  8.72085e+009  4.88519e+009
-0.229708  6.52867e+008  1.518e+009  4.80599e+009
-0.2505  1.12169e+010  1.34659e+010  4.7969e+009
-0.271292  2.19267e+010  2.53926e+010  4.79648e+009
-0.292083  2.47336e+010  2.89354e+010  4.77778e+009
-0.312875  1.98194e+010  2.4082e+010  4.73926e+009
-0.333667  1.14538e+010  1.5099e+010  4.69233e+009
-0.354458  4.1655e+009  6.7031e+009  4.65023e+009
-0.37525  4.46529e+008  1.69842e+009  4.62081e+009
-0.396042  2.84717e+008  4.01262e+008  4.60452e+009
-0.416833  2.03152e+009  1.40088e+009  4.59665e+009
-0.437625  3.7442e+009  2.83466e+009  4.59136e+009
-0.458417  4.22545e+009  3.42181e+009  4.58465e+009
-0.479208  3.36846e+009  2.86049e+009  4.57542e+009
-0.5  1.85693e+009  1.61315e+009  4.56486e+009
Index: sansrealspace/src/sans/realspace/test/sphere_d=0.1_Iq.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/sphere_d=0.1_Iq.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'radius': 20, 'contrast': 1.0, 'background': 0.0}
-<q>  <ana>  <sim>  <err>
-0.001  3.35076e+012  3.34973e+012  3.67891e+009
-0.0217917  3.22578e+012  3.22395e+012  3.55965e+009
-0.0425833  2.89407e+012  2.89029e+012  3.24964e+009
-0.063375  2.41141e+012  2.40527e+012  2.81671e+009
-0.0841667  1.85421e+012  1.84622e+012  2.34653e+009
-0.104958  1.30194e+012  1.29329e+012  1.91348e+009
-0.12575  8.20339e+011  8.12471e+011  1.56046e+009
-0.146542  4.50004e+011  4.4408e+011  1.29968e+009
-0.167333  2.02695e+011  1.99229e+011  1.12572e+009
-0.188125  6.53019e+010  6.40562e+010  1.02452e+009
-0.208917  9.08587e+009  9.2613e+009  9.76591e+008
-0.229708  6.52867e+008  1.25811e+009  9.60446e+008
-0.2505  1.12169e+010  1.14561e+010  9.57674e+008
-0.271292  2.19267e+010  2.14459e+010  9.56503e+008
-0.292083  2.47336e+010  2.36485e+010  9.52061e+008
-0.312875  1.98194e+010  1.85473e+010  9.4432e+008
-0.333667  1.14538e+010  1.0453e+010  9.35555e+008
-0.354458  4.1655e+009  3.7087e+009  9.28183e+008
-0.37525  4.46529e+008  5.22496e+008  9.23435e+008
-0.396042  2.84717e+008  6.49244e+008  9.21063e+008
-0.416833  2.03152e+009  2.35982e+009  9.19933e+008
-0.437625  3.7442e+009  3.79697e+009  9.18882e+008
-0.458417  4.22545e+009  3.9482e+009  9.17274e+008
-0.479208  3.36846e+009  2.88727e+009  9.15122e+008
-0.5  1.85693e+009  1.38828e+009  9.12848e+008
Index: sansrealspace/src/sans/realspace/test/sphere_d=2_Iq2D.txt
===================================================================
--- sansrealspace/src/sans/realspace/test/sphere_d=2_Iq2D.txt	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,27 +1,0 @@
-PARS: {'scale': 1.0, 'radius': 20, 'contrast': 1.0, 'background': 0.0}
-<q>  <ana>  <sim>  <err>
-0.001  3.35076e+012  3.35073e+012  1.02559e+008
-0.0217917  3.22578e+012  3.22556e+012  1.26748e+009
-0.0425833  2.89407e+012  2.89631e+012  3.98876e+009
-0.063375  2.41141e+012  2.4136e+012  7.05401e+009
-0.0841667  1.85421e+012  1.85598e+012  9.16184e+009
-0.104958  1.30194e+012  1.29271e+012  9.61462e+009
-0.12575  8.20339e+011  8.18218e+011  8.47219e+009
-0.146542  4.50004e+011  4.53479e+011  6.46034e+009
-0.167333  2.02695e+011  2.05057e+011  4.21957e+009
-0.188125  6.53019e+010  7.08642e+010  2.37486e+009
-0.208917  9.08587e+009  8.04306e+009  7.69335e+008
-0.229708  6.52867e+008  4.6001e+008  1.82649e+008
-0.2505  1.12169e+010  1.27539e+010  9.69079e+008
-0.271292  2.19267e+010  2.07541e+010  1.26591e+009
-0.292083  2.47336e+010  2.40875e+010  1.38764e+009
-0.312875  1.98194e+010  1.53331e+010  1.11323e+009
-0.333667  1.14538e+010  1.06653e+010  9.16921e+008
-0.354458  4.1655e+009  4.50656e+009  5.89412e+008
-0.37525  4.46529e+008  2.35626e+008  1.34098e+008
-0.396042  2.84717e+008  5.60381e+008  2.06561e+008
-0.416833  2.03152e+009  1.86189e+009  3.77226e+008
-0.437625  3.7442e+009  3.55198e+009  5.28877e+008
-0.458417  4.22545e+009  3.88908e+009  5.5361e+008
-0.479208  3.36846e+009  3.81988e+009  5.4743e+008
-0.5  1.85693e+009  1.91111e+009  3.83604e+008
Index: sansrealspace/src/sans/realspace/test/test-case.xml
===================================================================
--- sansrealspace/src/sans/realspace/test/test-case.xml	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,5 +1,0 @@
-<?xml version="1.0"?>
-<TestCase>
-  <Stimulus id="Add"/>
-  <Stimulus id="GetIq"/>
-</TestCase>
Index: sansrealspace/src/sans/realspace/test/test.pdb
===================================================================
--- sansrealspace/src/sans/realspace/test/test.pdb	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,10 +1,0 @@
-REMARK FILENAME="if0.pdb"
-REMARK  TOPH19.pep -MACRO for protein sequence
-REMARK DATE:17-Aug-02  11:05:39       created by user:
-ATOM      1  CB  SER     1      -1.115 -11.617 -11.368
-ATOM      2  OG  SER     1       0.202 -11.845 -10.894  1.00 54.67          
-ATOM      3  C   SER     1      -2.076 -12.837  -9.369  1.00 44.10          
-ATOM      4  O   SER     1      -3.108 -12.947  -8.704  1.00 43.77          
-ATOM      5  N   SER     1      -3.465 -12.399 -11.363  1.00 83.41          
-ATOM      6  CA  SER     1      -2.108 -12.709 -10.900  1.00 57.67          
-END
Index: sansrealspace/src/sans/realspace/test/testcase_generator.py
===================================================================
--- sansrealspace/src/sans/realspace/test/testcase_generator.py	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,321 +1,0 @@
-"""
-    Random test-case generator for Real-space simulation
-    
-    @copyright: University of Tennessee, 2007
-    @license: This software is provided as part of the DANSE project.
-"""
-import time
-
-class Stimulus:
-    """Base class for simuli objects"""
-    
-    frequency = 1.0
-    
-    def __init__(self):
-        """Initialization"""
-        name = self.__class__.__name__
-        pos = name.index('Stimulus')        
-        self.name = name[0:pos]
-        
-    def __call__(self, obj):
-        """
-            Stimulus application
-            @param obj: object to apply the stimulus to
-            @return: the modified object and the StimulusReport object
-        """
-        return obj, None
-    
-
-class StimulusReport:
-    """Report on the application of a stimulus"""
-    def __init__(self, tag=''):
-        """   
-            Initialization
-            @param tag: name of the applied stimulus
-        """
-        self.tag = tag
-        self.applied = 1
-        self.passed  = 0
-        self.trace = ''
-        self.log = ''
-        
-    def __str__(self):
-        """Returns a string with the success rate"""
-        return str(self.passed/self.applied)
-    
-    def __add__(self, other):
-        """Adds two reports"""
-        self.applied += other.applied
-        self.passed  += other.passed
-        if len(other.trace)>0:
-            self.trace = self.trace+'\n'+other.trace
-        if len(other.log)>0:
-            self.log = self.log+'\n'+other.log
-        return self
-
-    def isPassed(self):
-        """Returns true if report is a success"""
-        if self.applied == self.passed:
-            return True
-        return False
-
-
-class ReportCard: # pylint: disable-msg=R0902
-    """ Class to hold test-case results """
-    
-    def __init__(self):
-        """ Initialization """
-        ## Number of test cases
-        self.n_cases = 0
-        ## Number of passed test cases
-        self.n_cases_pass = 0
-        
-        ## Dictionary of stimuli
-        self.stimuli = {}
-        
-        ## Test log
-        self.log = ""
-        ## Trace
-        self.trace = ""
-        ## Model tested
-        self.model = ""
-        ## List of all models tested
-        self.modelList = []
-        
-        
-    def __add__(self, other):
-        """ Add two report cards
-            @param other: other report to add
-            @return: updated self
-        """
-        if other.__class__.__name__=='ReportCard':
-            # Adding two test-case report cards
-            self.n_cases += other.n_cases
-            self.n_cases_pass += other.n_cases_pass
-            
-            for tag in other.stimuli:
-                if tag in self.stimuli:
-                    self.stimuli[tag] += other.stimuli[tag]
-                else:
-                    self.stimuli[tag] = other.stimuli[tag]
-                    
-            if len(other.log)>0:
-                self.log += other.log
-            if len(other.trace)>0:
-                self.trace += other.trace
-                
-            if not other.model in self.modelList:
-                self.modelList.append(other.model)
-            
-        elif other.__class__.__name__ == 'StimulusReport':
-            # Adding a stimulus report to the report card
-            if other.tag in self.stimuli:
-                self.stimuli[other.tag] += other
-            else:
-                self.stimuli[other.tag] = other
-                    
-        else:
-            raise ValueError, \
-            "ReportCard: Unrecognized class %s" % other.__class__.__name__
-        return self
-        
-    def isPassed(self):
-        """ Returns true if no error was found """
-        if self.n_cases_pass < self.n_cases:
-            return False
-        return True
-        
-    def __str__(self):
-        """ String representation of the report card """
-        from sans.models.ModelFactory import ModelFactory
-        
-        log = ''
-        
-        rep = "Detailed output:\n"
-        rep += self.log
-        rep += "\n"
-        rep += "Total number of cases: %g\n" % self.n_cases
-        rep += "   Passed:             %g\n" % self.n_cases_pass
-        rep += "\n"
-        self.modelList.sort()
-        rep += "Models tested: %s\n" % self.modelList
-        rep += "\n"
-        rep += "\n"
-        rep += "Breakdown:\n"
-        
-        for tag in self.stimuli:
-            
-            rep += "   %-10s:          %g / %g\n" % (tag, self.stimuli[tag].passed, self.stimuli[tag].applied)
-            log += self.stimuli[tag].log
-        
-        rep += '\n'+log
-        return rep
-    
-        
-
-class TestCaseGenerator:
-    """ Generator for suite of test-cases
-    """
-    
-    def __init__(self, stimuli):
-        """ Initialization
-        """
-        self.stimuli = stimuli
-        self.n_tests = 0
-        self.n_passed = 0
-        self.time = 0
-        self.reportCard = ReportCard()
-    
-    def generateFiles(self, number, file_prefix):
-        """ Generate test-case files
-            @param number: number of files to generate
-            @param file_prefix: prefix for the file names
-        """
-        
-        for i in range(number):
-            filename = "%s_%d.xml" % (file_prefix, i)
-            self.generateFileTest(filename)
-            self.n_tests += 1
-            
-    def generateAndRun(self, number):
-        """ Generate test-cases and run them
-            @param number: number of test-cases to generate
-        """
-        start_time = time.time()
-        for i in range(number):
-            textcase = self.generateTest()
-            t = TestCase(self.stimuli, text = textcase)
-            passed = t.run()
-            self.reportCard += t.reportCard
-            if not passed:
-                t = time.localtime()
-                xmloutput = open("error_%i-%i-%i-%i-%i-%i_%i.xml" % \
-                 (t[0],t[1],t[2],t[3],t[4],t[5],self.reportCard.n_cases),'w')
-                xmloutput.write(textcase)
-                xmloutput.close()
-
-                
-        self.time += time.time()-start_time
-        print self.reportCard        
-        
-    def generateFileTest(self, filename = "tmp.xml"):
-        """
-            Write a random test-case in an XML file
-            @param filename: name of file to write to
-        """
-        text = self.generateTest()
-        # Write test case in file
-        xmlfile = open(filename,'w')
-        xmlfile.write(text)
-        xmlfile.close()
-    
-    
-    def generateTest(self):
-        """
-            Generate an XML representation of a random test-case
-        """
-        import random
-        
-        # Reset stimuli object
-        self.stimuli.reset()
-        #t = TestCase()
-        text = "<?xml version=\"1.0\"?>\n"
-        text  += "<TestCase>\n"
-        loop = True
-        while loop:
-            
-            stimulus = self.stimuli.getRandomStimulus()
-            if stimulus == None:
-                loop = False
-            else:   
-                text += "  <Stimulus id=\"%s\"/>\n" % stimulus
-        text += "</TestCase>"
-        
-        return text
-    
-        
-class TestCase:
-    """ Test-case class """
-    
-    def __init__(self, stimuliObject, filename = None, text = None):
-        """ Initialization
-            @param filename: name of file containing the test case
-        """
-        self.filename = filename
-        self.text = text
-        self.stimuli = stimuliObject
-        self.model = stimuliObject.setup()
-        self.passed = True
-        self.reportCard = ReportCard()
-        
-    
-    def run(self):
-        """ Read the test case and execute it """
-        from xml.dom.minidom import parse
-        from xml.dom.minidom import parseString
-        
-        # Initialize report
-        self.reportCard = ReportCard()
-        self.reportCard.model = "Canvas"
-        self.reportCard.n_cases = 1
-        
-        if not self.text == None:
-            dom = parseString(self.text)
-        elif not self.filename == None:
-            dom = parse(self.filename)
-        else:
-            print "No input to parse"
-            return False
-        
-        if dom.hasChildNodes():
-            for n in dom.childNodes:
-                if n.nodeName == "TestCase":
-                    self.processStimuli(n)
-            
-        # Update report card        
-        if self.passed:
-            self.reportCard.n_cases_pass = 1
-            
-        return self.passed
-                          
-    def processStimuli(self, node):
-        """ Process the stimuli list in the TestCase node 
-            of an XML test-case file
-            @param node: test-case node
-        """
-        report = ReportCard()
-        report.trace = "%s\n" % self.model.name
-        
-        self.passed = True
-        if node.hasChildNodes():
-            for n in node.childNodes:
-                if n.nodeName == "Stimulus":
-                    
-                    s_type = None
-                    if n.hasAttributes():
-                        # Get stilumus ID
-                        for i in range(len(n.attributes)):
-                            attr_name = n.attributes.item(i).name
-                            if attr_name == "id":
-                                s_type = n.attributes.item(i).nodeValue
-                    if hasattr(self.stimuli,"%sStimulus" % s_type):
-                        stimulus = getattr(self.stimuli,"%sStimulus" % s_type)()
-                        #print s_type, self.model.name
-                        m, res = stimulus(self.model)
-                        #print "     ", m.name
-                        self.model = m
-                        if not res.isPassed():
-                            self.passed = False
-                        
-                        report += res
-                        
-                    else:
-                        print "Stimulus %s not found" % s_type
-                        
-        self.reportCard += report
-        
-        if not self.passed:
-            print report.trace
-        return self.passed
-        
- 
Index: sansrealspace/src/sans/realspace/test/utest_oriented.py
===================================================================
--- sansrealspace/src/sans/realspace/test/utest_oriented.py	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,486 +1,0 @@
-"""
-    Unit tests for specific oriented models
-    @copyright: University of Tennessee, for the DANSE project
-"""
-
-import unittest, math, sys
-
-# Disable "missing docstring" complaint
-# pylint: disable-msg=C0111
-# Disable "too many methods" complaint 
-# pylint: disable-msg=R0904 
-# Disable "could be a function" complaint 
-# pylint: disable-msg=R0201
-# pylint: disable-msg=W0702
-
-try:
-    import VolumeCanvas
-    print "Testing local version"
-except:
-    print sys.exc_value
-    #testing the version that is working on
-    print "Testing installed version"
-    import sans.realspace.VolumeCanvas as VolumeCanvas
- 
-
-class TestSphere(unittest.TestCase):
-    """ Tests for oriented (2D) systems """
-        
-    def setUp(self):
-        """
-            Set up canvas
-        """
-        from sans.models.SphereModel import SphereModel
-        self.model = VolumeCanvas.VolumeCanvas()
-    
-        handle = self.model.add('sphere')
-        
-        radius = 10
-        density = .1
-        
-        ana = SphereModel()
-        ana.setParam('scale', 1.0)
-        ana.setParam('contrast', 1.0)
-        ana.setParam('background', 0.0)
-        ana.setParam('radius', radius)
-        self.ana = ana
-        
-        self.model.setParam('lores_density', density)
-        self.model.setParam('%s.radius' % handle, radius)
-        self.model.setParam('scale' , 1.0)
-        self.model.setParam('%s.contrast' % handle, 1.0)
-        self.model.setParam('background' , 0.0)
-        
-        
-    def testdefault(self):
-        """ Testing sphere """
-        # Default orientation
-        ana_val = self.ana.runXY([0.1, 0.1])
-        sim_val = self.model.getIq2D(0.1, 0.1)
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.1 )
-        
-class TestCylinderAddObject(unittest.TestCase):
-    """ Tests for oriented (2D) systems """
-        
-    def setUp(self):
-        """ Set up cylinder model """
-        from sans.models.CylinderModel import CylinderModel
-        radius = 5
-        length = 40
-        density = 20
-    
-        # Analytical model
-        self.ana = CylinderModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius', radius)
-        self.ana.setParam('length', length)
-    
-        # Simulation model
-        self.model = VolumeCanvas.VolumeCanvas()
-        cyl = VolumeCanvas.CylinderDescriptor()
-        self.handle = self.model.addObject(cyl)
-        self.model.setParam('lores_density', density)
-        self.model.setParam('%s.radius' % self.handle, radius)
-        self.model.setParam('%s.length' % self.handle, length)
-        self.model.setParam('scale' , 1.0)
-        self.model.setParam('%s.contrast' % self.handle, 1.0)
-        self.model.setParam('background' , 0.0)
-    
-    def testalongY(self):
-        """ Testing cylinder along Y axis """
-        self.ana.setParam('cyl_theta', math.pi/2.0)
-        self.ana.setParam('cyl_phi', math.pi/2.0)
-        
-        self.model.setParam('%s.orientation' % self.handle, [0,0,0])
-        
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.model.getIq2D(0.1, 0.2)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        
-        
-class TestCylinder(unittest.TestCase):
-    """ Tests for oriented (2D) systems """
-        
-    def setUp(self):
-        """ Set up cylinder model """
-        from sans.models.CylinderModel import CylinderModel
-        radius = 5
-        length = 40
-        density = 20
-    
-        # Analytical model
-        self.ana = CylinderModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius', radius)
-        self.ana.setParam('length', length)
-    
-        # Simulation model
-        self.model = VolumeCanvas.VolumeCanvas()
-        self.handle = self.model.add('cylinder')
-        self.model.setParam('lores_density', density)
-        self.model.setParam('%s.radius' % self.handle, radius)
-        self.model.setParam('%s.length' % self.handle, length)
-        self.model.setParam('scale' , 1.0)
-        self.model.setParam('%s.contrast' % self.handle, 1.0)
-        self.model.setParam('background' , 0.0)
-    
-    def testalongY(self):
-        """ Testing cylinder along Y axis """
-        self.ana.setParam('cyl_theta', math.pi/2.0)
-        self.ana.setParam('cyl_phi', math.pi/2.0)
-        
-        self.model.setParam('%s.orientation' % self.handle, [0,0,0])
-        
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.model.getIq2D(0.1, 0.2)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        
-    def testalongZ(self):
-        """ Testing cylinder along Z axis """
-        self.ana.setParam('cyl_theta', 0)
-        self.ana.setParam('cyl_phi', 0)
-        
-        self.model.setParam('%s.orientation' % self.handle, [90,0,0])
-        
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.model.getIq2D(0.1, 0.2)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        
-    def testalongX(self):
-        """ Testing cylinder along X axis """
-        self.ana.setParam('cyl_theta', 1.57)
-        self.ana.setParam('cyl_phi', 0)
-        
-        self.model.setParam('%s.orientation' % self.handle, [0,0,90])
-        
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.model.getIq2D(0.1, 0.2)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        
-class TestEllipsoid(unittest.TestCase):
-    """ Tests for oriented (2D) systems """
-        
-    def setUp(self):
-        """ Set up ellipsoid """
-        from sans.models.EllipsoidModel import EllipsoidModel
-        
-        radius_a = 60
-        radius_b = 10
-        density = 30
-        
-        self.ana = EllipsoidModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius_a', radius_a)
-        self.ana.setParam('radius_b', radius_b)
-        # Default orientation is there=1.57, phi=0
-        # Radius_a is along the x direction
-       
-        canvas = VolumeCanvas.VolumeCanvas()
-        canvas.setParam('lores_density', density)
-        self.handle = canvas.add('ellipsoid')
-        canvas.setParam('%s.radius_x' % self.handle, radius_a)
-        canvas.setParam('%s.radius_y' % self.handle, radius_b)
-        canvas.setParam('%s.radius_z' % self.handle, radius_b)
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('%s.contrast' % self.handle, 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas        
-
-    def testalongX(self):
-        """ Testing ellipsoid along X """
-        self.ana.setParam('axis_theta', 1.57)
-        self.ana.setParam('axis_phi', 0)
-        
-        self.canvas.setParam('%s.orientation' % self.handle, [0,0,0])
-        
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.canvas.getIq2D(0.1, 0.2)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-
-    def testalongZ(self):
-        """ Testing ellipsoid along Z """
-        self.ana.setParam('axis_theta', 0)
-        self.ana.setParam('axis_phi', 0)
-        
-        self.canvas.setParam('%s.orientation' % self.handle, [0,90,0])
-        
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.canvas.getIq2D(0.1, 0.2)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-
-    def testalongY(self):
-        """ Testing ellipsoid along Y """
-        self.ana.setParam('axis_theta', math.pi/2.0)
-        self.ana.setParam('axis_phi', math.pi/2.0)
-        
-        self.canvas.setParam('%s.orientation' % self.handle, [0,0,90])
-        
-        ana_val = self.ana.runXY([0.05, 0.15])
-        sim_val = self.canvas.getIq2D(0.05, 0.15)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        try:
-            self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
-            raise sys.exc_type, sys.exc_value
-
-class TestCoreShell(unittest.TestCase):
-    """ Tests for oriented (2D) systems """
-        
-    def setUp(self):
-        """ Set up zero-SLD-average core-shell model """
-        from sans.models.CoreShellModel import CoreShellModel
-        
-        radius = 15
-        thickness = 5
-        density = 20
-        
-        core_vol = 4.0/3.0*math.pi*radius*radius*radius
-        self.outer_radius = radius+thickness
-        shell_vol = 4.0/3.0*math.pi*self.outer_radius*self.outer_radius*self.outer_radius - core_vol
-        self.shell_sld = -1.0*core_vol/shell_vol
-
-        self.density = density
-           
-        # Core-shell
-        sphere = CoreShellModel()
-        # Core radius
-        sphere.setParam('radius', radius)
-        # Shell thickness
-        sphere.setParam('thickness', thickness)
-        sphere.setParam('core_sld', 1.0)
-        sphere.setParam('shell_sld', self.shell_sld)
-        sphere.setParam('solvent_sld', 0.0)
-        sphere.setParam('background', 0.0)
-        sphere.setParam('scale', 1.0)
-        self.ana = sphere
-       
-        canvas = VolumeCanvas.VolumeCanvas()        
-        canvas.setParam('lores_density', self.density)
-        
-        handle = canvas.add('sphere')
-        canvas.setParam('%s.radius' % handle, self.outer_radius)
-        canvas.setParam('%s.contrast' % handle, self.shell_sld)
-       
-        handle2 = canvas.add('sphere')
-        canvas.setParam('%s.radius' % handle2, radius)
-        canvas.setParam('%s.contrast' % handle2, 1.0)
-               
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas 
-           
-    def testdefault(self):
-        """ Testing default core-shell orientation """
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val, err = self.canvas.getIq2DError(0.1, 0.2)
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-                   
-class TestCoreShellError(unittest.TestCase):
-    """ Tests for oriented (2D) systems """
-        
-    def setUp(self):
-        """ Set up zero-SLD-average core-shell model """
-        from sans.models.CoreShellModel import CoreShellModel
-        
-        radius = 15
-        thickness = 5
-        density = 5
-        
-        core_vol = 4.0/3.0*math.pi*radius*radius*radius
-        self.outer_radius = radius+thickness
-        shell_vol = 4.0/3.0*math.pi*self.outer_radius*self.outer_radius*self.outer_radius - core_vol
-        self.shell_sld = -1.0*core_vol/shell_vol
-
-        self.density = density
-           
-        # Core-shell
-        sphere = CoreShellModel()
-        # Core radius
-        sphere.setParam('radius', radius)
-        # Shell thickness
-        sphere.setParam('thickness', thickness)
-        sphere.setParam('core_sld', 1.0)
-        sphere.setParam('shell_sld', self.shell_sld)
-        sphere.setParam('solvent_sld', 0.0)
-        sphere.setParam('background', 0.0)
-        sphere.setParam('scale', 1.0)
-        self.ana = sphere
-       
-        canvas = VolumeCanvas.VolumeCanvas()        
-        canvas.setParam('lores_density', self.density)
-        
-        handle = canvas.add('sphere')
-        canvas.setParam('%s.radius' % handle, self.outer_radius)
-        canvas.setParam('%s.contrast' % handle, self.shell_sld)
-       
-        handle2 = canvas.add('sphere')
-        canvas.setParam('%s.radius' % handle2, radius)
-        canvas.setParam('%s.contrast' % handle2, 1.0)
-               
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas 
-                   
-    def testdefault(self):
-        """ Testing default core-shell orientation """
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val, err = self.canvas.getIq2DError(0.1, 0.2)
-        
-        self.assert_( math.fabs(sim_val-ana_val) < 3.0 * err )
-
-class TestRunMethods(unittest.TestCase):
-    """ Tests run methods for oriented (2D) systems """
-
-    def setUp(self):
-        """ Set up ellipsoid """
-        from sans.models.EllipsoidModel import EllipsoidModel
-        
-        radius_a = 10
-        radius_b = 15
-        density = 5
-        
-        self.ana = EllipsoidModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius_a', radius_a)
-        self.ana.setParam('radius_b', radius_b)
-
-       
-        canvas = VolumeCanvas.VolumeCanvas()
-        canvas.setParam('lores_density', density)
-        self.handle = canvas.add('ellipsoid')
-        canvas.setParam('%s.radius_x' % self.handle, radius_a)
-        canvas.setParam('%s.radius_y' % self.handle, radius_b)
-        canvas.setParam('%s.radius_z' % self.handle, radius_b)
-        canvas.setParam('scale' , 1.0)
-        canvas.setParam('%s.contrast' % self.handle, 1.0)
-        canvas.setParam('background' , 0.0)
-        self.canvas = canvas     
-           
-        self.ana.setParam('axis_theta', 1.57)
-        self.ana.setParam('axis_phi', 0)
-        
-        self.canvas.setParam('%s.orientation' % self.handle, [0,0,0])
-        
-
-    def testRunXY_List(self):
-        """ Testing ellipsoid along X """
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.canvas.runXY([0.1, 0.2])
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        try:
-            self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
-            raise sys.exc_type, sys.exc_value
-
-    def testRunXY_float(self):
-        """ Testing ellipsoid along X """
-        ana_val = self.ana.runXY(0.1)
-        sim_val = self.canvas.runXY(0.1)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        try:
-            self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
-            raise sys.exc_type, sys.exc_value
-
-    def testRun_float(self):
-        """ Testing ellipsoid along X """
-        ana_val = self.ana.run(0.1)
-        sim_val = self.canvas.run(0.1)
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        try:
-            self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
-            raise sys.exc_type, sys.exc_value
-
-    def testRun_list(self):
-        """ Testing ellipsoid along X """
-        ana_val = self.ana.run([0.1, 33.0])
-        sim_val = self.canvas.run([0.1, 33.0])
-        #print ana_val, sim_val, sim_val/ana_val
-        
-        try:
-            self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        except:
-            print "Error", ana_val, sim_val, sim_val/ana_val
-            raise sys.exc_type, sys.exc_value
-
-class TestParamChange(unittest.TestCase):
-    """ Tests for oriented (2D) systems """
-        
-    def setUp(self):
-        """ Set up cylinder model """
-        from sans.models.CylinderModel import CylinderModel
-        radius = 5
-        length = 40
-        density = 20
-    
-        # Analytical model
-        self.ana = CylinderModel()
-        self.ana.setParam('scale', 1.0)
-        self.ana.setParam('contrast', 1.0)
-        self.ana.setParam('background', 0.0)
-        self.ana.setParam('radius', radius)
-        self.ana.setParam('length', length)
-        self.ana.setParam('cyl_theta', math.pi/2.0)
-        self.ana.setParam('cyl_phi', math.pi/2.0)
-    
-        # Simulation model
-        self.model = VolumeCanvas.VolumeCanvas()
-        self.handle = self.model.add('cylinder')
-        self.model.setParam('lores_density', density)
-        self.model.setParam('%s.radius' % self.handle, radius)
-        self.model.setParam('%s.length' % self.handle, length)
-        self.model.setParam('scale' , 1.0)
-        self.model.setParam('%s.contrast' % self.handle, 1.0)
-        self.model.setParam('background' , 0.0)
-        self.model.setParam('%s.orientation' % self.handle, [0,0,0])
-    
-    def testalongY(self):
-        """ Test that a parameter change forces the generation
-            of new space points
-        """
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.model.getIq2D(0.1, 0.2)
-        
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-        
-        # Change the radius a re-evaluate
-        self.ana.setParam('radius', 10)
-        self.model.setParam('%s.radius' % self.handle, 10)
-        
-        ana_val = self.ana.runXY([0.1, 0.2])
-        sim_val = self.model.getIq2D(0.1, 0.2)
-        self.assert_( math.fabs(sim_val/ana_val-1.0)<0.05 )
-
-
-if __name__ == '__main__':
-    unittest.main()        
Index: sansrealspace/src/sans/realspace/test/utest_realspace.py
===================================================================
--- sansrealspace/src/sans/realspace/test/utest_realspace.py	(revision f85b391403f2e88e36a297a1bd59244157b5eac4)
+++ 	(revision )
@@ -1,376 +1,0 @@
-"""
-    Unit tests for specific models
-    @author: Mathieu Doucet / UTK
-"""
-
-import unittest, math, time
-
-# Disable "missing docstring" complaint
-# pylint: disable-msg=C0111
-# Disable "too many methods" complaint 
-# pylint: disable-msg=R0904 
-# Disable "could be a function" complaint 
-# pylint: disable-msg=R0201
-
-try:
-    import VolumeCanvas
-    print "Testing local version"
-except:
-    import sys
-    print sys.exc_value
-    #testing the version that is working on
-    print "Testing installed version"
-    import sans.realspace.VolumeCanvas as VolumeCanvas
-     
-class TestRealSpaceModel(unittest.TestCase):
-    """ Unit tests for sphere model """
-    
-    def setUp(self):
-        self.model = VolumeCanvas.VolumeCanvas()
-        self.model.add('cylinder', 'cyl')
-        self.model.add('sphere', 'sph')
-        self.model.add('ellipsoid', 'elli')
-        self.model.add('singlehelix', 'shelix')
-        
-    def testAdding(self):
-        self.assertEqual('cyl', self.model.add('cylinder', 'cyl'))   
-
-    def testDeleting(self):
-        self.model.add('ellipsoid','elli2')
-        self.model.delete('elli2')
-        self.assert_('elli2' not in self.model.getShapeList())
-
-    def testsetParam(self):
-        self.model.setParam('q_max', 0.2)
-        self.model.setParam('shelix.radius_helix', 12)
-
-    def testgetParamList(self):
-        #print self.model.getParamList()
-        #print self.model.getParamList('shelix')
-        pass
-
-    def testPr_Iq(self):
-        self.model.getPr()
-        #print "pr is calculated", self.model.hasPr
-        result = self.model.getIq(0.1)
-        #print "I(0.1) is calculated: ", result       
-
-class TestSphere(unittest.TestCase):
-    """ Unit tests for sphere model """
-
-    def setUp(self):
-        self.canvas = VolumeCanvas.VolumeCanvas()
-        
-        
-    def testSetQmax(self):
-        old_value = self.canvas.getParam('q_max')
-        new_value = old_value + 0.1
-        self.canvas.setParam('q_max', new_value)
-        self.assertEqual(self.canvas.getParam("Q_MAx"), new_value)         
-        
-    def testSetDensity(self):        
-        self.canvas.setParam('lores_density', 0.1)
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam("%s.radius" % handle, 5.0)
-        vol = 4/3*math.pi*5*5*5
-        npts_1 = vol/0.1
-        value_1 = self.canvas.getIq(0.001)
-        
-        # Change density, the answer should be the same
-        self.canvas.setParam('lores_density', 0.2)
-        npts_2 = vol/0.2
-        value_2 = self.canvas.getIq(0.001)
-        
-        self.assert_( (value_1-value_2)/value_1 < 0.1)         
-        
-    def testSetDensityTiming(self):      
-        """Testing change in computation time with density"""
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam("%s.radius" % handle, 15.0)
-        
-        self.canvas.setParam('lores_density', 0.6)
-        t_0 = time.time()
-        self.canvas.getIq(0.001)
-        t_1 = time.time()-t_0
-        
-        # Change density, the answer should be the same
-        self.canvas.setParam('lores_density', 0.1)
-        t_0 = time.time()
-        self.canvas.getIq(0.001)
-        t_2 = time.time()-t_0
-        
-        self.assert_( t_2 < t_1 and (t_1-t_2)/t_2 > 2)         
-        
-    def testGetParamList(self):
-        """ Test GetParamList on empty canvas"""
-        self.assert_('lores_density' in self.canvas.getParamList())
-        handle = self.canvas.add('sphere')
-        
-    def testGetParamListWithShape(self):
-        """ Test GetParamList on filled canvas"""
-        self.canvas.add('sphere')
-        self.assert_('lores_density' in self.canvas.getParamList())
-        
-    def testAdd(self):
-        handle = "s1"
-        self.assertEqual(handle, self.canvas.add('sphere', handle))
- 
-        #TODO: test for current list of shape
-        self.assertEqual( [handle] , self.canvas.getShapeList())
-        
-    def testSetRadius(self):
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam("%s.rAdius" % handle, 24.0)
-        self.assertEqual(self.canvas.getParam("%s.rAdius" % handle), 24.0)
-
-    def testGetIq(self):
-        """ Test the output of I(q) to the analytical solution
-            If the normalization is wrong, we will have to fix it.
-            
-            getIq() should call getPr() behind the scenes so that
-            the user doesnt have to do it if he doesn't need to.
-        """
-        from sans.models.SphereModel import SphereModel
-        sphere = SphereModel()
-        sphere.setParam('radius', 10.0)
-        sphere.setParam('contrast', 1.0)
-        sphere.setParam('background', 0.0)
-        sphere.setParam('scale', 1.0)
-                
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle, 10.0)
-        self.canvas.setParam('%s.contrast' % handle, 1.0)
-        
-        
-        sim_1 = self.canvas.getIq(0.001)
-        ana_1 = sphere.run(0.001)
-        sim_2 = self.canvas.getIq(0.01)
-        ana_2 = sphere.run(0.01)
-        
-        # test the shape of the curve (calculate relative error 
-        # on the output and it should be compatible with zero
-        # THIS WILL DEPEND ON THE NUMBER OF SPACE POINTS:
-        # that why we need some error analysis.
-        self.assert_( (sim_2*ana_1/sim_1 - ana_2)/ana_2 < 0.1)
-        
-        # test the absolute amplitude
-        self.assert_( math.fabs(sim_2-ana_2)/ana_2 < 0.1)
-        
-    def testGetIq2(self):
-        """ Test two different q values
-        """
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle, 10.0)
-        
-        sim_1 = self.canvas.getIq(0.001)
-        sim_2 = self.canvas.getIq(0.01)
-        
-        self.assertNotAlmostEqual(sim_2, sim_1, 3)
-        
-    def testGetIq_Identical(self):
-        """ Test for identical model / no param change
-        """
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle, 10.0)
-        
-        sim_1 = self.canvas.getIq(0.01)
-        sim_2 = self.canvas.getIq(0.01)
-        
-        self.assertEqual(sim_2, sim_1)
-        
-    def testGetIq_Identical2(self):
-        """ Test for identical model after a parameter change
-            Should be different only of the space points
-            are regenerated and the random seed is different
-        """
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle, 10.0)
-        
-        self.canvas.setParam('lores_density', 0.1)
-        sim_1 = self.canvas.getIq(0.01)
-        
-        # Try to fool the code by changing to a different value
-        self.canvas.setParam('lores_density', 0.2)
-        self.canvas.getIq(0.01)
-        
-        self.canvas.setParam('lores_density', 0.1)
-        sim_2 = self.canvas.getIq(0.01)
-        
-        self.assert_((sim_2-sim_1)/sim_1<0.05)
-        
-    def testGetIq_time(self):
-        """ Time profile
-        """
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle, 15.0)
-        
-        
-        self.canvas.setParam('lores_density', 0.1)
-        t_0 = time.time()
-        sim_1 = self.canvas.getIq(0.01)
-        delta_1 = time.time()-t_0
-        
-        self.canvas.setParam('lores_density', 0.1)
-        
-        t_0 = time.time()
-        sim_2 = self.canvas.getIq(0.01)
-        delta_2 = time.time()-t_0
-        
-        self.assert_((delta_2-delta_1)/delta_1<0.05)
-        
-        
-    def testGetPr(self):
-        """Compare the output of P(r) to the theoretical value"""
-        #TODO: find a way to compare you P(r) to the known
-        # analytical value.
-        pass
-
-    def testLogic1(self):
-        """ Test that the internal logic is set so that the user
-            get the right output after changing a parameter
-        """
-        
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle, 10.0)
-        result_1 = self.canvas.getIq(0.1)
-        self.canvas.setParam('%s.radius' % handle, 20.0)
-        result_2 = self.canvas.getIq(0.1)
-        self.assertNotAlmostEqual(result_1, result_2, 2)
-
-class TestCanvas(unittest.TestCase):
-    """ Unit tests for all shapes in canvas model """
-
-    def setUp(self):
-        self.canvas = VolumeCanvas.VolumeCanvas()
-        self.canvas.params['lores_density'] = 0.05
-
-    def testGetIq_cylinder(self):
-        handle = self.canvas.add('cylinder','cyl')
-        self.canvas.setParam('%s.radius' % handle, 15.0)
-        self.canvas.setParam('%s.length' % handle, 50.0)
-        self.assertEqual(50,self.canvas.getParam('%s.length'%handle))
-        result_1 = self.canvas.getIq(0.1)
-        result_2 = self.canvas.getIq(0.1)
-        self.assertEqual(result_1,result_2)
-
-        self.canvas.delete(handle)
-        handle2 = self.canvas.add('cylinder','cyl2')
-        self.assertEqual(40,self.canvas.getParam('%s.length'%handle2))
-        result_3 = self.canvas.getIq(0.1)
-        self.assertNotEqual(result_1, result_3)
-
-    def testGetIq_ellipsoid(self):
-        handle = self.canvas.add('ellipsoid','elli')
-        self.canvas.setParam('%s.radius_x' % handle, 35)
-        self.canvas.setParam('%s.radius_y' % handle, 20)
-        self.canvas.setParam('%s.radius_z' % handle, 10)
-        result_1 = self.canvas.getIq(0.1)
-        result_2 = self.canvas.getIq(0.1)
-        self.assertEqual(result_1,result_2)
-
-        self.canvas.delete(handle)
-        self.assertEqual(False,self.canvas.hasPr)
-        handle2 = self.canvas.add('ellipsoid','elli2')
-        result_3 = self.canvas.getIq(0.1)
-        self.assertNotEqual(result_1, result_3)
-
-    def testGetIq_singlehelix(self):
-        handle = self.canvas.add('singlehelix','shelix')
-        self.canvas.setParam('%s.radius_helix' % handle, 11)
-        self.canvas.setParam('%s.radius_tube' % handle, 4)
-        self.canvas.setParam('%s.pitch' % handle, 30)
-        self.canvas.setParam('%s.turns' % handle, 3.2)
-        result_1 = self.canvas.getIq(0.1)
-        result_2 = self.canvas.getIq(0.1)
-        self.assertEqual(result_1,result_2)
-
-        self.canvas.delete(handle)
-        self.assertEqual(False,self.canvas.hasPr)
-        handle2 = self.canvas.add('singlehelix','shelix2')
-        result_3 = self.canvas.getIq(0.1)
-        self.assertNotEqual(result_1, result_3)
-        
-class TestOrdering(unittest.TestCase):
-    """ Unit tests for all shapes in canvas model """
-
-    def setUp(self):
-        from sans.models.CoreShellModel import CoreShellModel
-        radius = 15
-        thickness = 5
-        core_vol = 4.0/3.0*math.pi*radius*radius*radius
-        outer_radius = radius+thickness
-        shell_vol = 4.0/3.0*math.pi*outer_radius*outer_radius*outer_radius - core_vol
-        self.shell_sld = -1.0*core_vol/shell_vol
-        
-        self.canvas = VolumeCanvas.VolumeCanvas()
-        self.canvas.params['lores_density'] = 0.1
-        
-        # Core shell model
-        sphere = CoreShellModel()
-        # Core radius
-        sphere.setParam('radius', radius)
-        # Shell thickness
-        sphere.setParam('thickness', thickness)
-        sphere.setParam('core_sld', 1.0)
-        sphere.setParam('shell_sld', self.shell_sld)
-        sphere.setParam('solvent_sld', 0.0)
-        sphere.setParam('background', 0.0)
-        sphere.setParam('scale', 1.0)
-        self.sphere = sphere
-        self.radius = radius
-        self.outer_radius = outer_radius
-        
-    def set_coreshell_on_canvas(self, order1=None, order2=None):
-
-        handle = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle, self.outer_radius)
-        self.canvas.setParam('%s.contrast' % handle, self.shell_sld)
-        if not order1 == None:
-            self.canvas.setParam('%s.order' % handle, order1)
-       
-        handle2 = self.canvas.add('sphere')
-        self.canvas.setParam('%s.radius' % handle2, self.radius)
-        self.canvas.setParam('%s.contrast' % handle2, 1.0)
-        if not order2 == None:
-            self.canvas.setParam('%s.order' % handle2, order2)
-               
-        self.canvas.setParam('scale' , 1.0)
-        self.canvas.setParam('background' , 0.0)
-        
-        
-    def testDefaultOrder(self):
-        self.set_coreshell_on_canvas()
-        
-        ana = self.sphere.run(0.05)
-        val, err = self.canvas.getIqError(0.05)
-        self.assert_(math.fabs(ana-val)<2.0*err)
-        
-    def testRightOrder(self):
-        self.set_coreshell_on_canvas(3.0, 6.0)
-        
-        ana = self.sphere.run(0.05)
-        val, err = self.canvas.getIqError(0.05)
-        #print 'right', ana, val, err
-        self.assert_(math.fabs(ana-val)/ana < 1.1)
-        
-    def testWrongOrder(self):
-        from sans.models.SphereModel import SphereModel
-        self.set_coreshell_on_canvas(1, 0)
-        
-        # Core shell model
-        sphere = SphereModel()
-        # Core radius
-        sphere.setParam('radius', self.outer_radius)
-        # Shell thickness
-        sphere.setParam('contrast', self.shell_sld)
-        sphere.setParam('background', 0.0)
-        sphere.setParam('scale', 1.0)
-        
-        ana = sphere.run(0.05)
-        val, err = self.canvas.getIqError(0.05)
-        #print 'wrong', ana, val, err
-        self.assert_(math.fabs(ana-val)/ana < 1.1)
-            
-        
-if __name__ == '__main__':
-    unittest.main()
