summaryrefslogtreecommitdiff
path: root/src/phys.py
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2019-05-02 19:20:02 +0200
committerPaweł Redman <pawel.redman@gmail.com>2019-05-02 19:20:02 +0200
commitb35d3e4e76ce4fad133316861f1962efd9b9184f (patch)
tree8990b30d768daf1bdea44137ea0858b0880fe02f /src/phys.py
parent6db078cf4696289bb40169398ebe5f3b1f5e87bb (diff)
Element edition window
Diffstat (limited to 'src/phys.py')
-rw-r--r--src/phys.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/phys.py b/src/phys.py
index 96f3bad..cf30667 100644
--- a/src/phys.py
+++ b/src/phys.py
@@ -53,12 +53,14 @@ class Ellipse:
class Polarizer:
def __init__(self, type, delta=0):
+ self.name = "New element" # FIXME
self.type = type
self.angle = 0
self.delta = delta
- self.ref = False # FIXME: move this to UI or System
+ self.ref = False
self.t1 = 1
self.t2 = 0
+ self.enable = True
self.set_type(type)
def set_type(self, type):
@@ -92,7 +94,6 @@ class Polarizer:
class System:
def __init__(self):
self.elements = list()
- self.ignore = list()
def recalculate(system):
system.states = [None] * len(system.elements)
@@ -100,7 +101,7 @@ class System:
state = None
for i, pol in enumerate(system.elements):
- if i >= len(system.ignore) or not system.ignore[i]:
+ if pol.enable:
state = pol.mul(state)
system.states[i] = state
system.ellipses.append(Ellipse(state))