dragonyanglong / diffpy.pdfgui

graphical user interface for real space structure refinement to PDF
Other
0 stars 0 forks source link

apply Spdiameter #15

Open dragonyanglong opened 6 years ago

dragonyanglong commented 6 years ago

In CMI, if user want to use spdiameter, one need to specify the sphericalCF when setEquation at the beginning.

    contribution.registerFunction(sphericalCF, name = "f")
    contribution.setEquation("scale * (G_crystal) * f")

However, in GUI, we do not know user will use spdiameter or not, how to setEquation?

dragonyanglong commented 6 years ago

one suggestion (temp)

from diffpy.srfit.pdf.characteristicfunctions import sphericalCF

if gui.spdiameter = 0.0:
    spherical = 1.0
else
    contribution.registerFunction(sphericalCF, name = "spherical")

contribution.setEquation("scale * G_crystal * spherical")