Hello! I was studying a BNS simulation (without noise) and wanted to compare its ASD with the ET sensitivity curve. For the ASD, I used the sqrt of the normalized psd (NPSD) as I have seen in one of the lectures about Data Quality. Actually, I used the sqrt of:
PSD=(2/T)(FFT(h))**2.
Then, I found this definition in C. J. Moore et al. 2014:
ASD=2sqrt(f)|FFT(h)|.
Finally, I used the gwpy asd function with fftlength=None, overlap=None and method=median. I see a huge difference between these definitions, especially with the amplitude, so I am really confused and not sure which one is the best in order to compare with a sensitivity curve. I will really appreciate any comments and suggestions. Thank you!
This is the plot:
Hi Lucy:
gwpy.timeseries TimeSeries method asd should be fine.
There can be problems in the implementation of those formulas. In short, it can be caused by the definition of FFT, |data| != |FFT(data)|
I’ve come across the same bug once. If you’re using FFT in some package, you need to check the definition carefully. All the package has one common thing which is IFFT( FFT( |data| ) ) = |data|. But as you can see here, the factor can be distributed into IFFT and FFT, there’s one free variable. So you need to check the norm of the FFT which is the |FFT(data)|, it should contain something like N or sqrt(N). You need to check the implementation of PSD calculation, a proper calculation should fit welch method (scipy.signal package, default is 1-sided psd) and the gwpy one pretty well, this is a good way to check.
Hi @BarryG, Thank you very much for your reply!
I will check those details as you are suggesting. Still not sure about using the gwpy because I feel I don’t have a complete understanding of it, that is why I was more comfortable with a “manual” code, but the results are not the same as I was expecting, so I will do some tests and if I have more questions, I will be back here :]
Thanks a lot!!