gwsumm 2.2.3__tar.gz → 2.2.4__tar.gz

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.
Files changed (129) hide show
  1. {gwsumm-2.2.3 → gwsumm-2.2.4}/.github/workflows/build.yml +5 -7
  2. {gwsumm-2.2.3 → gwsumm-2.2.4}/.github/workflows/lint.yml +2 -2
  3. {gwsumm-2.2.3 → gwsumm-2.2.4}/PKG-INFO +2 -2
  4. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/environment.yml +2 -2
  5. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/_version.py +2 -2
  6. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/data/range.py +22 -6
  7. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/data/spectral.py +12 -20
  8. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/bootstrap.py +2 -2
  9. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/static.py +12 -11
  10. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/tests/test_bootstrap.py +6 -6
  11. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/tests/test_static.py +2 -2
  12. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/builtin.py +6 -4
  13. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/data.py +1 -1
  14. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/guardian.py +1 -1
  15. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm.egg-info/PKG-INFO +2 -2
  16. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm.egg-info/requires.txt +1 -1
  17. {gwsumm-2.2.3 → gwsumm-2.2.4}/pyproject.toml +1 -1
  18. {gwsumm-2.2.3 → gwsumm-2.2.4}/.codeclimate.yml +0 -0
  19. {gwsumm-2.2.3 → gwsumm-2.2.4}/.codecov.yml +0 -0
  20. {gwsumm-2.2.3 → gwsumm-2.2.4}/.flake8 +0 -0
  21. {gwsumm-2.2.3 → gwsumm-2.2.4}/.gitattributes +0 -0
  22. {gwsumm-2.2.3 → gwsumm-2.2.4}/.gitignore +0 -0
  23. {gwsumm-2.2.3 → gwsumm-2.2.4}/.readthedocs.yaml +0 -0
  24. {gwsumm-2.2.3 → gwsumm-2.2.4}/CONTRIBUTING.md +0 -0
  25. {gwsumm-2.2.3 → gwsumm-2.2.4}/LICENSE +0 -0
  26. {gwsumm-2.2.3 → gwsumm-2.2.4}/MANIFEST.in +0 -0
  27. {gwsumm-2.2.3 → gwsumm-2.2.4}/README.rst +0 -0
  28. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/Makefile +0 -0
  29. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/_static/css/custom.css +0 -0
  30. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/_templates/autoclass/class.rst +0 -0
  31. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/_templates/autosummary/base.rst +0 -0
  32. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/_templates/autosummary/class.rst +0 -0
  33. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/_templates/autosummary/module.rst +0 -0
  34. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/_templates/layout.html +0 -0
  35. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/api/index.rst +0 -0
  36. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/automation.rst +0 -0
  37. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/cli.rst +0 -0
  38. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/conf.py +0 -0
  39. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/configuration/data.rst +0 -0
  40. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/configuration/format.rst +0 -0
  41. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/configuration/index.rst +0 -0
  42. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/configuration/tabs.rst +0 -0
  43. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/examples/first.png +0 -0
  44. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/examples/imc.png +0 -0
  45. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/images/screenshot.png +0 -0
  46. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/index.rst +0 -0
  47. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/make.bat +0 -0
  48. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/modes.rst +0 -0
  49. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/overview.rst +0 -0
  50. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/plots.rst +0 -0
  51. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/states.rst +0 -0
  52. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/tabs/api.rst +0 -0
  53. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/tabs/index.rst +0 -0
  54. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/tabs/modes.rst +0 -0
  55. {gwsumm-2.2.3 → gwsumm-2.2.4}/docs/tabs/websites.rst +0 -0
  56. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/__init__.py +0 -0
  57. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/__main__.py +0 -0
  58. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/archive.py +0 -0
  59. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/batch.py +0 -0
  60. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/channels.py +0 -0
  61. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/config/__init__.py +0 -0
  62. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/config/defaults.ini +0 -0
  63. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/config/matplotlib.ini +0 -0
  64. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/data/__init__.py +0 -0
  65. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/data/coherence.py +0 -0
  66. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/data/mathutils.py +0 -0
  67. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/data/timeseries.py +0 -0
  68. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/data/utils.py +0 -0
  69. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/globalv.py +0 -0
  70. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/__init__.py +0 -0
  71. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/html5.py +0 -0
  72. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/tests/__init__.py +0 -0
  73. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/html/tests/test_html5.py +0 -0
  74. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/io.py +0 -0
  75. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/mode.py +0 -0
  76. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/__init__.py +0 -0
  77. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/core.py +0 -0
  78. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/guardian/__init__.py +0 -0
  79. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/guardian/__main__.py +0 -0
  80. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/guardian/core.py +0 -0
  81. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/guardian/tests/__init__.py +0 -0
  82. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/guardian/tests/test_main.py +0 -0
  83. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/mixins.py +0 -0
  84. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/noisebudget.py +0 -0
  85. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/range.py +0 -0
  86. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/registry.py +0 -0
  87. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/segments.py +0 -0
  88. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/sei.py +0 -0
  89. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/triggers/__init__.py +0 -0
  90. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/triggers/__main__.py +0 -0
  91. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/triggers/core.py +0 -0
  92. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/triggers/tests/__init__.py +0 -0
  93. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/triggers/tests/test_main.py +0 -0
  94. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/plot/utils.py +0 -0
  95. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/segments.py +0 -0
  96. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/state/__init__.py +0 -0
  97. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/state/all.py +0 -0
  98. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/state/core.py +0 -0
  99. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/state/registry.py +0 -0
  100. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/__init__.py +0 -0
  101. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/builtin.py +0 -0
  102. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/core.py +0 -0
  103. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/etg.py +0 -0
  104. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/fscan.py +0 -0
  105. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/gracedb.py +0 -0
  106. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/management.py +0 -0
  107. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/misc.py +0 -0
  108. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/registry.py +0 -0
  109. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/sei.py +0 -0
  110. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tabs/stamp.py +0 -0
  111. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/__init__.py +0 -0
  112. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/common.py +0 -0
  113. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_archive.py +0 -0
  114. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_batch.py +0 -0
  115. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_channels.py +0 -0
  116. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_config.py +0 -0
  117. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_data.py +0 -0
  118. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_mode.py +0 -0
  119. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_plot.py +0 -0
  120. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_tabs.py +0 -0
  121. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/tests/test_utils.py +0 -0
  122. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/triggers.py +0 -0
  123. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/units.py +0 -0
  124. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm/utils.py +0 -0
  125. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm.egg-info/SOURCES.txt +0 -0
  126. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm.egg-info/dependency_links.txt +0 -0
  127. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm.egg-info/entry_points.txt +0 -0
  128. {gwsumm-2.2.3 → gwsumm-2.2.4}/gwsumm.egg-info/top_level.txt +0 -0
  129. {gwsumm-2.2.3 → gwsumm-2.2.4}/setup.cfg +0 -0
@@ -49,12 +49,12 @@ jobs:
49
49
 
50
50
  steps:
51
51
  - name: Get source code
52
- uses: actions/checkout@v2
52
+ uses: actions/checkout@v4
53
53
  with:
54
54
  fetch-depth: 0
55
55
 
56
56
  - name: Cache conda packages
57
- uses: actions/cache@v2
57
+ uses: actions/cache@v4
58
58
  env:
59
59
  # increment to reset cache
60
60
  CACHE_NUMBER: 0
@@ -64,14 +64,12 @@ jobs:
64
64
  restore-keys: ${{ runner.os }}-conda-${{ matrix.python-version }}-
65
65
 
66
66
  - name: Configure conda
67
- uses: conda-incubator/setup-miniconda@v2
67
+ uses: conda-incubator/setup-miniconda@v3
68
68
  with:
69
69
  activate-environment: test
70
70
  miniforge-variant: Mambaforge
71
71
  python-version: ${{ matrix.python-version }}
72
72
  use-mamba: true
73
- # this is needed for caching to work properly:
74
- use-only-tar-bz2: true
75
73
 
76
74
  - name: Conda info
77
75
  run: conda info --all
@@ -113,14 +111,14 @@ jobs:
113
111
  run: python -m coverage report --show-missing
114
112
 
115
113
  - name: Publish coverage to Codecov
116
- uses: codecov/codecov-action@v1.2.1
114
+ uses: codecov/codecov-action@v4
117
115
  with:
118
116
  files: coverage.xml
119
117
  flags: ${{ runner.os }},python${{ matrix.python-version }}
120
118
 
121
119
  - name: Upload test results
122
120
  if: always()
123
- uses: actions/upload-artifact@v2
121
+ uses: actions/upload-artifact@v4
124
122
  with:
125
123
  name: pytest-conda-${{ matrix.os }}-${{ matrix.python-version }}
126
124
  path: pytest.xml
