Skip to content

Commit

Permalink
Change domain name from gw-openscience.org to gwosc.org
Browse files Browse the repository at this point in the history
  • Loading branch information
martinberoiz committed Apr 19, 2023
1 parent 91aa1b2 commit e2e0e49
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 35 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `gwosc` client API

The `gwosc` package provides an interface to querying the open data
releases hosted on <https://gw-openscience.org> from the GEO, LIGO,
releases hosted on <https://gwosc.org> from the GEO, LIGO,
and Virgo gravitational-wave observatories.

## Release status
Expand Down Expand Up @@ -67,14 +67,14 @@ You can search for remote data URLS based on the event name:
```python
>>> from gwosc.locate import get_event_urls
>>> get_event_urls('GW150914')
['https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126259447-32.hdf5', 'https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126257415-4096.hdf5', 'https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5', 'https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126257415-4096.hdf5']
['https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126259447-32.hdf5', 'https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126257415-4096.hdf5', 'https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5', 'https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126257415-4096.hdf5']
```

You can down-select the URLs using keyword arguments:

```python
>>> get_event_urls('GW150914', detector='L1', duration=32)
['https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5']
['https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5']
```

## Locating data URLs by GPS interval
Expand All @@ -85,7 +85,7 @@ follows:
```python
>>> from gwosc.locate import get_urls
>>> get_urls('L1', 968650000, 968660000)
['https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968646656-4096.hdf5', 'https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968650752-4096.hdf5', 'https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968654848-4096.hdf5', 'https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968658944-4096.hdf5']
['https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968646656-4096.hdf5', 'https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968650752-4096.hdf5', 'https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968654848-4096.hdf5', 'https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968658944-4096.hdf5']
```

This arguments for this function are as follows
Expand Down Expand Up @@ -119,6 +119,6 @@ The output is a `list` of `(start, end)` 2-tuples which each represent a
semi-open time interval.

