## page was renamed from Upgrade 09/IFO Modeling/SIS Introduction = Introduction to SIS = ---- ---- The SIS manual is available [[https://dcc.ligo.org/cgi-bin/private/DocDB/ShowDocument?docid=160|here]]. == Getting started == ---- ---- Instructions to install/run SIS on your mac [[http://www.ligo.caltech.edu/~hiro/SIS/|here]]. SIS can be run remotely on rigel1.ligo.caltech.edu [[http://www.ligo.caltech.edu/~hiro/SIS/how2remote.pdf|How to]]. There is a SIS directory on the 40m SVN (https://nodus.ligo.caltech.edu:30889/svn/trunk/SIS/) which contains some ongoing work e.g. LG33 beams. To run SIS type ''sis'' at the command line. This will open the program and give you a choice of configurations. Typing e.g. ''FP'' will open a simulation of a single Fabry-Perot arm cavity. Typing ''lock'' will run the simulation and lock the cavity. Typing a question mark at any point will usually give you a help screen. == Things you might want to do == ---- ---- === Define a simulation === ---- SIS looks in the current directory for (when looking at a FP cavity) a file called sisDB_FP.mcr. You can place all simulation parameters in this file. The options are outlined in the manual and can be viewed using the simSpec command. For example ''simSpec'' ''ITM'' will return something like ITM.aperture = 0.34 ITM.thickness = 0.2 ITM.Wfft = 0 ITM.mech.x = 0 ITM.mech.y = 0 ITM.mech.z = 0 ITM.mech.tX = 0 ITM.mech.tY = 0 ITM.mech.tZ = 0 ITM.opt.T = 0.014 ITM.opt.R = 0.986 ITM.opt.ROC = 2076 ITM.opt.refrIndex = 1.44963 etc These parameters can also be changed within SIS by typing e.g. ''ITM.opt.ROC = 2000'' inside the simSpec environment. === Lock a cavity === ---- Typing ''lock'' at the main screen will run the simulation and lock the cavity. There are two options which you might want to change here. ''inputBeam.matchToCavity'' takes care of mode matching the beam to the cavity by changing the input beam waist and position. ''FPcav.matchToInput'' changes the cavity length to lock the cavity. Each of these commands can take several values, e.g. for matchToCavity: 0 : Use the provided waistSize and waistPosition values i.e. don't mode match. 1 : use opt.ROC values of mirrors to find the mode 2 : use mirror maps, build using HR_phase etc, to find the mode 3 : use gaussian beam weighted map to find the mode -1, -2, -3 : Calculate the mode for the first run and do not update until this value is changed. These same values apply to matchToInput where thay are used to find the initial guess for the locking algorithm. === Save things === ---- The commands saveField and storeMap save the optical fields and mirror maps in a fairly obvious way. The program sisbin.m allows you to easily load the fields when saved in the default format. [Field, x] = sisbin('myField.dat'); When running in a loop the @ can be used to represent the iteration number (see the example below on sweeping a cavity). One can also save the PSD of an HR surface using e.g.: ''storeMap'' ''ETM'' ''PSDHR'' === Run simulations in a loop === ---- SIS has the facility to run loops using @RBEG and @REND. ''@RBEG 10'' ''Commands to run'' ''@REND'' This will run the commands given ten times. The iteration number is stored as ''iLoop''. It will run from zero to nine. === Run lots of commands without typing === ---- You can write SIS commands in a *.in file. They will be executed in sequence just as if they were typed in the terminal. The file is run by typing @nameOfInputFile.in while inside SIS. === Tilt a mirror === ---- To yaw the ITM write: ''ITM.mech.tY = yaw'' To pitch the ITM write: ''ITM.mech.tY = -pitch'' ''ITM.mech.tZ = PI/2'' Where ''pitch'' and ''yaw'' are angles in radians. You can also write ''ITM.mech = [x,y,x,tX,tY,tZ]'' === Use your own mirror map === ---- If you want to include some measured or theoretical phase map this can be done with the command, ''ETM.opt.HR_phase = DATAFILE("myMirrorMap.dat")'' written in your input file or typed within SIS. Various file formats are accepted, see the manual (linked above). === Quickly do something in the shell === ---- One can do this as follows: ''@SHELL'' ''rm myfile.txt'' ''exit'' without leaving SIS. === Sweep the cavity length === ---- This example combines many of the things discussed above. You can edit it to sweep e.g. the ROC of a mirror etc. etc. etc. I have written a @sweepCavity.in file which contains all of the commands I want to run. It looks like this: ''FP'' % Simulate a FP cavity ''lock'' % Lock the cavity ''sim'' % Enter simSpec environment (In SIS you don't need to type the full command if there is no ambiguity) ''FPcav.matchToInput = 0'' % Turn off locking of the cavity ''cavLeng = FPcav._cavLeng'' % Define a variable which stores the locked cavity length ''exit'' % Exit the simSpec environment ''@RBEG -500 500'' % Start a loop where iLoop runs from -500 to +500 ''@@FPcav.delL = cavLeng + iLoop*0.532e-9'' % Change the cavity length (A command starting with @@ is equivalent to the same command without @@ being entered in simSpec) ''calc'' % Calculate the fields (NOT the same as lock) ''sim'' % Go back into simSpec ''P = FPOWER(1)'' % Get SIS to calculate the power in field 1 (SIS has lots of built in functions like this, RTFM) ''exit'' % Leave simSpec ''@PRINT findLock.txt << P'' % Write the field power to a file (append is the default behaviour) ''@REND'' % End the loop You can run it by typing sis < @sweepCavity.in === Anything else ? === ---- ---- If it is easy [[http://www.lownoon.com/|phone me]] (JM); if it isn't phone Hiro.