Skip to content
Snippets Groups Projects
Commit b6217cac authored by Anna Green's avatar Anna Green
Browse files

plot all errsigs and cross couplings for the maxtem 0 and 4 cases

parent 5ab6527d
No related branches found
No related tags found
No related merge requests found
import pykat
import pykat.gw_detectors.ifo as ifo
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
pykat.init_pykat_plotting() #TODO pretty plotting too much space in x direction
##first test:
# ligo = pykat.gw_detectors.ifo.aLIGO()
# alldofs=["CARM","DARM","MICH","PRCL","SRCL"]
# ligo.plot_error_signals(ligo.kat, DOFs=alldofs, plotDOFs=alldofs)
LIGO1 = ifo.aLIGO(debug=True)
kat = pykat.finesse.kat()
kat.verbose=False
kat2 = kat.deepcopy()
kat.loadKatFile("tuned/PI-DRMi-m4original.kat")
kat2.loadKatFile("tuned/PI-DRMi.kat")
# #creating auxMICH port that works for non-recycled MICH monitoring
LIGO1.APOP_f2 = ifo.port("APOP_f2","nAPOP", LIGO1.f2, phase=13)
LIGO1.aMICH = ifo.DOF("aMICH", LIGO1.APOP_f2, "Q", ["ITMX", "ETMX", "ITMY", "ETMY"], [1,1,-1,-1], 100.0)
# #######################
#for testing
# dofs = [LIGO1.CARM, LIGO1.DARM,LIGO1.MICH, LIGO1.PRCL, LIGO1.SRCL]#, LIGO1.aMICH]
# locks = [kat.ETMX_lock, kat.ETMY_lock, kat.MICH_lock, kat.ITMY_lock, kat.PRCL_lock, kat.SRCL_lock]
alldofs=["CARM","DARM","MICH","PRCL","SRCL"] #use with dofs = LIGO1._strToDOFs(DOFs) to get dofs
# alldofs_cmds= LIGO1._strToDOFs(alldofs)
Xdofs={}
for d in alldofs:
li = alldofs[:]
li.remove(d)
Xdofs[d] = li
print(Xdofs)
########################
##tests
kat3 = kat2.deepcopy()
kat3.REFL_f2_I.phase1 -=90
# kat3.POP_f2_Q.phase1 -=90 #MICH doesn't exist, so is created #TODO: alert the user to this
katlist = [kat2,kat]
legend = ["maxtem 0","maxtem 4"]
xlim = 1e-2
ErrSigs = plt.figure("ErrSigs (default)")
for k in katlist:
kat = k.deepcopy()
#TODO: move lock removal to ifo.py
BlockList = kat._kat__blocks
if 'locks' in BlockList:
kat.removeBlock('locks')
if 'powers' in BlockList:
kat.removeBlock('powers')
if 'errsigs' in BlockList:
kat.removeBlock('errsigs')##temporary 'noplot' get-around TODO
LIGO1.plot_error_signals(kat,xlimits=[-xlim,xlim],fig=ErrSigs)#, plotDOFs=alldofs),
plt.legend(legend,loc=9, bbox_to_anchor = (2.2,1.0),fontsize=10)
plt.show(block=False)
for k in katlist:
jj=katlist.index(k)
kat = k.deepcopy()
#TODO: move lock removal to ifo.py
BlockList = kat._kat__blocks
if 'locks' in BlockList:
kat.removeBlock('locks')
if 'powers' in BlockList:
kat.removeBlock('powers')
if 'errsigs' in BlockList:
kat.removeBlock('errsigs')
for d in alldofs:
i = alldofs.index(d)
fig = plt.figure(legend[jj]+" - "+str(i))
LIGO1.plot_error_signals(kat,xlimits=[-xlim,xlim],DOFs=[d], plotDOFs=Xdofs[d],fig=fig)
plt.show(block=False)
END = input('press enter to close all and quit')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment