40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log, Page 33 of 344  Not logged in ELOG logo
ID Date Author Typeup Category Subject
  6415   Wed Mar 14 13:27:15 2012 ZachHowToComputer Scripts / ProgramsModeMatchr

I have added to ModeMatchr the capability to fix the total MMT distance. This is nice if you are coupling to a cavity some fixed distance away. The blurb from the help:

% Note: for any total length constraint dtot_tol > 0, ModeMatchr will use
% fminsearch to find the best solutions near your nominal dtot, and then
% omit solutions whose dtot lie outside your tolerance. For dtot_tol = 0,
% ModeMatchr actively constrains dtot to your value, and then finds the
% best solution. Therefore, set dtot_tol = 0 if you have a fixed distance
% into which to put a MMT.


For your mode matching pleasure, I have added a tool called "ModeMatchr" to the SVN under /trunk/zach/tools/modematchr/

It uses the usual fminsearch approach, but tolerates a fully astigmatic input (i.e., w0ix ≠ w0iy, z0ix ≠ z0iy) and allows for transforming to an elliptical waist  (i.e., w0fx ≠ w0fy, but z0fx = z0fy). It would be straightforward to allow for z0fx ≠ z0fy, but I have never seen a case when we actually wanted this. On the other hand, the elliptical output ability is nice for coupling to wide-angle ring cavities.

It also does the looping through available lenses for you , and retains the best solution for each lens combination in an output cell, which can then be combed with another function (getOtherSol). fminsearch is incredibly fast: with a 10-lens bank, it finds all 100 best solutions on my crappy MacBook in <10s.

I have also included the functionality to constrain the length of the total MMT to within some percentage of the optimal distance, which helps to sift through the muck .



  6442   Sun Mar 25 20:13:31 2012 ranaHowToSUSOptical Lever Servo Tuning thoughts

To start the optical lever filter design, I looked into the noise on ITMY. It should be similar to the other arm cavity optics since they have the same whitening electronics.

The RED/BLUE are with loops open. The MAGENTA/CYAN with loops closed. Looks good; the bandwidth is a few Hz and there is not much peaking,

To figure out the contribution from the dark noise I misaligned the ITMY until the sum on the QPD went to zero. Then I took the spectra of the OL{1,2,3,4}_OUT signals (they all looked the same).

To normalize them properly I took OL4, multiplied it by 2 to account for the incoherent sum of 4 channels and then divided by the nominal SUM (which was 14685 counts). I've left the OL3 un-normalized to show the ratio.

From this plot it seems that the dark noise is not a problem at any frequency (no need to amplify for the new ADCs).

I'm going to use the open loop spectra to design the optimal feedback control. The file is saved as /users/rana/dtt/ITMY_OL-120325.xml

Attachment 1: Untitled.png
  6637   Thu May 10 14:49:06 2012 KojiHowToGeneralHow to clean & bake black glass pieces

  6833   Tue Jun 19 20:26:50 2012 JenneHowToLockingSummer Plan

Jenne and Yuta's Summer Plan

These are the things that we'd like to accomplish, hopefully before Yuta leaves in mid-July

* Yarm mode scan

  ~ Measure residual motion of Yarm cavity when ALS is engaged

* Xarm mode scan

  ~ Align Xarm IR

  ~ Align Xarm green to cavity

  ~ Do mode scan (similar to Yarm)

  ~ Measure residual motion of Xarm cavity when ALS is engaged

* Hold both arms on IR resonance simultaneously (quick proof that we can)

  ~ Modify beatbox so we can use both X and Y at the same time (Jamie will do this Wednesday morning - we've already discussed)

* PRMI + Arms

  ~ Lock the PRMI (which we already know we can do) holding arms off resonance, bring both arms into resonance using ALS

* PRC mode matching - figure out what the deal is

  ~ Look at POP camera with video capture - use software that Eric the Tall wrote with JoeB to measure spot size

* DRMI glitches

  ~ Why can't we keep the DRMI locked stably?

* DRMI + Arms

  ~ Full lock!!

  ~ Make lots of useful diagnostics for aLIGO, measure sensing matricies, etc.

  7746   Mon Nov 26 18:56:34 2012 JenneHowToComputersData logging suggestions

We've been talking for a while about how we want to store data.  I'm not in love with keeping it on the elog, although I think we should always be able to reference and go back and forth between the elogs and the data.

I have made a new folder: /data    EDIT: nevermind.  I want it to be on the file system just like /users, but I don't know how to do that.  Right now the folder is just on Ottavia. Jamie will help me tomorrow.

In this folder, we will save all of the data which goes into the elog. 

I propose that we should have a common format for the names of the data files, so that we can easily find things.

My proposal is that one begins ones elog regarding the data to be saved, and submit it immediately after putting in the first ~sentence or so. One should then make a new folder inside the data folder with a title "elog#####_Anything_Else_You_Want" Then, data (which was originally saved in ones own users folder) should be copied into the /data/elog#####_AnythingElse/ folder. Also in that folder should be any Matlab scripts used to create the plots that you post in the elog.  One should then edit the elog to continue making a regular, very thorough elog, including the path to the data.  Elog should include all of the information about the measurement, state of the IFO (or whatever you were measuring), etc. 

Riju will be alpha-testing this procedure tonight.  EDIT: nevermind...see previous edit.

  7747   Mon Nov 26 19:27:59 2012 RijuHowTo Testing AG4395A+GPIB

Riju, Jenne

We have checked the transfer function of a bandpass filter using AG4395A network analyzer and retrieved the data through GPIB. The RF out signal of AG4395A had been divided by splitter with two outputs of the splitter going to through R and the filter which was connected to the A channel of the network analyzer. The GPIB data came in complex data format, from which the absolute value and phase had to be retrieved. 


The plot for the TF is as following

Attachment 1: tfmag.jpg
Attachment 2: tfphase.jpg
  7765   Fri Nov 30 09:59:53 2012 SteveHowToGeneralHow not to

Clean cabinet S15 doors were left open. You have to lock it up!

  7768   Fri Nov 30 14:21:18 2012 ranaHowToComputer Scripts / ProgramsThe mystery of PDFs and you. As deep as the mystery of Rasputin.

This is how to post PDF:

From DTT, print the plot as a postscript file.

Then use ps2pdf to make a archival PDF version (the flag is the key!). Example:

ps2pdf -dPDFX /home/controls/Desktop/darm.ps

Attachment 1: darm.pdf
  7776   Mon Dec 3 07:40:00 2012 SteveHowToAlignmenthow was the BS chamber misalinged



 Whoever was working around the BS chamber at 11 AM on Friday should admit it now and take the punishment.

For those of you who like to do work on the interferometer without reporting it in the elog because you think that what you did doesn't affect anything, this is your example of how our time can be wasted by such laziness.

 I'm taking full responsibility for this action and I told them after lunch Friday.



The BS isolation stack  supported by two beam tubes and they can pivot around the pivot point.

Attachment 1: BSsupport.jpg
  7794   Wed Dec 5 17:38:41 2012 RijuHowTo Photodiode transimpedance

I have started making the circuit to measure the transimpedance for the photodiode PDA10CF using Jenne's laser. I will continue it tomorrow.

  7807   Tue Dec 11 08:53:52 2012 SteveHowToPEMcables needs care

How NOT to:

The janitor can not clean in areas like this. He may only steps on these cables accidentally as he dust wiping our chambers.

Attachment 1: IMG_1839.JPG
  7809   Tue Dec 11 10:09:04 2012 AyakaHowToPEMcables needs care


How NOT to:

The janitor can not clean in areas like this. He may only steps on these cables accidentally as he dust wiping our chambers.

 Sorry for the mess. I fixed it.

  7872   Wed Jan 2 15:33:23 2013 JenneHowToLockingWe should retry in-air locking

Immediate things to do include finishing installation of new TTs and re-routing of oplev paths in the BS chamber, but after all that, we should retry in-air locking.

The last time we (I) tried in-air locking, MICH wouldn't lock since there was only ~ 6uW of light on AS55 (see elog 7355).  That was before we increased the power into the MC by a factor of 10 (see elog 7410), so we should have tens of microwatts on the PD now.  At that time, we could barely see some PDH signal hidden in the noise of the PD, so with a factor of 10 optical gain, we should be able to lock MICH.

REFL should also have plenty of power - about 1.5 times the power incident on the PRM, so we should be able to lock PRCL. 

Even if we put a flat G&H mirror after the PRM to make a mini-cavity, and we lose power due to poor mode matching, we'll still have plenty of power at the REFL port to lock the mini-cavity.

For reference, I calculate that at full power, POX and POY see ~13uW when the arms are locked.


POX/POY power =  [  (P_inc on ITM) + (P_circ in arm)*(T_itm)  ] * (pickoff fraction of ITM ~ 100ppm)

REFL power = (P_inc on PRM) + (P_circ in PRCL)*(T_prm)     =~ 1.5*(P_inc on PRM)

  7873   Thu Jan 3 19:19:59 2013 ranaHowToElectronicscable racks

Today I found 3 power cables in the orange Pomona cable tray, put in so that the cables were damaged and therefore dangerous.

Please think about what you are doing before doing it. Damaging these things because your are in a hurry or frustrated will just waste our time and damage our interferometer.

For reference, we only use the thick blue Pomona racks for power cables. We use the orange and black ones for thinner cables. Pay attention and keep the cables organized.

Cable Rack Selection


  7877   Mon Jan 7 00:08:16 2013 JenneHowToAlignmentIn-vac plan

List of things to do, in order:

* Remove BS heavy door.  Steve, please remove the BS door as soon as you have enough people to do so.  I will be a little late, since I have a dentist appointment, but please don't wait for me.  Jamie and Manasa can help you.  Put on a light door.

* Remove MC light doors, make aluminum foil tube (not light access connector, yet).

* Open laser shutter, lock PMC. (Required slight tweaking of input steering.) Confirm power level into vacuum <100mW.

* Lock MC and check spot positions of MC (quickly.  this shouldn't take all day, hopefully).

-------------------------------  End of work for Monday.  See following elog ------------------------------------------------


* Move TT1 to be as close as possible to the location indicated on the diagram, then align it. 

         * Make sure beam out of Faraday is hitting the center of the optic.

         * Make sure beam reflected off of TT1 hits center of PZT2.  Only use actuators for the final alignment, then confirm that they aren't close to the edge of their ranges.

         * Lock down TT1 with dog clamps.

* Put light access connector on MC.

* Swap PZT2 out with TT2.  Should be at correct spot, according to diagram, and beam should be hitting center of optic.  Alignment only to the ~few degree point here.

* Re-level BS table.

* Fix oplevs that need fixing.  (Manasa should have the plan on one of the diagrams).

* Put target on PRM cage.

* Align TT2 so that beam goes through PRM target.

* Open ITMX heavy door. (Probably Tuesday morning).

* Place freestanding target in front of PR2.  Ensure TT2 is aligned to go through PRM target, and hit center of PR2.  Again, save actuators for fine-tuning.

At this point, I think we should (temporarily) install one of the G&H mirrors as a flat mirror facing the PRM, and see if we can lock that cavity using REFL.  We will want to have already created a model for this case, to compare our observations to.  Or we could align the full PRMI, and try to lock that in air.



  8190   Wed Feb 27 19:27:29 2013 AnnalisaHowToCOMSOL TipsMirror support Eigenfrequency

 I studied the eigenfrequencies of a mirror support using COMSOL.


Attachment 1: IronSupport.png
Attachment 2: IronSupportEigenfreq.png
  8226   Mon Mar 4 20:03:42 2013 AnnalisaHowToCOMSOL TipsStudy of mirror mount eigenfrequencies

 I studied the eigenfrequencies of a mirror mount designed with COMSOL.

I imposed fixed constraints for the base screws and for the screw connecting the base with the pedestal. Note that the central screw is connected to the base only for a small thickness, and the pedestal touches the base only with a thin annulus. This is in way to make a better model of the actual stress.

Shown in fig. 2 is the lowest eigenfrequency of the mount.

I' going to change the base and study the way the eigenfrequency vary, in way to find the configuration which minimizes the lowest eigenfrequency.


Attachment 1: MirrorSupport1.png
Attachment 2: MirrorSupportEig1.png
Attachment 3: pedestal.png
Attachment 4: Base2.png
  8231   Tue Mar 5 14:59:32 2013 SteveHowToVACdry-forepump replaced

TP3 turbo pump's dry-foreline pump was replaced.

How to do it:

The pump should be replaced when it's performance  <1.0 - 1.3 Torr

Set up valve configuration as shown at Atm1: close in this order VAEE, VASV, VABS, VASV, VASE, VA6 and V5,

Turn TP3 off at it's controller in the rack. Wait till is stops, so you can read 760 Torr at TP3 foreline gauge

Disconnect intake, exhaust vacuum seals and replace pump. Reconnect vacuum fitting and start it up.

Confirm operational details on the front of the controller: 50 K_RPM, 0.2A and <100 mTorr

Reset valves in reverse order

PS: the average life of the tip seal on the Varian SSH-110 dry-pump is about 1 year

      This pump " ser LP1007L556 " seal  made new record of 668 days: thanks to Bob Taylor who is replacing these seals


Attachment 1: changingforepump.png
Attachment 2: TP3wFp600.jpg
  8265   Sun Mar 10 13:29:29 2013 KojiHowToIOOHow to calculate the accumulated round-trip Gouy phase

How to calculate the accumulated round-trip Gouy phase (and namely the transverse mode spacing) of a general cavity
only from the round-trip ABCD matrix


  8441   Thu Apr 11 03:25:29 2013 JenneHowToSUSIdea for how to properly balance SUS actuators
We have calibrated the overall actuators of each suspension independent of the optical levers. So, we know how much we are 
moving the optic in POS in real units as a result of the dither we inject for the lockin measurement. The amount the oplev beam 
appears to move if there is only POS motion is
where theta is the oplev's angle of incidence and d is the distance the optic has moved in POS.  None of the of the steering mirrors in the 
oplev path matter. 

I propose that I will add an option in the lockin path to subtract away the apparent angle from the oplev output just before the signal 
goes into the lockin module.  Then we will be balancing the actuators based on only the actual angular motion.

The success of this technique depends on how well we know our actuator calibration and the oplev angle of incidence. This also 
assumes that the oplev beam is centered on the optic, so we don't have beam displacement from A2L of the oplev beam, which then 
makes another apparent angular motion.  I suspect that we are close enough that we won't have to worry about this effect.
  8919   Wed Jul 24 19:21:56 2013 JamieHowToSUSSUS MEDM screen modernization

I started poking around at what we want for new SUS MEDM screens.  Rana and I decided we'd start with the ASC TIPTILT screens:


It's missing some things (like SIDE OSEMS) but it should provide a good starting point.

I copied the entire <userapps>/asc/common/medm/asctt directory to a new directory in our sus area:

controls@rossa:/opt/rtcds/userapps/release 0$ cp -a asc/common/medm/asctt sus/c1/medm/new

I then removed all the useless file name prefixes.  We still need to go through and sed out all the ASC stuff in the MEDM files themselves.

It makes heavy use of macro substitution, which is good (it's what we're using now).  So once we clean up all the channel names, we should just be able to swap out the pointers in our overview screens to the new screens (or rename things).  In the mean time, during development, you can run:

controls@rossa:/opt/rtcds/userapps/release 0$ medm -x -macro "IFO=C1,ifo=c1,OPTIC=ITMX" sus/c1/medm/new/OVERVIEW.adl 

  9005   Tue Aug 13 11:54:40 2013 Alex ColeHowToElectronicsRF PD Fiber-Coupled Laser Operation

This post pertains to the fiber-coupled diode laser mounted in rack 1Y1.

To turn the laser on, first turn the power supply's key (red) to the clockwise. Then make sure that the laser is in "current" mode by checking that the LED next to "I" in the "Laser Mode" box in lit up. If the light is not on, press the button to the right of the "I" light until it is. Now press the output button (green). This is like removing the safety for the laser. Then turn the dial (blue) until you have your desired current. Presently, the current limit is set to around 92 mA.

To turn the laser off, dial the current back down to 0mA and turn the key (red) counterclockwise.

Attachment 1: photo_(4).pdf
  9027   Mon Aug 19 10:03:17 2013 SteveHowToGeneralhow not to leave a cable

We can not leave cables connected like this. This is a burned toast award.

Attachment 1: NONOcable.jpg
  9059   Fri Aug 23 21:01:38 2013 Alex ColeHowToElectronicsAutomated Photodetector Frequency Response System

 This post describes how to use the Automated Photodetector Frequency Response System.

On the mechanical side, turn on:

-the diode laser (in rack 1Y1)

-the RF Switch (in rack 1Y1)

-the reference PD (under the POY table)

-the AG4395A Network Analyzer

The NA’s RF output should go to the laser’s modulation input, the reference PD’s output should go to the NA’s R input, and the RF Switch Chassis’s output (which is the combination of the two switches’ COM channels using a splitter) should go to the NA’s A input.

Once this is done, navigate into /users/alex.cole and run PDFR.sh. This script collects data for each photodetector under consideration by switching using a python script and communicating with the NA via GPIB. It then sends all the data to RF.m, which fits the functions, plots the latest data against canonical data, and saves the plots to file.

The fitting function, fit.m, also outputs peak frequency to the command line. This function uses PD name data (e.g. ‘REFL33’) to choose an interval with minimal noise to fit.

The main script prompts the user to press enter after each NA sweep to make sure that measurements don’t get interrupted/put out of order by RF switching.

Once you're done, you should turn off the laser, NA, RF Switch, and reference PD.


Sometimes, the NA throws up and doesn’t feel like running a particular sweep. If this happens, it’s a good idea to keep the matlab script from trying to analyze this PD’s data. Do this by opening up RF.m and commenting out the calls to ‘fit’ and ‘canonical’ for that PD.

If fit.m complains about a particular set of data, it is often the case that the N/P ratio (where N is order of approximation and P is number of points in the interval) is too high. You can fix this by reducing N or making the PD’s frequency range (chosen in the fnew_idx line) larger.

Choosing a single PD

If you only want to grab the transfer function for one PD, first look up which switch input it belongs to. This information is contained in /users/alex.cole/switchList. To turn the switch to a particular input, type something like:

python rf.py “ch7”

This command uses TCP/IP to tell the switch to look at channel 7. Switch input numbers range from 1 to 16, though not all of them are in use.

Once the switch is looking at the correct input, you can run a sweep and download the data by typing /opt/rtcds/caltech/c1/scripts/general/netgpibdata/NWAG4395A -s 1000000 -e 500000000 -c 499000000 -f [filestem for output] -d [path of directory for output] -i -g 10 -x 15. 

  9093   Mon Sep 2 03:51:14 2013 ranaHowToGeneralHow To Coil Cables


  9097   Tue Sep 3 10:54:33 2013 SteveHowToGeneralHow To Coil Cables



 B grade Nobel is awarded.

                                  If cables could dream?

This skill should be  mandatory for LIGOX graduates.

  9187   Thu Oct 3 00:01:59 2013 rana, jenneHowToLSCsteps to full IFO

In moving now to full IFO locking, there are a number of sub-states to diagnose:

  1. PRMI + 1 arm
  • Measure sensing matrix as arm is scanned into resonance. Compare time series of sensing matrix elements with New LoopTickle simulation. But first, we need more than 1 LOCKIN screen in the LSC! That will allow us to measure all of the elements of front_matrix.jpg simulataneously.
  • Measure 3f PRMI noise spectra as a function of arm position. Look for trouble.
  1. DRMI + 1 arm
  • Same as PRMI above.
  • Want to find why this is unstable sometimes. Make stable for t > 10 minutes.
  • Maybe add some QPD->ASC for SRC angular control, but how? Will this still work after the arms are resonant or will it be swamped by carrier contrast defect? Will Berlusconi ruin all of the Italian gelateria? Only time can tell...
  1. FPMI (non optically recombined) for ALS diagnosis
  2. PRFPMI (iLIGO configuration)
  • this ought to be easier than DRFPMI
  • will let us tell if our ALS is good enough to handle the coupled cavity pole
  1. DRFPMI (aLIGO style)

Which to do first and in what order?

  9189   Thu Oct 3 01:18:57 2013 KojiHowToLSCsteps to full IFO

I vote on PRMI+1arm -> PRFPMI

  9219   Tue Oct 8 00:21:01 2013 manasaHowToGreen LockingALS arm stabilization

Step by step procedure for stabilizing arms using ALS servo:

The procedure is the same for both the arms. 

0. Check that the ALS arm servos are turned OFF and not sending any signals to the ETM suspensions. 

1. Find the beat note by varying the laser temperature (moving the slider for SLOW_SERVO2_OFFSET).
Tip: It is easier to have the arms locked using IR PDH while searching for the beat note. Also check the stability of the MC. Unstable MC will cause the PSL temperature to drift and thereby affect the beat frequency.

2. Once you have the beat note, check if the beat amplitude is ~ -15 to -20 dBm. If the amplitude is small, then the alignment needs to be fixed (either the green input pointing at the end tables or the PSL green alignment). This is important because the UGF of the phase tracking loop (should be above 1KHz) changes with the amplitude of the beat note.
Also the beat frequency should be < 100 MHz; preferably below 80 MHz.

3. Disable IR PDH locking if you had used it while searching for the beat note. 

4. Press CLEAR HISTORY button for the phase tracker servo. Check if the phase tracking loop is stable (phase tracker servo output counts should not be ramping up). If the phase tracker is not stable, check the servo gain and phase margin of the loop.

5. Turn OFF all filters in the ALS arm servo filter module except for FM5 (phase compensation filter). With ALS arm servo gain set to zero, enable the arm servo and allow ALS control signals to be sent to the ETM suspensions.

5. Open dtt and look at the power spectrum of the ALS error signal (C1:ALS-BEAT?_FINE_PHASE_OUT_HZ). 

6. Set ALS arm servo gain +/- 0.1 to check the sign of the servo gain. Wrong sign of gain will make the loop unstable (beat note moving all over the frequency range on the spectrum analyzer). If this happens, set the gain to zero immediately and clear history of phase tracker servo. If you have set the correct sign for gain, the servo will stabilize the beat note frequency right away. 

7. Once you know the correct sign of the servo gain, increase the gain in steps while simultaneously looking at the power spectrum of error signal on dtt (it is convenient to set dtt measurements to low bandwidth and exponential measurement settings). Increase the gain until you can see a slight bump close to the UGF of the ALS servo (>100Hz). 
There have been times when this servo gain was in a few hundreds; but right now it varies from +/- 10-20 for both the arms. So we are stepping up gain in steps of +/- 2.

8. Enable filters (FM2, FM3, FM6, FM7, FM8). Wait to see the rms noise of the error signal go down (a few seconds).

9. Enable boost filter (FM10). There also exists a weaker boost filter (FM4) which we don't use any more. 


1. Beat frequency changes affect both the servo gain and sign of gain. So if you lose stability of ALS servo at any point, you should go through all the steps again.

2. At any point if the ALS arm servo becomes unstable (which can happen if the MC loses lock or if the beat frequency was too high ), change the servo gain to zero immediately. Turn OFF all the filters except for FM5 (if they were enabled) and reset phase tracker servo (CLEAR HISTORY button in the phase tracker filter module). Masayuki has written the down script that does all this. The script will detect arm servo loop instability by continuously looking at the feedback signal. Details about the script can be found here

Here is a cheat sheet that can give you an idea of the SLOW SERVO2 offset range to scan in order to find the beat note:

PSL temperature  X offset   Y offset
31.58                     5278       -10890
31.52                     5140       (not recorded)
31.45                     4810       (not recorded)
31.33                     4640       -10440
31.28                     4500       -10340

  9305   Mon Oct 28 18:57:27 2013 MasayukiHowToLSCread 'scope and spectrum analyser datas


The command to get the data from spectrum analyzer right now

From command line, put ./netgpibdata -i -d AG4395A -a 17 -f meas01

(EDIT JCD:  You must first be in the correct folder:  /opt/rtcds/caltech/c1/scripts/general/netgpibdata/)

(EDIT JCD again: "meas01" in the command line instruction will be the name of the filename.  Also, the output file meas01.dat has a comment in the first line that must be deleted before you can plot the data.  This sucks, and we should write a script to strip that line, then make nice plots.)

Please take notice that although IP address of AG4395A is same as written in the help of netgpibdata, the GPIB address is not same. It's 17.


How to use  'scope from control room.

Open the browser. Put the IP adress of 'scope ( into adrress bar of the browser. If it's on the network, below screen will open.

You can control 'scope, get the data, and so on from control room.

Please take notice that Google Chrome cannot connect the 'scope. So you have to use the Firefox or other browser.

  9318   Wed Oct 30 08:32:55 2013 EvanHowToComputer Scripts / Programsmatplotlibrc

FYI, you can trick out matplotlib by creating a matplotlibrc config file. This allows you to set defaults for plot size, trace color, fonts, grids, etc., analogous to what is achieved in ATF:1840 for Matlab.

Note also that matplotlib supports LaTeX by default (if you have LaTeX installed), which means, for example, that you can include true square roots on your spectral densities:

plt.ylabel('Voltage spectral density (V/$\\sqrt{\\mathrm{Hz}}$)')

Since the backslash is used for escape characters in python, you must escape LaTeX backslashes.

For maximum effect, you can set the following lines in your matplotlibrc file:

text.usetex = True

text.latex.preamble = \usepackage{txfonts}

Then all text and mathematics in your plot will be sent through LaTeX for processing and will appear in Times.

Also, why is the conversion from watts to volts V = 50 * sqrt(W) and not V = sqrt(50 * W)?

  9319   Wed Oct 30 14:58:44 2013 SteveHowToGeneralshutting down a computer


 We have tried to ssh into c1iscey yesterday morning. It just did not work. We have just tried it again (now) and it did work.

Lesson learned: always shut down the computer from a TERMINAL Do not turn it off by the manual power switch.

  9573   Fri Jan 24 12:44:25 2014 GabrieleHowToLSCProcedure to measure PRC length

Here is how to measure the PRC length with a set of distance measurements in the optical setup. 

We need to take distance measurements between reference points on each mirror suspension. For the large ones (SOS) that are used for BS, PRM and ITMs, the reference points are the corners of the second rectangular base: not the one directly in contact with the optical bench (since the chamfers make difficult to define a clear corner), but the rectangular one just above it. For the small suspensions (TT) the points are directly the corners of the base plates.

From the mechanical drawings of the two kind of suspensions I got the distances between the mirror centers and the reference corners. The mirror is not centered in the base, so it is a good idea to cross check if the numbers are correct with some measurements on the dummy suspensions.

I assumed the dimensions of the mirrors, as well as the beam incidence angles are known and we don't need to measure them again. Small errors in the angles should have small impact on the results.

I wrote a MATLAB script that takes as input the measured distances and produce the optical path lengths. The script also produce a drawing of the setup as reconstructed, showing the measurement points, the mirrors, the reference base plates,  and the beam path. Here is an example output, that can be used to understand which are the five distances to be measured. I used dummy measured distances to produce it.


In red the beam path in vacuum and in magenta the beam path in the substrate. The mirrors are the blue rectangles inside the reference bases which are in black. The thick lines are the HR faces. The green points are the measurement points and the green lines the distances to be measured. The names on the measurement lines are those used in the MATLAB script. 

The MATLAB scripts are attached to this elog. The main file is survey_v2.m, which contains all the parameters and the measured values. Update it with the real numbers and run it to get the results, including the graphic output. The other files are auxiliary functions to create the graphics. I checked many times the code and the computations, but I can't be sure that there are no errors, since there's no way to check if the output is correct... The plot is produced in a way which is somehow independent from the computations, so if it makes sense this gives at least a self consistency test. 

Attachment 2: survey_v2.m
global sos_lx sos_ly sos_cx sos_cy tt_lx tt_ly tt_cx tt_cy

%% Survey of the PRC length

%% measured distances
d_MB2_MY  = 2000.0;
d_MB3_MX  = 2000.0;
d_MB1_M31 = 400.0;
d_M32_M21 = 3000.0;
d_M22_MP  = 2000.0;
... 210 more lines ...
Attachment 3: distance.m
function d = distance(c1, c2)
    d = sqrt(sum((c1-c2).^2));
Attachment 4: draw_beam.m
function draw_beam(c1, c2, color)
    plot( [c1(1), c2(1)], [c1(2), c2(2)], color, 'LineWidth', 2)
Attachment 5: draw_measurement.m
function draw_measurement(c1, c2, color, name)
    plot( [c1(1), c2(1)], [c1(2), c2(2)], color)
    text( (c1(1)+c2(1))/2, (c1(2)+c2(2))/2 + 20, name, ...
        'FontSize', 5, 'HorizontalAlignment', 'center', ...
         'VerticalAlignment', 'middle')
Attachment 6: draw_point.m
function draw_point(c)
    plot(c(1), c(2), 'go', 'LineWidth', 2, 'MarkerSize', 3);
Attachment 7: draw_sos.m
function draw_sos(C, angle)
    global sos_lx sos_ly sos_cx sos_cy tt_lx tt_ly tt_cx tt_cy

    c(:,1) = [-sos_lx/2, -sos_ly/2 + sos_cy-sos_ly/2]';
    c(:,2) = [-sos_lx/2, sos_ly/2 + sos_cy-sos_ly/2]';
    c(:,3) = [sos_lx/2, sos_ly/2 + sos_cy-sos_ly/2]';
    c(:,4) = [sos_lx/2, -sos_ly/2 + sos_cy-sos_ly/2]';
    c(:,5) = [-sos_lx/2, -sos_ly/2 + sos_cy-sos_ly/2]';
    m_lx = 25.4*2;
... 18 more lines ...
Attachment 8: draw_tt.m
function draw_tt(C, angle)
    global sos_lx sos_ly sos_cx sos_cy tt_lx tt_ly tt_cx tt_cy

    c(:,1) = [-tt_lx/2, -tt_ly/2 + tt_cy-tt_ly/2]';
    c(:,2) = [-tt_lx/2, tt_ly/2 + tt_cy-tt_ly/2]';
    c(:,3) = [tt_lx/2, tt_ly/2 + tt_cy-tt_ly/2]';
    c(:,4) = [tt_lx/2, -tt_ly/2 + tt_cy-tt_ly/2]';
    c(:,5) = [-tt_lx/2, -tt_ly/2 + tt_cy-tt_ly/2]';
    m_lx = 25.4;
... 18 more lines ...
  9574   Fri Jan 24 13:10:12 2014 JamieHowToLSCProcedure to measure PRC length


I wrote a MATLAB script that takes as input the measured distances and produce the optical path lengths. The script also produce a drawing of the setup as reconstructed, showing the measurement points, the mirrors, the reference base plates,  and the beam path. Here is an example output, that can be used to understand which are the five distances to be measured. I used dummy measured distances to produce it.


This path does not look correct to me.  Maybe it's because this is supposed to represent "optical path lengths" as opposed to actual physical location of optics, but I think locations should be checked.  For instance, PRM looks like it's floating in mid-air between the BS and ITMX chambers, and PR2 is not located behind ITMX.  Actually, come to think of it, it might just be that ITMX (or the ITMs in general) is in the wrong place?

Here is a similar diagram I produced when building a Finesse model of the 40m, based on the CAD drawing that Manasa is maintaining:


  9575   Sat Jan 25 21:09:16 2014 gabrieleHowToLSCProcedure to measure PRC length

I know the drawing is wrong. I put random distances, not realistic ones, and I did not try to get something close to reality. Once we put the measured distances, the drawing should (hopefully) be correct.

  9578   Mon Jan 27 17:49:46 2014 ranaHowToComputer Scripts / Programssendmail started on nodus: fixing SwiftMail on Dokuwiki

Since the recent filesystem fracas, the new accounts could not be created on nodus / dokuwiki (for the controls workshop, for example).

I started sendmail on nodus using the command:   sudo /etc/init.d/sendmail start

and the SwiftMail plugin on there is now sending out the confirmation emails again. This will happen each time we reboot nodus, so let's replace it.

  9744   Sun Mar 23 14:20:07 2014 ranaHowToLSCBLRMS screens

 We should make screens like this for the LSC signals, errors, ALS, etc.

Attachment 1: blrms.png
  9885   Wed Apr 30 21:31:25 2014 ranaHowToIOOMystery Alignment again

Looks like there was some mysterious MC alignment shift around 5:30 PM today, but no elog.....?? Now things are drifting much more than this morning or yesterday. Who did what and why???

I think I'll blame Jamie since he just got back and did some computer fiber voodoo today.


  9944   Tue May 13 00:46:58 2014 ranaHowToPSLPMC relocking

The PMC runs out of range sometimes due to the daily temperature swing. The voltage swings up after sunset and then starts to swing down before sunrise. So when you relock the PMC at the beginning of the locking night, the mnemonic from the PMC is:

Sun Go Low, Lock Me Voltage Low.

  10014   Mon Jun 9 20:07:53 2014 nicolasHowToComputer Scripts / ProgramsLatex (math) in the elog

\text{\LaTeX} in the elog

One feature that has been sorely missing in the elog has been the ability to easily add mathematical symbols. Here is an imperfect solution.

There is a browser plugin available for firefox, safari and chrome that allow you to add “markdown” formatting to any rich text input box in the browser. One feature of markdown is latex math formulae.


The way it works is you type some latex formatted math text in between dollar signs, click the button in your browser, and it converts them to rendered images.

So this


becomes this


Some drawbacks:

The images are actually rendered through a google service, so if that service changes or goes down, the images won’t render, however the HTML source still contains the source string.
The size of formulae are not really matched to the text.
Going back and forth between rendered and unrendered can lose changes (if you make changes after rendering).

Bonus features:

It also works in Gmail!
You can do code highlighting:

#!/bin/bash   ### this is a comment  PATH=$PATH:/home/user/path    echo "How cool is this?" 

EDIT: it looks like the code highlighting is sort of broken :-(.

  10086   Sat Jun 21 01:25:12 2014 NichinHowToElectronicsPD Trasimpedence measurement theory

 Here is the logic that I have been using to calculate the transimpedence of PDs. Please let me know if you think anything is wrong.

Attachment 1: Transimpedence_Calculation_.pdf
  10152   Tue Jul 8 15:07:24 2014 NichinHowToElectronicsRF Multiplexer in rack 1Y1

The RF multiplexer is configured as shown in the figure. It is now effectively a 15x1 RF mux.


To select a required channel:

Run the script as shown below 


>python rfMux.py ch11

For channel 10 to 16, you can just enter the required channel number and it is routed to the output.

For channel 1 to 8, you only need to input the required channel number as above. No need to run the code again to select ch9 after selecting ch1-8


How the NI-8100 controller works:

Whenever any channel of one switch is selected, the output of the other switch is set to its ch0 (ch1 and ch9 in the figure).

So selecting ch1-8 will automatically select ch9 as output for the other switch. IF you send a command to select ch9 afterwards, the first switch will be automatically set to ch1 and not stay on what you had selected before.

  10210   Wed Jul 16 01:27:01 2014 NichinHowToComputer Scripts / ProgramsHP8591E spectrum analyzer remote scan

The script for running continuous scans on HP 8591E spectrum analyzer is located at scripts/general/netgpibdata/HP8591E_contdScan.py

Give the file HP8591E_param.yml as an argument when running the script. This contains the sweep parameters: Start and stop frequencies along with the place where the plot is stored as a PDF.

The default PDF is located on the Desktop and is named HP8591E_View.pdf     Open this using okular and then run the script.  (Okular pdf viewer automatically reloads the PDF as and when a new one is created)

What the script does:

1) Set the start and stop frequencies as given in the .yml file

2) Take a data trace and plot it in a PDF.

3) Repeat taking traces and update the PDF. Untill Ctrl+C is pressed (PDF refresh rate: approximately every 3 seconds )

4) Exit smoothly after the keyboard interrupt.

Other details:

This spectrum analyzer is connected to a GPIB - Ethernet controller that is configured as santuzza.martian (

I have currently stolen the wireless modem from the spectrum analyzer inside the lab (vanna.martian) and using it for this one. *poker face*

To improve:

Get the plot to show where the two biggest peaks are located. Currently it recognizes only the biggest one.

Possibly have makers on the two peaks.

PFA a sample pdf

Attachment 1: HP8591E_View.pdf
  10381   Wed Aug 13 23:58:49 2014 ranaHowToComputer Scripts / ProgramsHP8591E spectrum analyzer remote scan


The script for running continuous scans on HP 8591E spectrum analyzer is located at scripts/general/netgpibdata/HP8591E_contdScan.py

There was no such script in the directory when I looked today, but I found one called HP8591E. Of course, it didn't run because it hadn't been tested from the scripts directory and pointed to some /users/nichin/ stuff.

I modified a couple of lines and then committed it and the default .YML parameter file to the SVN. It runs and produces plots continuously from the scripts directory.

*** also, as you can see, we have mostly recovered the green beat amplitudes after yesterday's FLL attack on the ALS ***

Attachment 1: HP8591E_View.pdf
  10391   Thu Aug 14 19:23:25 2014 ranaHowToIOOHow do I set the FSS offset to make the PZT voltage start at the right place?

 When the IMC locks, we want the FAST OUT of the TTFSS box to be close to zero volts. We also want the control signal from the MC Servo board to be close to 0 V. How to set this up?

With the IMC locked, we just servo the FSS input offset to minimize the MC board output :

ezcaservo -r C1:IOO-MC_FAST_MON -g 0.1 -t 10 C1:PSL-FSS_INOFFSET

I would have used "CDSUTILS", but that seems to have some sort of ridiculous bug where we can't have prefixes on channel names, even on the command line. 

  10473   Mon Sep 8 16:23:25 2014 LarryHowToComputer Scripts / Programsaccessing 40m data remotely with python


Attached is an example script showing how to access 40m data remotely. The only two nonstandard python modules you need are the nds2 client module and astropy (used for time conversion). For mac users, both of these are available via macports (nds2-client and, e.g. py27-astropy). Otherwise, check out their websites:




Have fun!



Attachment 1: get40mData.ipynb.gz
  10482   Wed Sep 10 02:35:54 2014 JenneHowToTreasureSecret scripts, revealed!

 I hereby confess to having a secret script.  But it is secret no longer!

It's a "goLock" script, and it is now in the path from any terminal.  It kills any open medm sessions (to clean up desktops), and then opens a palette of screens that I find useful.  It also starts up the CARM and DARM ALS watch scripts, and the toggle shutter scripts.  It then leaves the terminal in .../scripts/PRFPMI/ , which is where the carm_cm_up.sh script that we've been using lives.

I also made tonight a "goHome" script, but all that one does so far is set the LSC mode to OFF.  The other thing that this could / should do is restore all optics so we don't have hysteresis problems.

Also, also, my "new" misalign / restore scripts had a bug, in that they were always switching oplevs for the PRM, no matter what optic was requested.  This sometimes caused the PRM oplev to be engaged while the optic was misaligned, so the PRM would get rung up.  This has been fixed.

  10515   Wed Sep 17 18:36:03 2014 KojiHowToGeneralHow to run DTT measurement automatically
  • Suppose you have a dtt template name test.xml
  • The file test.dtt

    restore test.xml
    run -w
    save test2.xml
  • Run diag < test.dtt
  • The result is saved in test2.xml
  11040   Mon Feb 16 21:52:51 2015 ranaHowToTreasurebig Dataviewer windows

Following this entry, I have made the same change in the controls account on rossa:

In the ~/.grace/gracerc file (create one if it doesn't exist), put in a line which reads:


Now we can scale our dataviewer live and playback plots by stretching the window with our mouse. The attached screenshot shows how I filled up one of the vertical monitors with a DV window for arm locking.

Attachment 1: bigDV.png
  11081   Fri Feb 27 01:59:57 2015 ranaHowToLSCiPython Notebook for LSC Sensing Matrix

I have adapted one of Evan's python scripts into an ipython notebook for calculating our PRMI sensing matrix - the work is ~half done.

The script gets the data from the various PD channels (like REFL33_I) and demdoulates it at the modulation frequencies. At the moment its using just the sensing channels, but with the recent addition of the SUS-LSC_OUT_DQ channels, we can demod the actuation channels as well and not have to hand code the exc amplitudes and the basolute phase. Please ignore the phase for the moment.

The attached PDF shows the demod (including lowpass) outputs for a 2 minute stretch of PRMI locked on f2. Next step is to average these numbers and make the radar plots with the error bars. The script is scripts/LSC/SensingMatrix/PRMIsensMat.ipynb and is in the SVN now.

** along the way, I noticed that the reason this notebook hasn't been working since last night is that someone sadly installed a new anaconda python distro today  without telling anyone by ELOG. This new distro didn't have all the packages of the previous one.no I've updated it with astropy and uncertainties packages.

I've fixed the Radar plot making part, so that's now included too. The radial direction is linear, so you can see from the smearing of the blobs that the uncertainty is represented in the graphics due to each measurement being a small semi-transparent dot. Next, we'll put the output of the statistics on the plot: mean, std, and kurtosis.

Attachment 1: Plots_1109056456.pdf
Plots_1109056456.pdf Plots_1109056456.pdf Plots_1109056456.pdf Plots_1109056456.pdf Plots_1109056456.pdf Plots_1109056456.pdf Plots_1109056456.pdf Plots_1109056456.pdf
Attachment 2: Radar_1109056456.pdf
ELOG V3.1.3-