コード例 #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
ファイル: magnetism.py プロジェクト: hoogerheide/refl1d
 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())