gwpy 3.0.12__py3-none-any.whl → 3.0.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gwpy might be problematic. Click here for more details.
- gwpy/_version.py +9 -4
- gwpy/astro/range.py +22 -9
- gwpy/astro/tests/test_range.py +8 -3
- gwpy/detector/tests/test_units.py +4 -5
- gwpy/detector/units.py +101 -67
- gwpy/plot/plot.py +0 -1
- gwpy/segments/tests/test_flag.py +36 -6
- gwpy/signal/spectral/_scipy.py +14 -0
- gwpy/timeseries/core.py +1 -1
- gwpy/timeseries/io/losc.py +1 -1
- gwpy/timeseries/statevector.py +2 -2
- gwpy/timeseries/tests/test_timeseries.py +1 -0
- {gwpy-3.0.12.dist-info → gwpy-3.0.13.dist-info}/METADATA +26 -25
- {gwpy-3.0.12.dist-info → gwpy-3.0.13.dist-info}/RECORD +18 -18
- {gwpy-3.0.12.dist-info → gwpy-3.0.13.dist-info}/WHEEL +1 -1
- {gwpy-3.0.12.dist-info → gwpy-3.0.13.dist-info}/entry_points.txt +0 -0
- {gwpy-3.0.12.dist-info → gwpy-3.0.13.dist-info/licenses}/LICENSE +0 -0
- {gwpy-3.0.12.dist-info → gwpy-3.0.13.dist-info}/top_level.txt +0 -0
gwpy/_version.py
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
3
6
|
TYPE_CHECKING = False
|
|
4
7
|
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
12
|
else:
|
|
8
13
|
VERSION_TUPLE = object
|
|
@@ -12,5 +17,5 @@ __version__: str
|
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
|
13
18
|
version_tuple: VERSION_TUPLE
|
|
14
19
|
|
|
15
|
-
__version__ = version = '3.0.
|
|
16
|
-
__version_tuple__ = version_tuple = (3, 0,
|
|
20
|
+
__version__ = version = '3.0.13'
|
|
21
|
+
__version_tuple__ = version_tuple = (3, 0, 13)
|
gwpy/astro/range.py
CHANGED
|
@@ -330,10 +330,17 @@ def inspiral_range_psd(psd, snr=8, mass1=1.4, mass2=1.4, horizon=False,
|
|
|
330
330
|
z_hor = find_root_redshift(
|
|
331
331
|
lambda z: inspiral.SNR(psd.value[f > 0], z) - snr,
|
|
332
332
|
)
|
|
333
|
-
|
|
334
|
-
inspiral.cosmo.luminosity_distance(z_hor)
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
if horizon:
|
|
334
|
+
dist = inspiral.cosmo.luminosity_distance(z_hor)
|
|
335
|
+
else:
|
|
336
|
+
dist = range_func(
|
|
337
|
+
f[f > 0],
|
|
338
|
+
psd.value[f > 0],
|
|
339
|
+
z_hor=z_hor,
|
|
340
|
+
H=inspiral,
|
|
341
|
+
detection_snr=snr,
|
|
342
|
+
)
|
|
343
|
+
|
|
337
344
|
# calculate the sensitive distance PSD
|
|
338
345
|
(fz, hz) = inspiral.z_scale(z_hor)
|
|
339
346
|
hz = interp1d(fz, hz, bounds_error=False, fill_value=(hz[0], 0))(f)
|
|
@@ -434,11 +441,17 @@ def inspiral_range(psd, snr=8, mass1=1.4, mass2=1.4, fmin=None, fmax=None,
|
|
|
434
441
|
)
|
|
435
442
|
|
|
436
443
|
# return the sensitive distance metric
|
|
437
|
-
|
|
438
|
-
inspiral.cosmo.luminosity_distance(z_hor)
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
444
|
+
if horizon:
|
|
445
|
+
dist = inspiral.cosmo.luminosity_distance(z_hor)
|
|
446
|
+
else:
|
|
447
|
+
dist = range_func(
|
|
448
|
+
f[frange],
|
|
449
|
+
psd.value[frange],
|
|
450
|
+
z_hor=z_hor,
|
|
451
|
+
H=inspiral,
|
|
452
|
+
detection_snr=snr,
|
|
453
|
+
)
|
|
454
|
+
return units.Quantity(dist, unit="Mpc")
|
|
442
455
|
|
|
443
456
|
|
|
444
457
|
# -- burst range --------------------------------
|
gwpy/astro/tests/test_range.py
CHANGED
|
@@ -38,6 +38,7 @@ __credits__ = 'Alex Urban <alexander.urban@ligo.org>'
|
|
|
38
38
|
TEST_RESULTS = {
|
|
39
39
|
'sensemon_range': 19.332958991178117 * units.Mpc,
|
|
40
40
|
'inspiral_range': 18.519899937121536 * units.Mpc,
|
|
41
|
+
'inspiral_range_snr_10': 14.82352747 * units.Mpc,
|
|
41
42
|
'burst_range': 13.592140825568954 * units.Mpc,
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -111,11 +112,15 @@ def test_inspiral_range_psd(psd):
|
|
|
111
112
|
|
|
112
113
|
|
|
113
114
|
@pytest.mark.requires("inspiral_range")
|
|
114
|
-
|
|
115
|
+
@pytest.mark.parametrize(("snr", "expected"), (
|
|
116
|
+
(8, TEST_RESULTS["inspiral_range"]),
|
|
117
|
+
(10, TEST_RESULTS["inspiral_range_snr_10"]),
|
|
118
|
+
))
|
|
119
|
+
def test_inspiral_range(psd, snr, expected):
|
|
115
120
|
"""Test for :func:`gwpy.astro.inspiral_range`
|
|
116
121
|
"""
|
|
117
|
-
|
|
118
|
-
utils.assert_quantity_almost_equal(
|
|
122
|
+
result = astro.inspiral_range(psd, snr=snr)
|
|
123
|
+
utils.assert_quantity_almost_equal(result, expected)
|
|
119
124
|
|
|
120
125
|
|
|
121
126
|
# -- burst range --------------------------------
|
|
@@ -53,12 +53,11 @@ def test_parse_unit_strict():
|
|
|
53
53
|
parse_unit('metre', parse_strict='raise')
|
|
54
54
|
|
|
55
55
|
# check that warnings get posted, and a custom NamedUnit gets returned
|
|
56
|
-
with pytest.warns(
|
|
56
|
+
with pytest.warns(
|
|
57
|
+
units.UnitsWarning,
|
|
58
|
+
match="'metre' did not parse as gwpy unit",
|
|
59
|
+
) as exc:
|
|
57
60
|
u = parse_unit('metre', parse_strict='warn')
|
|
58
|
-
assert str(exc[0].message) == ('metre is not a valid unit. Did you mean '
|
|
59
|
-
'meter? Mathematical operations using this '
|
|
60
|
-
'unit should work, but conversions to '
|
|
61
|
-
'other units will not.')
|
|
62
61
|
assert isinstance(u, units.IrreducibleUnit)
|
|
63
62
|
assert str(u) == 'metre'
|
|
64
63
|
|
gwpy/detector/units.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
1
|
+
# Copyright (c) 2017-2025 Cardiff University
|
|
2
|
+
# 2014-2017 Louisiana State University
|
|
3
3
|
#
|
|
4
4
|
# This file is part of GWpy.
|
|
5
5
|
#
|
|
@@ -16,18 +16,24 @@
|
|
|
16
16
|
# You should have received a copy of the GNU General Public License
|
|
17
17
|
# along with GWpy. If not, see <http://www.gnu.org/licenses/>.
|
|
18
18
|
|
|
19
|
-
"""
|
|
20
|
-
"""
|
|
19
|
+
"""Custom units and formatting."""
|
|
21
20
|
|
|
21
|
+
import contextlib
|
|
22
22
|
import re
|
|
23
|
-
import warnings
|
|
24
23
|
|
|
25
|
-
from astropy import
|
|
24
|
+
from astropy import (
|
|
25
|
+
__version__ as astropy_version,
|
|
26
|
+
units,
|
|
27
|
+
)
|
|
26
28
|
from astropy.units import imperial as units_imperial
|
|
27
29
|
from astropy.units.format.generic import Generic
|
|
30
|
+
from packaging.version import Version
|
|
28
31
|
|
|
29
32
|
__author__ = "Duncan Macleod <duncan.macleod@ligo.org>"
|
|
30
33
|
|
|
34
|
+
#: Is the current version of Astropy 7.1 or later?
|
|
35
|
+
ASTROPY_71 = Version(astropy_version) >= Version("7.1.0a0")
|
|
36
|
+
|
|
31
37
|
# container for new units (so that each one only gets created once)
|
|
32
38
|
UNRECOGNIZED_UNITS = {}
|
|
33
39
|
|
|
@@ -45,58 +51,82 @@ class GWpyFormat(Generic):
|
|
|
45
51
|
created so that mathematical operations will work. Conversions to other
|
|
46
52
|
units will explicitly not work.
|
|
47
53
|
"""
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
|
|
55
|
+
name = "gwpy"
|
|
56
|
+
re_closest_unit = re.compile(r"Did you mean (.*)\?\Z")
|
|
57
|
+
re_closest_unit_delim = re.compile("(, | or )")
|
|
52
58
|
|
|
53
59
|
@classmethod
|
|
54
|
-
def
|
|
55
|
-
|
|
60
|
+
def _validate_unit(cls, unit, detailed_exception=True):
|
|
61
|
+
"""Validate a unit string."""
|
|
56
62
|
try:
|
|
57
|
-
return
|
|
63
|
+
return super()._validate_unit(unit, detailed_exception)
|
|
58
64
|
except ValueError as exc:
|
|
59
|
-
|
|
60
|
-
sname = name[:-1] if name.endswith('s') else ''
|
|
65
|
+
singular = unit[:-1] if unit.endswith("s") else ""
|
|
61
66
|
|
|
62
67
|
# parse alternative units from the error message
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
alts = cls.re_closest_unit_delim.split(match.groups()[0])[::2]
|
|
66
|
-
except AttributeError:
|
|
67
|
-
alts = []
|
|
68
|
-
alts = list(set(alts))
|
|
69
|
-
|
|
70
|
-
# match uppercase to titled (e.g. MPC -> Mpc)
|
|
71
|
-
if name.title() in alts:
|
|
72
|
-
alt = name.title()
|
|
73
|
-
# match titled unit to lower-case (e.g. Amp -> amp)
|
|
74
|
-
elif name.lower() in alts:
|
|
75
|
-
alt = name.lower()
|
|
76
|
-
# match plural to singular (e.g. meters -> meter)
|
|
77
|
-
elif sname in alts:
|
|
78
|
-
alt = sname
|
|
79
|
-
elif sname.lower() in alts:
|
|
80
|
-
alt = sname.lower()
|
|
68
|
+
# split 'A, B, or C' -> ['A', 'B', 'C']
|
|
69
|
+
if match := cls.re_closest_unit.search(str(exc)):
|
|
70
|
+
alts = set(cls.re_closest_unit_delim.split(match.groups()[0])[::2])
|
|
81
71
|
else:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
72
|
+
alts = set()
|
|
73
|
+
|
|
74
|
+
candidates = list(filter(None, (
|
|
75
|
+
# match uppercase to titled (e.g. MPC -> Mpc)
|
|
76
|
+
unit.title(),
|
|
77
|
+
# match titled unit to lower-case (e.g. Amp -> amp)
|
|
78
|
+
unit.lower(),
|
|
79
|
+
# match plural to singular (e.g. meters -> meter)
|
|
80
|
+
singular,
|
|
81
|
+
singular.lower() if singular else None,
|
|
82
|
+
)))
|
|
83
|
+
|
|
84
|
+
for candidate in candidates:
|
|
85
|
+
if candidate in alts:
|
|
86
|
+
return super()._validate_unit(candidate, detailed_exception)
|
|
87
|
+
|
|
88
|
+
raise
|
|
89
|
+
|
|
90
|
+
if not ASTROPY_71:
|
|
91
|
+
@classmethod
|
|
92
|
+
def _get_unit(cls, t):
|
|
93
|
+
# match as normal
|
|
94
|
+
try:
|
|
95
|
+
return cls._parse_unit(t.value)
|
|
96
|
+
except ValueError as exc:
|
|
97
|
+
name = t.value
|
|
98
|
+
singular = name[:-1] if name.endswith("s") else ""
|
|
99
|
+
|
|
100
|
+
# parse alternative units from the error message
|
|
101
|
+
# split 'A, B, or C' -> ['A', 'B', 'C']
|
|
102
|
+
if match := cls.re_closest_unit.search(str(exc)):
|
|
103
|
+
alts = set(cls.re_closest_unit_delim.split(match.groups()[0])[::2])
|
|
104
|
+
else:
|
|
105
|
+
alts = set()
|
|
106
|
+
|
|
107
|
+
candidates = list(filter(None, (
|
|
108
|
+
# match uppercase to titled (e.g. MPC -> Mpc)
|
|
109
|
+
name.title(),
|
|
110
|
+
# match titled unit to lower-case (e.g. Amp -> amp)
|
|
111
|
+
name.lower(),
|
|
112
|
+
# match plural to singular (e.g. meters -> meter)
|
|
113
|
+
singular,
|
|
114
|
+
singular.lower() if singular else None,
|
|
115
|
+
)))
|
|
116
|
+
|
|
117
|
+
for candidate in candidates:
|
|
118
|
+
if candidate in alts:
|
|
119
|
+
return cls._parse_unit(candidate)
|
|
120
|
+
|
|
121
|
+
raise
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def parse_unit(
|
|
125
|
+
name,
|
|
126
|
+
parse_strict="warn",
|
|
127
|
+
format="gwpy",
|
|
128
|
+
):
|
|
129
|
+
"""Attempt to intelligently parse a `str` as a `~astropy.units.Unit`.
|
|
100
130
|
|
|
101
131
|
Parameters
|
|
102
132
|
----------
|
|
@@ -123,23 +153,27 @@ def parse_unit(name, parse_strict='warn', format='gwpy'):
|
|
|
123
153
|
if name is None or isinstance(name, units.UnitBase):
|
|
124
154
|
return name
|
|
125
155
|
|
|
126
|
-
|
|
156
|
+
# have we already handled this new unit?
|
|
157
|
+
with contextlib.suppress(KeyError):
|
|
127
158
|
return UNRECOGNIZED_UNITS[name]
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
#
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
159
|
+
|
|
160
|
+
# no, either a valid unit, or something new
|
|
161
|
+
try:
|
|
162
|
+
return units.Unit(name, parse_strict="raise")
|
|
163
|
+
except ValueError as exc:
|
|
164
|
+
if (
|
|
165
|
+
# the format was selected by the user
|
|
166
|
+
format in {None, "generic"}
|
|
167
|
+
# or we were asked to be strict about things
|
|
168
|
+
or parse_strict == "raise"
|
|
169
|
+
# or this isn't the error we're looking for
|
|
170
|
+
or "did not parse as unit" not in str(exc)
|
|
171
|
+
):
|
|
172
|
+
raise
|
|
173
|
+
# try again using our own lenient parser
|
|
174
|
+
new = units.Unit(name, parse_strict=parse_strict, format=format)
|
|
175
|
+
UNRECOGNIZED_UNITS[name] = new
|
|
176
|
+
return new
|
|
143
177
|
|
|
144
178
|
|
|
145
179
|
# -- custom units -------------------------------------------------------------
|
gwpy/plot/plot.py
CHANGED
|
@@ -136,7 +136,6 @@ class Plot(figure.Figure):
|
|
|
136
136
|
num = kwargs.pop('num', max(pyplot.get_fignums() or {0}) + 1)
|
|
137
137
|
self._parse_subplotpars(kwargs)
|
|
138
138
|
super().__init__(**kwargs)
|
|
139
|
-
self.number = num
|
|
140
139
|
|
|
141
140
|
# add interactivity (scraped from pyplot.figure())
|
|
142
141
|
backend_mod = get_backend_mod()
|
gwpy/segments/tests/test_flag.py
CHANGED
|
@@ -375,6 +375,36 @@ class TestDataQualityFlag(object):
|
|
|
375
375
|
utils.assert_segmentlist_equal(x.active, a.known & ~a.active)
|
|
376
376
|
utils.assert_segmentlist_equal(x.known, a.known)
|
|
377
377
|
|
|
378
|
+
def test_difference_simple(self):
|
|
379
|
+
"""Test that subtract works as intended for a simple case.
|
|
380
|
+
|
|
381
|
+
Tests regression against https://github.com/gwpy/gwpy/issues/1700
|
|
382
|
+
|
|
383
|
+
Returns
|
|
384
|
+
-------
|
|
385
|
+
|
|
386
|
+
"""
|
|
387
|
+
known1 = _as_segmentlist((0, 2), (3, 7))
|
|
388
|
+
active1 = _as_segmentlist((1, 2), (3, 4), (5, 7))
|
|
389
|
+
|
|
390
|
+
known2 = _as_segmentlist((3, 7), (8, 10))
|
|
391
|
+
active2 = _as_segmentlist((4, 7), (9, 10))
|
|
392
|
+
|
|
393
|
+
a = self.TEST_CLASS(active=active1, known=known1)
|
|
394
|
+
b = self.TEST_CLASS(active=active2, known=known2)
|
|
395
|
+
|
|
396
|
+
diff = a - b
|
|
397
|
+
|
|
398
|
+
expected_known = _as_segmentlist((3, 7))
|
|
399
|
+
expected_active = _as_segmentlist((3, 4))
|
|
400
|
+
|
|
401
|
+
expected_diff = self.TEST_CLASS(
|
|
402
|
+
active=expected_active,
|
|
403
|
+
known=expected_known
|
|
404
|
+
)
|
|
405
|
+
|
|
406
|
+
utils.assert_flag_equal(diff, expected_diff)
|
|
407
|
+
|
|
378
408
|
def test_coalesce(self):
|
|
379
409
|
flag = self.create()
|
|
380
410
|
flag.coalesce()
|
|
@@ -655,8 +685,8 @@ class TestDataQualityDict(object):
|
|
|
655
685
|
a = instance.copy()
|
|
656
686
|
a &= reverse
|
|
657
687
|
keys = list(a.keys())
|
|
658
|
-
|
|
659
|
-
|
|
688
|
+
for key in keys:
|
|
689
|
+
utils.assert_flag_equal(a[key], instance[key] & reverse[key])
|
|
660
690
|
|
|
661
691
|
def test_and(self, instance, reverse):
|
|
662
692
|
a = instance.copy()
|
|
@@ -667,8 +697,8 @@ class TestDataQualityDict(object):
|
|
|
667
697
|
a = instance.copy()
|
|
668
698
|
a |= reverse
|
|
669
699
|
keys = list(a.keys())
|
|
670
|
-
|
|
671
|
-
|
|
700
|
+
for key in keys:
|
|
701
|
+
utils.assert_flag_equal(a[key], instance[key] | reverse[key])
|
|
672
702
|
|
|
673
703
|
def test_or(self, instance, reverse):
|
|
674
704
|
a = instance.copy()
|
|
@@ -679,8 +709,8 @@ class TestDataQualityDict(object):
|
|
|
679
709
|
a = instance.copy()
|
|
680
710
|
a -= reverse
|
|
681
711
|
keys = list(a.keys())
|
|
682
|
-
|
|
683
|
-
|
|
712
|
+
for key in keys:
|
|
713
|
+
utils.assert_flag_equal(a[key], instance[key] - reverse[key])
|
|
684
714
|
|
|
685
715
|
def test_sub(self, instance, reverse):
|
|
686
716
|
a = instance.copy(deep=True)
|
gwpy/signal/spectral/_scipy.py
CHANGED
|
@@ -23,6 +23,8 @@ import numpy
|
|
|
23
23
|
import warnings
|
|
24
24
|
|
|
25
25
|
import scipy.signal
|
|
26
|
+
from packaging.version import Version
|
|
27
|
+
from scipy import __version__ as scipy_version
|
|
26
28
|
|
|
27
29
|
from ...frequencyseries import FrequencySeries
|
|
28
30
|
from ._utils import scale_timeseries_unit
|
|
@@ -37,6 +39,18 @@ def _spectral_density(timeseries, segmentlength, noverlap=None, name=None,
|
|
|
37
39
|
sdfunc=scipy.signal.welch, **kwargs):
|
|
38
40
|
"""Calculate a generic spectral density of this `TimeSeries`
|
|
39
41
|
"""
|
|
42
|
+
if (
|
|
43
|
+
Version(scipy_version) >= Version("1.16.0a0")
|
|
44
|
+
and (other := kwargs.get("y")) is not None
|
|
45
|
+
and timeseries.size != other.size
|
|
46
|
+
):
|
|
47
|
+
# manually zero-pad the shorter array, see
|
|
48
|
+
# https://github.com/scipy/scipy/issues/23036
|
|
49
|
+
if (a := timeseries.size) < (b := other.size):
|
|
50
|
+
timeseries = timeseries.pad((0, b - a), mode="constant")
|
|
51
|
+
else:
|
|
52
|
+
kwargs["y"] = numpy.pad(other, (0, a - b), mode="constant")
|
|
53
|
+
|
|
40
54
|
# compute spectral density
|
|
41
55
|
freqs, psd_ = sdfunc(
|
|
42
56
|
timeseries.value,
|
gwpy/timeseries/core.py
CHANGED
|
@@ -383,7 +383,7 @@ class TimeSeriesBase(Series):
|
|
|
383
383
|
version=None, format='hdf5',
|
|
384
384
|
host=GWOSC_DEFAULT_HOST, verbose=False,
|
|
385
385
|
cache=None, **kwargs):
|
|
386
|
-
"""Fetch open-access data from
|
|
386
|
+
"""Fetch open-access data from GWOSC.
|
|
387
387
|
|
|
388
388
|
Parameters
|
|
389
389
|
----------
|
gwpy/timeseries/io/losc.py
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
# You should have received a copy of the GNU General Public License
|
|
18
18
|
# along with GWpy. If not, see <http://www.gnu.org/licenses/>.
|
|
19
19
|
|
|
20
|
-
"""Read and write HDF5 files in
|
|
20
|
+
"""Read and write HDF5 files in GWOSC format
|
|
21
21
|
|
|
22
22
|
For more details, see :ref:`gwpy-table-io`.
|
|
23
23
|
"""
|
gwpy/timeseries/statevector.py
CHANGED
|
@@ -202,7 +202,7 @@ class StateTimeSeries(TimeSeriesBase):
|
|
|
202
202
|
def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
|
|
203
203
|
out = super().__array_ufunc__(ufunc, method, *inputs, **kwargs)
|
|
204
204
|
if out.ndim:
|
|
205
|
-
return out.
|
|
205
|
+
return out.astype(bool)
|
|
206
206
|
return out
|
|
207
207
|
|
|
208
208
|
def diff(self, n=1, axis=-1):
|
|
@@ -711,7 +711,7 @@ class StateVector(TimeSeriesBase):
|
|
|
711
711
|
-------
|
|
712
712
|
DataQualityFlag list : `list`
|
|
713
713
|
a list of `~gwpy.segments.flag.DataQualityFlag`
|
|
714
|
-
|
|
714
|
+
representations for each bit in this `StateVector`
|
|
715
715
|
|
|
716
716
|
See also
|
|
717
717
|
--------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: gwpy
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.13
|
|
4
4
|
Summary: A python package for gravitational-wave astrophysics
|
|
5
5
|
Author-email: Duncan Macleod <duncan.macleod@ligo.org>
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -39,39 +39,40 @@ Requires-Dist: python-dateutil
|
|
|
39
39
|
Requires-Dist: requests>=2.20.0
|
|
40
40
|
Requires-Dist: scipy>=1.6.0
|
|
41
41
|
Requires-Dist: tqdm>=4.52.0
|
|
42
|
-
Provides-Extra: test
|
|
43
|
-
Requires-Dist: coverage[toml]>=5.0; extra == "test"
|
|
44
|
-
Requires-Dist: pytest>=3.9.1; extra == "test"
|
|
45
|
-
Requires-Dist: pytest-freezer; extra == "test"
|
|
46
|
-
Requires-Dist: pytest-cov>=2.4.0; extra == "test"
|
|
47
|
-
Requires-Dist: pytest-requires; extra == "test"
|
|
48
|
-
Requires-Dist: pytest-socket; extra == "test"
|
|
49
|
-
Requires-Dist: pytest-xdist; extra == "test"
|
|
50
|
-
Requires-Dist: requests-mock; extra == "test"
|
|
51
42
|
Provides-Extra: astro
|
|
52
|
-
Requires-Dist: inspiral-range>=0.
|
|
53
|
-
Provides-Extra:
|
|
54
|
-
Requires-Dist:
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
Requires-Dist:
|
|
58
|
-
Requires-Dist: sphinxcontrib-programoutput; extra == "docs"
|
|
43
|
+
Requires-Dist: inspiral-range>=0.9.0; extra == "astro"
|
|
44
|
+
Provides-Extra: conda
|
|
45
|
+
Requires-Dist: lxml!=4.9.1; sys_platform == "win32" and extra == "conda"
|
|
46
|
+
Requires-Dist: python-framel!=8.46.0,>=8.40.1; extra == "conda"
|
|
47
|
+
Requires-Dist: python-ldas-tools-framecpp>=2.6.9; (sys_platform != "win32" and python_version < "3.12") and extra == "conda"
|
|
48
|
+
Requires-Dist: python-nds2-client>=0.16; extra == "conda"
|
|
59
49
|
Provides-Extra: dev
|
|
60
50
|
Requires-Dist: ciecplib; extra == "dev"
|
|
61
|
-
Requires-Dist: inspiral-range>=0.
|
|
51
|
+
Requires-Dist: inspiral-range>=0.9.0; extra == "dev"
|
|
62
52
|
Requires-Dist: lalsuite; sys_platform != "win32" and extra == "dev"
|
|
63
53
|
Requires-Dist: lscsoft-glue; sys_platform != "win32" and extra == "dev"
|
|
64
54
|
Requires-Dist: psycopg2; sys_platform == "linux" and extra == "dev"
|
|
65
55
|
Requires-Dist: pycbc>=1.13.4; sys_platform != "win32" and extra == "dev"
|
|
66
56
|
Requires-Dist: pymysql; extra == "dev"
|
|
67
|
-
Requires-Dist: python-ligo-lw
|
|
57
|
+
Requires-Dist: python-ligo-lw<2.0.0,>=1.7.0; sys_platform != "win32" and extra == "dev"
|
|
68
58
|
Requires-Dist: sqlalchemy; extra == "dev"
|
|
69
59
|
Requires-Dist: uproot>=4.1.5; extra == "dev"
|
|
70
|
-
Provides-Extra:
|
|
71
|
-
Requires-Dist:
|
|
72
|
-
Requires-Dist:
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
Requires-Dist:
|
|
60
|
+
Provides-Extra: docs
|
|
61
|
+
Requires-Dist: numpydoc>=0.8.0; extra == "docs"
|
|
62
|
+
Requires-Dist: Sphinx>=4.4.0; extra == "docs"
|
|
63
|
+
Requires-Dist: sphinx-automodapi; extra == "docs"
|
|
64
|
+
Requires-Dist: sphinx-immaterial>=0.7.3; extra == "docs"
|
|
65
|
+
Requires-Dist: sphinxcontrib-programoutput; extra == "docs"
|
|
66
|
+
Provides-Extra: test
|
|
67
|
+
Requires-Dist: coverage[toml]>=5.0; extra == "test"
|
|
68
|
+
Requires-Dist: pytest>=3.9.1; extra == "test"
|
|
69
|
+
Requires-Dist: pytest-freezer; extra == "test"
|
|
70
|
+
Requires-Dist: pytest-cov>=2.4.0; extra == "test"
|
|
71
|
+
Requires-Dist: pytest-requires; extra == "test"
|
|
72
|
+
Requires-Dist: pytest-socket; extra == "test"
|
|
73
|
+
Requires-Dist: pytest-xdist; extra == "test"
|
|
74
|
+
Requires-Dist: requests-mock; extra == "test"
|
|
75
|
+
Dynamic: license-file
|
|
75
76
|
|
|
76
77
|
GWpy is a collaboration-driven Python package providing tools for
|
|
77
78
|
studying data from ground-based gravitational-wave detectors.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
gwpy/__init__.py,sha256=3chu5cxfVA08qkFYk3lyXBlFXO6lrgytIIdh_nL9YzU,1533
|
|
2
|
-
gwpy/_version.py,sha256=
|
|
2
|
+
gwpy/_version.py,sha256=JWg2h16dQdIpYNHBSSjv82RoRX7L_3ojF90-EhUcobE,513
|
|
3
3
|
gwpy/conftest.py,sha256=nMqidKFNcwTCvDb-vHzzCmzUyyL0TH9DwbmagfdE1II,1639
|
|
4
4
|
gwpy/astro/__init__.py,sha256=DtaqsbVdlI4Qy6eRlXuLtraTCLXjpQYadk5pEFwXrM8,1909
|
|
5
|
-
gwpy/astro/range.py,sha256=
|
|
5
|
+
gwpy/astro/range.py,sha256=9GfA3CCJIl3y_p7k0DJq4PUH60uZgZdAtMJcsmOP78E,25092
|
|
6
6
|
gwpy/astro/tests/__init__.py,sha256=jDVhmCPpiwaMzDz1Dq_TQTd4rfY5it5qfZ17bohcCOo,746
|
|
7
|
-
gwpy/astro/tests/test_range.py,sha256=
|
|
7
|
+
gwpy/astro/tests/test_range.py,sha256=a2QxsRv18GMzcGHa6IU0HTNFc0K2AsZ_visUZtm5VcQ,6210
|
|
8
8
|
gwpy/cli/__init__.py,sha256=3DnwWaykhjk-bT0h3n-f8vSHNtGzpi7RVG3rbOkFQhM,1404
|
|
9
9
|
gwpy/cli/cliproduct.py,sha256=9OPACkQyjQmRtEmIgis4O3NaQLQV7AvEET1T44rSyLM,34269
|
|
10
10
|
gwpy/cli/coherence.py,sha256=CbGwFl9pLHNncBMRdEr5mv-6EJLuML56Tp_kMD4F-Ds,4048
|
|
@@ -27,14 +27,14 @@ gwpy/cli/tests/test_timeseries.py,sha256=HCYeRdk1Y7owMHTURmV-G9N4iSPZpoKXKvfigOr
|
|
|
27
27
|
gwpy/cli/tests/test_transferfunction.py,sha256=VCve5NgBQo7tBgM5zaBlqY29R0ymc7Tfk9pRpJLsBdg,1999
|
|
28
28
|
gwpy/detector/__init__.py,sha256=gsC_0ca8m8xRQzQ8ns6fpwFQ14_uxUu1LRh1B-sN6EA,2252
|
|
29
29
|
gwpy/detector/channel.py,sha256=2X37knAbqzDg3GavKheXnOHOAgVaPHrOFQ4f4WpmvPc,26786
|
|
30
|
-
gwpy/detector/units.py,sha256=
|
|
30
|
+
gwpy/detector/units.py,sha256=9QOCV8gbB6J8dbVA9rpZwQoAD6INSgxBw7wlcrlksJk,8281
|
|
31
31
|
gwpy/detector/io/__init__.py,sha256=dAsz8ii5RVhwI_BNVjYrsnX1Pt3nfjh8jqVl4xqLTec,1037
|
|
32
32
|
gwpy/detector/io/cis.py,sha256=gHGnB68xMAv0xQUG4eazA-4Jp0BesYlrttPBXt2g2Qs,3184
|
|
33
33
|
gwpy/detector/io/clf.py,sha256=AusPzKEEuJM6qRyrAzBKmVeYrpnU8Tniql1DPtVHW28,5689
|
|
34
34
|
gwpy/detector/io/omega.py,sha256=d6BZe2PCSMg89kXPzSjBNKfhSiYpQAMhqQ_irziv2EQ,5939
|
|
35
35
|
gwpy/detector/tests/__init__.py,sha256=pxB9IZpIXe2m7bax8I-qOG0qggEJ4jiXxLOhI_T82m8,749
|
|
36
36
|
gwpy/detector/tests/test_channel.py,sha256=pVlP-BDT_XLGfNVb6iMVHCifPZz1x8koeThqqgnpQo4,18473
|
|
37
|
-
gwpy/detector/tests/test_units.py,sha256=
|
|
37
|
+
gwpy/detector/tests/test_units.py,sha256=_xQLE5jPkaY_V41PiOSbxLWD1iwR5jatvfl_8mh144s,2501
|
|
38
38
|
gwpy/frequencyseries/__init__.py,sha256=cHVavDdimRR07gB0ekmlcXgwSasjaPMnzZ1OQMc1am4,995
|
|
39
39
|
gwpy/frequencyseries/_fdcommon.py,sha256=kc9G1R7XbcfOxVpzcRY3wcsZVJrrJDpzCfVqsI6H5zs,1943
|
|
40
40
|
gwpy/frequencyseries/frequencyseries.py,sha256=DU2ZMDaXua4birZNX6lUYxmYcusBJQgWKAwlw9wmP9Q,14481
|
|
@@ -77,7 +77,7 @@ gwpy/plot/colors.py,sha256=qmrM4u4Ir8OB2jkHUG3ZnriUlp1sdAB_IAb0H9mhC_A,3367
|
|
|
77
77
|
gwpy/plot/gps.py,sha256=Xui1PMSh9K0ovSFuLyVJNKsMoNoOqppQtoEU3y5ZVDU,16846
|
|
78
78
|
gwpy/plot/legend.py,sha256=mD07CTmv0rF171olt6ObsK9k4i-TxKacHQ4kBRzdb_0,1635
|
|
79
79
|
gwpy/plot/log.py,sha256=Sn1BJRB5ml0oqE8UXBphb7MDhwu7ru-UtlvG4i5qTyE,5030
|
|
80
|
-
gwpy/plot/plot.py,sha256=
|
|
80
|
+
gwpy/plot/plot.py,sha256=HzuBIa2YJ1PdqdK8OBBc-BtGJ6ynymdJC3xhWL3B6LE,22054
|
|
81
81
|
gwpy/plot/rc.py,sha256=cK8pOzcvuRsMv_16k9Hl2mkn_dk8FaRrIVhtNhBzyp8,4816
|
|
82
82
|
gwpy/plot/segments.py,sha256=vRC1kj5gUXb6qCWmS-ijNS84To33BLrk2MW0hABlprg,16943
|
|
83
83
|
gwpy/plot/tex.py,sha256=W1EPjdd9T6H2irDsbbbNNLL_CqBcYRTcAWx9OlsCcFg,4869
|
|
@@ -106,7 +106,7 @@ gwpy/segments/io/json.py,sha256=hpGZAuM73UeUK3e4DyIrNQmxujOA7wDGc5QY4vf8F2k,3036
|
|
|
106
106
|
gwpy/segments/io/ligolw.py,sha256=nYaHjlge1D_Bz4m62dLZUKPBJEo_jnq5M6oD4tkq5qA,4907
|
|
107
107
|
gwpy/segments/io/segwizard.py,sha256=JVBFcBBJlFi1E8WBLa7nkz-9vlKVu_bYlprVT50nbqE,5007
|
|
108
108
|
gwpy/segments/tests/__init__.py,sha256=4Y-SPq-7QBHsvVIIlz6UgvPxDsBkO4orFrapx3Uwgew,749
|
|
109
|
-
gwpy/segments/tests/test_flag.py,sha256=
|
|
109
|
+
gwpy/segments/tests/test_flag.py,sha256=v_of1UhVg3jbmkgx8vKCwMHIC2CNnlcTZxrAFZOze20,32477
|
|
110
110
|
gwpy/segments/tests/test_segments.py,sha256=VSvjy3p4MuVyucK_QB5PfOjZ0FvJU-jd4pNHv7ppiE8,5360
|
|
111
111
|
gwpy/signal/__init__.py,sha256=1FcrzAPP5fkp9OzrpQyrDswINDqGuLYY_cdtJQttB64,972
|
|
112
112
|
gwpy/signal/fft.py,sha256=YS2g5Urh5Y4x_L2rGts11O5t-M5Y_yAtAvrFkqTv4KQ,1189
|
|
@@ -118,7 +118,7 @@ gwpy/signal/spectral/_lal.py,sha256=NthuLPlGAY2dwYccXmwRJDU3WT41dsTMz122UcvH_cE,
|
|
|
118
118
|
gwpy/signal/spectral/_median_mean.py,sha256=1yB3nr2U56b_7ruZQo2y7XXAdpcaFZjq6fyrpKT4SvM,1851
|
|
119
119
|
gwpy/signal/spectral/_pycbc.py,sha256=VnZLJArAxtIWhyyifAYn1oyBS9jV0SauzEi50mGXexE,3577
|
|
120
120
|
gwpy/signal/spectral/_registry.py,sha256=hI3klLe2MS0roooZXPwvzVUc_0PcDrnRwa6_QNhBOpk,2346
|
|
121
|
-
gwpy/signal/spectral/_scipy.py,sha256=
|
|
121
|
+
gwpy/signal/spectral/_scipy.py,sha256=eVM8o53JSCVO8TIRsM9uVFCMWXYFwinXJikouY2v3VI,8275
|
|
122
122
|
gwpy/signal/spectral/_ui.py,sha256=MbB3aSUFS4bS5S39fEcSqyhbC6Foq15PGlazVJalWjM,14241
|
|
123
123
|
gwpy/signal/spectral/_utils.py,sha256=qSaj1GctqOd4HmiVwtfUUrBXvZAh0WJYbKiePUKEa1E,1669
|
|
124
124
|
gwpy/signal/tests/__init__.py,sha256=k8yHNX5UvKYZCwZQA4oDEK7gNAYMX7JLhztV67_JoOY,747
|
|
@@ -185,15 +185,15 @@ gwpy/time/tests/__init__.py,sha256=EF4G-IubXcMA_-mucDvcpjqM-ITyp0G_3cvO0VeYdxI,7
|
|
|
185
185
|
gwpy/time/tests/test_main.py,sha256=3QV6kTWQ6AkGCYmqxfw-JfAoiR6VXzyrM__7XeyQvTI,1362
|
|
186
186
|
gwpy/time/tests/test_time.py,sha256=Cj3Yv0N4MYi9C5fzuXPgR6rge6aKgfIbnhUwzeKDRDM,4402
|
|
187
187
|
gwpy/timeseries/__init__.py,sha256=e-ncacmSPxUUmya8xlQ-Govk4ptr-0TVp26vMIPmxTU,1134
|
|
188
|
-
gwpy/timeseries/core.py,sha256=
|
|
189
|
-
gwpy/timeseries/statevector.py,sha256=
|
|
188
|
+
gwpy/timeseries/core.py,sha256=VhmP8LXq4RiiaJeRR8DeF34hPi_F-SmHpyd7_Yeod8w,57886
|
|
189
|
+
gwpy/timeseries/statevector.py,sha256=HAiSCPbAY96fTW0t_TmYxLYOyv9Mia7rFXKW65joi_w,35892
|
|
190
190
|
gwpy/timeseries/timeseries.py,sha256=lg28EEMASBR2IS_4gJfcU0j3uo7tEfFEVjK-Uv64ziw,87809
|
|
191
191
|
gwpy/timeseries/io/__init__.py,sha256=qviFCaeTVeTZ7ZiIQKQyU1xxh76Ba60yE9vVtm9y1bY,938
|
|
192
192
|
gwpy/timeseries/io/ascii.py,sha256=M05FDTCa06KLJ1Sb0jDh3NxrmMboV73j38nyMacVPkQ,1185
|
|
193
193
|
gwpy/timeseries/io/cache.py,sha256=xN-lSjsBy7Heo_9X7FVRYneA4HaEMpLs4Q1Zc7lJSoA,2794
|
|
194
194
|
gwpy/timeseries/io/core.py,sha256=1hp7f7UgcEEqw1T9Oa0DGMMg6uyKJih8h4A3rNkx0SQ,4692
|
|
195
195
|
gwpy/timeseries/io/hdf5.py,sha256=eGiqWQIdD3Lu-74F6qiw9dKq6GSjBHoroanNsdzcy2E,4214
|
|
196
|
-
gwpy/timeseries/io/losc.py,sha256=
|
|
196
|
+
gwpy/timeseries/io/losc.py,sha256=nZJVW7xmcLbE__f4TgJHNIjOQ1fNidQqGu9Y4KGwdkQ,9590
|
|
197
197
|
gwpy/timeseries/io/nds2.py,sha256=TlUQgKyHzhRQ9kzwEDxt5zgAWAo8viLkokM4P50n3Xk,7811
|
|
198
198
|
gwpy/timeseries/io/wav.py,sha256=E_EjIa43nzpps18x-ekollMvgPbrKyqt1v_VAXicbPQ,3595
|
|
199
199
|
gwpy/timeseries/io/gwf/__init__.py,sha256=R1jtuqAw82Vp1LwEFg1hXaok1NEotldCSpHs9QuDZqc,13156
|
|
@@ -207,7 +207,7 @@ gwpy/timeseries/tests/test_io_gwf_framecpp.py,sha256=S0MgBEZ2_o6MDrBfAZbj4SWk3LD
|
|
|
207
207
|
gwpy/timeseries/tests/test_io_gwf_lalframe.py,sha256=iD9m01menvAgUXoGJnX7Xv-O5t3mgX2C2N2nRN-gitY,5479
|
|
208
208
|
gwpy/timeseries/tests/test_io_losc.py,sha256=E_bLM3bc4TO2-cMOEF3vDG8cr6TKgQwPY-EBN6DzyUg,1833
|
|
209
209
|
gwpy/timeseries/tests/test_statevector.py,sha256=-wmDd1GLEXeR1vWa2jixndLyx0WL4eYJLU-BlcEA9JE,13768
|
|
210
|
-
gwpy/timeseries/tests/test_timeseries.py,sha256
|
|
210
|
+
gwpy/timeseries/tests/test_timeseries.py,sha256=-KWXEvs7GNazXXvU1hSpMdHbZRzBDOezLhzzaTkncjc,57426
|
|
211
211
|
gwpy/types/__init__.py,sha256=JIpXRdi0av2V0BkynOwUhijxQShSAqE5gLrowJ6Nckg,1159
|
|
212
212
|
gwpy/types/array.py,sha256=D4EwGC80hKFhrRuFD3xnHaqJR7jdT88v5nik-3o-RU0,15595
|
|
213
213
|
gwpy/types/array2d.py,sha256=NtwW5T6PWHiAS6kFYUfF8fm3WE4qQdPbXN01iaBET0k,12367
|
|
@@ -245,9 +245,9 @@ gwpy/utils/tests/test_mp.py,sha256=kZXUTFqCPi4wvCkGgSSk8XrG9pHPGakPNuNUykgSp-k,2
|
|
|
245
245
|
gwpy/utils/tests/test_shell.py,sha256=arHzI96Rmje5JPhbQ33vEN0ByRh8qwRVqfl4-jzLUv4,2334
|
|
246
246
|
gwpy/utils/tests/test_sphinx_ex2rst.py,sha256=KcIBPWTsPp00iTdYT6bZ8g2F7bN66PaX5uLJlcWu0J0,2263
|
|
247
247
|
gwpy/utils/tests/test_sphinx_zenodo.py,sha256=GL-3R7yFxF6ZQLuVhJI74djdgvE9sX4Q0atdHi3SyiU,5237
|
|
248
|
-
gwpy-3.0.
|
|
249
|
-
gwpy-3.0.
|
|
250
|
-
gwpy-3.0.
|
|
251
|
-
gwpy-3.0.
|
|
252
|
-
gwpy-3.0.
|
|
253
|
-
gwpy-3.0.
|
|
248
|
+
gwpy-3.0.13.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
249
|
+
gwpy-3.0.13.dist-info/METADATA,sha256=z-wxNUOIuBRD9SHwekqZ8ICGX6R8ZCXIxUvdW4T999w,4921
|
|
250
|
+
gwpy-3.0.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
251
|
+
gwpy-3.0.13.dist-info/entry_points.txt,sha256=pcO_XRknobU7b1uuxFb3nTdGMk8FrHQsWBOflnj6Ev8,54
|
|
252
|
+
gwpy-3.0.13.dist-info/top_level.txt,sha256=0XRdsSjFdBe_QF_Qst002-CCxuuO13ag2n-11nBpZ4E,5
|
|
253
|
+
gwpy-3.0.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|