Commit f0ba1e89 authored by Manasadevi Thirugnanasambandam's avatar Manasadevi Thirugnanasambandam
Browse files

Manasa's basecode for simple PRMI

parent b0fe8afc
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##Tasks\n",
"1. build the Finesse file from scratch - don't just use a aLIGO model; no need to include the IMC or the RC folding mirrors yet (i.e. no PR2, PR3, SR2, SR3). No OMC. No ETMs.\n",
"1. input all the modulation parameters and cavity lengths\n",
"1. do some DC scans of cavity lengths to make sure that the initial parameters are right\n",
"1. design the feedback loops such that the loop gain requirements are met, and that the cross coupling is low enough, and that the loop stability is 'good enough'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"** Optical layout with nodes (to be inserted)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" ..-\n",
" PyKat 1.1.269 _ '(\n",
" \\`.|\\.__...-\"\"\"\"-_.\" )\n",
" ..+-----.._ / ' ` .-'\n",
" . ' `: 7/* _/._\\ \\ (\n",
" ( '::;;+;;: `-\"' =\" /,`\"\" `) /\n",
" L. \\`:::a:f c_/ n_'\n",
" ..`--...___`. . ,\n",
" `^-....____: +. www.gwoptics.org/pykat\n",
"\n"
]
}
],
"source": [
"from pykat import finesse # import the whole pykat.finesse package\n",
"from pykat.commands import * # import all packages in pykat.commands\n",
"import numpy as np # for basic math/sci/array functions\n",
"import matplotlib.pyplot as plt # for plotting\n",
"import scipy # for analysing the plots\n",
"\n",
"# tell the notebook to automatically show plots inline below each cell\n",
"%matplotlib inline \n",
"# use pykat's plotting style. change dpi to change plot sizes on your screen\n",
"pykat.init_pykat_plotting(dpi=72)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"## Raw design file for IFO without IMC and folding mirror in RCs \n",
"## Mirror specs, modulation parameters and cavity lengths referenced from aligo finesse base code dt. 19 May 2020\n",
"## Same naming conventions from aligo basecode followed for components and nodes\n",
"\n",
"basecode = '''\n",
"## PSL and IO\n",
"l L0 1.0 0 0 ni\n",
"#s sL_mod1 1.0 ni n1\n",
"#mod Lmod1 9099471.0 0.18 1 pm 0.0 n1 n2\n",
"s sL_mod2 1.0 n2 n3\n",
"mod Lmod2 45497355.0 0.5 1 pm 0.0 n3 nLaserout\n",
"\n",
"##PRM\n",
"s sLaser_PRC 0.0 nLaserout nFI1\n",
"dbs FI nFI1 nFI2 nFI3 nREFL\n",
"s sFI_PRM 0.0 nFI3 nPRM1\n",
"m2 PRMar 0 4e-05 0.0 nPRM1 nPRMs1\n",
"s sPRMsub1 0.0737 1.4496 nPRMs1 nPRMs2\n",
"m1 PRM 0.03 8.5e-06 0.0 nPRMs2 nPRM2\n",
"attr PRM Rcx 11.009\n",
"attr PRM Rcy 11.009\n",
"s sPRM_BS 52.3135 nPRM2 nPRBS\n",
"\n",
"##BS\n",
"bs1 BS 0.5 3.75e-05 0.0 45.0 nPRBS nYBS nBSi1 nBSi3\n",
"s BSsub1 0.0687 1.4496 nBSi1 nBSi2\n",
"s BSsub2 0.0687 1.4496 nBSi3 nBSi4\n",
"bs2 BSAR1 5e-05 0.0 0.0 -29.195 nBSi2 dump14 nXBS nPOX\n",
"bs2 BSAR2 5e-05 0.0 0.0 29.195 nBSi4 dump15 nASBS dump16\n",
"s sAS 0.0 nASBS nAS\n",
"\n",
"#ITMY\n",
"s ly1 5.0126 nYBS nITMY1a\n",
"lens ITMY_therm 34500.0 nITMY1a nITM_th1\n",
"s ITMY_th1 0.0 nITM_th1 nITM_th2\n",
"lens ITMY_lens inf nITM_th2 nITM_th3\n",
"s ITMY_th2 0.0 nITM_th3 nITMY1\n",
"m2 ITMYAR 0.0 2e-05 0.0 nITMY1 nITMYs1\n",
"s ITMYsub 0.2 1.44963098985906 nITMYs1 nITMYs2\n",
"m1 ITMY 0.014 3.75e-05 0.0 nITMYs2 nITMY2\n",
"attr ITMY Rcx -1934.0\n",
"attr ITMY Rcy -1934.0\n",
"attr ITMY mass 40.0\n",
"\n",
"#ITMX\n",
"s lx1 4.993 nXBS nITMX1a\n",
"lens ITMX_therm 34500.0 nITMX1a nITMX_th1\n",
"s ITMX_th1 0.0 nITMX_th1 nITMX_th2\n",
"lens ITMX_lens inf nITMX_th2 nITMX_th3\n",
"s ITMX_th2 0.0 nITMX_th3 nITMX1\n",
"m2 ITMXAR 0.0 2e-05 0.0 nITMX1 nITMXs1\n",
"s ITMXsub 0.2 1.44963098985906 nITMXs1 nITMXs2\n",
"m1 ITMX 0.014 3.75e-05 0.0 nITMXs2 nITMX2\n",
"attr ITMX Rcx -1934.0\n",
"attr ITMX Rcy -1934.0\n",
"attr ITMX mass 40.0\n",
"\n",
"#Cavities\n",
"cav cavPRX PRM nPRM2 ITMX nITMXs2\n",
"cav cavPRY PRM nPRM2 ITMY nITMYs2\n",
"\n",
"#DC detectors\n",
"pd0 P_DC_AS nAS\n",
"pd0 PLaserout nREFL*\n",
"pd0 Px nITMX2\n",
"pd0 Py nITMY2\n",
"pd0 Pprc nPRM2\n",
"pd0 Psrc nSRM1*\n",
"ad prc0 0 nPRM2\n",
"ad prcf1 9099471.0 nPRM2\n",
"ad prcf2 45497355.0 nPRM2\n",
"ad asc0 0 nAS\n",
"ad asf1 9099471.0 nAS\n",
"ad asf2 45497355.0 nAS\n",
"\n",
"#RF detectors\n",
"pd1 REFL_f2_I 45497355.0 14.0 nREFL\n",
"pd1 REFL_f2_Q 45497355.0 104.0 nREFL\n",
"pd1 POP_f2_I 45497355.0 13.0 nPOP\n",
"pd1 POP_f2_Q 45497355.0 103.0 nPOP\n",
"pd1 AS_f2_I 45497355.0 13.0 nAS\n",
"pd1 AS_f2_Q 45497355.0 103.0 nAS\n",
"\n",
"'''\n",
"\n",
"#initialise Finesse with a new empty kat object\n",
"basekat = finesse.kat() \n",
"#tell Finesse to talk less\n",
"basekat.verbose = False\n",
"#parse the Finesse code into PyKat\n",
"basekat.parse(basecode)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:markdown id: tags:
##Tasks
1. build the Finesse file from scratch - don't just use a aLIGO model; no need to include the IMC or the RC folding mirrors yet (i.e. no PR2, PR3, SR2, SR3). No OMC. No ETMs.
1. input all the modulation parameters and cavity lengths
1. do some DC scans of cavity lengths to make sure that the initial parameters are right
1. design the feedback loops such that the loop gain requirements are met, and that the cross coupling is low enough, and that the loop stability is 'good enough'
%% Cell type:markdown id: tags:
** Optical layout with nodes (to be inserted)
%% Cell type:code id: tags:
``` python
from pykat import finesse # import the whole pykat.finesse package
from pykat.commands import * # import all packages in pykat.commands
import numpy as np # for basic math/sci/array functions
import matplotlib.pyplot as plt # for plotting
import scipy # for analysing the plots
# tell the notebook to automatically show plots inline below each cell
%matplotlib inline
# use pykat's plotting style. change dpi to change plot sizes on your screen
pykat.init_pykat_plotting(dpi=72)
```
%%%% Output: stream
..-
PyKat 1.1.269 _ '(
\`.|\.__...-""""-_." )
..+-----.._ / ' ` .-'
. ' `: 7/* _/._\ \ (
( '::;;+;;: `-"' =" /,`"" `) /
L. \`:::a:f c_/ n_'
..`--...___`. . ,
`^-....____: +. www.gwoptics.org/pykat
%% Cell type:code id: tags:
``` python
## Raw design file for IFO without IMC and folding mirror in RCs
## Mirror specs, modulation parameters and cavity lengths referenced from aligo finesse base code dt. 19 May 2020
## Same naming conventions from aligo basecode followed for components and nodes
basecode = '''
## PSL and IO
l L0 1.0 0 0 ni
#s sL_mod1 1.0 ni n1
#mod Lmod1 9099471.0 0.18 1 pm 0.0 n1 n2
s sL_mod2 1.0 n2 n3
mod Lmod2 45497355.0 0.5 1 pm 0.0 n3 nLaserout
##PRM
s sLaser_PRC 0.0 nLaserout nFI1
dbs FI nFI1 nFI2 nFI3 nREFL
s sFI_PRM 0.0 nFI3 nPRM1
m2 PRMar 0 4e-05 0.0 nPRM1 nPRMs1
s sPRMsub1 0.0737 1.4496 nPRMs1 nPRMs2
m1 PRM 0.03 8.5e-06 0.0 nPRMs2 nPRM2
attr PRM Rcx 11.009
attr PRM Rcy 11.009
s sPRM_BS 52.3135 nPRM2 nPRBS
##BS
bs1 BS 0.5 3.75e-05 0.0 45.0 nPRBS nYBS nBSi1 nBSi3
s BSsub1 0.0687 1.4496 nBSi1 nBSi2
s BSsub2 0.0687 1.4496 nBSi3 nBSi4
bs2 BSAR1 5e-05 0.0 0.0 -29.195 nBSi2 dump14 nXBS nPOX
bs2 BSAR2 5e-05 0.0 0.0 29.195 nBSi4 dump15 nASBS dump16
s sAS 0.0 nASBS nAS
#ITMY
s ly1 5.0126 nYBS nITMY1a
lens ITMY_therm 34500.0 nITMY1a nITM_th1
s ITMY_th1 0.0 nITM_th1 nITM_th2
lens ITMY_lens inf nITM_th2 nITM_th3
s ITMY_th2 0.0 nITM_th3 nITMY1
m2 ITMYAR 0.0 2e-05 0.0 nITMY1 nITMYs1
s ITMYsub 0.2 1.44963098985906 nITMYs1 nITMYs2
m1 ITMY 0.014 3.75e-05 0.0 nITMYs2 nITMY2
attr ITMY Rcx -1934.0
attr ITMY Rcy -1934.0
attr ITMY mass 40.0
#ITMX
s lx1 4.993 nXBS nITMX1a
lens ITMX_therm 34500.0 nITMX1a nITMX_th1
s ITMX_th1 0.0 nITMX_th1 nITMX_th2
lens ITMX_lens inf nITMX_th2 nITMX_th3
s ITMX_th2 0.0 nITMX_th3 nITMX1
m2 ITMXAR 0.0 2e-05 0.0 nITMX1 nITMXs1
s ITMXsub 0.2 1.44963098985906 nITMXs1 nITMXs2
m1 ITMX 0.014 3.75e-05 0.0 nITMXs2 nITMX2
attr ITMX Rcx -1934.0
attr ITMX Rcy -1934.0
attr ITMX mass 40.0
#Cavities
cav cavPRX PRM nPRM2 ITMX nITMXs2
cav cavPRY PRM nPRM2 ITMY nITMYs2
#DC detectors
pd0 P_DC_AS nAS
pd0 PLaserout nREFL*
pd0 Px nITMX2
pd0 Py nITMY2
pd0 Pprc nPRM2
pd0 Psrc nSRM1*
ad prc0 0 nPRM2
ad prcf1 9099471.0 nPRM2
ad prcf2 45497355.0 nPRM2
ad asc0 0 nAS
ad asf1 9099471.0 nAS
ad asf2 45497355.0 nAS
#RF detectors
pd1 REFL_f2_I 45497355.0 14.0 nREFL
pd1 REFL_f2_Q 45497355.0 104.0 nREFL
pd1 POP_f2_I 45497355.0 13.0 nPOP
pd1 POP_f2_Q 45497355.0 103.0 nPOP
pd1 AS_f2_I 45497355.0 13.0 nAS
pd1 AS_f2_Q 45497355.0 103.0 nAS
'''
#initialise Finesse with a new empty kat object
basekat = finesse.kat()
#tell Finesse to talk less
basekat.verbose = False
#parse the Finesse code into PyKat
basekat.parse(basecode)
```
%% Cell type:code id: tags:
``` python
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment