This document explains how to use the NDS (Network Data Server) client interface in Python, Octave, and MATLAB programs. NDS is a TCP/IP protocol for retrieving online or archived data from thousands of instrument channels at LIGO (Laser Interferometer Gravitational-Wave Observatory) sites and data analysis clusters. Language modules for Python, Octave, and MATLAB (via Java) are provided through SWIG.
The SWIG language interface provides some special features:
Uniform API across multiple languages. The NDS programming interface is the same in C++, Python, Octave, and MATLAB/Java, up to syntax and coding convention differences in each of the languages.
Works in all (modern) versions of MATLAB. The MATLAB/Java interface is compatible with all versions of MATLAB going back to the early 2000s.
Supports NDS2 epochs. NDS2 servers have the concept of epochs of work, these are ranges of start/stop times that requests may be constrained to. This allows requests for data availability and channel lists to be limited to the channels available during the specified epoch, as opposed to the entire history of NDS2.
Server protocols are cached. When you connect to a new server, the protocol version of the server is saved on disk to speed up the process of connecting to that server in the future.
Users can specify how to handle data that resides on tape. The NDS2 servers have access to large stores of data that are backed by archival quality tape systems. This means that data that has not been recently accessed may require retrieval from tape. This is very slow operation which can take from minutes to an hour depending on the load on the storage system. To help users gauge the length of time a request will take the system can raise a new error when data is seen to reside on tape storage.
Iterate and Fetch requests that work with gaps. The old interface will return a data not found error if there is a gap in the data. The new interface allows the application to select the response to gaps. This can be aborting (as in the old code) or filling in the gap with some value.
Channel availability information is exposed. A new api is introduced which allows for the retreival of availablility information from NDS2 servers on a per channel basis.