gwpy 3.0.5__py3-none-any.whl → 3.0.7__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 +14 -2
- gwpy/cli/gwpy_plot.py +0 -1
- gwpy/detector/channel.py +1 -6
- gwpy/plot/axes.py +8 -1
- gwpy/plot/plot.py +4 -2
- gwpy/plot/tests/test_axes.py +8 -2
- gwpy/timeseries/core.py +75 -41
- gwpy/timeseries/tests/test_core.py +33 -11
- gwpy/timeseries/tests/test_timeseries.py +50 -12
- gwpy/types/series.py +1 -2
- gwpy/utils/tests/test_misc.py +1 -1
- {gwpy-3.0.5.dist-info → gwpy-3.0.7.dist-info}/METADATA +24 -25
- {gwpy-3.0.5.dist-info → gwpy-3.0.7.dist-info}/RECORD +17 -17
- {gwpy-3.0.5.dist-info → gwpy-3.0.7.dist-info}/WHEEL +1 -1
- {gwpy-3.0.5.dist-info → gwpy-3.0.7.dist-info}/LICENSE +0 -0
- {gwpy-3.0.5.dist-info → gwpy-3.0.7.dist-info}/entry_points.txt +0 -0
- {gwpy-3.0.5.dist-info → gwpy-3.0.7.dist-info}/top_level.txt +0 -0
gwpy/_version.py
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
# file generated by setuptools_scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
TYPE_CHECKING = False
|
|
4
|
+
if TYPE_CHECKING:
|
|
5
|
+
from typing import Tuple, Union
|
|
6
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
+
else:
|
|
8
|
+
VERSION_TUPLE = object
|
|
9
|
+
|
|
10
|
+
version: str
|
|
11
|
+
__version__: str
|
|
12
|
+
__version_tuple__: VERSION_TUPLE
|
|
13
|
+
version_tuple: VERSION_TUPLE
|
|
14
|
+
|
|
15
|
+
__version__ = version = '3.0.7'
|
|
16
|
+
__version_tuple__ = version_tuple = (3, 0, 7)
|
gwpy/cli/gwpy_plot.py
CHANGED
gwpy/detector/channel.py
CHANGED
|
@@ -34,11 +34,6 @@ from .units import parse_unit
|
|
|
34
34
|
|
|
35
35
|
__author__ = 'Duncan Macleod <duncan.macleod@ligo.org>'
|
|
36
36
|
|
|
37
|
-
try: # python >= 3.7
|
|
38
|
-
Pattern = re.Pattern
|
|
39
|
-
except AttributeError: # python < 3.7
|
|
40
|
-
Pattern = re._pattern_type
|
|
41
|
-
|
|
42
37
|
QUOTE_REGEX = re.compile(r'^[\s\"\']+|[\s\"\']+$')
|
|
43
38
|
|
|
44
39
|
|
|
@@ -729,7 +724,7 @@ class ChannelList(list):
|
|
|
729
724
|
a new `ChannelList` containing the matching channels
|
|
730
725
|
"""
|
|
731
726
|
# format name regex
|
|
732
|
-
if isinstance(name, Pattern):
|
|
727
|
+
if isinstance(name, re.Pattern):
|
|
733
728
|
flags = name.flags
|
|
734
729
|
name = name.pattern
|
|
735
730
|
else:
|
gwpy/plot/axes.py
CHANGED
|
@@ -162,7 +162,10 @@ class Axes(_Axes):
|
|
|
162
162
|
super().__init__(*args, **kwargs)
|
|
163
163
|
|
|
164
164
|
# handle Series in `ax.plot()`
|
|
165
|
-
|
|
165
|
+
if matplotlib_version >= "3.8.0":
|
|
166
|
+
self._get_lines = PlotArgsProcessor()
|
|
167
|
+
else:
|
|
168
|
+
self._get_lines = PlotArgsProcessor(self)
|
|
166
169
|
|
|
167
170
|
# reset data formatters (for interactive plots) to support
|
|
168
171
|
# GPS time display
|
|
@@ -635,6 +638,10 @@ class PlotArgsProcessor(_process_plot_var_args):
|
|
|
635
638
|
"""Find `Series` data in `plot()` args and unwrap
|
|
636
639
|
"""
|
|
637
640
|
newargs = []
|
|
641
|
+
# matplotlib 3.8.0 includes the Axes object up-front
|
|
642
|
+
if args and isinstance(args[0], Axes):
|
|
643
|
+
newargs.append(args[0])
|
|
644
|
+
args = args[1:]
|
|
638
645
|
while args:
|
|
639
646
|
# strip first argument
|
|
640
647
|
this, args = args[:1], args[1:]
|
gwpy/plot/plot.py
CHANGED
|
@@ -519,9 +519,11 @@ class Plot(figure.Figure):
|
|
|
519
519
|
pass
|
|
520
520
|
|
|
521
521
|
# add new axes
|
|
522
|
-
|
|
522
|
+
try:
|
|
523
523
|
divider = ax.get_axes_locator()._axes_divider
|
|
524
|
-
|
|
524
|
+
except AttributeError:
|
|
525
|
+
# get_axes_locator() is None _or_ the _axes_divider property
|
|
526
|
+
# has been removed
|
|
525
527
|
from mpl_toolkits.axes_grid1 import make_axes_locatable
|
|
526
528
|
divider = make_axes_locatable(ax)
|
|
527
529
|
if location not in {'top', 'bottom'}:
|
gwpy/plot/tests/test_axes.py
CHANGED
|
@@ -23,7 +23,10 @@ import pytest
|
|
|
23
23
|
|
|
24
24
|
import numpy
|
|
25
25
|
|
|
26
|
-
from matplotlib import
|
|
26
|
+
from matplotlib import (
|
|
27
|
+
__version__ as matplotlib_version,
|
|
28
|
+
rcParams,
|
|
29
|
+
)
|
|
27
30
|
from matplotlib.collections import PolyCollection
|
|
28
31
|
from matplotlib.lines import Line2D
|
|
29
32
|
|
|
@@ -169,7 +172,10 @@ class TestAxes(AxesTestBase):
|
|
|
169
172
|
array = Array2D(numpy.random.random((10, 10)), dx=.1, dy=.2)
|
|
170
173
|
ax.grid(True, which="both", axis="both")
|
|
171
174
|
mesh = ax.pcolormesh(array)
|
|
172
|
-
|
|
175
|
+
if matplotlib_version >= "3.8.0":
|
|
176
|
+
utils.assert_array_equal(mesh.get_array(), array.T)
|
|
177
|
+
else: # matplotlib < 3.8.0
|
|
178
|
+
utils.assert_array_equal(mesh.get_array(), array.T.flatten())
|
|
173
179
|
utils.assert_array_equal(mesh.get_paths()[-1].vertices[2],
|
|
174
180
|
(array.xspan[1], array.yspan[1]))
|
|
175
181
|
# check that restore_grid decorator did its job
|
gwpy/timeseries/core.py
CHANGED
|
@@ -245,8 +245,6 @@ class TimeSeriesBase(Series):
|
|
|
245
245
|
del self.dt
|
|
246
246
|
return
|
|
247
247
|
self.dt = (1 / units.Quantity(val, units.Hertz)).to(self.xunit)
|
|
248
|
-
if numpy.isclose(self.dt.value, round(self.dt.value)):
|
|
249
|
-
self.dt = units.Quantity(round(self.dt.value), self.dt.unit)
|
|
250
248
|
|
|
251
249
|
# -- duration
|
|
252
250
|
@property
|
|
@@ -1187,48 +1185,61 @@ class TimeSeriesBaseDict(OrderedDict):
|
|
|
1187
1185
|
verbose=False, allow_tape=True, observatory=None, **readargs):
|
|
1188
1186
|
"""Find and read data from frames for a number of channels.
|
|
1189
1187
|
|
|
1188
|
+
This method uses :mod:`gwdatafind` to discover the (`file://`) URLs
|
|
1189
|
+
that provide the requested data, then reads those files using
|
|
1190
|
+
:meth:`TimeSeriesDict.read()`.
|
|
1191
|
+
|
|
1190
1192
|
Parameters
|
|
1191
1193
|
----------
|
|
1192
1194
|
channels : `list`
|
|
1193
|
-
|
|
1195
|
+
Required data channels.
|
|
1194
1196
|
|
|
1195
1197
|
start : `~gwpy.time.LIGOTimeGPS`, `float`, `str`
|
|
1196
1198
|
GPS start time of required data,
|
|
1197
1199
|
any input parseable by `~gwpy.time.to_gps` is fine
|
|
1198
1200
|
|
|
1199
|
-
end : `~gwpy.time.LIGOTimeGPS`, `float`, `str
|
|
1201
|
+
end : `~gwpy.time.LIGOTimeGPS`, `float`, `str`
|
|
1200
1202
|
GPS end time of required data, defaults to end of data found;
|
|
1201
1203
|
any input parseable by `~gwpy.time.to_gps` is fine
|
|
1202
1204
|
|
|
1203
|
-
frametype : `str
|
|
1204
|
-
|
|
1205
|
-
|
|
1205
|
+
frametype : `str`
|
|
1206
|
+
Name of frametype in which this channel is stored; if not given
|
|
1207
|
+
all frametypes discoverable via GWDataFind will be searched for
|
|
1208
|
+
the required channels.
|
|
1206
1209
|
|
|
1207
|
-
frametype_match : `str
|
|
1208
|
-
|
|
1210
|
+
frametype_match : `str`
|
|
1211
|
+
Regular expression to use for frametype matching.
|
|
1209
1212
|
|
|
1210
|
-
pad : `float
|
|
1211
|
-
|
|
1213
|
+
pad : `float`
|
|
1214
|
+
Value with which to fill gaps in the source data,
|
|
1212
1215
|
by default gaps will result in a `ValueError`.
|
|
1213
1216
|
|
|
1214
|
-
scaled : `bool
|
|
1215
|
-
|
|
1217
|
+
scaled : `bool`
|
|
1218
|
+
Apply slope and bias calibration to ADC data, for non-ADC data
|
|
1216
1219
|
this option has no effect.
|
|
1217
1220
|
|
|
1218
|
-
nproc : `int
|
|
1219
|
-
|
|
1220
|
-
default.
|
|
1221
|
+
nproc : `int`
|
|
1222
|
+
Number of parallel processes to use.
|
|
1221
1223
|
|
|
1222
|
-
allow_tape : `bool
|
|
1223
|
-
|
|
1224
|
+
allow_tape : `bool`
|
|
1225
|
+
Allow reading from frame files on (slow) magnetic tape.
|
|
1224
1226
|
|
|
1225
1227
|
verbose : `bool`, optional
|
|
1226
|
-
|
|
1228
|
+
Print verbose output about read progress, if ``verbose``
|
|
1227
1229
|
is specified as a string, this defines the prefix for the
|
|
1228
|
-
progress meter
|
|
1230
|
+
progress meter.
|
|
1229
1231
|
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
+
readargs
|
|
1233
|
+
Any other keyword arguments to be passed to `.read()`.
|
|
1234
|
+
|
|
1235
|
+
Raises
|
|
1236
|
+
------
|
|
1237
|
+
requests.exceptions.HTTPError
|
|
1238
|
+
If the GWDataFind query fails for any reason.
|
|
1239
|
+
|
|
1240
|
+
RuntimeError
|
|
1241
|
+
If no files are found to read, or if the read operation
|
|
1242
|
+
fails.
|
|
1232
1243
|
"""
|
|
1233
1244
|
from ..io import datafind as io_datafind
|
|
1234
1245
|
|
|
@@ -1236,11 +1247,18 @@ class TimeSeriesBaseDict(OrderedDict):
|
|
|
1236
1247
|
end = to_gps(end)
|
|
1237
1248
|
|
|
1238
1249
|
# -- find frametype(s)
|
|
1250
|
+
|
|
1251
|
+
frametypes = {}
|
|
1252
|
+
|
|
1239
1253
|
if frametype is None:
|
|
1240
1254
|
matched = io_datafind.find_best_frametype(
|
|
1241
|
-
channels,
|
|
1242
|
-
|
|
1243
|
-
|
|
1255
|
+
channels,
|
|
1256
|
+
start,
|
|
1257
|
+
end,
|
|
1258
|
+
frametype_match=frametype_match,
|
|
1259
|
+
allow_tape=allow_tape,
|
|
1260
|
+
)
|
|
1261
|
+
|
|
1244
1262
|
# flip dict to frametypes with a list of channels
|
|
1245
1263
|
for name, ftype in matched.items():
|
|
1246
1264
|
try:
|
|
@@ -1249,30 +1267,34 @@ class TimeSeriesBaseDict(OrderedDict):
|
|
|
1249
1267
|
frametypes[ftype] = [name]
|
|
1250
1268
|
|
|
1251
1269
|
if verbose and len(frametypes) > 1:
|
|
1252
|
-
gprint("Determined
|
|
1270
|
+
gprint(f"Determined {len(frametypes)} frametypes to read")
|
|
1253
1271
|
elif verbose:
|
|
1254
|
-
gprint("Determined best frametype as
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
frametypes = {frametype: channels}
|
|
1272
|
+
gprint(f"Determined best frametype as '{list(frametypes)[0]}'")
|
|
1273
|
+
else: # use the given frametype for all channels
|
|
1274
|
+
frametypes[frametype] = channels
|
|
1258
1275
|
|
|
1259
1276
|
# -- read data
|
|
1277
|
+
|
|
1260
1278
|
out = cls()
|
|
1261
1279
|
for frametype, clist in frametypes.items():
|
|
1262
1280
|
if verbose:
|
|
1263
|
-
verbose = "Reading {}
|
|
1281
|
+
verbose = f"Reading '{frametype}' data"
|
|
1282
|
+
|
|
1264
1283
|
# parse as a ChannelList
|
|
1265
1284
|
channellist = ChannelList.from_names(*clist)
|
|
1266
1285
|
# strip trend tags from channel names
|
|
1267
1286
|
names = [c.name for c in channellist]
|
|
1287
|
+
|
|
1268
1288
|
# find observatory for this group
|
|
1269
1289
|
if observatory is None:
|
|
1270
1290
|
try:
|
|
1271
1291
|
observatory = ''.join(
|
|
1272
1292
|
sorted(set(c.ifo[0] for c in channellist)))
|
|
1273
1293
|
except TypeError as exc:
|
|
1274
|
-
|
|
1275
|
-
|
|
1294
|
+
raise ValueError(
|
|
1295
|
+
"Cannot parse list of IFOs from channel names",
|
|
1296
|
+
) from exc
|
|
1297
|
+
|
|
1276
1298
|
# find frames
|
|
1277
1299
|
cache = io_datafind.find_urls(
|
|
1278
1300
|
observatory,
|
|
@@ -1282,16 +1304,28 @@ class TimeSeriesBaseDict(OrderedDict):
|
|
|
1282
1304
|
on_gaps="error" if pad is None else "warn",
|
|
1283
1305
|
)
|
|
1284
1306
|
if not cache:
|
|
1285
|
-
raise RuntimeError(
|
|
1286
|
-
|
|
1307
|
+
raise RuntimeError(
|
|
1308
|
+
f"No {observatory}-{frametype} URLs found for "
|
|
1309
|
+
f"[{start}, {end})",
|
|
1310
|
+
)
|
|
1311
|
+
|
|
1287
1312
|
# read data
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1313
|
+
new = cls.read(
|
|
1314
|
+
cache,
|
|
1315
|
+
names,
|
|
1316
|
+
start=start,
|
|
1317
|
+
end=end,
|
|
1318
|
+
pad=pad,
|
|
1319
|
+
scaled=scaled,
|
|
1320
|
+
nproc=nproc,
|
|
1321
|
+
verbose=verbose,
|
|
1322
|
+
**readargs,
|
|
1323
|
+
)
|
|
1324
|
+
|
|
1292
1325
|
# map back to user-given channel name and append
|
|
1293
|
-
out.append(type(new)(
|
|
1294
|
-
|
|
1326
|
+
out.append(type(new)(
|
|
1327
|
+
(key, new[chan]) for (key, chan) in zip(clist, names)
|
|
1328
|
+
))
|
|
1295
1329
|
return out
|
|
1296
1330
|
|
|
1297
1331
|
@classmethod
|
|
@@ -107,26 +107,48 @@ class TestTimeSeriesBase(_TestSeries):
|
|
|
107
107
|
a.t0, units.Quantity(1126259462, 's'))
|
|
108
108
|
|
|
109
109
|
def test_sample_rate(self):
|
|
110
|
-
"""Test `gwpy.timeseries.TimeSeriesBase.sample_rate
|
|
110
|
+
"""Test `gwpy.timeseries.TimeSeriesBase.sample_rate`.
|
|
111
111
|
"""
|
|
112
112
|
# check basic conversion from dt -> sample_rate
|
|
113
113
|
a = self.create(dt=0.5)
|
|
114
114
|
assert a.sample_rate == 2 * units.Hz
|
|
115
115
|
|
|
116
|
+
def test_sample_rate_del(self, array):
|
|
117
|
+
"""Test that `sample_rate` cannot be deleted.
|
|
118
|
+
"""
|
|
116
119
|
# test that we can't delete sample_rate
|
|
117
|
-
with pytest.raises(
|
|
118
|
-
|
|
120
|
+
with pytest.raises(
|
|
121
|
+
AttributeError,
|
|
122
|
+
match="(can't delete attribute|has no deleter)",
|
|
123
|
+
):
|
|
124
|
+
del array.sample_rate
|
|
119
125
|
|
|
126
|
+
def test_sample_rate_none(self, array):
|
|
127
|
+
"""Test that `sample_rate = None` is effectively a deletion.
|
|
128
|
+
"""
|
|
120
129
|
# check None gets preserved
|
|
121
|
-
|
|
122
|
-
with pytest.raises(AttributeError):
|
|
123
|
-
|
|
130
|
+
array.sample_rate = None
|
|
131
|
+
with pytest.raises(AttributeError, match="_t0"):
|
|
132
|
+
array._t0
|
|
133
|
+
|
|
134
|
+
@pytest.mark.parametrize(("samp", "dt"), [
|
|
135
|
+
(128 * units.Hz, units.s / 128.),
|
|
136
|
+
(16.384 * units.kiloHertz, units.s / 16384),
|
|
137
|
+
(10 / units.s, units.s / 10),
|
|
138
|
+
])
|
|
139
|
+
def test_sample_rate_type(self, array, samp, dt):
|
|
140
|
+
"""Test that units and types are handled when setting `sample_rate`.
|
|
141
|
+
"""
|
|
142
|
+
array.sample_rate = samp
|
|
143
|
+
utils.assert_quantity_equal(array.dt, dt)
|
|
124
144
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
145
|
+
def test_sample_rate_ghz(self, array):
|
|
146
|
+
"""Test that very large sample rates don't get rounded to dt=0.
|
|
147
|
+
|
|
148
|
+
Regression: https://github.com/gwpy/gwpy/issues/1646
|
|
149
|
+
"""
|
|
150
|
+
array.sample_rate = 1e9
|
|
151
|
+
assert array.dt.value > 0.
|
|
130
152
|
|
|
131
153
|
def test_duration(self, array):
|
|
132
154
|
assert array.duration == array.t0 + array.shape[0] * array.dt
|
|
@@ -30,6 +30,8 @@ import pytest
|
|
|
30
30
|
import numpy
|
|
31
31
|
from numpy import testing as nptest
|
|
32
32
|
|
|
33
|
+
from requests.exceptions import HTTPError
|
|
34
|
+
|
|
33
35
|
from scipy import signal
|
|
34
36
|
|
|
35
37
|
from astropy import units
|
|
@@ -646,24 +648,34 @@ class TestTimeSeries(_TestTimeSeriesBase):
|
|
|
646
648
|
"os.environ",
|
|
647
649
|
{"GWDATAFIND_SERVER": GWOSC_DATAFIND_SERVER},
|
|
648
650
|
)
|
|
649
|
-
|
|
651
|
+
@pytest.mark.parametrize("kwargs", [
|
|
652
|
+
pytest.param({"verbose": True}, id="default"),
|
|
653
|
+
pytest.param({"observatory": GWOSC_GW150914_IFO[0]}, id="observatory"),
|
|
654
|
+
])
|
|
655
|
+
def test_find(self, gw150914_16384, kwargs):
|
|
656
|
+
"""Test that `TimeSeries.find()` can actually find data.
|
|
657
|
+
"""
|
|
650
658
|
ts = self.TEST_CLASS.find(
|
|
651
659
|
GWOSC_GW150914_CHANNEL,
|
|
652
660
|
*GWOSC_GW150914_SEGMENT,
|
|
653
661
|
frametype=GWOSC_GW150914_FRAMETYPE,
|
|
662
|
+
**kwargs,
|
|
654
663
|
)
|
|
655
|
-
utils.assert_quantity_sub_equal(
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
ts2 = self.TEST_CLASS.find(
|
|
660
|
-
GWOSC_GW150914_CHANNEL,
|
|
661
|
-
*GWOSC_GW150914_SEGMENT,
|
|
662
|
-
frametype=GWOSC_GW150914_FRAMETYPE,
|
|
663
|
-
observatory=GWOSC_GW150914_IFO[0],
|
|
664
|
+
utils.assert_quantity_sub_equal(
|
|
665
|
+
ts,
|
|
666
|
+
gw150914_16384,
|
|
667
|
+
exclude=['name', 'channel', 'unit'],
|
|
664
668
|
)
|
|
665
|
-
|
|
666
|
-
|
|
669
|
+
|
|
670
|
+
@pytest_skip_network_error
|
|
671
|
+
@mock.patch.dict(
|
|
672
|
+
"os.environ",
|
|
673
|
+
{"GWDATAFIND_SERVER": GWOSC_DATAFIND_SERVER},
|
|
674
|
+
)
|
|
675
|
+
def test_find_datafind_httperror(self):
|
|
676
|
+
"""Test that HTTPErrors are presented in `find()`.
|
|
677
|
+
"""
|
|
678
|
+
with pytest.raises(HTTPError):
|
|
667
679
|
self.TEST_CLASS.find(
|
|
668
680
|
GWOSC_GW150914_CHANNEL,
|
|
669
681
|
*GWOSC_GW150914_SEGMENT,
|
|
@@ -671,6 +683,32 @@ class TestTimeSeries(_TestTimeSeriesBase):
|
|
|
671
683
|
observatory='X',
|
|
672
684
|
)
|
|
673
685
|
|
|
686
|
+
@mock.patch.dict(
|
|
687
|
+
"os.environ",
|
|
688
|
+
{"GWDATAFIND_SERVER": GWOSC_DATAFIND_SERVER},
|
|
689
|
+
)
|
|
690
|
+
def test_find_datafind_runtimeerror(self):
|
|
691
|
+
"""Test that empty datafind caches result in RuntimeErrors in `find()`.
|
|
692
|
+
"""
|
|
693
|
+
with pytest.raises(RuntimeError):
|
|
694
|
+
self.TEST_CLASS.find(
|
|
695
|
+
GWOSC_GW150914_CHANNEL,
|
|
696
|
+
*GWOSC_GW150914_SEGMENT.shift(-1e8), # no data available here!
|
|
697
|
+
frametype=GWOSC_GW150914_FRAMETYPE,
|
|
698
|
+
)
|
|
699
|
+
|
|
700
|
+
def test_find_observatory_error(self):
|
|
701
|
+
with pytest.raises(
|
|
702
|
+
ValueError,
|
|
703
|
+
match="Cannot parse list of IFOs from channel names",
|
|
704
|
+
):
|
|
705
|
+
self.TEST_CLASS.find(
|
|
706
|
+
"Test",
|
|
707
|
+
0,
|
|
708
|
+
1,
|
|
709
|
+
frametype="X1_TEST",
|
|
710
|
+
)
|
|
711
|
+
|
|
674
712
|
@_gwosc_cvmfs
|
|
675
713
|
@mock.patch.dict(
|
|
676
714
|
"os.environ",
|
gwpy/types/series.py
CHANGED
|
@@ -839,8 +839,7 @@ class Series(Array):
|
|
|
839
839
|
N = min(self.shape[0], other.shape[0])
|
|
840
840
|
|
|
841
841
|
# if units are the same, can shortcut
|
|
842
|
-
|
|
843
|
-
if type(other) == type(self) and other.unit == self.unit:
|
|
842
|
+
if isinstance(other, Series) and other.unit == self.unit:
|
|
844
843
|
self.value[-N:] = other.value[-N:]
|
|
845
844
|
# otherwise if its just a numpy array
|
|
846
845
|
elif type(other) is type(self.value) or ( # noqa: E721
|
gwpy/utils/tests/test_misc.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gwpy
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.7
|
|
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
|
|
@@ -15,60 +15,59 @@ Classifier: Natural Language :: English
|
|
|
15
15
|
Classifier: Operating System :: OS Independent
|
|
16
16
|
Classifier: Programming Language :: Python
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.8
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
23
22
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
24
23
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
25
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.8
|
|
26
25
|
Description-Content-Type: text/markdown
|
|
27
26
|
License-File: LICENSE
|
|
28
|
-
Requires-Dist: astropy
|
|
27
|
+
Requires-Dist: astropy >=4.3.0
|
|
29
28
|
Requires-Dist: dqsegdb2
|
|
30
|
-
Requires-Dist: gwdatafind
|
|
31
|
-
Requires-Dist: gwosc
|
|
32
|
-
Requires-Dist: h5py
|
|
33
|
-
Requires-Dist: ligo-segments
|
|
34
|
-
Requires-Dist: ligotimegps
|
|
35
|
-
Requires-Dist: matplotlib
|
|
36
|
-
Requires-Dist: numpy
|
|
29
|
+
Requires-Dist: gwdatafind >=1.1.0
|
|
30
|
+
Requires-Dist: gwosc >=0.5.3
|
|
31
|
+
Requires-Dist: h5py >=3.0.0
|
|
32
|
+
Requires-Dist: ligo-segments >=1.0.0
|
|
33
|
+
Requires-Dist: ligotimegps >=1.2.1
|
|
34
|
+
Requires-Dist: matplotlib >=3.3.0
|
|
35
|
+
Requires-Dist: numpy >=1.19
|
|
37
36
|
Requires-Dist: python-dateutil
|
|
38
37
|
Requires-Dist: requests
|
|
39
|
-
Requires-Dist: scipy
|
|
40
|
-
Requires-Dist: tqdm
|
|
38
|
+
Requires-Dist: scipy >=1.5.0
|
|
39
|
+
Requires-Dist: tqdm >=4.10.0
|
|
41
40
|
Provides-Extra: astro
|
|
42
41
|
Requires-Dist: inspiral-range ; extra == 'astro'
|
|
43
42
|
Provides-Extra: conda
|
|
44
|
-
Requires-Dist: python-framel
|
|
43
|
+
Requires-Dist: python-framel >=8.40.1 ; extra == 'conda'
|
|
45
44
|
Requires-Dist: python-nds2-client ; extra == 'conda'
|
|
46
45
|
Requires-Dist: python-ldas-tools-framecpp ; (sys_platform != "win32") and extra == 'conda'
|
|
47
46
|
Provides-Extra: dev
|
|
48
47
|
Requires-Dist: ciecplib ; extra == 'dev'
|
|
49
|
-
Requires-Dist: dateparser
|
|
48
|
+
Requires-Dist: dateparser >=1.1.2 ; extra == 'dev'
|
|
50
49
|
Requires-Dist: psycopg2 ; extra == 'dev'
|
|
51
50
|
Requires-Dist: pymysql ; extra == 'dev'
|
|
52
51
|
Requires-Dist: pyRXP ; extra == 'dev'
|
|
53
52
|
Requires-Dist: sqlalchemy ; extra == 'dev'
|
|
54
|
-
Requires-Dist: uproot
|
|
53
|
+
Requires-Dist: uproot >=4.1.5 ; extra == 'dev'
|
|
55
54
|
Requires-Dist: maya ; (python_version < "3.11") and extra == 'dev'
|
|
56
55
|
Requires-Dist: lalsuite ; (sys_platform != "win32") and extra == 'dev'
|
|
57
56
|
Requires-Dist: lscsoft-glue ; (sys_platform != "win32") and extra == 'dev'
|
|
58
|
-
Requires-Dist: pycbc
|
|
59
|
-
Requires-Dist: python-ligo-lw
|
|
57
|
+
Requires-Dist: pycbc >=1.13.4 ; (sys_platform != "win32") and extra == 'dev'
|
|
58
|
+
Requires-Dist: python-ligo-lw >=1.7.0 ; (sys_platform != "win32") and extra == 'dev'
|
|
60
59
|
Provides-Extra: docs
|
|
61
|
-
Requires-Dist: numpydoc
|
|
62
|
-
Requires-Dist: Sphinx
|
|
60
|
+
Requires-Dist: numpydoc >=0.8.0 ; extra == 'docs'
|
|
61
|
+
Requires-Dist: Sphinx >=4.4.0 ; extra == 'docs'
|
|
63
62
|
Requires-Dist: sphinx-automodapi ; extra == 'docs'
|
|
64
|
-
Requires-Dist: sphinx-immaterial
|
|
65
|
-
Requires-Dist: sphinx-panels
|
|
63
|
+
Requires-Dist: sphinx-immaterial >=0.7.3 ; extra == 'docs'
|
|
64
|
+
Requires-Dist: sphinx-panels >=0.6.0 ; extra == 'docs'
|
|
66
65
|
Requires-Dist: sphinxcontrib-programoutput ; extra == 'docs'
|
|
67
66
|
Provides-Extra: test
|
|
68
|
-
Requires-Dist: coverage[toml]
|
|
69
|
-
Requires-Dist: pytest
|
|
67
|
+
Requires-Dist: coverage[toml] >=5.0 ; extra == 'test'
|
|
68
|
+
Requires-Dist: pytest >=3.9.1 ; extra == 'test'
|
|
70
69
|
Requires-Dist: pytest-freezegun ; extra == 'test'
|
|
71
|
-
Requires-Dist: pytest-cov
|
|
70
|
+
Requires-Dist: pytest-cov >=2.4.0 ; extra == 'test'
|
|
72
71
|
Requires-Dist: pytest-requires ; extra == 'test'
|
|
73
72
|
Requires-Dist: pytest-socket ; extra == 'test'
|
|
74
73
|
Requires-Dist: pytest-xdist ; extra == 'test'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
gwpy/__init__.py,sha256=3chu5cxfVA08qkFYk3lyXBlFXO6lrgytIIdh_nL9YzU,1533
|
|
2
|
-
gwpy/_version.py,sha256=
|
|
2
|
+
gwpy/_version.py,sha256=LJ4HJPpXI_UsV9wSih_sOZxstGnvrh7nUYp4E-ZbpXc,411
|
|
3
3
|
gwpy/conftest.py,sha256=nMqidKFNcwTCvDb-vHzzCmzUyyL0TH9DwbmagfdE1II,1639
|
|
4
4
|
gwpy/astro/__init__.py,sha256=DtaqsbVdlI4Qy6eRlXuLtraTCLXjpQYadk5pEFwXrM8,1909
|
|
5
5
|
gwpy/astro/range.py,sha256=ah1TLCNk8Pq8YBHaXKuglShO8rFbmDgO2z4SOuWlDEc,24880
|
|
@@ -9,7 +9,7 @@ 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
|
|
11
11
|
gwpy/cli/coherencegram.py,sha256=mpGG3fHBR2OfjhfnRm3VgewAdr6wUgB6kwtsCeWnc64,3353
|
|
12
|
-
gwpy/cli/gwpy_plot.py,sha256=
|
|
12
|
+
gwpy/cli/gwpy_plot.py,sha256=CaxV0CsLUjsj24hGjjn5pwmKGq10I3-4qJoZvOKlSf0,5099
|
|
13
13
|
gwpy/cli/qtransform.py,sha256=aXtgnc0Jb6UnHsaVDHuYhZclj4jsS6OPN5VnKrMg-dk,9140
|
|
14
14
|
gwpy/cli/spectrogram.py,sha256=NlNHVJhjb162j5P5e0G_6ngcbPlCW31Umw-IqKmsqGs,7131
|
|
15
15
|
gwpy/cli/spectrum.py,sha256=IpBhoi70h1Cx1R6qlA3RMCyB7BXWrNFyQEVRpEIOSWE,4899
|
|
@@ -26,7 +26,7 @@ gwpy/cli/tests/test_spectrum.py,sha256=0NOk0pylLgSR9u74FmdxctSaGevdCyzEsHZId7eU-
|
|
|
26
26
|
gwpy/cli/tests/test_timeseries.py,sha256=HCYeRdk1Y7owMHTURmV-G9N4iSPZpoKXKvfigOrfxLg,1279
|
|
27
27
|
gwpy/cli/tests/test_transferfunction.py,sha256=VCve5NgBQo7tBgM5zaBlqY29R0ymc7Tfk9pRpJLsBdg,1999
|
|
28
28
|
gwpy/detector/__init__.py,sha256=gsC_0ca8m8xRQzQ8ns6fpwFQ14_uxUu1LRh1B-sN6EA,2252
|
|
29
|
-
gwpy/detector/channel.py,sha256=
|
|
29
|
+
gwpy/detector/channel.py,sha256=2X37knAbqzDg3GavKheXnOHOAgVaPHrOFQ4f4WpmvPc,26786
|
|
30
30
|
gwpy/detector/units.py,sha256=YbKVRrOWIfGDWzeRmKriZuenIJdkxGmpUiHcIoJ2jp0,7113
|
|
31
31
|
gwpy/detector/io/__init__.py,sha256=dAsz8ii5RVhwI_BNVjYrsnX1Pt3nfjh8jqVl4xqLTec,1037
|
|
32
32
|
gwpy/detector/io/cis.py,sha256=gHGnB68xMAv0xQUG4eazA-4Jp0BesYlrttPBXt2g2Qs,3184
|
|
@@ -70,14 +70,14 @@ gwpy/io/tests/test_mp.py,sha256=_v5sM6oU9Qw1dIH-zCJyMQVDs4uoOohwjFY82aRx_6c,3293
|
|
|
70
70
|
gwpy/io/tests/test_nds2.py,sha256=RKaP1XhnJGaC53mdFuQYqYM2xjrP_S-7SUPysbX6-hM,12185
|
|
71
71
|
gwpy/io/tests/test_utils.py,sha256=TM_sk6sTV_Hh8A7jY-C4rL9sPu5_ylUB88Js2bOlcb4,3971
|
|
72
72
|
gwpy/plot/__init__.py,sha256=wOFYB6xVJx7UfO4QFVCEdPNQ-UJBVTXYbDp4a5EU27c,1641
|
|
73
|
-
gwpy/plot/axes.py,sha256=
|
|
73
|
+
gwpy/plot/axes.py,sha256=mpMtg-VTNpSRzbvRyca9EbHJtTdcFKHYX8pVIc6aPUw,23376
|
|
74
74
|
gwpy/plot/bode.py,sha256=EfC8wl0_xYriL12m-jZdeDHBJ0tt2GJ6rYNuHQlkRsQ,8733
|
|
75
75
|
gwpy/plot/colorbar.py,sha256=4-0Lci1KhpEwdCo1L6jWbZ0ErjKxZ61Zt1uokrlM44M,7041
|
|
76
76
|
gwpy/plot/colors.py,sha256=qmrM4u4Ir8OB2jkHUG3ZnriUlp1sdAB_IAb0H9mhC_A,3367
|
|
77
77
|
gwpy/plot/gps.py,sha256=rpGcV0Ky-VPxRbPpziKjZyZs3Y-sgPkGsO9_sdhQvKo,16720
|
|
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=Ci8bxBgld4PjbeFtQQ_19ryYENJ1EHcIQN7f18Xi99c,21866
|
|
81
81
|
gwpy/plot/rc.py,sha256=cK8pOzcvuRsMv_16k9Hl2mkn_dk8FaRrIVhtNhBzyp8,4816
|
|
82
82
|
gwpy/plot/segments.py,sha256=HhjQEv8G00Rp7iRun98CGIk91-c_vAvEsv-uch3CbyU,16943
|
|
83
83
|
gwpy/plot/tex.py,sha256=SJRMIgxBZ9I0vFM1n3O5UqETWS_pnRxg78UFSPYjBXI,4783
|
|
@@ -85,7 +85,7 @@ gwpy/plot/text.py,sha256=SPVO-QQe6B6SaPiycS38EwZGmVbwQfxQfQ1cjbGeOiI,1989
|
|
|
85
85
|
gwpy/plot/units.py,sha256=D0bWwYIAg-QuWpsNvze9UFuHoBX9p81B-Dlj5kbDxRQ,1825
|
|
86
86
|
gwpy/plot/utils.py,sha256=uRz9Gqy_2Mxk-2Nvw9wy-kIoAKUDeSDALMRkSziQyZY,1670
|
|
87
87
|
gwpy/plot/tests/__init__.py,sha256=k6hQsfBzktDEYb9gGfy9DKD5Cj2GCQmnFBnXIR9yynM,740
|
|
88
|
-
gwpy/plot/tests/test_axes.py,sha256=
|
|
88
|
+
gwpy/plot/tests/test_axes.py,sha256=URs8Nvg7WHqDWYjTTSz169hhCM-aE3P9nRa4n9qwolk,11736
|
|
89
89
|
gwpy/plot/tests/test_bode.py,sha256=Noa55V7WxiE7C__RdNb2xcbeapFeuKP9gt0cmnT9eeg,3351
|
|
90
90
|
gwpy/plot/tests/test_colors.py,sha256=m29kKi0tptiY_dv3FnUzxPAlI2qHn1K3inG2382cDoU,1881
|
|
91
91
|
gwpy/plot/tests/test_gps.py,sha256=J_2Y0lzhVA1_LfH0Z_8bJFVPRhDPqWgnd6x4md4zXgc,5456
|
|
@@ -185,7 +185,7 @@ 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=7XGTzQxUDUlpHwNqobuQq5NK4Clahf1sVqGbVGeBRCU,5728
|
|
187
187
|
gwpy/timeseries/__init__.py,sha256=e-ncacmSPxUUmya8xlQ-Govk4ptr-0TVp26vMIPmxTU,1134
|
|
188
|
-
gwpy/timeseries/core.py,sha256=
|
|
188
|
+
gwpy/timeseries/core.py,sha256=P2Pbin4_Lfhfa18t19HxvHWW8NrTxBykcQZ4ZsO9nas,57802
|
|
189
189
|
gwpy/timeseries/statevector.py,sha256=Ns65za6o1L49mXUN-WukP-Lz3vxQw330Od2FzPjQGbI,35811
|
|
190
190
|
gwpy/timeseries/timeseries.py,sha256=lg28EEMASBR2IS_4gJfcU0j3uo7tEfFEVjK-Uv64ziw,87809
|
|
191
191
|
gwpy/timeseries/io/__init__.py,sha256=qviFCaeTVeTZ7ZiIQKQyU1xxh76Ba60yE9vVtm9y1bY,938
|
|
@@ -201,17 +201,17 @@ gwpy/timeseries/io/gwf/framecpp.py,sha256=-cPrdQEnzFeEjc_ktpSNY36pnyAU9PQI8ofR7U
|
|
|
201
201
|
gwpy/timeseries/io/gwf/framel.py,sha256=UQuydhR9reAgSmYSI0lqHJ7120gDyXHoImaQUjXz0mc,4776
|
|
202
202
|
gwpy/timeseries/io/gwf/lalframe.py,sha256=hpBQRNHhNUat-E8EKXHcRCTZm6JKjodIgjs0n4HTVfQ,6828
|
|
203
203
|
gwpy/timeseries/tests/__init__.py,sha256=QJdnWz_IQOTYq6MvKuBzz2HFiNVf6QMXrZ-kDks-lDI,751
|
|
204
|
-
gwpy/timeseries/tests/test_core.py,sha256=
|
|
204
|
+
gwpy/timeseries/tests/test_core.py,sha256=9tJ5_ifgdW91Ga_l7AoExLN9QAMNaTcgNep3eu7Rvbc,19685
|
|
205
205
|
gwpy/timeseries/tests/test_io_gwf_framecpp.py,sha256=2EHmlVLbM3J-6YQmaxiCHNL1Fiw7Lur4fRiMJDCY1kM,2265
|
|
206
206
|
gwpy/timeseries/tests/test_io_gwf_lalframe.py,sha256=Bz5gjhKT8px27mPkdDDiR47-vjc5Tn04f2Is8CKAvLc,4969
|
|
207
207
|
gwpy/timeseries/tests/test_io_losc.py,sha256=E_bLM3bc4TO2-cMOEF3vDG8cr6TKgQwPY-EBN6DzyUg,1833
|
|
208
208
|
gwpy/timeseries/tests/test_statevector.py,sha256=NOSe4BRwIKoaax_YnxoP2UQ1mpy4Zbw8zJPbcI8OHzE,12935
|
|
209
|
-
gwpy/timeseries/tests/test_timeseries.py,sha256
|
|
209
|
+
gwpy/timeseries/tests/test_timeseries.py,sha256=-iH7gnhApfgHKQBRXz2GI663tZ7yvdjaRpUisX1h2q4,56584
|
|
210
210
|
gwpy/types/__init__.py,sha256=JIpXRdi0av2V0BkynOwUhijxQShSAqE5gLrowJ6Nckg,1159
|
|
211
211
|
gwpy/types/array.py,sha256=JiwmwXmSIYY-Y08yrs5sUJu3a0iAQT3kE0mWmKT3g7M,15282
|
|
212
212
|
gwpy/types/array2d.py,sha256=NtwW5T6PWHiAS6kFYUfF8fm3WE4qQdPbXN01iaBET0k,12367
|
|
213
213
|
gwpy/types/index.py,sha256=JMvhf5HyT8mIRemj3aBY0A6aliEKMgyt6rDGNoiPO0Y,3074
|
|
214
|
-
gwpy/types/series.py,sha256=
|
|
214
|
+
gwpy/types/series.py,sha256=zcRvwoFoVJbpxBs8-eTdx7zV3Vb_B4oEtv3dXwj0lWM,36490
|
|
215
215
|
gwpy/types/sliceutils.py,sha256=M4SIuaGSUv3_OsS07O2_6rRC8hxq7z6XwQViFsdqsn4,3567
|
|
216
216
|
gwpy/types/io/__init__.py,sha256=B5A4gqpldCnd9LjZ0BEWU5qaJI-tWU-Du0n_gEcw1Cs,905
|
|
217
217
|
gwpy/types/io/ascii.py,sha256=bamzUBneh2DZXjQ1jPlUjMvfnvBU-ckjGJ4eYR9zzY8,2872
|
|
@@ -240,13 +240,13 @@ gwpy/utils/tests/test_decorators.py,sha256=CS7zoXcVS71VyVr7d9_ll7tWZjuFxBGuKsGKx
|
|
|
240
240
|
gwpy/utils/tests/test_enum.py,sha256=xOEKR-Id8krxTTBcTNlVjM-S_aGA__4_zMh1DupavM0,2185
|
|
241
241
|
gwpy/utils/tests/test_env.py,sha256=-ZG0L_jxrNsNmImuAEEBow66JN-BAsnKEG-KcOl_Nr8,2000
|
|
242
242
|
gwpy/utils/tests/test_lal.py,sha256=7JQ_26ikvSwD1nrN4r8HXg_zJEdHzsxEZUiFPM_sPT0,3478
|
|
243
|
-
gwpy/utils/tests/test_misc.py,sha256
|
|
243
|
+
gwpy/utils/tests/test_misc.py,sha256=rkTxdu7gv9Dxs0OI6IvGivGiAs3PuK8ckMtNF5_kE6I,2624
|
|
244
244
|
gwpy/utils/tests/test_mp.py,sha256=kZXUTFqCPi4wvCkGgSSk8XrG9pHPGakPNuNUykgSp-k,2062
|
|
245
245
|
gwpy/utils/tests/test_shell.py,sha256=2zKiOE-zItqufgUV4QQ5GJgwbujQASd-iuRFG4JcXvA,2367
|
|
246
246
|
gwpy/utils/tests/test_sphinx_ex2rst.py,sha256=KcIBPWTsPp00iTdYT6bZ8g2F7bN66PaX5uLJlcWu0J0,2263
|
|
247
|
-
gwpy-3.0.
|
|
248
|
-
gwpy-3.0.
|
|
249
|
-
gwpy-3.0.
|
|
250
|
-
gwpy-3.0.
|
|
251
|
-
gwpy-3.0.
|
|
252
|
-
gwpy-3.0.
|
|
247
|
+
gwpy-3.0.7.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
248
|
+
gwpy-3.0.7.dist-info/METADATA,sha256=YrKrpeUk03PdzfhdIxk5PH8T6CDcSNe03d62swlrdCQ,5132
|
|
249
|
+
gwpy-3.0.7.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
250
|
+
gwpy-3.0.7.dist-info/entry_points.txt,sha256=pcO_XRknobU7b1uuxFb3nTdGMk8FrHQsWBOflnj6Ev8,54
|
|
251
|
+
gwpy-3.0.7.dist-info/top_level.txt,sha256=0XRdsSjFdBe_QF_Qst002-CCxuuO13ag2n-11nBpZ4E,5
|
|
252
|
+
gwpy-3.0.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|