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,
Generate a logical ordering of NDS (host, port) tuples for this IFO.
- Parameters:
- ifo
str Prefix for IFO of interest.
- env
str, optional Shell environment variable name to use for server order. Default is
"NDSSERVER". The contents of this variable should be a comma-separated list ofhost:portstrings, e.g."nds1.server.com:80,nds2.server.com:80". Passenv=Noneto disable parsing any environment variable.- epoch
LIGOTimeGPS,float,str, optional GPS epoch of data requested.
- lookback
float, 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_gwosc
bool, optional
- ifo
- Returns:
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)]