Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
b57a16af
Commit
b57a16af
authored
Jan 06, 2017
by
Daniel Brown
Browse files
fixing ordering. Adding more intelligent remove in BlockedKatFile
parent
4081eabd
Pipeline
#1762
passed with stage
in 19 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
b57a16af
...
@@ -216,7 +216,13 @@ class BlockedKatFile(object):
...
@@ -216,7 +216,13 @@ class BlockedKatFile(object):
self
.
blocks
=
{
self
.
__NO_BLOCK
:
""
}
self
.
blocks
=
{
self
.
__NO_BLOCK
:
""
}
self
.
__currentBlock
=
self
.
__NO_BLOCK
self
.
__currentBlock
=
self
.
__NO_BLOCK
def
remove
(
self
,
block
):
def
remove
(
self
,
*
blocks
):
if
len
(
blocks
[
0
])
>
1
and
not
isinstance
(
blocks
[
0
],
six
.
string_types
):
# if we've got an iterable thing that isn't a string, eg list or tuple
# just use that
blocks
=
blocks
[
0
]
for
block
in
blocks
:
if
block
not
in
self
.
ordering
or
block
not
in
self
.
blocks
:
if
block
not
in
self
.
ordering
or
block
not
in
self
.
blocks
:
raise
Exception
(
"%s block not found"
)
raise
Exception
(
"%s block not found"
)
...
...
pykat/optics/gaussian_beams.py
View file @
b57a16af
...
@@ -14,11 +14,6 @@ from scipy.special import hermite
...
@@ -14,11 +14,6 @@ from scipy.special import hermite
from
pykat.math.jacobi
import
jacobi
from
pykat.math.jacobi
import
jacobi
from
pykat.SIfloat
import
SIfloat
from
pykat.SIfloat
import
SIfloat
class
gauss_param
(
BeamParam
):
pass
class
beam_param
(
BeamParam
):
pass
class
BeamParam
(
object
):
class
BeamParam
(
object
):
"""
"""
...
@@ -499,3 +494,13 @@ def LG2HG(p,l):
...
@@ -499,3 +494,13 @@ def LG2HG(p,l):
coefficients
[
j
]
=
c
*
(
-
1.0
)
**
p
*
(
-
2
)
**
j
*
jacobi
(
j
,
n
-
j
,
m
-
j
,
0.0
)
coefficients
[
j
]
=
c
*
(
-
1.0
)
**
p
*
(
-
2
)
**
j
*
jacobi
(
j
,
n
-
j
,
m
-
j
,
0.0
)
return
coefficients
,
ns
,
ms
return
coefficients
,
ns
,
ms
# These classes are here as legacy classes, BeamParam should throw a warning if they are used instead.
class
gauss_param
(
BeamParam
):
pass
class
beam_param
(
BeamParam
):
pass
\ No newline at end of file
Write
Preview
Supports
Markdown
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