Open mh-skjelvareid opened 3 years ago
Have tried quickly making changes to positive frequencies in all algorithms. Works for PSM, but not (immediately) for MULOK and CPSM. The MULOK code is quite complex and there are many pitfalls, but it should be possible with more time. With CPSM the 'exact' transfer function fails - possibly because the besselh() function isn't "symmetric" with regard to positive/negative frequencies. Maybe a change to positive frequencies isn't possible here. Requires more digging into theory.
The algorithms in /core were originally written using negative frequencies / omega, with corresponding signs in phase shifts etc. The negative and positive spectra of the original measured waveforms are mirror images of each other, and it doesn't really matter if the negative or positive frequency band is used. However, using negative frequencies gives the impression that this is necessary for the code to work, which it isn't. Changing to positive frequencies would make the code cleaner and easier to understand.