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
1ff9f598
Commit
1ff9f598
authored
10 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
fixing pykat.components.NodeGaussSetter import
parent
4d44e57d
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/node_network.py
+8
-8
8 additions, 8 deletions
pykat/node_network.py
with
8 additions
and
8 deletions
pykat/node_network.py
+
8
−
8
View file @
1ff9f598
...
...
@@ -12,7 +12,7 @@ if USE_GUI:
import
pykat.exceptions
as
pkex
from
pykat.components
import
Component
from
pykat.components
import
Component
,
NodeGaussSetter
from
pykat.detectors
import
BaseDetector
as
Detector
from
pykat.utilities.optics.gaussian_beams
import
beam_param
...
...
@@ -65,7 +65,7 @@ class NodeNetwork(object):
node_old is the node that is attached to the component. This will accept
str - name of a node
pykat.node_network.Node - The direct node object
pykat.components.
NodeGaussSetter - the node object that is used to set gaussian parameters
NodeGaussSetter - the node object that is used to set gaussian parameters
This will call a components __on_node_change callback function to let it know that the nodes
connected to it have changed.
...
...
@@ -77,10 +77,10 @@ class NodeNetwork(object):
if
isinstance
(
node_new
,
str
):
node_new
=
self
.
__kat
.
nodes
[
node_new
]
if
isinstance
(
node_old
,
pykat
.
components
.
NodeGaussSetter
):
if
isinstance
(
node_old
,
NodeGaussSetter
):
node_old
=
node_old
.
node
if
isinstance
(
node_new
,
pykat
.
components
.
NodeGaussSetter
):
if
isinstance
(
node_new
,
NodeGaussSetter
):
node_new
=
node_new
.
node
if
not
node_new
.
isDump
and
node_new
.
components
.
count
(
None
)
==
0
:
...
...
@@ -204,14 +204,14 @@ class NodeNetwork(object):
node_old is the node that is attached to the component. This will accept
str - name of a node
pykat.node_network.Node - The direct node object
pykat.components.
NodeGaussSetter - the node object that is used to set gaussian parameters
NodeGaussSetter - the node object that is used to set gaussian parameters
"""
if
isinstance
(
node
,
str
):
node
=
self
.
__kat
.
nodes
[
node
]
if
isinstance
(
node
,
pykat
.
components
.
NodeGaussSetter
):
if
isinstance
(
node
,
NodeGaussSetter
):
node
=
node
.
node
if
not
isinstance
(
node
,
Node
):
...
...
@@ -399,13 +399,13 @@ class NodeNetwork(object):
if
isinstance
(
from_node
,
str
):
from_node
=
self
.
__kat
.
nodes
[
from_node
]
if
isinstance
(
from_node
,
pykat
.
components
.
NodeGaussSetter
):
if
isinstance
(
from_node
,
NodeGaussSetter
):
from_node
=
from_node
.
node
if
isinstance
(
to_node
,
str
):
to_node
=
self
.
__kat
.
nodes
[
to_node
]
if
isinstance
(
to_node
,
pykat
.
components
.
NodeGaussSetter
):
if
isinstance
(
to_node
,
NodeGaussSetter
):
to_node
=
to_node
.
node
if
to_node
==
from_node
:
...
...
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