示例#1
0
 def set_layer_name(self, name):
     """
     Update the names of the magnetic parameters with the name of the
     layer if it has not already been set.  This is necessary since we don't
     know the layer name until after we have constructed the magnetism object.
     """
     if self.name == "LAYER":
         for p in flatten(self.parameters()):
             p.name = p.name.replace("LAYER", name)
         self.name = name
示例#2
0
 def set_layer_name(self, name):
     """
     Update the names of the magnetic parameters with the name of the
     layer if it has not already been set.  This is necessary since we don't
     know the layer name until after we have constructed the magnetism object.
     """
     if self.name == "LAYER":
         for p in flatten(self.parameters()):
             p.name = p.name.replace("LAYER", name)
         self.name = name
示例#3
0
文件: splines.py 项目: RONNCC/bumps
 def flattened(self):
     return flatten(self.parameters())