Your first script with NDS

Example 3.1. Getting started: your first script with NDS in Python

>>> import nds2
>>> conn = nds2.connection('nds.ligo-wa.caltech.edu', 31200)
>>> print conn
<nds.ligo-wa.caltech.edu:31200 (protocol version 2)>
>>> conn.set_parameter('ALLOW_DATA_ON_TAPE', '1')
>>> buffers = conn.fetch(1024417918, 1024417928, ['H1:PSL-ISS_PDA_OUT_DQ', 'H1:PSL-ISS_PDB_OUT_DQ'])
>>> print buffers
('<H0:PEM-EY_SEISX (GPS time 953618740.000000000, 15360 samples)>', '<H0:PEM-EY_SEISY (GPS time 953618740.000000000, 15360 samples)>')
>>> buffers[0].data
array([ 2.39337158,  2.39943528,  2.38724732, ...,  2.39846468,
        2.39515495,  2.39528942], dtype=float32)

Example 3.2. Getting started: your first script with NDS in Octave

octave:1> conn = nds2.connection('nds.ligo-wa.caltech.edu', 31200)
conn =

<nds2.ligo-wa.caltech.edu:31200 (protocol version 2)>
octave:2> conn.set_parameter('ALLOW_DATA_ON_TAPE', '1')
octave:3> buffers = conn.fetch(1024417918, 1024417928, {'H1:PSL-ISS_PDA_OUT_DQ', 'H1:PSL-ISS_PDB_OUT_DQ'})
buffers =
(
  [1] =

<H1:PSL-ISS_PDA_OUT_DQ (GPS time 1024417918.000000000, 327680 samples)>
  [2] =

<H1:PSL-ISS_PDB_OUT_DQ (GPS time 1024417918.000000000, 327680 samples)>
)
octave:4> buffers{1}.data
ans =

   2.3934
   2.3994
   2.3872
   2.3891
  ...

Example 3.3. Getting started: your first script with NDS in MATLAB

>> conn = nds2.connection('nds.ligo-wa.caltech.edu', 31200)

conn =

<nds.ligo-wa.caltech.edu:31200 (protocol version 2)>

>> conn.setParameter('ALLOW_DATA_ON_TAPE', '1')
>> buffers = conn.fetch(1024417918, 1024417928, {'H1:PSL-ISS_PDA_OUT_DQ', 'H1:PSL-ISS_PDB_OUT_DQ'})


buffers =

nds2.buffer[]:
    [nds2.buffer]
    [nds2.buffer]

>> buffers(1).getData()

ans =

   2.3934
   2.3994
   2.3872
   2.3891
  ...