Commit 9c446c9d authored by Daniel Brown's avatar Daniel Brown

Adding divergence attr to BeamParam. Adding DARM_h to ifo objects for length...

Adding divergence attr to BeamParam. Adding DARM_h to ifo objects for length modulation DOF. Fixing pitch motion TF.
parent 4d150fac
......@@ -234,7 +234,7 @@ def scan_optics_string(_optics, _factors, _varName='scan', target="phi", linlog=
#print()
return _tuneStr
def scan_f_cmds(DOF, linlog="lin", lower=10, upper=5000, steps=100):
def scan_f_cmds(DOF, linlog="log", lower=10, upper=5000, steps=100):
name = "_%s" % DOF.name
cmds = DOF.fsig(name, 1)
......
......@@ -202,20 +202,20 @@ class ALIGO_IFO(IFO):
code = """
tf2 QUAD 2.38663 0.0 {-0.0050+86.8639i,-0.0050+61.0536i,-0.0050+32.0042i,-0.0050+21.3735i,-0.0050+20.6567i,-0.0050+19.0823i,-0.0050+22.3646i,-0.0050+17.2518i,-0.0050+16.5670i,-0.0050+15.0288i,-0.0050+12.4591i,-0.0050+13.1589i,-0.0050+10.0625i,-0.0050+8.4105i,-0.0050+8.4829i,-0.0050+6.2308i,-0.0050+6.5431i,-0.0050+5.5092i,-0.0050+2.7083i,-0.0050+3.2843i,-0.0050+2.8957i,-0.0050+3.7645i,-0.0050+14.0137i,-0.0050+3.4691i} {-0.0050+86.8639i,-0.0050+61.0536i,-0.0050+32.0042i,-0.0050+21.3735i,-0.0050+20.6566i,-0.0050+19.0823i,-0.0050+17.2493i,-0.0050+16.5665i,-0.0050+22.3646i,-0.0050+15.0288i,-0.0050+12.4591i,-0.0050+13.1589i,-0.0050+9.4995i,-0.0050+8.4829i,-0.0050+5.5072i,-0.0050+6.2177i,-0.0050+6.7464i,-0.0050+6.5428i,-0.0050+2.7591i,-0.0050+2.8957i,-0.0050+3.7645i,-0.0050+14.0137i,-0.0050+3.4691i}
attr ETMY iy 1 rymech
attr ETMX iy 1 rymech
attr ITMY iy 1 rymech
attr ITMX iy 1 rymech
attr PRM iy 1 rymech
attr PR2 iy 1 rymech
attr PR3 iy 1 rymech
attr SRM iy 1 rymech
attr SR2 iy 1 rymech
attr SR3 iy 1 rymech
attr BS iy 1 rymech
attr ETMY iy 1 rymech QUAD
attr ETMX iy 1 rymech QUAD
attr ITMY iy 1 rymech QUAD
attr ITMX iy 1 rymech QUAD
attr PRM iy 1 rymech QUAD
attr PR2 iy 1 rymech QUAD
attr PR3 iy 1 rymech QUAD
attr SRM iy 1 rymech QUAD
attr SR2 iy 1 rymech QUAD
attr SR3 iy 1 rymech QUAD
attr BS iy 1 rymech QUAD
"""
self.kat.parse(code)
......@@ -882,6 +882,8 @@ def make_kat(name="design", katfile=None, verbose = False, debug=False, keepComm
kat.IFO.DARM = DOF(kat.IFO, "DARM", kat.IFO.AS_DC, "", ["ETMX", "ETMY"], [-1,1], 1.0, sigtype="z")
kat.IFO.SRCL = DOF(kat.IFO, "SRCL", kat.IFO.REFL_f2, "I", "SRM", -1, 1e2, sigtype="z")
kat.IFO.DARM_h = DOF(kat.IFO, "DARM_h", None, "", ["LY", "LX"], [-1,1], 1.0, sigtype="phase")
kat.IFO.LSC_DOFs = (kat.IFO.PRCL, kat.IFO.MICH, kat.IFO.CARM, kat.IFO.DARM, kat.IFO.SRCL)
kat.IFO.CAV_POWs = (kat.IFO.POW_X, kat.IFO.POW_Y, kat.IFO.POW_BS)
......
......@@ -139,6 +139,10 @@ class BeamParam(object):
return np.arctan2(q.real, q.imag)
@property
def divergence(self):
return self.wavelength/ (self.w0 * np.pi)
@property
def w0(self):
return np.sqrt(self.__q.imag * self.__lambda / (self.__nr * math.pi))
......
......@@ -21,15 +21,18 @@ def in_ipython():
return False
def init_pykat_plotting(mode="display", dpi=100):
def init_pykat_plotting(mode="display", dpi=100, fmts=None):
import matplotlib as mpl
__DPI__ = int(dpi)
if fmts is None:
fmts=['svg', 'pdf']
if in_ipython():
try:
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('pdf', 'svg')
set_matplotlib_formats(*fmts)
ipy = get_ipython()
ipy.magic("matplotlib inline")
except:
......
Markdown is supported
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