Skip to content

bfichera/lmfit-slider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lmfit-slider

Requirements

  • matplotlib
  • numpy

Installation

pip install lmfit-slider

Usage

import lmfit
import numpy as np

from lmfit_slider import slider


def fcn(params, x, A):
    return A*np.sin(params['k']*x)


params = lmfit.Parameters()
params.add('k', value=1, min=-10, max=10)

data_x = np.linspace(0, 2*np.pi, 6)
data = 1.5*np.sin(4*data_x)

model_x = np.linspace(min(data_x), max(data_x), 5000)

new_params = slider(
    fcn,
    params,
    data_x=data_x,
    data=data,
    args=(model_x, 1.5),
)

new_params.pretty_print()

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages