fusion-flap / flap

Fusion Library of Analysis Programs
MIT License
11 stars 5 forks source link

Hanning option is not working during CPSD calculation #55

Closed thelampire closed 4 years ago

thelampire commented 4 years ago

First gives this error:

File "/Users/mlampert/work/repos/flap_repos/flap/spectral_analysis.py", line 980, in _cpsd data_proc_ref *= hanning_window_ref.astype(data_proc_ref.dtype)

UnboundLocalError: local variable 'hanning_window_ref' referenced before assignment

Then when I modify line 938 from hanning_window = hanning_window.reshape(han_sh) to hanning_window_ref = hanning_window.reshape(han_sh):

ValueError: operands could not be broadcast together with shapes (396,64,80) (396,) (396,64,80)

thelampire commented 4 years ago

Fixed it in the latest push in thelampire-patch-3