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

Derivative of Spline Surface #20

Closed
BenMichell opened this issue Jun 2, 2020 · 7 comments
Closed

Derivative of Spline Surface #20

BenMichell opened this issue Jun 2, 2020 · 7 comments
Assignees
Milestone

Comments

@BenMichell
Copy link

Hi Eugene,

I came across your package trying to replicate some analysis that had been done in Matlab using csaps. The tool works perfectly, however the analysis I'm replicating used the Matlab function fnders to return the derivative of the spline surface fitted using csaps.

Is there a way to do this in your package, or is it something you would consider as an additional feature?

Many thanks again for the tool.

Best Regards,

Ben

@espdev
Copy link
Owner

espdev commented Jun 2, 2020

Hi Ben,

Currently, csaps package does not provide any spline analysis functionality. However, I think we can convert csaps PP spline representation to scipy PPoly object for univariate/multivariate cases and NdPPoly for nd-grid cases. scipy PPoly class contains spline analysis methods (derivative, integrate, ...) and we just can use this functionality for csaps splines because it is regular cubic spline with natural boundary condition.

I can try to implement converting SplinePPForm to PPoly. In fact, we just need to reshape the array of spline coefficients and use PPoly.construct_fast method.

@BenMichell
Copy link
Author

BenMichell commented Jun 2, 2020 via email

@Taniya-Fansupkar
Copy link

Hi Eugene,
I am looking for finding un normalized taylor coefficient which is returned by fntlr function in Matlab and the fntlr takes input spline object returned by csaps in Matlab. How can I do similar thing using your library of csaps

@Taniya-Fansupkar
Copy link

Same as Ben who is looking for fnder for finding derivative, I am looking for fntlr equivalent for finding unnormalized Taylor coefficient

@espdev
Copy link
Owner

espdev commented Jun 11, 2020

@Taniya-Fansupkar,

It seems to me fntlr function and its analogues do not exist in scipy in some form. You can implement the function for a cubic spline. I have not looked at the fntlr matlab source code yet and do not know how difficult it is.

I want to add support of analysis functionality to csaps package based on scipy PPoly class. We could add fntlr also.

@Taniya-Fansupkar
Copy link

@espdev
It would be much more beneficial if you add support for analysis functionality to csaps package.

@espdev
Copy link
Owner

espdev commented Jul 2, 2020

@BenMichell @Taniya-Fansupkar

Spline analysis functionality has been implemented via SciPy PPoly/NdPPoly classes. These changes already in master branch and will be in 1.0.0 release. See tests/test_analysis how to use it.

Also I try to implement and add fntlr to 1.0.0 release or 1.1.0.

@espdev espdev closed this as completed Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants