def __init__(self, *args, **kwargs): self.intensity = kwargs.pop('intensity', 1.) self.scale_factor = kwargs.pop('scaling', 1.) IVCurve.__init__(self, data=kwargs.pop('data', []), type=IVCurve.THEORETICAL_IV, smoothed=kwargs.pop('smoothed', True)) MillerIndex.__init__(self, *args, **kwargs)
def index(self, index): from leed import BeamSet if (isinstance(index, MillerIndex) or isinstance(index, MillerIndexSet) or isinstance(index, BeamSet)): self._index = index else: try: self._index = MillerIndex(*index[:2]) except any as e: try: self._index = MillerIndexSet(index) except any as e: raise e raise e
def __ge__(self, other): return MillerIndex.__ge__(self, other)
def __str__(self): sf = str('{}*'.format(self.scale_factor) if abs(self.scale_factor) != 1. else '-' if self.scale_factor < 0 else '') return "{}{}".format(sf, MillerIndex.__str__(self))
def __init__(self, x, y, h, k): MillerIndex.__init__(self, h, k) self.x = x self.y = y