For documentation on what flags are available, for example for the O1
science run, see [the O1 data release page](https://gw-openscience.org/O1/)
science run, see [the O1 data release page](https://gwosc.org/O1/)
(*Data Quality*).

2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Depends:
python3-requests,
Description: Python interface to the Gravitational-Wave Open Science Center data archive
The `gwosc` package provides an interface to querying the open data
releases hosted on <https://gw-openscience.org> from the GEO, LIGO,
releases hosted on <https://gwosc.org> from the GEO, LIGO,
and Virgo gravitational-wave observatories.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
=======

A python interface to the
`Gravitational-Wave Open Science Center <https://gw-openscience.org>`_ archive.
`Gravitational-Wave Open Science Center <https://gwosc.org>`_ archive.

Installation
------------
Expand Down
4 changes: 2 additions & 2 deletions gwosc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ BuildRequires: python%{python3_pkgversion}-requests-mock >= 1.5.0

%description
The `gwosc` package provides an interface to querying the open data
releases hosted on <https://gw-openscience.org> from the GEO, LIGO,
releases hosted on <https://gwosc.org> from the GEO, LIGO,
and Virgo gravitational-wave observatories.

# -- python-3X-gwosc
Expand All @@ -49,7 +49,7 @@ Requires: python%{python3_pkgversion}-requests >= 1.0.0
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
%description -n python%{python3_pkgversion}-%{name}
The `gwosc` package provides an interface to querying the open data
releases hosted on <https://gw-openscience.org> from the GEO, LIGO,
releases hosted on <https://gwosc.org> from the GEO, LIGO,
and Virgo gravitational-wave observatories.

# -- build steps
Expand Down
14 changes: 7 additions & 7 deletions gwosc/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
_MAX_GPS = 99999999999

#: The default GWOSC host URL
DEFAULT_URL = "https://www.gw-openscience.org"
DEFAULT_URL = "https://gwosc.org"

#: Cache of downloaded blobs
JSON_CACHE = {}
Expand Down Expand Up @@ -88,7 +88,7 @@ def fetch_dataset_json(gpsstart, gpsend, host=DEFAULT_URL):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -124,7 +124,7 @@ def fetch_run_json(run, detector, gpsstart=0, gpsend=_MAX_GPS,
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -180,7 +180,7 @@ def fetch_catalog_json(catalog, host=DEFAULT_URL):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand All @@ -207,7 +207,7 @@ def fetch_allevents_json(full=False, host=DEFAULT_URL):
Parameters
----------
host : `str`, optional
the URL of the GWOSC host to query, defaults to gw-openscience.org
the URL of the GWOSC host to query, defaults to https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -380,7 +380,7 @@ def fetch_filtered_events_json(select, host=DEFAULT_URL):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -441,7 +441,7 @@ def fetch_event_json(
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down
14 changes: 7 additions & 7 deletions gwosc/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def find_datasets(
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -323,7 +323,7 @@ def event_gps(event, catalog=None, version=None, host=api.DEFAULT_URL):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -373,7 +373,7 @@ def event_segment(
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -417,7 +417,7 @@ def event_at_gps(gps, host=api.DEFAULT_URL, tol=1):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
tol : `float`, optional
the search window (in seconds), default: ``1``
Expand Down Expand Up @@ -458,7 +458,7 @@ def event_detectors(event, catalog=None, version=None, host=api.DEFAULT_URL):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
version : `int`, `None`, optional
the version of the data release to use,
Expand Down Expand Up @@ -498,7 +498,7 @@ def run_segment(run, host=api.DEFAULT_URL):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down Expand Up @@ -533,7 +533,7 @@ def run_at_gps(gps, host=api.DEFAULT_URL):
host : `str`, optional
the URL of the GWOSC host to query, defaults to
https://www.gw-openscience.org
https://gwosc.org
Returns
-------
Expand Down
18 changes: 9 additions & 9 deletions gwosc/locate.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
>>> from gwosc.locate import get_event_urls
>>> get_event_urls('GW150914')
['https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126259447-32.hdf5',
'https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126257415-4096.hdf5',
'https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5',
'https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126257415-4096.hdf5']
['https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126259447-32.hdf5',
'https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/H-H1_GWOSC_4KHZ_R1-1126257415-4096.hdf5',
'https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5',
'https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126257415-4096.hdf5']
You can down-select the URLs using keyword arguments:
>>> get_event_urls('GW150914', detector='L1', duration=32)
['https://www.gw-openscience.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5']
['https://gwosc.org/eventapi/json/GWTC-1-confident/GW150914/v3/L-L1_GWOSC_4KHZ_R1-1126259447-32.hdf5']
You can search for remote data URLs based on the GPS time interval as
follows:
>>> from gwosc.locate import get_urls
>>> get_urls('L1', 968650000, 968660000)
['https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968646656-4096.hdf5',
'https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968650752-4096.hdf5',
'https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968654848-4096.hdf5',
'https://www.gw-openscience.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968658944-4096.hdf5']
['https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968646656-4096.hdf5',
'https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968650752-4096.hdf5',
'https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968654848-4096.hdf5',
'https://gwosc.org/archive/data/S6/967835648/L-L1_LOSC_4_V1-968658944-4096.hdf5']
By default, this method will return the paths to HDF5 files for the 4 kHz
sample-rate data, these can be specified as keyword arguments.
Expand Down
4 changes: 2 additions & 2 deletions gwosc/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def check_json_url_list(urllist, keys={'detector', 'format', 'url'}):

@pytest.mark.remote
def test_fetch_json():
url = 'https://www.gw-openscience.org/archive/1126257414/1126261510/json/'
url = 'https://gwosc.org/archive/1126257414/1126261510/json/'
out = api.fetch_json(url)
assert isinstance(out, dict)
assert len(out['events']) == 3
Expand All @@ -57,7 +57,7 @@ def test_fetch_json():
@pytest.mark.remote
def test_fetch_json_error():
# check errors (use legit URL that isn't JSON)
url = 'https://www.gw-openscience.org/archive/1126257414/1126261510/'
url = 'https://gwosc.org/archive/1126257414/1126261510/'
with pytest.raises((RequestException, ValueError)):
api.fetch_json(url)

Expand Down
2 changes: 1 addition & 1 deletion gwosc/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
For documentation on what flags are available, for example for the O1
science run, see `the O1 data release
page <https://gw-openscience.org/O1/>`__ (*Data Quality*).
page <https://gwosc.org/O1/>`__ (*Data Quality*).
""" # noqa: E501

from operator import itemgetter
Expand Down

0 comments on commit e2e0e49

Please sign in to comment.