Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gaussianfit.py needs improvement #1

Open
7 tasks
pavoljuhas opened this issue Nov 20, 2013 · 1 comment
Open
7 tasks

gaussianfit.py needs improvement #1

pavoljuhas opened this issue Nov 20, 2013 · 1 comment
Assignees

Comments

@pavoljuhas
Copy link
Member

The gaussianfit.py extension e13ed35 is currently not very usable, for example the gaussianfit function does not return any result. I suggest the following improvements:

  • replace header with CMI-related one as in diffpy/diffpy.srreal@302745e
  • convert gaussianfit function to a class that would accept the same arguments
  • the class should automatically pick meaningful starting values for x0, sig from the maximum and FWHM in the y-array
  • the class should have attributes A, sig, x0, recipe, results, x, y, dy, yg, where
    • A, sig, x0 are properties forwarded to recipe.NAME
    • x, y, dy are read-only input data, yg the Gauss curve evaluated for the current A, sig, x0
  • the class should have methods:
    • plot - replacement for plotResults()
    • refine() - call scipy leastsq for the current recipe state
  • remove the "gau.dat" file and the if name == "main" block.
  • write a few-line example in the class docstring that generates Gauss curve with some noise and executes the gaussfit class.
@ghost ghost assigned XiaohaoYang Nov 20, 2013
@ghost ghost assigned kevinrknox Dec 12, 2013
@pavoljuhas
Copy link
Member Author

Kevin volunteered to fix this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants