Extracts data from from each Analysis. Parameter (default), (type): ----------------------------- * analyses (), (list): a list with Analysis for curve data extraction Return (type): -------------- * curveData (), (list): a list with d
(analyses)
| 759 | |
| 760 | |
| 761 | def _curve_data_extractor_bars(analyses): |
| 762 | """ |
| 763 | Extracts data from from each Analysis. |
| 764 | |
| 765 | Parameter (default), (type): |
| 766 | ----------------------------- |
| 767 | |
| 768 | * analyses (), (list): |
| 769 | a list with Analysis for curve data extraction |
| 770 | |
| 771 | Return (type): |
| 772 | -------------- |
| 773 | |
| 774 | * curveData (), (list): |
| 775 | a list with dictionaries containing the information about each |
| 776 | curve. Needed keys for analysis plot: |
| 777 | |
| 778 | - 'bands', (), (ndarray): fractional octave bands; |
| 779 | - 'data', (), (ndarray): magnitude axis; |
| 780 | - 'dataLabel', (), (str): data label; |
| 781 | - 'error', (), (ndarray): error for each fractional octave band; |
| 782 | - 'errorLabel', (), (str): error label; |
| 783 | |
| 784 | >>> curveData = [{'bands':[100, 200, 400], 'data':[1, 5 ,7], |
| 785 | 'dataLabel':'my precious data', |
| 786 | 'error':[2e-5, 1, 3], |
| 787 | 'errorLabel':'my mistakes'}] |
| 788 | """ |
| 789 | curveData = [] |
| 790 | for analysis in analyses: |
| 791 | bands = analysis.bands |
| 792 | anData = analysis.data |
| 793 | dataLabel = analysis.dataLabel |
| 794 | error = analysis.error |
| 795 | errorLabel = analysis.errorLabel |
| 796 | curveData.append({ |
| 797 | 'bands':bands, |
| 798 | 'data':anData, |
| 799 | 'dataLabel':dataLabel, |
| 800 | 'error':error, |
| 801 | 'errorLabel':errorLabel}) |
| 802 | return curveData |
| 803 | |
| 804 | |
| 805 | def spectrogram(sigObjs, winType, winSize, |