Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
finesse
pykat
Commits
fbe402bb
Commit
fbe402bb
authored
Nov 21, 2018
by
Andreas Freise
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changing all hard-coded occurances of design_with_IMC_HAM2_FI_OM.kat to design.kat
parent
208c981e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
23 deletions
+24
-23
pykat/__init__.py
pykat/__init__.py
+17
-5
pykat/ifo/__init__.py
pykat/ifo/__init__.py
+1
-1
pykat/ifo/aligo/__init__.py
pykat/ifo/aligo/__init__.py
+2
-13
pykat/ifo/aplus/aplus.py
pykat/ifo/aplus/aplus.py
+2
-2
pykat/ifo/ifo.py
pykat/ifo/ifo.py
+2
-2
No files found.
pykat/__init__.py
View file @
fbe402bb
...
@@ -50,17 +50,19 @@ from pykat.style import use as set_plot_style
...
@@ -50,17 +50,19 @@ from pykat.style import use as set_plot_style
from
.SIfloat
import
SIfloat
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
:
try
:
kat
=
finesse
.
kat
()
kat
=
finesse
.
kat
()
v
=
kat
.
finesse_version
()
v
=
kat
.
finesse_version
()
except
pkex
.
MissingFinesse
:
except
pkex
.
MissingFinesse
:
from
warnings
import
warn
from
warnings
import
warn
msg
=
"Could not find the finesse executable 'kat'"
\
"or you do not have the permissions to run it."
warn
(
msg
)
warn
(
msg
)
class
nokat
(
object
):
def
__getattribute__
(
self
,
attr
):
warn
(
msg
)
kat
=
nokat
()
kat
=
nokat
()
v
=
str
(
__min_req_finesse__
)
v
=
str
(
__min_req_finesse__
)
if
float
(
v
.
split
(
'-'
)[
0
])
<
__min_req_finesse__
:
if
float
(
v
.
split
(
'-'
)[
0
])
<
__min_req_finesse__
:
...
@@ -68,6 +70,16 @@ if float(v.split('-')[0]) < __min_req_finesse__:
...
@@ -68,6 +70,16 @@ if float(v.split('-')[0]) < __min_req_finesse__:
str
(
__min_req_finesse__
),
str
(
__min_req_finesse__
),
v
))
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
SI
=
{
'yocto'
:
1E-24
,
# yocto
'zepto'
:
1E-21
,
# zepto
'zepto'
:
1E-21
,
# zepto
'atto'
:
1E-18
,
# atto
'atto'
:
1E-18
,
# atto
...
...
pykat/ifo/__init__.py
View file @
fbe402bb
...
@@ -1281,7 +1281,7 @@ class IFO(object):
...
@@ -1281,7 +1281,7 @@ class IFO(object):
import pykat
import pykat
from pykat.ifo import aligo
from pykat.ifo import aligo
base = aligo.make_kat("design
_with_IMC_HAM2_FI_OMC
")
base = aligo.make_kat("design")
base.maxtem = 2
base.maxtem = 2
base = aligo.setup(base)
base = aligo.setup(base)
...
...
pykat/ifo/aligo/__init__.py
View file @
fbe402bb
...
@@ -749,22 +749,11 @@ def make_kat(name="design", katfile=None, verbose = False, debug=False, use_RF_D
...
@@ -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:
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
keepComments: If true it will keep the original comments from the file
preserveComments: If true it will keep the const commands in the kat
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
:
if
debug
:
kat
=
finesse
.
kat
(
tempdir
=
"."
,
tempname
=
"test"
)
kat
=
finesse
.
kat
(
tempdir
=
"."
,
tempname
=
"test"
)
...
@@ -1420,4 +1409,4 @@ def setup(base, DC_offset_pm=20, verbose=False, debug=False):
...
@@ -1420,4 +1409,4 @@ def setup(base, DC_offset_pm=20, verbose=False, debug=False):
#the lock block of the kat
#the lock block of the kat
lock_cmds
=
base
.
IFO
.
add_locks_block
(
locks
,
verbose
=
verbose
)
lock_cmds
=
base
.
IFO
.
add_locks_block
(
locks
,
verbose
=
verbose
)
return
base
return
base
\ No newline at end of file
pykat/ifo/aplus/aplus.py
View file @
fbe402bb
...
@@ -501,7 +501,7 @@ def make_kat(katfile=None, verbose=False, debug=False,
...
@@ -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
keepComments: If true it will keep the original comments from the file
preserveComments: If true it will keep the const commands in the kat
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
:
if
debug
:
kat
=
finesse
.
kat
(
tempdir
=
"."
,
tempname
=
"test"
)
kat
=
finesse
.
kat
(
tempdir
=
"."
,
tempname
=
"test"
)
...
@@ -1082,4 +1082,4 @@ def setup(base, verbose=False, debug=False):
...
@@ -1082,4 +1082,4 @@ def setup(base, verbose=False, debug=False):
#the lock block of the kat
#the lock block of the kat
lock_cmds
=
base
.
IFO
.
add_locks_block
(
locks
,
verbose
=
verbose
)
lock_cmds
=
base
.
IFO
.
add_locks_block
(
locks
,
verbose
=
verbose
)
return
base
return
base
\ No newline at end of file
pykat/ifo/ifo.py
View file @
fbe402bb
...
@@ -62,8 +62,8 @@ class aLIGO(object):
...
@@ -62,8 +62,8 @@ class aLIGO(object):
# TODO different files not yet implemented
# TODO different files not yet implemented
if
_name
!=
"default"
:
if
_name
!=
"default"
:
printf
(
"aLIGO name `{}' not recognised, using 'default'"
,
_name
)
printf
(
"aLIGO name `{}' not recognised, using 'default'"
,
_name
)
self
.
kat
.
loadKatFile
(
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
_with_IMC_HAM2_FI_OMC
.kat"
)
#"aLIGO.kat"
self
.
rawBlocks
.
read
(
self
.
_data_path
+
"design.kat"
)
#"aLIGO.kat"
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# set variables to zero first
# set variables to zero first
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment