= How to set up NDS2 = == 1. build and install == . Go [[https://www.lsc-group.phys.uwm.edu/daswg/wiki/NetworkDataServer2|here]] and download the latest source tarball ({{{ nds2-client-x.x.x.tar }}}). . Then, open terminal, go to the directory where you downloaded it and type: . {{{ tar -xvf nds2-client-0.6.6 cd nds2-client-0.6.6 ./configure --prefix= (you may need to chmod to run this) make sudo make install }}} . ''' NOTE: if you have macports, then you can have it do all the compiling and installation for you, (i.e. port install nds2-client-x.x.x.tar). I have not tried this, but it should work. If it fails, the above method is still very fast.''' <
> == 2. setup kerberos == . You will need to authenticate yourself with ''''' kerberos '''''. . Unless you already use this for something else, place [[https://wiki.ligo.org/foswiki/pub/AuthProject/LIGOKerberos5Configuration/krb5.conf|this file]] in your {{{ /etc }}} directory. . Then go back to the terminal and type: . {{{kinit albert.einstein }}} (but use your own name, you hack) . It should prompt you for your LIGO.ORG password. . ''' NOTE: If you are doing this on a GC machine, it should have kerberos configured already, so just type the kinit command and enter your password. ''' <
> == 3. use NDS2 in MATLAB == . Now, open MATLAB, got to File -> Set Path... and "Add with subfolders..." . . You actually only need {{{ /lib, /lib/matlab[your-version] }}}, and {{{ /share/matlab}}}, but it's easier just to add the whole thing. . The useful function is {{{ NDS2_GetData }}} Its syntax is . {{{ out = NDS2_GetData( {'CHANNEL_NAME'} , start_time , duration , 'SERVER_NAME:PORT' ) }}} . ''' Note: 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.