|
Size: 5282
Comment:
|
← Revision 17 as of 2013-09-21 02:05:01 ⇥
Size: 5882
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| ## page was renamed from Upgrade 09/IFO Modeling/SIS Introduction | |
| Line 4: | Line 5: |
The SIS manual is available [https://dcc.ligo.org/cgi-bin/private/DocDB/ShowDocument?docid=160 here]. |
The SIS manual is available [[https://dcc.ligo.org/cgi-bin/private/DocDB/ShowDocument?docid=160|here]]. |
| Line 10: | Line 10: |
SIS is available on a couple of the control room machines (e.g. rossa) and on menkar.ligo.caltech.edu (fast). |
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]]. |
| Line 26: | Line 25: |
| Line 29: | Line 27: |
When running SIS it looks in the current directory for (when looking at a FP cavity) a file called sisDB_FP.mcr. |
SIS looks in the current directory for (when looking at a FP cavity) a file called sisDB_FP.mcr. |
| Line 36: | Line 33: |
| ''simSpec'' ''ITM'' |
''simSpec'' ''ITM'' |
| Line 42: | Line 39: |
| 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 within the simSpec environment. |
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. |
| Line 74: | Line 71: |
Typing ''lock'' at the main screen will run SIS and lock the cavity. There are two options which you might want to change here. |
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. |
| Line 81: | Line 77: |
| Each of these commands can take several values: matchToCavity |
Each of these commands can take several values, e.g. for matchToCavity: |
| Line 93: | Line 87: |
| -1, -2, -3 : Calculate the mode for the first run and do not update until this value is changed. |
-1, -2, -3 : Calculate the mode for the first run and do not update until this value is changed. |
| Line 100: | Line 93: |
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 exampole below on sweeping a cavity). |
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'' |
| Line 110: | Line 109: |
SIS has the facility to run loops using @RBEG and @REND see the following example. The iteration number is stored as ''iLoop''. |
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. |
| Line 115: | Line 121: |
You can write SIS commands in a *.in file. They will be executed in sequence just as if they were typed in the terminal. |
You can write SIS commands in a *.in file. They will be executed in sequence just as if they were typed in the terminal. |
| Line 120: | Line 125: |
| === 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. |
|
| Line 122: | Line 169: |
This example combines many of the things discussed above (and some not). You can edit it to sweep e.g. the ROC of a mirror etc. etc. I have written a @sweepCavity.in file which contains all of the command I want to run. It looks like this: ''FP'' %Simulate an 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 |
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 |
| Line 161: | Line 203: |
| === 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") This can be done in your input file or within SIS. Various formats are accepted, see the manual (linked above). === Quickly do something in the shell === ---- Say you are in SIS and you want to delete some output file so that new data is not added to old data. One can do this as follows ''@SHELL'' ''rm myfile.txt'' ''exit'' without leaving SIS |
|
| Line 186: | Line 206: |
If it is easy phone me (JM); if it isn't phone Hiro. |
If it is easy [[http://www.lownoon.com/|phone me]] (JM); if it isn't phone Hiro. |
Introduction to SIS
The SIS manual is available here.
Getting started
Instructions to install/run SIS on your mac here. SIS can be run remotely on rigel1.ligo.caltech.edu 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 phone me (JM); if it isn't phone Hiro.
