How to set up NDS2

1. build and install

cd nds2-client-0.6.6

./configure --prefix=<directory where you want NDS2 installed> (you may need to chmod to run this)

make

make install

}}}

BR

2. setup kerberos

}}} (but use your own name, you hack)

BR

3. set MATLAB environment

Now, open MATLAB, got to File -> Set Path... and "Add with subfolders..." <directory where you want NDS2 installed>. You actually only need <dir...>/lib, <dir...>/lib/matlab[your-version], and <dir...>/share/matlab, but it's easier just to add the whole thing.

The useful function is NDS2_GetData (note that this isn't a link; moinmoin just goes crazy for camelcase). Its syntax is

out = NDS2_GetData( {'CHANNEL_NAME'} , start_time , duration , 'SERVER_NAME:PORT' )

Note that the channel name has to be a cell (i.e. use {' '}). If you have ligotools, run mdv_config so that gps() works and you can use it for the start_time argument. Duration is in seconds as usual. Use this server: ldas-pcdev1.ligo.caltech.edu:31200. You should be all set. Note that the generated out.data will be single precision, whereas most of the stuff you want to put it through will want double, so just

out.data = double(out.data);

and you can do what you like.