Calculates and returns total variance of noise spectra. :param noiseData: a. Dictionary with key-value pairs: - keys (str): names of noise sources - value (expr, list): input or output referred noise spectrum or list with spectra
(noiseData, numeric, method, CDS, tau, fmin, fmax, points, wf)
| 1425 | return P_s |
| 1426 | |
| 1427 | def _doVarNoiseData(noiseData, numeric, method, CDS, tau, fmin, fmax, points, wf): |
| 1428 | """ |
| 1429 | Calculates and returns total variance of noise spectra. |
| 1430 | |
| 1431 | :param noiseData: |
| 1432 | |
| 1433 | a. Dictionary with key-value pairs: |
| 1434 | |
| 1435 | - keys (str): names of noise sources |
| 1436 | - value (expr, list): input or output referred noise spectrum or list with spectra |
| 1437 | |
| 1438 | b. Expression of a noise spectrum or a list of expressions |
| 1439 | |
| 1440 | :type param: dict |
| 1441 | |
| 1442 | :param numeric: True if result needs to be numeric |
| 1443 | :type numeric: Bool |
| 1444 | |
| 1445 | :param method: Integration method, implemented methods are: |
| 1446 | |
| 1447 | - "auto": automatic selection of integration method |
| 1448 | - "symbolic": forces symbolic integration |
| 1449 | - "scipy": numeric integration using scipy.integrate.quad |
| 1450 | CDS will use integration per section f=1/tau |
| 1451 | - "log": numeric integration using numpy.trapezoid with a |
| 1452 | logarithmic frequency sweep from f_min to f_max |
| 1453 | and the number of points (CDS: per section) set by points |
| 1454 | - "lin": numeric integration using numpy.trapezoid with a |
| 1455 | linear frequency sweep from fmin to fmax |
| 1456 | and the number of points (CDS: per section) set by points |
| 1457 | - "list": numeric integration using numpy.trapezoid with frequency |
| 1458 | points taken from points (CDS: switches method to 'scipy'). |
| 1459 | |
| 1460 | Defaults to 'auto' |
| 1461 | |
| 1462 | :type method: str |
| 1463 | |
| 1464 | :param CDS: True if correlated double sampling is required, defaults to False |
| 1465 | If True parameter 'tau' must be given a nonzero finite value |
| 1466 | (can be symbolic). |
| 1467 | If method=="log" a logarithmic frequency seep will be used from |
| 1468 | the lowest frequency until the frequency of the first notch: |
| 1469 | f=1/tau. Linear sweeping will be used for all other frequency |
| 1470 | segments. |
| 1471 | The number of points per segment will be set to points. |
| 1472 | If type(points) == list, the method will be set to 'scipy'. |
| 1473 | :type CDS: Bool |
| 1474 | |
| 1475 | :param tau: CDS delay time |
| 1476 | :type tau: str, int, float, sp.Symbol |
| 1477 | |
| 1478 | :param fmin: Lower limit of the frequency range in Hz. |
| 1479 | :type fmin: str, int, float, sp.Symbol |
| 1480 | |
| 1481 | :param fmax: Upper limit of the frequency range in Hz. |
| 1482 | :type fmax: str, int, float, sp.Symbol |
| 1483 | |
| 1484 | :param points: Number of frequency points for integration for method="lin" |
no test coverage detected