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

#324 LineScan.fitSpline implemented #397

Merged
merged 1 commit into from Apr 15, 2013

Conversation

Projects
None yet
2 participants
@akshaydixi
Copy link
Contributor

akshaydixi commented Apr 13, 2013

Implemented LineScan.fitSpline based on http://www.scipy.org/Cookbook/Interpolation

This is my first pull request so please bear with me if there are any errors.

Looking forward to some feedback.
A an example of the function in action:

import matplotlib.pyplot as plt
img = Image('lenna')
ls = img.getLineScan(pt1=(50,50),pt2=(75,75)).normalize()
spline1 = ls.fitSpline(degree=1)
spline2 = ls.fitSpline(degree=2)
plt.plot(ls)
plt.show()

ls
plt.plot(spline1)
plt.show()

spline1
plt.plot(spline2)
plt.show()
spline2

kscottz pushed a commit that referenced this pull request Apr 15, 2013

Katherine Scott
Merge pull request #397 from akshaydixi/LineScan/fitSpline
 #324 LineScan.fitSpline implemented. I am going to merge this in but be aware that there is no test, I am going to accept it because there is example code with output. We need to break out the line scan tests into a separate test suite. Once we get that up and running we will need a test for this.

@kscottz kscottz merged commit ceb4c31 into sightmachine:develop Apr 15, 2013

1 check passed

default The Travis build passed
Details

@akshaydixi akshaydixi deleted the akshaydixi:LineScan/fitSpline branch Apr 15, 2013

@akshaydixi akshaydixi restored the akshaydixi:LineScan/fitSpline branch Apr 15, 2013

@akshaydixi akshaydixi deleted the akshaydixi:LineScan/fitSpline branch Apr 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.