Skip to content

trspeb/pysplinefit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PYSPLINEFIT

Python library to fit a general spline to data in python/scipy.

Presentation

Let's imagine you have experimental data in two arrays or matrix: x and y. Let's imagine you would like to fit a lookup table on the data on the knots (1, 2, 3, 4, 5).

Step 1: Create the basis. We choose a hat functions basis.

basis = Hatbasis((1, 2, 3, 4, 5))

Step 2: Fit the data.

spline = Optspline(basis, x, y)

Step 3: Use your spline as a function.

spline(2.5) # evaluate @ x = 2.5

Use cases

See the handspinner article.

About

Fitting a general spline to data in python/scipy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages