How to fit without calling pylab and plotting each time

Issue #4 new
Former user created an issue

Dear pyspeckit team,

I was wondering if there is any possibility, or any parameter that can be set to avoid the call of pylab (an the subsequent plotting of the fit) each time specfit or baseline are called. I have been looking into your web page and I could not find anything.

This is because during my fitting procedure I iterate several times over the fit and I think probably the code is spending too much time and memory resources during each iteration.

Comments (2)

  1. Adam Ginsburg

    Indeed that should be possible and straightforward. If you want the plot, but you don't want it to update at each step, do: sp.plotter.autorefresh=False before running the various fits, then sp.plotter() to re-plot when you're done, or

    sp.plotter()
    sp.specfit.plot_fit()
    sp.baseline.plot_baseline()
    

    if you want to plot all of them.

    If you want to avoid having a plot at all, just don't call sp.plotter and no plot will be made.

  2. Log in to comment