@@ -15,7 +15,7 @@ def pfbresponse(taps, nchans, fs):
1515
1616 Parameters
1717 ----------
18- taps : str or array_like
18+ taps : str or ndarray
1919 If string will treat it as a csv file. If array treats it as taps to the filter.
2020 nchans : int
2121 The number of channesl for the pfb.
@@ -24,7 +24,7 @@ def pfbresponse(taps, nchans, fs):
2424
2525 Returns
2626 -------
27- freq_ar : array_like
27+ freq_ar : ndarray
2828 Frequency vector in Hz.
2929 filt_dict : dict
3030 Keys are filter number, values are frequency response in dB
@@ -86,7 +86,7 @@ def plotresponse(freq_ar, filt_dict, nchans):
8686
8787 Parameters
8888 ----------
89- freq_ar : array_like
89+ freq_ar : ndarray
9090 Frequency vector in Hz.
9191 filt_dict : dict
9292 Keys are filter number, values are frequency response in dB
@@ -97,7 +97,7 @@ def plotresponse(freq_ar, filt_dict, nchans):
9797 -------
9898 fig : figure
9999 Image of frequency response.
100- axs : array_like
100+ axs : ndarray
101101 List of the axes that teh frequency response plotted on.
102102 """
103103 fig , axs = plt .subplots (2 , 1 , figsize = (6 , 8 ))
@@ -138,12 +138,17 @@ def pfb_dec_simp(data, nchans, coeffs):
138138 """
139139 Parameters
140140 ----------
141- data : array_like
141+ data : ndarray
142142 A numpy array to be processed.
143143 nchans : int
144144 Number of output channes
145- coefs : array_like
145+ coefs : ndarray
146146 Filter coefficients in nchan x tpc array.
147+
148+ Returns
149+ -------
150+ xout : ndarray
151+ The output from the polyphase.
147152 """
148153 remove_sub = False
149154 if data .ndim == 1 :
@@ -190,12 +195,17 @@ def pfb_rec_simp(data, nchans, coeffs, mask, fillmethod, fillparams=[], realout=
190195 """
191196 Parameters
192197 ----------
193- data : array_like
198+ data : ndarray
194199 A numpy array to be processed.
195200 nchans : int
196201 Number of output channes
197- coefs : array_like
202+ coefs : ndarray
198203 Filter coefficients in nchan x tpc array.
204+
205+ Returns
206+ -------
207+ rec_array : ndarray
208+ The output from the polyphase synthesis.
199209 """
200210
201211 remove_sub = False
@@ -211,9 +221,10 @@ def pfb_rec_simp(data, nchans, coeffs, mask, fillmethod, fillparams=[], realout=
211221 else :
212222 npw = np .nanmedian (data .flatten ().real ** 2 + data .flatten ().imag ** 2 )
213223 npw = npw / np .log (2 )
214- d1 = np .random .randn (shp , dtype = data .dtype ) + 1j * np .random .randn (
215- shp , dtype = data .dtype
216- )
224+ d1r = np .random .randn (* shp , dtype = data .dtype )
225+ d1i = np .random .randn (* shp , dtype = data .dtype )
226+ d1 = d1r + 1j * d1i
227+
217228 d1 = np .sqrt (npw / 2 ) * d1
218229 rec_input = d1
219230 elif fillmethod == "value" :
@@ -281,18 +292,18 @@ def pfb_decompose(data, nchans, coefs, mask):
281292
282293 Parameters
283294 ----------
284- data : array_like
295+ data : ndarray
285296 A numpy array to be processed.
286297 nchans : int
287298 Number of output channes
288- coefs : array_like
299+ coefs : ndarray
289300 Filter coefficients
290- mask : array_like
301+ mask : ndarray
291302 List of channels to be kept
292303
293304 Returns
294305 -------
295- xout : array_like
306+ xout : ndarray
296307 The output from the polyphase.
297308 """
298309
@@ -364,13 +375,13 @@ def pfb_reconstruct(data, nchans, coefs, mask, fillmethod, fillparams=[], realou
364375
365376 Parameters
366377 ----------
367- data : array_like
378+ data : ndarray
368379 A numpy array to be processed.
369380 nchans : int
370381 Number of output channes
371- coefs : array_like
382+ coefs : ndarray
372383 Filter coefficients
373- mask : array_like
384+ mask : ndarray
374385 List of channels to be kept
375386 fillmethod : string
376387 Type of filled in the data before the reconstrution.
@@ -379,7 +390,7 @@ def pfb_reconstruct(data, nchans, coefs, mask, fillmethod, fillparams=[], realou
379390
380391 Returns
381392 -------
382- rec_array : array_like
393+ rec_array : ndarray
383394 The output from the polyphase synthesis.
384395 """
385396
0 commit comments