MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / integrate_monomial_coeffs

Function integrate_monomial_coeffs

SLiCAP/SLiCAPmath.py:2319–2399  ·  view source on GitHub ↗

Returns expr in which x in coefficients of monomials of variables are integrated over the range x_lower ... x_upper. If doit=True the integration will be performed, else integral operators will be returned. :param expr: Sympy expression :type param: sympy.expr :param vari

(expr, variables, x, x_lower, x_upper, doit=True, 
                              wf=1, method="auto", CDS=False, tau=None, 
                              points=1000, numeric=True)

Source from the content-addressed store, hash-verified

2317 return new_coeffs
2318
2319def integrate_monomial_coeffs(expr, variables, x, x_lower, x_upper, doit=True,
2320 wf=1, method="auto", CDS=False, tau=None,
2321 points=1000, numeric=True):
2322 """
2323 Returns expr in which x in coefficients of monomials of
2324 variables are integrated over the range x_lower ... x_upper. If doit=True
2325 the integration will be performed, else integral operators will be returned.
2326
2327 :param expr: Sympy expression
2328 :type param: sympy.expr
2329
2330 :param variables: List or tuple with variables
2331 (currently only two variables accepted)
2332
2333 :type variables: list with sympy.Symbol objects
2334
2335 :param x: integration variable
2336 :type x: sympy.Symbol
2337
2338 :param x_lower: start value integration
2339 :type x_lower: sympy.Symbol, int or float
2340
2341 :param x_upper: end value integration
2342 :type x_upper: sympy.Symbol, int or float
2343
2344 :param doit: True/False; If True, the integration will be performed,
2345 else integral operators will be returned.
2346 :type doit: bool
2347
2348 :param CDS: True if correlated double sampling is required, defaults to False
2349 If True parameter 'tau' must be given a nonzero finite value
2350 (can be symbolic).
2351 If method=="log" a logarithmic frequency seep will be used from
2352 the lowest frequency until the frequency of the first notch:
2353 f=1/tau. Linear sweeping will be used for all other frequency
2354 segments.
2355 The number of points per segment will be set to points.
2356 If type(points) == list, the method will be set to 'scipy'.
2357 :type CDS: Bool
2358
2359 :param tau: CDS delay time
2360 :type tau: str, int, float, sp.Symbol
2361
2362 :param method: Integration method, implemented methods are:
2363
2364 - "auto": automatic selection of integration method
2365 - "symbolic": forces symbolic integration
2366 - "scipy": numeric integration using scipy.integrate.quad
2367 CDS will use integration per section f=1/tau
2368 - "log": numeric integration using numpy.trapezoid with a
2369 logarithmic frequency sweep from f_min to f_max
2370 and the number of points (CDS: per section) set by points
2371 - "lin": numeric integration using numpy.trapezoid with a
2372 linear frequency sweep from fmin to fmax
2373 and the number of points (CDS: per section) set by points
2374 - "list": numeric integration using numpy.trapezoid with frequency
2375 points taken from points (CDS: switches method to 'scipy').
2376

Callers 1

SLiCAPmath.pyFile · 0.85

Calls 1

Tested by

no test coverage detected