Changeset 65f3930 in sasview for src/sas/sasgui/perspectives/fitting/model_thread.py
- Timestamp:
- Jun 26, 2017 4:22:56 PM (7 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 50fcb09
- Parents:
- 98e3f24
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/model_thread.py
rba8d326 r65f3930 4 4 5 5 import time 6 import math 7 6 8 import numpy as np 7 import math 9 8 10 from sas.sascalc.data_util.calcthread import CalcThread 9 11 from sas.sascalc.fit.MultiplicationModel import MultiplicationModel … … 240 242 class CalcCommandline: 241 243 def __init__(self, n=20000): 242 #print thread.get_ident()243 from sas.models.CylinderModel import CylinderModel 244 245 model = CylinderModel()246 247 248 print model.runXY([0.01, 0.02])244 #print(thread.get_ident()) 245 246 from sasmodels.sasview_model import _make_standard_model 247 cylinder = _make_standard_model('cylinder') 248 model = cylinder() 249 250 print(model.runXY([0.01, 0.02])) 249 251 250 252 qmax = 0.01 … … 255 257 y = numpy.arange(-qmax, qmax+qstep*0.01, qstep) 256 258 257 258 259 calc_thread_2D = Calc2D(x, y, None, model.clone(),None, 259 260 -qmax, qmax,qstep, 260 261 262 261 completefn=self.complete, 262 updatefn=self.update , 263 yieldtime=0.0) 263 264 264 265 calc_thread_2D.queue() … … 269 270 270 271 def update(self,output): 271 print "update"272 print("update") 272 273 273 274 def complete(self, image, data, model, elapsed, qmin, qmax,index, qstep ): 274 print "complete"275 print("complete") 275 276 self.done = True 276 277
Note: See TracChangeset
for help on using the changeset viewer.