gwpy
gwpy copied to clipboard
Package for analysing and characterising gravitational wave data in python
In this page of the documentation: https://gwpy.github.io/docs/stable/segments/#subtraction, it is told that the subtraction operator "returns the union of the known segments, and the difference of the active segment lists." However...
This PR refactors `TimeSeries.resample` to make it simpler internally, and to better track scipy's default behaviours, and improves the tests to match.
gwpy.timeseries.TimeSeries.resample should at least replicate LIGO's up-sampling functionality of copying samples when resampling to a higher sample rate. In my testing asking for a higher sample rate does nothing presently.
```python In [3]: from gwpy.timeseries import TimeSeries In [4]: ts = TimeSeries.fetch('H1:CAL-DARM_ERR_DBL_DQ', 1378540810, 1378540818) In [6]: psd = ts.psd() In [7]: psd.size Out[7]: 16385 In [19]: inds = np.where(psd.frequencies.value >...
Using `gwpy=3.0.5` the following code snippet ```python channels = ["H1:DCS-CALIB_STRAIN_CLEAN_C01", "L1:DCS-CALIB_STRAIN_CLEAN_C01"] start = 1240764591 stop = 1240764592 TimeSeriesDict.find(channels, start, stop, frametype_match=".*HOFT_C01") ``` leads to a missing segments RuntimeError: ``` RuntimeError:...
The test suite is emitting the following warnings relating to the use of the deprecated `nyq` keyword to a few `scipy.signal` filter design functions: ``` ../../../.conda/envs/gwpy-nightly-3.9/lib/python3.9/site-packages/gwpy/signal/tests/test_filter_design.py:52 ../../../.conda/envs/gwpy-nightly-3.9/lib/python3.9/site-packages/gwpy/signal/tests/test_filter_design.py:52 ../../../.conda/envs/gwpy-nightly-3.9/lib/python3.9/site-packages/gwpy/signal/tests/test_filter_design.py:52 ../../../.conda/envs/gwpy-nightly-3.9/lib/python3.9/site-packages/gwpy/signal/tests/test_filter_design.py:52 /home/duncan.macleod/.conda/envs/gwpy-nightly-3.9/lib/python3.9/site-packages/gwpy/signal/tests/test_filter_design.py:52:...
We've temporarily pinned a `matplotlib` requirement in `Bilby` to block `matplotlib==3.8.0` as there are some breaking changes coming from `gwpy`. It looks like the needed changes are already present (https://github.com/gwpy/gwpy/pull/1661)....
If we want docstrings for all tests, worth spending some time updating e.g. signal/tests/test_filter_design.py
GWpy has an implementation of a bilinear transform for ZPK filter coefficients. This was written before [`scipy.signal.bilinear_zpk`](https://docs.scipy.org/doc/scipy-1.1.0/reference/generated/scipy.signal.bilinear_zpk.html) was available, but should probably now just be dropped (or hollowed out with...
I have been trying to replicate the functionality of mixing two signals and use the beating products. the following code almost does what I need ``` gwpyTimeSeries.demodulate(mixingFrequency,exp=True, stride=1/gwpyTimeSeries.sample_rate.decompose().value) ``` The...