After plenty of work, NDS2 can now be used to get site data within MATLAB using the following machines:
- allegra
- megatron
- ottavia
- pianosa
- rosalba
- rossa
What I did
NDS2 was not working on any of the machines, so the first thing I did was simply to install the newest version. I downloaded the latest tarball (0.9.1) from the LDAS Wiki, unzipped and installed it
/users/zach $ tar -xvf nds2-client-0.9.1.tar
/users/zach $ cd nds2-client-0.9.1
/users/zach $ sudo ./configure --prefix=/cvs/cds/caltech/apps/linux64 --with-matlab=/cvs/cds/caltech/apps/linux64/matlab/bin/matlab
/users/zach $ sudo make
/users/zach $ sudo make install
Even with the new version, it still didn't work.
Solution: The main problem was that the cyrus-sasl-gssapi authentication protocol was not installed on these machines, so that even with a kerberos ticket the datalink could not be established. Using information from the LDAS Wiki, I used aptitude to install it as:
$ sudo aptitude install lscsoft-auth
This group installs both the SASL protocol and the package python-kerberos
I also needed to update the kerberos config file for each machine, which is located at /etc/krb5.conf. I found that ottavia had a nice one with many realms, so I copied that one over to the other machines. In any case where there was an old config file overwritten, it is now /etc/krb5.conf.old.
Finally, the matlab path for NDS2 was still set to the old 2010a directory (/cvs/cds/caltech/apps/linux64/lib/matlab2010a) that was created by the NDS2 install when Rana originally did it. The new install I made above created the appropriate 2010b mexa64 files, so I changed the matlab path within matlab to this one:
>> rmpath /cvs/cds/caltech/apps/linux64/lib/matlab2010a
>> addpath /cvs/cds/caltech/apps/linux64/lib/matlab2010b
>> savepath
Now everything works fine on all these machines. As in Rana's original post, you get data in the following way:
$ kinit albert.einstein %then enter password
$ matlab -nosplash -nodesktop
>> d = NDS2_GetData({'H1:LSC-NPTRX_OUT16.mean'},963968415,6000,'nds.ligo.caltech.edu:31200')
d =
name: 'H1:LSC-NPTRX_OUT16.mean'
chan_type: 'm-trend'
rate: 0.0167
data_type: 'real_8'
signal_gain: 1
signal_offset: 0
signal_slope: 1
signal_units: ''
start_gps_sec: 963968415
duration_sec: 6000
data: [100x1 double]
exists: 1
>> quit % since you've seen that the data is really here
$ kdestroy % so that no one uses your credentials
Some thoughts
- I would like to extend this to the 32-bit machines, but I have to figure out the best way to install the proper NDS2 client without interfering with the 64-bit version. I think it is just a matter of specifying the matlabroot in the .../linux/ instead of .../linux64/
- It would be nice to find a way that the nice tool gps('MM/DD/YYYY XX:XX:XX UTC'), which calls the ligotool executable tconvert, can be automatically usable when calling NDS2 functions. Right now, there seems to be an issue preventing that: even though tconvert can be run in the terminal, gps() returns an error and even directly running unix('tconvert now') or !tconvert returns the same error. I have emailed Peter Shawhan to see if he has any advice.
|