diff --git a/test/t-doEstimatorNormalMulti.cpp b/test/t-doEstimatorNormalMulti.cpp index 661fe474..c6fdeabc 100644 --- a/test/t-doEstimatorNormalMulti.cpp +++ b/test/t-doEstimatorNormalMulti.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -31,12 +32,14 @@ int main(int ac, char** av) AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m - AtomType covar1_value = parser.createParam((AtomType)1, "covar1", "Covar value 1", '1', section).value(); + AtomType covar1_value = parser.createParam((AtomType)1.0, "covar1", "Covar value 1", '1', section).value(); AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value(); - AtomType covar3_value = parser.createParam((AtomType)1, "covar3", "Covar value 3", '3', section).value(); + AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value(); std::ostringstream ss; - ss << p_size << "_" << mean_value << "_" << covar1_value << "_" << covar2_value << "_" << covar3_value << "_gen"; + ss << p_size << "_" << fixed << setprecision(1) + << mean_value << "_" << covar1_value << "_" << covar2_value << "_" + << covar3_value << "_gen"; std::string gen_filename = ss.str(); if (parser.userNeedsHelp()) diff --git a/test/test_cov_parameters.py b/test/test_cov_parameters.py index c73c9fbb..f9199a9e 100755 --- a/test/test_cov_parameters.py +++ b/test/test_cov_parameters.py @@ -2,7 +2,7 @@ PSIZE = 10000 MEAN = 0 -CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters" +CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters -f %s_gen1" from os import system from numpy import arange @@ -12,6 +12,7 @@ if __name__ == '__main__': for p1 in list(arange(0.1, 1.1, 0.1)): for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)): for p3 in list(arange(0.1, 1.1, 0.1)): - cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) ) + gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) + cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen ) print cmd system( cmd )