def __init__(self, name): """Initialize. name -- name of the data set. It must be a unique identifier. """ PDFComponent.__init__(self, name) self.clear() return
def __init__(self, name, *args, **kwargs): """Initialize PDFStructure. name -- name of this PDFStructure. args, kwargs -- optional arguments passed to parent Structure class """ PDFComponent.__init__(self, name) PDFFitStructure.__init__(self, *args, **kwargs) return
def __init__(self, name): """initialize Calculation name -- calculation name """ PDFComponent.__init__(self, name) # rmin, rstep, rmax, rlen, rcalc self.setRGrid(rmin=0.1, rstep=0.01, rmax=10.0) self.rcalc = [] self.Gcalc = [] self.stype = 'X' # user must specify qmax to get termination ripples self.qmax = 0.0 self.qdamp = 0.001 self.qbroad = 0.0 self.spdiameter = None self.dscale = 1.0 return
def __init__(self, name): """initialize name -- component name """ from diffpy.pdfgui.control.pdflist import PDFList PDFComponent.__init__(self, name) self.datasets = PDFList() self.strucs = PDFList() self.calcs = PDFList() # self.metadata is created but not pickled only for the purpose # of plotting. It holds common metadata from all its datasets self.metadata = {} # controlCenter is the reference to global PDFGuiControl object from diffpy.pdfgui.control.pdfguicontrol import pdfguicontrol self.controlCenter = pdfguicontrol()
def __init__(self, name, config): """initialize name -- component name config -- configuration for this proxy """ if name is None: name = 'ServerHost' PDFComponent.__init__(self, name) self.config = config import threading self.lock = threading.RLock() self.servers = [] from diffpy.pdfgui.control.connection import Connection self.connection = Connection(self) self.quit = False return
def __init__(self, name=None): """initialize name -- name of plot """ if name is None: name = 'Plot [%i]' % Plotter.__plotWindowNumber PDFComponent.__init__(self, name) import threading self.lock = threading.RLock() self.curves = [] self.window = None self.isShown = False from diffpy.pdfgui.control.pdfguicontrol import pdfguicontrol self.controlCenter = pdfguicontrol() # add some flavor by starting with random style import random self.symbolStyleIndex = random.randint(0, 100) self.lineStyleIndex = random.randint(0, 100) return
def __init__(self, name=None): """initialize name -- name of plot """ if name is None: name = 'Plot [%i]' % Plotter.__plotWindowNumber PDFComponent.__init__(self, name) import threading self.lock = threading.RLock() self.curves = [] self.window = None self.isShown = False from diffpy.pdfgui.control.pdfguicontrol import pdfguicontrol self.controlCenter = pdfguicontrol() # add some flavor by starting with random style import random self.symbolStyleIndex = random.randint(0,100) self.lineStyleIndex = random.randint(0,100) return