@@ -27,9 +27,9 @@ jobs:
27
27
  name: Flake8
28
28
  runs-on: ubuntu-latest
29
29
  steps:
30
- - uses: actions/checkout@v2
30
+ - uses: actions/checkout@v3
31
31
  - name: Set up Python
32
- uses: actions/setup-python@v2
32
+ uses: actions/setup-python@v5
33
33
  with:
34
34
  python-version: '3.x'
35
35
  - name: Install dependencies
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gwsumm
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: A python toolbox used by the LIGO Scientific Collaboration for detector characterisation
5
5
  Author-email: Alex Urban <alex.urban@ligo.org>, Duncan Macleod <duncan.macleod@ligo.org>
6
6
  Maintainer-email: Evan Goetz <evan.goetz@ligo.org>
@@ -28,7 +28,7 @@ Description-Content-Type: text/x-rst
28
28
  License-File: LICENSE
29
29
  Requires-Dist: astropy>=3.0.0
30
30
  Requires-Dist: gwdatafind>=1.1.1
31
- Requires-Dist: gwdetchar>=2.0.0
31
+ Requires-Dist: gwdetchar>=2.2.4
32
32
  Requires-Dist: gwpy>=2.0.0
33
33
  Requires-Dist: gwtrigfind
34
34
  Requires-Dist: lalsuite
@@ -28,6 +28,6 @@ dependencies:
28
28
  # docs
29
29
  - numpydoc
30
30
  - sphinx
31
- - sphinx-automodapi
31
+ - sphinx-automodapi !=0.17.0
32
32
  - sphinx_bootstrap_theme
33
- - sphinxcontrib-programoutput
33
+ - sphinxcontrib-programoutput
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '2.2.3'
16
- __version_tuple__ = version_tuple = (2, 2, 3)
15
+ __version__ = version = '2.2.4'
16
+ __version_tuple__ = version_tuple = (2, 2, 4)
@@ -117,21 +117,37 @@ def get_range_spectrogram(channel, segments, config=None, cache=None,
117
117
  add_spectrogram(outspec if 'energy' in rangekwargs else
118
118
  outspec**(1/2.), key=key)
119
119
 
120
- if return_:
121
- return globalv.SPECTROGRAMS.get(key, SpectrogramList())
120
+ if not return_:
121
+ return
122
+
123
+ # return correct data, according to state segment
124
+ out = SpectrogramList()
125
+ for specgram in globalv.SPECTROGRAMS[key]:
126
+ for seg in segments:
127
+ if abs(seg) < specgram.dt.value:
128
+ continue
129
+ if specgram.span.intersects(seg):
130
+ common = specgram.span & type(seg)(seg[0],
131
+ seg[1] + specgram.dt.value)
132
+ s = specgram.crop(*common)
133
+ if s.shape[0]:
134
+ out.append(s)
135
+ return out.coalesce()
122
136
 
123
137
 
124
138
  @use_segmentlist
125
139
  def get_range_spectrum(channel, segments, config=None, cache=None, query=True,
126
140
  nds=None, return_=True, nproc=1, datafind_error='raise',
127
141
  frametype=None, stride=60, fftlength=None, overlap=None,
128
- method=None, which='all', **rangekwargs):
142
+ method=None, which='all', state=None, **rangekwargs):
129
143
  """Compute percentile spectra of the range integrand from a set of
130
144
  spectrograms
131
145
  """
132
146
  name = str(channel)
133
- cmin = '%s.min' % name
134
- cmax = '%s.max' % name
147
+ if state:
148
+ name += f',{state}'
149
+ cmin = f'{name}.min'
150
+ cmax = f'{name}.max'
135
151
 
136
152
  if name not in globalv.SPECTRUM:
137
153
  speclist = get_range_spectrogram(
@@ -164,4 +180,4 @@ def get_range_spectrum(channel, segments, config=None, cache=None, query=True,
164
180
  return globalv.SPECTRUM[cmin]
165
181
  if which == 'max':
166
182
  return globalv.SPECTRUM[cmax]
167
- raise ValueError("Unrecognised value for `which`: %r" % which)
183
+ raise ValueError(f"Unrecognised value for `which`: {which}")
@@ -34,7 +34,6 @@ from scipy import interpolate
34
34
 
35
35
  from astropy import units
36
36
 
37
- from gwpy.segments import DataQualityFlag
38
37
  from gwpy.frequencyseries import FrequencySeries
39
38
  from gwpy.spectrogram import SpectrogramList
40
39
 
@@ -328,17 +327,11 @@ def apply_transfer_function_series(specgram, tfunc):
328
327
  def get_spectrum(channel, segments, config=None, cache=None,
329
328
  query=True, nds=None, format='power', return_=True,
330
329
  frametype=None, nproc=1, datafind_error='raise',
331
- **fftparams):
332
- """Retrieve the time-series and generate a spectrogram of the given
330
+ state=None, **fftparams):
331
+ """Retrieve the time-series and generate a spectrum of the given
333
332
  channel
334
333
  """
335
334
  channel = get_channel(channel)
336
- if isinstance(segments, DataQualityFlag):
337
- name = ','.join([channel.ndsname, segments.name])
338
- segments = segments.active
339
- else:
340
- name = channel.ndsname
341
- name += ',%s' % format
342
335
 
343
336
  # read data for all sub-channels
344
337
  specs = []
@@ -351,6 +344,7 @@ def get_spectrum(channel, segments, config=None, cache=None,
351
344
  return_=return_, frametype=frametype,
352
345
  nproc=nproc,
353
346
  datafind_error=datafind_error,
347
+ state=state,
354
348
  **fftparams))
355
349
  if return_ and len(channels) == 1:
356
350
  return specs[0]
@@ -363,19 +357,17 @@ def get_spectrum(channel, segments, config=None, cache=None,
363
357
 
364
358
  def _get_spectrum(channel, segments, config=None, cache=None, query=True,
365
359
  nds=None, format='power', return_=True, which='all',
366
- **fftparams):
367
- """Retrieve the time-series and generate a spectrogram of the given
360
+ state=None, **fftparams):
361
+ """Retrieve the time-series and generate a spectrum of the given
368
362
  channel
369
363
  """
370
364
  channel = get_channel(channel)
371
- if isinstance(segments, DataQualityFlag):
372
- name = ','.join([channel.ndsname, segments.name])
373
- segments = segments.active
374
- else:
375
- name = channel.ndsname
376
- name += ',%s' % format
377
- cmin = '%s.min' % name
378
- cmax = '%s.max' % name
365
+
366
+ name = f'{channel.ndsname},{format}'
367
+ if state:
368
+ name = f'{channel.ndsname},{state},{format}'
369
+ cmin = f'{name}.min'
370
+ cmax = f'{name}.max'
379
371
 
380
372
  if name not in globalv.SPECTRUM:
381
373
  if os.path.isfile(channel.ndsname):
@@ -424,4 +416,4 @@ def _get_spectrum(channel, segments, config=None, cache=None, query=True,
424
416
  return globalv.SPECTRUM[cmin]
425
417
  if which == 'max':
426
418
  return globalv.SPECTRUM[cmax]
427
- raise ValueError("Unrecognised value for `which`: %r" % which)
419
+ raise ValueError(f"Unrecognised value for `which`: {which}")
@@ -150,9 +150,9 @@ def state_switcher(states, default=0):
150
150
  page.li(class_='nav-item dropdown')
151
151
  page.a(str(current), class_='nav-link dropdown-toggle', href='#',
152
152
  id_='states', role='button', title='Show/hide state menu',
153
- **{'data-toggle': 'dropdown'})
153
+ **{'data-bs-toggle': 'dropdown'})
154
154
  page.div(
155
- class_='dropdown-menu dropdown-menu-right state-switch shadow',
155
+ class_='dropdown-menu dropdown-menu-end state-switch shadow',
156
156
  id_='statemenu',
157
157
  )
158
158
  page.h6('Select below to view this page in another state (different '
@@ -24,33 +24,34 @@ This module mainly declares the resources used by standard on HTML pages
24
24
  from collections import OrderedDict
25
25
 
26
26
  __author__ = 'Duncan Macleod <duncan.macleod@ligo.org>'
27
- __credits__ = 'Alex Urban <alexander.urban@ligo.org>'
27
+ __credits__ = ('Alex Urban <alexander.urban@ligo.org>,'
28
+ ' Evan Goetz <evan.goetz@ligo.org>')
28
29
 
29
30
 
30
31
  # build collection of CSS resources
31
32
  CSS = OrderedDict((
32
33
  ('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/'
33
- 'font-awesome/5.15.1/css/fontawesome.min.css'),
34
+ 'font-awesome/6.5.1/css/fontawesome.min.css'),
34
35
  ('font-awesome-solid', 'https://cdnjs.cloudflare.com/ajax/libs/'
35
- 'font-awesome/5.15.1/css/solid.min.css'),
36
- ('gwbootstrap', 'https://cdn.jsdelivr.net/npm/gwbootstrap@1.3.2/'
36
+ 'font-awesome/6.5.1/css/solid.min.css'),
37
+ ('gwbootstrap', 'https://cdn.jsdelivr.net/npm/gwbootstrap@1.3.4/'
37
38
  'lib/gwbootstrap.min.css'),
38
39
  ))
39
40
 
40
41
  # build collection of javascript resources
41
42
  JS = OrderedDict((
42
- ('jquery', 'https://code.jquery.com/jquery-3.5.1.min.js'),
43
- ('jquery-ui', 'https://code.jquery.com/ui/1.12.1/jquery-ui.min.js'),
43
+ ('jquery', 'https://code.jquery.com/jquery-3.7.1.min.js'),
44
+ ('jquery-ui', 'https://code.jquery.com/ui/1.13.2/jquery-ui.min.js'),
44
45
  ('moment', 'https://cdnjs.cloudflare.com/ajax/libs/'
45
- 'moment.js/2.29.1/moment.min.js'),
46
- ('bootstrap', 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/'
46
+ 'moment.js/2.30.1/moment.min.js'),
47
+ ('bootstrap', 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/'
47
48
  'dist/js/bootstrap.bundle.min.js'),
48
- ('fancybox', 'https://cdnjs.cloudflare.com/ajax/libs/'
49
- 'fancybox/3.5.7/jquery.fancybox.min.js'),
49
+ ('fancybox', 'https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/'
50
+ 'dist/fancybox/fancybox.umd.js'),
50
51
  ('datepicker', 'https://cdnjs.cloudflare.com/ajax/libs/'
51
52
  'bootstrap-datepicker/1.9.0/js/'
52
53
  'bootstrap-datepicker.min.js'),
53
- ('gwbootstrap', 'https://cdn.jsdelivr.net/npm/gwbootstrap@1.3.2/'
54
+ ('gwbootstrap', 'https://cdn.jsdelivr.net/npm/gwbootstrap@1.3.4/'
54
55
  'lib/gwbootstrap-extra.min.js'),
55
56
  ))
56
57
 
@@ -83,11 +83,11 @@ def test_state_switcher():
83
83
  assert parse_html(str(switcher)) == parse_html(
84
84
  '<ul class="nav navbar-nav">\n<li class="nav-item dropdown">\n'
85
85
  '<a class="nav-link dropdown-toggle" href="#" id="states" role='
86
- '"button" title="Show/hide state menu" data-toggle="dropdown">Test</a>'
87
- '\n<div class="dropdown-menu dropdown-menu-right state-switch shadow" '
88
- 'id="statemenu">\n<h6 class="dropdown-header">Select below to view '
89
- 'this page in another state (different time segments).</h6>\n<div '
90
- 'class="dropdown-divider"></div>\n<a class="dropdown-item state" '
86
+ '"button" title="Show/hide state menu" data-bs-toggle="dropdown">Test'
87
+ '</a>\n<div class="dropdown-menu dropdown-menu-end state-switch '
88
+ 'shadow" id="statemenu">\n<h6 class="dropdown-header">Select below to '
89
+ 'view this page in another state (different time segments).</h6>\n'
90
+ '<div class="dropdown-divider"></div>\n<a class="dropdown-item state" '
91
91
  'title="Test" id="state_test" onclick="jQuery(this).load_state'
92
92
  '(&quot;#test&quot;);">Test</a>\n</div>\n</li>\n</ul>')
93
93
 
@@ -102,6 +102,6 @@ def test_base_map_dropdown():
102
102
  assert parse_html(str(menu_wbases)) == parse_html(
103
103
  '<div class="dropdown base-map">\n<a href="#" class="navbar-brand '
104
104
  'nav-link border border-white rounded dropdown-toggle" role="button" '
105
- 'data-toggle="dropdown">test</a>\n<div class="dropdown-menu '
105
+ 'data-bs-toggle="dropdown">test</a>\n<div class="dropdown-menu '
106
106
  'dropdown-1-col shadow">\n<a title="key" class="dropdown-item" '
107
107
  'data-new-base="value">key</a>\n</div>\n</div>')
@@ -62,11 +62,11 @@ def test_get_js():
62
62
  # test list of files
63
63
  js_files = list(x.split('/')[-1] for x in js.values())
64
64
  assert js_files == [
65
- 'jquery-3.5.1.min.js',
65
+ 'jquery-3.7.1.min.js',
66
66
  'jquery-ui.min.js',
67
67
  'moment.min.js',
68
68
  'bootstrap.bundle.min.js',
69
- 'jquery.fancybox.min.js',
69
+ 'fancybox.umd.js',
70
70
  'bootstrap-datepicker.min.js',
71
71
  'gwbootstrap-extra.min.js',
72
72
  ]
@@ -512,10 +512,11 @@ class SpectrumDataPlot(DataPlot):
512
512
  data = get_coherence_spectrum(
513
513
  [str(channel), str(channel2)], valid, query=False)
514
514
  elif self.type == 'range-spectrum':
515
- data = get_range_spectrum(str(channel), valid, query=False)
515
+ data = get_range_spectrum(str(channel), valid, query=False,
516
+ state=valid)
516
517
  elif self.type == 'cumulative-range-spectrum':
517
- data = get_range_spectrum(
518
- str(channel), valid, query=False, which='mean')
518
+ data = get_range_spectrum(str(channel), valid, query=False,
519
+ which='mean', state=valid)
519
520
  if str(data.unit) == 'Mpc':
520
521
  data = (data**3).cumsum() ** (1/3.)
521
522
  else:
@@ -527,7 +528,8 @@ class SpectrumDataPlot(DataPlot):
527
528
  else:
528
529
  try:
529
530
  data = get_spectrum(str(channel), valid, query=False,
530
- format=sdform, method=method)
531
+ format=sdform, method=method,
532
+ state=valid)
531
533
  except ValueError as exc:
532
534
  # math op failed beacuse one of the datasets is empty
533
535
  if (
@@ -786,7 +786,7 @@ class DataTab(ProcessedTab, ParentTab):
786
786
  page.div(class_='card border-info mb-1 shadow-sm')
787
787
  page.div(class_='card-header text-white bg-info')
788
788
  page.a(flag.name, class_='card-link cis-link collapsed',
789
- href='#flag%d' % i, **{'data-toggle': 'collapse',
789
+ href='#flag%d' % i, **{'data-bs-toggle': 'collapse',
790
790
  'aria-expanded': 'false'})
791
791
  page.div.close() # card-header
792
792
  page.div(id_='flag%d' % i, class_='collapse',
@@ -293,7 +293,7 @@ class GuardianTab(DataTab):
293
293
  page.div(class_='card-header text-white bg-info')
294
294
  page.a('%s [%d]' % (name, bit), href='#collapse-%d' % bit,
295
295
  class_='card-link cis-link collapsed',
296
- **{'data-toggle': 'collapse', 'aria-expandedt': 'false'})
296
+ **{'data-bs-toggle': 'collapse', 'aria-expanded': 'false'})
297
297
  page.div.close() # card-header
298
298
 
299
299
  # body
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gwsumm
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: A python toolbox used by the LIGO Scientific Collaboration for detector characterisation
5
5
  Author-email: Alex Urban <alex.urban@ligo.org>, Duncan Macleod <duncan.macleod@ligo.org>
6
6
  Maintainer-email: Evan Goetz <evan.goetz@ligo.org>
@@ -28,7 +28,7 @@ Description-Content-Type: text/x-rst
28
28
  License-File: LICENSE
29
29
  Requires-Dist: astropy>=3.0.0
30
30
  Requires-Dist: gwdatafind>=1.1.1
31
- Requires-Dist: gwdetchar>=2.0.0
31
+ Requires-Dist: gwdetchar>=2.2.4
32
32
  Requires-Dist: gwpy>=2.0.0
33
33
  Requires-Dist: gwtrigfind
34
34
  Requires-Dist: lalsuite
@@ -1,6 +1,6 @@
1
1
  astropy>=3.0.0
2
2
  gwdatafind>=1.1.1
3
- gwdetchar>=2.0.0
3
+ gwdetchar>=2.2.4
4
4
  gwpy>=2.0.0
5
5
  gwtrigfind
6
6
  lalsuite
@@ -39,7 +39,7 @@ classifiers = [
39
39
  dependencies = [
40
40
  "astropy >=3.0.0",
41
41
  "gwdatafind >=1.1.1",
42
- "gwdetchar >=2.0.0",
42
+ "gwdetchar >=2.2.4",
43
43
  "gwpy >=2.0.0",
44
44
  "gwtrigfind",
45
45
  "lalsuite",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes