Commit 408e6192 authored by Heller, William T.'s avatar Heller, William T.
Browse files

Merge branch 'ver_0_3_1' into 'master'

Ver 0 3 1

See merge request !25
parents c9a12a01 c2fd53d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,6 +38,6 @@ sas-temper test_sphere_nz.yaml

**Note the use of the dash in the executable script name, rather than an underscore.**

A portion of this research was sponsored by the Laboratory Directed Research 
Research sponsored by the Laboratory Directed Research 
and Development Program of Oak Ridge National Laboratory, managed by UT-Battelle, 
LLC, for the U. S. Department of Energy.
 No newline at end of file
+17 −17
Original line number Diff line number Diff line
@@ -44,20 +44,20 @@ def outputSingleRes(conf, d, m, mnum, res):
            if p.polydispersity is None:
                if p.kind not in ["fixed"]:
                    if p.kind in ["integer"]:
                        buff = "# "+str(p.name)+ " = %6d +/- %6.6f\n" %(p.val, p.unc)
                        buff = "# "+str(p.name)+ " = %6d +/- %6.6e\n" %(p.val, p.unc)
                    else:
                        buff = "# "+str(p.name)+ " = %6.6f +/- %6.6f\n" %(p.val, p.unc)
                        buff = "# "+str(p.name)+ " = %6.6e +/- %6.6e\n" %(p.val, p.unc)
                else:
                    buff = "# "+str(p.name)+ " = %6.6f; fixed\n" %(p.val)
                    buff = "# "+str(p.name)+ " = %6.6e; fixed\n" %(p.val)
            else:
                if p.kind not in ["fixed"]:
                    if p.kind in ["integer"]:
                        buff = "# "+str(p.name)+ " = %6d +/- %6.6f, polydispersity %s = %6.6f +/- %6.6f\n" %(p.val, p.unc, str(p.polydispersity.kind), p.polydispersity.val, p.polydispersity.unc)
                        buff = "# "+str(p.name)+ " = %6d +/- %6.6e, polydispersity %s = %6.6e +/- %6.6e\n" %(p.val, p.unc, str(p.polydispersity.kind), p.polydispersity.val, p.polydispersity.unc)
                    else:
                        buff = "# "+str(p.name)+ " = %6.6f +/- %6.6f, polydispersity %s = %6.6f +/- %6.6f\n" %(p.val, p.unc, str(p.polydispersity.kind), p.polydispersity.val, p.polydispersity.unc)
                        buff = "# "+str(p.name)+ " = %6.6e +/- %6.6e, polydispersity %s = %6.6e +/- %6.6e\n" %(p.val, p.unc, str(p.polydispersity.kind), p.polydispersity.val, p.polydispersity.unc)
                else:
                    # the polydispersity parameter cannot be "fixed" at present
                    buff = "# "+str(p.name)+ " = %6.6f; fixed, polydispersity %s = %6.6f +/- %6.6f\n" %(p.val, str(p.polydispersity.kind), p.polydispersity.val, p.polydispersity.unc)
                    buff = "# "+str(p.name)+ " = %6.6e; fixed, polydispersity %s = %6.6e +/- %6.6e\n" %(p.val, str(p.polydispersity.kind), p.polydispersity.val, p.polydispersity.unc)
            f.write(buff)

            # in case this was coupled
@@ -73,20 +73,20 @@ def outputSingleRes(conf, d, m, mnum, res):
                if sqp.polydispersity is None:
                    if sqp.kind not in ["fixed"]:
                        if sqp.kind in ["integer"]:
                            buff = "# " + str(sqp.name) + " = %6d +/- %6.6f \n" %(sqp.val, sqp.unc)
                            buff = "# " + str(sqp.name) + " = %6d +/- %6.6e \n" %(sqp.val, sqp.unc)
                        else:
                            buff = "# " + str(sqp.name) + " = %6.6f +/- %6.6f \n" %(sqp.val, sqp.unc)
                            buff = "# " + str(sqp.name) + " = %6.6e +/- %6.6e \n" %(sqp.val, sqp.unc)
                    else:
                        buff = "# " + str(sqp.name) + " = %6.6f; fixed \n" %(sqp.val)
                        buff = "# " + str(sqp.name) + " = %6.6e; fixed \n" %(sqp.val)
                else:
                    if sqp.kind not in ["fixed"]:
                        if sqp.kind in ["integer"]:
                            buff = "# " + str(sqp.name) + " = %6d +/- %6.6f, polydispersity %s = %6.6f +/- %6.6f\n" %(sqp.val, sqp.unc, str(sqp.polydispersity.kind), sqp.polydispersity.val, sqp.polydispersity.unc)
                            buff = "# " + str(sqp.name) + " = %6d +/- %6.6e, polydispersity %s = %6.6e +/- %6.6e\n" %(sqp.val, sqp.unc, str(sqp.polydispersity.kind), sqp.polydispersity.val, sqp.polydispersity.unc)
                        else:
                            buff = "# " + str(sqp.name) + " = %6.6f +/- %6.6f, polydispersity %s = %6.6f +/- %6.6f\n" %(sqp.val, sqp.unc, str(sqp.polydispersity.kind), sqp.polydispersity.val, sqp.polydispersity.unc)
                            buff = "# " + str(sqp.name) + " = %6.6e +/- %6.6e, polydispersity %s = %6.6e +/- %6.6e\n" %(sqp.val, sqp.unc, str(sqp.polydispersity.kind), sqp.polydispersity.val, sqp.polydispersity.unc)
                    else:
                        # the polydispersity parameter cannot be "fixed" at present
                        buff = "# " + str(sqp.name) + " = %6.6f; fixed, polydispersity %s = %6.6f +/- %6.6f\n" %(sqp.val, str(sqp.polydispersity.kind), sqp.polydispersity.val, sqp.polydispersity.unc)
                        buff = "# " + str(sqp.name) + " = %6.6e; fixed, polydispersity %s = %6.6e +/- %6.6e\n" %(sqp.val, str(sqp.polydispersity.kind), sqp.polydispersity.val, sqp.polydispersity.unc)
                f.write(buff)

                # in case we have a coupled parameter
@@ -97,7 +97,7 @@ def outputSingleRes(conf, d, m, mnum, res):

        buff = "# the model profile q and I(q)\n"
        for i in range(0,len(m.x)):
            buff = "%6.6f\t%6.6f\n" %(m.x[i], m.y[i])
            buff = "%6.6e\t%6.6e\n" %(m.x[i], m.y[i])
            f.write(buff)

    # end by closing the file
@@ -194,9 +194,9 @@ def outputSetRes(conf, res):
        f.write(buff)
        for j in range(0,parms):
            if varkinds[j] in ["fixed"]:
                buff = "# " + names[j] + " = %6.6f; fixed\n" %(ave[j])
                buff = "# " + names[j] + " = %6.6e; fixed\n" %(ave[j])
            else:
                buff = "# " + names[j] + " = %6.6f +/- %6.6f\n" %(ave[j], std[j])
                buff = "# " + names[j] + " = %6.6e +/- %6.6e\n" %(ave[j], std[j])
            f.write(buff)

        buff = "# Pearson product-moment correlation coefficients\n"
@@ -212,12 +212,12 @@ def outputSetRes(conf, res):
        f.write(buff)
        for i in range(0,conf.models):
            buff = ""
            buff += "%6.6f\t" %(chisq[i])
            buff += "%6.6e\t" %(chisq[i])
            for j in range(0,parms):
                if varkinds[j] in ["integer"]:
                    buff += "%6d\t" %(vals[j][i])
                else:
                    buff += "%6.6f\t" %(vals[j][i])
                    buff += "%6.6e\t" %(vals[j][i])
            buff += "\n"
            f.write(buff)

+6 −3
Original line number Diff line number Diff line
@@ -62,7 +62,10 @@ for i in range(0,sasTemperConf.models):
        print('#', end='', flush=True)


# and output the analysis of the set of models found
# and output the analysis of the set of models found,
# but only if you are generating more than 3 models.
# much of the information is of little use otherwise.
if sasTemperConf.models >=3 :
    output.outputSetRes(sasTemperConf, results)
    
# add a little feedback to the user