Open gzhu06 opened 3 years ago
You're absolutely right, thanks a lot! It's a clear oversight I made when adding support to torch 1.8!
For torch under 1.8, it will work as expected though as what I called it conj
(in a very stupid way), does the rotation
def conj(filt):
return torch.stack([filt[:, :, :, 1], -filt[:, :, :, 0]], dim=-1)
Do you want to submit a fix for torch version > 1.8 with the correct rotation? That would be awesome!
Thanks again for spoting it!
Yes, I'd like to. I'll submit a fix some time this or next week.
Just want to make sure that to fix this: in 1.7, pytorch uses additional dimension to store real and image parts, while in 1.8 it's already a tensor in complex datatype.
So it's simply:
hft_f = -1j * ft_f
Right? Also I think conj could be misleading.
Yes, I'd like to. I'll submit a fix some time this or next week.
Thanks ! :tada:
Yes this is correct : hft_f = -1j * ft_f
(-90° phase shift).
And the conj name should also be changed, you're right
Thanks for this project, very impressive contribution! I have a question on the hibert transform from the code asteroid-filterbanks/asteroid_filterbanks/analytic_free_fb.py :
As far as I know, the hilbert transform is performed like this:
From the code, it looks like using conj to perform rotation operation, is this correct?