Skip to content

Instantly share code, notes, and snippets.

@keflavich
Last active December 17, 2015 02:29
Show Gist options
  • Save keflavich/5535930 to your computer and use it in GitHub Desktop.
Save keflavich/5535930 to your computer and use it in GitHub Desktop.
Astropy fit gui example

Shows the results of:

import fitgui
from numpy.random import randn
import numpy as np

x = np.linspace(0,50,100)
y = randn(100) + 10*np.exp(-(x-20)**2/5.)

fg = fitgui.FitGui(x,y)

Then clicking New Model... (Frame 1) and selecting Gaussian1DModel (Frame 2,3) then modifying the initial guess (Frame 4,5) and clicking Fit Model (Frame 6), then displaying the residuals (Frame 7)

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