Commit fbe402bb authored by Andreas Freise's avatar Andreas Freise

changing all hard-coded occurances of design_with_IMC_HAM2_FI_OM.kat to design.kat

parent 208c981e
......@@ -50,17 +50,19 @@ from pykat.style import use as set_plot_style
from .SIfloat import SIfloat
msg = "Could not find the finesse executable 'kat'" \
"or you do not have the permissions to run it."
class nokat(object):
def __getattribute__(self, attr):
warn(msg)
try:
kat = finesse.kat()
v = kat.finesse_version()
except pkex.MissingFinesse:
from warnings import warn
msg = "Could not find the finesse executable 'kat'" \
"or you do not have the permissions to run it."
warn(msg)
class nokat(object):
def __getattribute__(self, attr):
warn(msg)
kat = nokat()
v = str(__min_req_finesse__)
if float(v.split('-')[0]) < __min_req_finesse__:
......@@ -68,6 +70,16 @@ if float(v.split('-')[0]) < __min_req_finesse__:
str(__min_req_finesse__),
v))
def info():
print("Pykat version: " + __version__)
print("Pykat loaded from: " + __file__)
if kat != nokat():
print("Finesse version: " + str(v))
print("Finesse loaded from: " + str(kat._finesse_exec()))
else:
print("Finesse could not be initialised")
SI = {'yocto': 1E-24, # yocto
'zepto': 1E-21, # zepto
'atto': 1E-18, # atto
......
......@@ -1281,7 +1281,7 @@ class IFO(object):
import pykat
from pykat.ifo import aligo
base = aligo.make_kat("design_with_IMC_HAM2_FI_OMC")
base = aligo.make_kat("design")
base.maxtem = 2
base = aligo.setup(base)
......
......@@ -749,22 +749,11 @@ def make_kat(name="design", katfile=None, verbose = False, debug=False, use_RF_D
The `name` argument selects from default aLIGO files included in Pykat:
- design: A file based on the design parameters for the final aLIGO setup.
125W input, T_SRM = 20%.
- design_low_power: A file based on the design parameters for the final aLIGO setup.
20W input, T_SRM = 35%. The higher SRM transmission mirror is used for low power
operation. 20W input power from O1 observation.
- design_with_IMC_HAM2: A file based on `design` but has the IMC and HAM2 blocks
which contain design parameter input optics
- design_with_IMC_HAM2_FI_OMC: A file with the OMC and IMC, most complete file
keepComments: If true it will keep the original comments from the file
preserveComments: If true it will keep the const commands in the kat
"""
names = ['design', 'design_low_power', 'design_with_IMC_HAM2', 'design_with_IMC_HAM2_FI_OMC']
names = ['design']
if debug:
kat = finesse.kat(tempdir=".",tempname="test")
......@@ -1420,4 +1409,4 @@ def setup(base, DC_offset_pm=20, verbose=False, debug=False):
#the lock block of the kat
lock_cmds = base.IFO.add_locks_block(locks, verbose=verbose)
return base
\ No newline at end of file
return base
......@@ -501,7 +501,7 @@ def make_kat(katfile=None, verbose=False, debug=False,
keepComments: If true it will keep the original comments from the file
preserveComments: If true it will keep the const commands in the kat
"""
names = ['design', 'design_low_power', 'design_with_IMC_HAM2', 'design_with_IMC_HAM2_FI_OMC']
names = ['design']
if debug:
kat = finesse.kat(tempdir=".",tempname="test")
......@@ -1082,4 +1082,4 @@ def setup(base, verbose=False, debug=False):
#the lock block of the kat
lock_cmds = base.IFO.add_locks_block(locks, verbose=verbose)
return base
\ No newline at end of file
return base
......@@ -62,8 +62,8 @@ class aLIGO(object):
# TODO different files not yet implemented
if _name != "default":
printf("aLIGO name `{}' not recognised, using 'default'",_name)
self.kat.loadKatFile(self._data_path+"design_with_IMC_HAM2_FI_OMC.kat")#"aLIGO.kat"
self.rawBlocks.read(self._data_path+"design_with_IMC_HAM2_FI_OMC.kat")#"aLIGO.kat"
self.kat.loadKatFile(self._data_path+"design.kat")#"aLIGO.kat"
self.rawBlocks.read(self._data_path+"design.kat")#"aLIGO.kat"
# ----------------------------------------------------------------------
# set variables to zero first
......
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