You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In various applications --e.g. convolving a detector response with a spectrum-- it would be desirable for functions to return the analytical integral within a range when possible. Even when analytics integration is not possible, numerical integration is a common task and it would be nice to provide it instead of everyone writing their own code.
Some initial thoughts on how to implement this:
Add an integrate() method to the Function class that, by default, passes args, kwargs, and the Function.evaluate to scipy.integrate
For functions with an analytic integral, override this method with the exact calculation
For functions using scipy.integrate might be problematic in the context of composite functions --e.g. discontinuous functions-- throw a warning. Maybe a flag is needed to specify this?
The text was updated successfully, but these errors were encountered:
In various applications --e.g. convolving a detector response with a spectrum-- it would be desirable for functions to return the analytical integral within a range when possible. Even when analytics integration is not possible, numerical integration is a common task and it would be nice to provide it instead of everyone writing their own code.
Some initial thoughts on how to implement this:
The text was updated successfully, but these errors were encountered: