Ejemplo n.º 1
0
 def __init__(self, data, model, smearer, qmin, qmax, page_id,
              state=None,
              weight=None,
              fid=None,
              toggle_mode_on=False,
              completefn=None,
              updatefn=None,
              update_chisqr=True,
              source='model',
              yieldtime=0.04,
              worktime=0.04,
              exception_handler=None,
              ):
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime,
                         exception_handler=exception_handler)
     self.qmin = qmin
     self.qmax = qmax
     self.weight = weight
     self.fid = fid
     #self.qstep = qstep
     self.toggle_mode_on = toggle_mode_on
     self.data = data
     self.page_id = page_id
     self.state = None
     # the model on to calculate
     self.model = model
     self.smearer = smearer
     self.starttime = 0
     self.update_chisqr = update_chisqr
     self.source = source
Ejemplo n.º 2
0
 def __init__(self, data, model, smearer, qmin, qmax, page_id,
              state=None,
              weight=None,
              fid=None,
              toggle_mode_on=False,
              completefn=None,
              updatefn=None,
              update_chisqr=True,
              source='model',
              yieldtime=0.04,
              worktime=0.04,
              exception_handler=None,
             ):
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime,
                         exception_handler=exception_handler)
     self.qmin = qmin
     self.qmax = qmax
     self.weight = weight
     self.fid = fid
     #self.qstep = qstep
     self.toggle_mode_on = toggle_mode_on
     self.data = data
     self.page_id = page_id
     self.state = None
     # the model on to calculate
     self.model = model
     self.smearer = smearer
     self.starttime = 0
     self.update_chisqr = update_chisqr
     self.source = source
Ejemplo n.º 3
0
 def __init__(self,
              id=-1,
              func=None,
              qx=None,
              qy=None,
              qx_min=None,
              qx_max=None,
              qy_min=None,
              qy_max=None,
              image=None,
              completefn=None,
              updatefn=None,
              elapsed=0,
              yieldtime=0.01,
              worktime=0.01):
     """
     """
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.starttime = 0
     self.id = id
     self.func = func
     self.qx = qx
     self.qy = qy
     self.qx_min = qx_min
     self.qx_max = qx_max
     self.qy_min = qy_min
     self.qy_max = qy_max
     self.image = image
Ejemplo n.º 4
0
 def __init__(self,
              fn,
              page_id,
              handler,
              batch_outputs,
              batch_inputs=None,
              pars=None,
              completefn=None,
              updatefn=None,
              yieldtime=0.03,
              worktime=0.03,
              reset_flag=False):
     CalcThread.__init__(self,
              completefn,
              updatefn,
              yieldtime,
              worktime)
     self.handler = handler
     self.fitter = fn
     self.pars = pars
     self.batch_inputs = batch_inputs
     self.batch_outputs = batch_outputs
     self.page_id = page_id
     self.starttime = time.time()
     self.updatefn = updatefn
     #Relative error desired in the sum of squares.
     self.reset_flag = reset_flag
Ejemplo n.º 5
0
 def __init__(self, pr, nfunc=5, error_func=None, completefn=None,
              updatefn=None, yieldtime=0.01, worktime=0.01):
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.pr = pr
     self.nfunc = nfunc
     self.error_func = error_func
     self.starttime = 0
Ejemplo n.º 6
0
 def __init__(self,
              id= -1,
              func=None,
              qx=None,
              qy=None,
              qx_min=None,
              qx_max=None,
              qy_min=None,
              qy_max=None,
              image=None,
              completefn=None,
              updatefn=None,
              elapsed=0,
              yieldtime=0.01,
              worktime=0.01
              ):
     """
     """
     CalcThread.__init__(self, completefn,
              updatefn,
              yieldtime,
              worktime)
     self.starttime = 0
     self.id = id
     self.func = func
     self.qx = qx
     self.qy = qy
     self.qx_min = qx_min
     self.qx_max = qx_max
     self.qy_min = qy_min
     self.qy_max = qy_max
     self.image = image
Ejemplo n.º 7
0
 def __init__(self,
              raw_data,
              extrapolated_data,
              bg,
              updatefn=None,
              completefn=None):
     CalcThread.__init__(self, updatefn=updatefn, completefn=completefn)
     self.data = raw_data
     self.background = bg
     self.extrapolation = extrapolated_data
Ejemplo n.º 8
0
 def __init__(self,
              path,
              completefn=None,
              updatefn=None,
              yieldtime=0.01,
              worktime=0.01):
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.path = path
     #Instantiate a loader
     self.loader = Loader()
     self.starttime = 0
Ejemplo n.º 9
0
 def __init__(self,
              x,
              model,
              completefn=None,
              updatefn=None,
              yieldtime=0.01,
              worktime=0.01):
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.x = x
     self.model = model
     self.starttime = 0
Ejemplo n.º 10
0
 def __init__(self, x, model,
              completefn = None,
              updatefn   = None,
              yieldtime  = 0.01,
              worktime   = 0.01
              ):
     CalcThread.__init__(self,completefn,
              updatefn,
              yieldtime,
              worktime)
     self.x = x
     self.model = model
     self.starttime = 0
Ejemplo n.º 11
0
 def __init__(self, path, completefn=None,
              updatefn=None,
              yieldtime=0.01,
              worktime=0.01
              ):
     CalcThread.__init__(self, completefn,
              updatefn,
              yieldtime,
              worktime)
     self.path = path
     #Instantiate a loader 
     self.loader = Loader()
     self.starttime = 0
Ejemplo n.º 12
0
 def __init__(self,
              id=-1,
              panel=None,
              image=None,
              completefn=None,
              updatefn=None,
              elapsed=0,
              yieldtime=0.01,
              worktime=0.01):
     """
     """
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.starttime = 0
     self.id = id
     self.panel = panel
     self.image = image
Ejemplo n.º 13
0
 def __init__(self,
              id=-1,
              panel=None,
              image=None,
              completefn=None,
              updatefn=None,
              elapsed=0,
              yieldtime=0.01,
              worktime=0.01):
     """
     """
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.starttime = 0
     self.id = id
     self.panel = panel
     self.image = image
Ejemplo n.º 14
0
 def __init__(self,
              path,
              loader,
              flag=True,
              transform_data=None,
              completefn=None,
              updatefn=None,
              yieldtime=0.01,
              worktime=0.01):
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.load_state_flag = flag
     self.transform_data = transform_data
     self.list_path = path
     # Instantiate a loader
     self.loader = loader
     self.message = ""
     self.starttime = 0
     self.updatefn = updatefn
Ejemplo n.º 15
0
 def __init__(self, path, loader,
              flag=True,
              transform_data=None,
              completefn=None,
              updatefn=None,
              yieldtime=0.01,
              worktime=0.01):
     CalcThread.__init__(self, completefn,
                         updatefn,
                         yieldtime,
                         worktime)
     self.load_state_flag = flag
     self.transform_data = transform_data
     self.list_path = path
     # Instantiate a loader
     self.loader = loader
     self.message = ""
     self.starttime = 0
     self.updatefn = updatefn
Ejemplo n.º 16
0
 def __init__(
     self,
     model,
     page_id,
     data,
     fid=None,
     qmin=None,
     qmax=None,
     weight=None,
     smearer=None,
     toggle_mode_on=False,
     state=None,
     completefn=None,
     update_chisqr=True,
     source='model',
     updatefn=None,
     yieldtime=0.01,
     worktime=0.01,
     exception_handler=None,
 ):
     """
     """
     CalcThread.__init__(self,
                         completefn,
                         updatefn,
                         yieldtime,
                         worktime,
                         exception_handler=exception_handler)
     self.fid = fid
     self.data = data
     self.qmin = qmin
     self.qmax = qmax
     self.model = model
     self.weight = weight
     self.toggle_mode_on = toggle_mode_on
     self.state = state
     self.page_id = page_id
     self.smearer = smearer
     self.starttime = 0
     self.update_chisqr = update_chisqr
     self.source = source
     self.out = None
     self.index = None
Ejemplo n.º 17
0
 def __init__(self,
              fn,
              page_id,
              handler,
              batch_outputs,
              batch_inputs=None,
              pars=None,
              completefn=None,
              updatefn=None,
              yieldtime=0.03,
              worktime=0.03,
              reset_flag=False):
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime)
     self.handler = handler
     self.fitter = fn
     self.pars = pars
     self.batch_inputs = batch_inputs
     self.batch_outputs = batch_outputs
     self.page_id = page_id
     self.starttime = time.time()
     self.updatefn = updatefn
     #Relative error desired in the sum of squares.
     self.reset_flag = reset_flag
Ejemplo n.º 18
0
 def __init__(self, model,
              page_id,
              data,
              fid=None,
              qmin=None,
              qmax=None,
              weight=None,
              smearer=None,
              toggle_mode_on=False,
              state=None,
              completefn=None,
              update_chisqr=True,
              source='model',
              updatefn=None,
              yieldtime=0.01,
              worktime=0.01,
              exception_handler=None,
             ):
     """
     """
     CalcThread.__init__(self, completefn, updatefn, yieldtime, worktime,
                         exception_handler=exception_handler)
     self.fid = fid
     self.data = data
     self.qmin = qmin
     self.qmax = qmax
     self.model = model
     self.weight = weight
     self.toggle_mode_on = toggle_mode_on
     self.state = state
     self.page_id = page_id
     self.smearer = smearer
     self.starttime = 0
     self.update_chisqr = update_chisqr
     self.source = source
     self.out = None
     self.index = None
Ejemplo n.º 19
0
 def __init__(self, raw_data, extrapolated_data, bg, updatefn=None,
     completefn=None):
     CalcThread.__init__(self, updatefn=updatefn, completefn=completefn)
     self.data = raw_data
     self.background = bg
     self.extrapolation = extrapolated_data