|
15 | 15 | @plot_test |
16 | 16 | def test_plot_spectra(tfm, tfg, skip_if_no_mpl): |
17 | 17 |
|
18 | | - # Test with 1d inputs - 1d freq array and list of 1d power spectra |
| 18 | + # Test with 1d inputs - 1d freq array & list of 1d power spectra |
19 | 19 | plot_spectra(tfm.freqs, tfm.power_spectrum, |
20 | 20 | save_fig=True, file_path=TEST_PLOTS_PATH, file_name='test_plot_spectra_1d.png') |
21 | 21 |
|
22 | | - # Test with 1d inputs - 1d freq array and list of 1d power spectra |
| 22 | + # Test with 1d inputs - 1d freq array & list of 1d power spectra |
23 | 23 | plot_spectra(tfg.freqs, [tfg.power_spectra[0, :], tfg.power_spectra[1, :]], |
24 | | - save_fig=True, file_path=TEST_PLOTS_PATH, file_name='test_plot_spectra_list_1d.png') |
| 24 | + save_fig=True, file_path=TEST_PLOTS_PATH, |
| 25 | + file_name='test_plot_spectra_list_1d.png') |
25 | 26 |
|
26 | | - # Test with multiple freq inputs - list of 1d freq array and list of 1d power spectra |
27 | | - plot_spectra([tfg.freqs, tfg.freqs], [tfg.power_spectra[0, :], tfg.power_spectra[1, :]], |
| 27 | + # Test with multiple lists - list of 1d freqs & list of 1d power spectra (different f ranges) |
| 28 | + plot_spectra([tfg.freqs, tfg.freqs[:-5]], |
| 29 | + [tfg.power_spectra[0, :], tfg.power_spectra[1, :-5]], |
28 | 30 | save_fig=True, file_path=TEST_PLOTS_PATH, |
29 | 31 | file_name='test_plot_spectra_lists_1d.png') |
30 | 32 |
|
31 | 33 | # Test with 2d array inputs |
32 | 34 | plot_spectra(np.vstack([tfg.freqs, tfg.freqs]), |
33 | 35 | np.vstack([tfg.power_spectra[0, :], tfg.power_spectra[1, :]]), |
34 | | - save_fig=True, file_path=TEST_PLOTS_PATH, file_name='test_plot_spectra_2d.png') |
| 36 | + save_fig=True, file_path=TEST_PLOTS_PATH, |
| 37 | + file_name='test_plot_spectra_2d.png') |
35 | 38 |
|
36 | 39 | # Test with labels |
37 | 40 | plot_spectra(tfg.freqs, [tfg.power_spectra[0, :], tfg.power_spectra[1, :]], labels=['A', 'B'], |
38 | | - save_fig=True, file_path=TEST_PLOTS_PATH, file_name='test_plot_spectra_labels.png') |
| 41 | + save_fig=True, file_path=TEST_PLOTS_PATH, |
| 42 | + file_name='test_plot_spectra_labels.png') |
39 | 43 |
|
40 | 44 | @plot_test |
41 | 45 | def test_plot_spectra_shading(tfm, tfg, skip_if_no_mpl): |
|
0 commit comments