host_resolution_order#

gwpy.io.nds2.host_resolution_order(
ifo: str | None,
env: str | None = 'NDSSERVER',
epoch: SupportsToGps = 'now',
lookback: float = 1209600,
*,
include_gwosc: bool = True,
) list[tuple[str, int | None]][source]#

Generate a logical ordering of NDS (host, port) tuples for this IFO.

Parameters:
ifostr

Prefix for IFO of interest.

envstr, optional

Shell environment variable name to use for server order. Default is "NDSSERVER". The contents of this variable should be a comma-separated list of host:port strings, e.g. "nds1.server.com:80,nds2.server.com:80". Pass env=None to disable parsing any environment variable.

epochLIGOTimeGPS, float, str, optional

GPS epoch of data requested.

lookbackfloat, optional

Duration of spinning-disk cache. This value triggers defaulting to the CIT NDS2 server over those at the LIGO sites. Default is two weeks.

include_gwoscbool, optional

If True include the GWOSC NDS2 instance in the list.

Returns:
hrolist of 2-tuples

Drdered list of (host, port) tuples.

Examples

With no environment settings:

>>> host_resolution_order('H1')
[('nds.ligo-wa.caltech.edu', None),
 ('nds.ligo.caltech.edu', None),
 ('nds.gwosc.org', None),
]
>>> host_resolution_order('H1', include_gwosc=False))
[('nds.ligo-wa.caltech.edu', None), ('nds.ligo.caltech.edu', None)]