Skip to content

Commit d8de7f9

Browse files
committed
turned store_single_spectrum public for lineprofiling
1 parent 5261bf1 commit d8de7f9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/signalsnap/spectrum_calculator.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ def save_spec(self, save_path):
812812
self.S_stationarity_temp = None
813813
pickle_save(save_path, self)
814814

815-
def __store_single_spectrum(self, single_spectrum, order):
815+
def store_single_spectrum(self, single_spectrum, order):
816816

817817
"""
818818
Helper function to store the spectra of single frames afterwards used for calculation of errors and overlaps.
@@ -1012,9 +1012,10 @@ def fourier_coeffs_to_spectra(self, orders, a_w_all_gpu, f_max_ind, f_min_ind,
10121012
single_spectrum = c1(a_w) / self.config.delta_t / single_window.mean() / single_window.shape[0]
10131013

10141014
elif order == 2:
1015-
print('a_w_all_gpu:', a_w_all_gpu.shape)
1016-
print(f_min_ind, f_max_ind)
1017-
a_w = af.lookup(a_w_all_gpu, af.Array(list(range(f_min_ind, f_max_ind))), dim=0)
1015+
if self.config.f_lists is None:
1016+
a_w = af.lookup(a_w_all_gpu, af.Array(list(range(f_min_ind, f_max_ind))), dim=0)
1017+
else:
1018+
a_w = a_w_all_gpu
10181019

10191020
if self.config.corr_data is not None:
10201021
a_w_all_corr = fft_r2c(window * chunk_corr_gpu, dim0=0, scale=1)
@@ -1046,7 +1047,7 @@ def fourier_coeffs_to_spectra(self, orders, a_w_all_gpu, f_max_ind, f_min_ind,
10461047

10471048
single_spectrum = self.c4(a_w, a_w_corr) / (self.config.delta_t * (single_window ** order).sum())
10481049

1049-
self.__store_single_spectrum(single_spectrum, order)
1050+
self.store_single_spectrum(single_spectrum, order)
10501051

10511052
def __prep_f_and_S_arrays(self, orders, f_all_in):
10521053
"""

0 commit comments

Comments
 (0)