Skip to content

Adding LPSD averaging method

Created by: artem-basalaev

Introducing logarithmic power spectrum density (LPSD) averaging method for PSD/ASD/CSD and coherence calculation in TimeSeries.

The method produces variable-size frequency bins in FrequencySeries which results in a smooth curve over large frequency range. See example of performance comparison here.

Original C code developed for LISA Collaboration by Martin Hewitson (link), subsequently translated to python by Christian Darsow-Fromm and published on gitlab (link). Both C and python code subsequently generalized by me for CSD. Python code still uses compiled C core when possible, resulting in high computational efficiency. The algorithm is widely used by LISA community.

The code for LPSD method was then introduced into GWpy-based Spicypy package, and this pull request is mostly back-porting necessary changes into GWpy. The idea being that LPSD averaging method might be of interest for larger community of users of GWpy.

This is my first pull request, so please forgive me if formatting etc is wrong, and I'd love to read up somewhere on expected format if there's a source. Changes are certainly up to debate, whether it is needed at all, the scope, and particular implementation. For example, I can imagine that you not want to implement also coherence calculation in a single pull request, because limiting it to CSD/PSD/ASD is less new code. I'm happy to split/reduce changes if desired.

Tagging @duncanmmacleod because we discussed this with him once shortly, but we did not go through changes in detail.

Merge request reports