Skip to content

Commit d607d20

Browse files
Merge pull request #16 from FlorianStummer/splitting-workaround
Modulator added to pybdsim
2 parents 8391568 + 1402333 commit d607d20

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/pybdsim/Builder.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,15 @@ def __init__(self,name,**kwargs):
953953
GmadObject.__init__(self, "matdef",name,**kwargs)
954954

955955

956+
class Modulator(GmadObject):
957+
"""
958+
A modulator definition. Any kwargs will be written as parameter=value.
959+
parameter=(value,unit) -> parameter=value*unit
960+
"""
961+
def __init__(self,name,**kwargs):
962+
GmadObject.__init__(self, "modulator",name,**kwargs)
963+
964+
956965
class NewColour(GmadObject):
957966
"""
958967
A newcolour definition. Any kwargs will be written as parameter=value.
@@ -1475,7 +1484,7 @@ def AddObject(self, obj):
14751484
the value (not the key) is added to the internal list without the key.
14761485
14771486
Objects:
1478-
Aperture, Atom, BLM, CavityModel, Crystal, Field, Laser, Material, NewColour
1487+
Aperture, Atom, BLM, CavityModel, Crystal, Field, Laser, Material, Modulator, NewColour
14791488
Placement, Query, Region, SamplerPlacement, Scorer, ScorerMesh, XSecBias.
14801489
"""
14811490
if type(obj) in [list, tuple]:

0 commit comments

Comments
 (0)