40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log  Not logged in ELOG logo
Entry  Tue Sep 10 15:41:37 2019, aaron, Update, IOO, WFS measurements Screenshot_from_2019-09-10_18-51-28.pngmctrend_190910.png
    Reply  Wed Sep 11 10:26:56 2019, aaron, Update, IOO, WFS measurements 
       Reply  Wed Sep 11 14:37:43 2019, aaron, Update, IOO, WFS measurements 20190911_WFS.jpg20190911_WFS_2.jpg
          Reply  Thu Sep 12 12:42:31 2019, aaron, Update, IOO, WFS measurements WFS2_TFs.pdfD755499D-9FDF-4E2B-BFC1-016B459DD35D.jpeg
             Reply  Fri Sep 13 10:36:03 2019, aaron, Update, IOO, WFS measurements TF-.pngWFS2_TFs.pdf
                Reply  Mon Sep 16 12:38:59 2019, aaron, Update, IOO, WFS measurements 
                Reply  Thu Oct 3 11:38:35 2019, aaron, Update, IOO, WFS measurements 
          Reply  Mon Sep 30 13:20:55 2019, aaron, Update, IOO, shot noise measurement 
       Reply  Fri Sep 13 10:53:40 2019, aaron, Update, IOO, WFS loop measurements 
          Reply  Mon Sep 16 05:08:04 2019, rana, Update, IOO, WFS loop measurements LSCsensingMatrix.ipynbASCsensingMatrix.ipynb
             Reply  Mon Sep 16 11:55:58 2019, rika, Update, IOO, WFS loop measurements 
                Reply  Tue Sep 17 09:41:48 2019, gautam, Update, IOO, WFS loop measurements 
                Reply  Tue Sep 17 10:47:44 2019, rika, Update, IOO, WFS loop measurements MC2.pdf
                   Reply  Wed Sep 18 14:45:52 2019, rika, Update, IOO, WFS loop measurements Screenshot_from_2019-09-18_18-15-34.png
             Reply  Tue Sep 17 10:34:48 2019, aaron, Update, IOO, WFS loop measurements 
                Reply  Tue Oct 8 20:39:42 2019, aaron, Update, IOO, WFS loop measurements 
                   Reply  Wed Oct 9 09:37:28 2019, aaron, Update, IOO, WFS loop measurements 
Message ID: 14887     Entry time: Tue Sep 17 10:34:48 2019     In reply to: 14878     Reply to this: 14957
Author: aaron 
Type: Update 
Category: IOO 
Subject: WFS loop measurements 

I'm using the notebooks from rana as a starting point, and making a script to measure and fill the WFS sensing matrix. It lives at /users/aaron/WFS/scripts/WFSsensingMatrix.ipynb for now. Here's what it does; what's been tested is in green, untested is goldenrod, uncoded is fire brick.

  1. Sets up an nds connection, listening to the WFS channels and the MC#_PIT/YAW IN1 channels.
  2. Loops over the excitation channels. For now, I'm assuming the user is injecting excitations one at a time in awggui; in principle, we could excite the various MC angular dof at several frequencies and take a single measurement, or use the natural frequencies of the suspensions.
    1. For each excitation, grab the data
    2. Filter the data. I'm using a 30 Hz to 40 Hz cheby filter
    3. Take an FFT, hold on to that for future reference
    4. Generate an LO at the excitation frequency, and demodulate the signals. Strong low pass.
    5. The single-frequency transfer function is now [WFS channel] / [excited MC channel]. Each iteration of this loop generates a column of the sensing matrix.
  3. Invert the sensing matrix
  4. Populate in the appropriate channels of the WFS_OUTMATRIX

Grabbing data with nds

To run these on pianosa, I ran (inside the jupyter notebook)

import sys
!{sys.executable} -m pip install astropy --user

I'm getting an error when starting the nds2 connection

conn = nds2.connection('192.168.113.201', 31200)
Failed to establish a connection[INFO: Request SASL authentication protocol]+

 I didn't find anything on the elog about this error, but I'm looking at the nds user manual. The problem was, I didn't have a valid Kerberos ticket; I opened one on Pianosa with my albert.einstein (note all caps ligo.org).

kinit aaron.markowitz@LIGO.ORG

 I'm now able to run the scripts Rana mentions, but I haven't been able to grab the channels I want (eg C1:SUS-MC1_ASCPIT_IN1_OUT); it says the channel isn't found. When I check how many of the Caltech channels are available (conn.count_channels('C1*')), there are none. I was connecting to nds.ligo.caltech.edu, but this must be the wrong server (it has all the channels for the sites). fb and fb1 (and the IP they point to, 192.168.113.201) cannot be connected to, giving the error 'Error occurred trying to write to socket.'

I recall that in the cryo lab, we need to use port 8088 to get data from cymac1, and indeed substituting 31200 -> 8088 lets me access the C1 channels (I can count the channels), but no matter what time I request, nds tells me there is no data available (gap). Gautam came by and diagnosed that the gaps I'm seeing in the frames' data are real, fb is down (see elog).


WFS Sensing Matrix Script

Saving extra channels

Continuing, I'm going to modify the script to grab live data. I'm using the iterate and next methods. I noticed that the MC2_TRANS pit/yaw channels are not saved to frames, even though WFS1/2 pit/yaw are. Since I expect I'll want to lookback at these channels, I followed the instructions for adding a daq channel, uncommenting the following line in /opt/rtcds/caltech/c1/chans/daq/C1IOO.ini:

[C1:IOO-MC2_TRANS_PIT_OUT_DQ]
acquire=1
datarate=512
chnnum=10186
datatype=4
[C1:IOO-MC2_TRANS_YAW_OUT_DQ]
acquire=1
chnnum=10189
datarate=512
datatype=4

I made a backup of the old version of this .ini file, which can be found in /users/aaron/backups/190917_C1IOO.ini. I did not remake the model, as I couldn't find the c1ioo model in /opt/rtcds/caltech/c1/userapps/trunk or from the matlab command prompt. I restarted the fb via telnet, but didn't restart the model or check the svn (got an error?). The _DQ channels are now reachable on dataviewer, so things seem to be working.

awgpy

I also tried importing cdsutils, so I can control awg in the same script that we read out the sensing matrix, but I'm getting the python3 error when I import cdsutils:

No module name '__version'

I tried pip upgrading cdsutils, but it's already up-to-date. I get the above error even if I switch to a python 2 kernel; cdsutils is installed in the python2.7 directory, so I don't know why pip is finding it when I'm running a python 3 kernel. I can move on from this for now, but it would be useful to be able to script the excitation along with the measurement.


Changes to the user environment

jupyter on donatella

Tangentially related, Rika wanted to be running some jupyter notebooks while working on donatella. I ran, on donatella:

conda install jupyter

 hm, that didn't work. Also jupyter is installed when you install conda, so I'm not sure how there is a version of conda but not of jupyter. I also see that pip and pip3 are not recognized commands on donatella.

scipy on pianosa

I noticed that some of the functions in the scipy signal processing toolbox were out of date on pianosa. The cheby and welch filters now accept additional kwargs (for eg, before you needed to give IIR filter methods a cutoff frequency normalized to the Nyquist rate, but now you can give it the frequencies and sampling rate separately).

I want to update this package, but I hesitate to break everyone's existing scripts.

ELOG V3.1.3-