Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Steinlechner
pykat
Commits
7ce58a1d
Commit
7ce58a1d
authored
11 years ago
by
Andreas Freise
Browse files
Options
Downloads
Patches
Plain Diff
fixing some problems with the priting of the finesse output
Also pdtype was read in by the photdiode code (as a pdxxx)
parent
73421d17
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pykat/finesse.py
+18
-11
18 additions, 11 deletions
pykat/finesse.py
with
18 additions
and
11 deletions
pykat/finesse.py
+
18
−
11
View file @
7ce58a1d
...
...
@@ -271,7 +271,7 @@ class kat(object):
obj
=
pykat
.
components
.
lens
.
parseFinesseText
(
line
)
elif
(
first
[
0
:
3
]
==
"
mod
"
):
obj
=
pykat
.
components
.
modulator
.
parseFinesseText
(
line
)
elif
(
first
[
0
:
2
]
==
"
pd
"
):
elif
(
first
[
0
:
2
]
==
"
pd
"
and
first
!=
"
pdtype
"
):
obj
=
pykat
.
detectors
.
photodiode
.
parseFinesseText
(
line
)
elif
(
first
==
"
xaxis
"
or
first
==
"
xaxis*
"
):
obj
=
pykat
.
commands
.
xaxis
.
parseFinesseText
(
line
)
...
...
@@ -339,6 +339,8 @@ class kat(object):
Runs the current simulation setup that has been built thus far.
It returns a katRun or katRun2D object which is populated with the various
data from the simulation run.
printoutput=1 prints the Finesse banner
printerr shows the Finesse progress (set kat.verbose=1 to see warnings and errors)
"""
start
=
datetime
.
datetime
.
now
()
...
...
@@ -390,6 +392,9 @@ class kat(object):
katfile
.
writelines
(
r
.
katScript
)
katfile
.
flush
()
if
printout
==
1
:
cmd
=
[
kat_exec
]
else
:
cmd
=
[
kat_exec
,
'
--perl1
'
]
if
self
.
__time_code
:
...
...
@@ -411,18 +416,20 @@ class kat(object):
#if self.verbose: print "Finesse output:"
for
line
in
iter
(
p
.
stderr
.
readline
,
""
):
err
+=
line
if
len
(
line
)
>
0
:
if
len
(
line
)
>
0
and
printerr
==
1
:
if
line
.
rstrip
().
endswith
(
'
%
'
):
vals
=
line
.
split
(
"
-
"
)
action
=
vals
[
0
].
strip
()
prc
=
vals
[
1
].
strip
()[:
-
1
]
if
self
.
verbose
:
sys
.
stdout
.
write
(
"
\r
{0} {1}%
"
.
format
(
action
,
prc
))
sys
.
stdout
.
write
(
"
\r
{0} {1}%
"
.
format
(
action
,
prc
))
elif
line
[
0
:
3
]
==
'
**
'
:
if
self
.
verbose
:
sys
.
stdout
.
write
(
line
)
[
out
,
errpipe
]
=
p
.
communicate
()
if
printout
==
1
:
print
out
print
""
# get the version number
ix
=
out
.
find
(
'
build
'
)
+
6
...
...
@@ -434,8 +441,8 @@ class kat(object):
if
p
.
returncode
!=
0
:
raise
pkex
.
FinesseRunError
(
err
,
katfile
.
name
)
if
printout
==
1
:
print
out
if
printerr
==
1
:
print
err
#
if printout == 1: print out
#
if printerr == 1: print err
root
=
os
.
path
.
splitext
(
katfile
.
name
)
base
=
os
.
path
.
basename
(
root
[
0
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment