- Timestamp:
- Aug 3, 2011 10:55:13 AM (13 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 8677607
- Parents:
- 4225aed
- Location:
- sansview/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r4225aed r67ae937 71 71 self.qmin_data_set = None 72 72 self.qmax_data_set = None 73 self.npts_data_set = 0 73 74 ## Q range 74 75 self.qmin = None -
sansview/perspectives/fitting/fit_thread.py
rcc31608 r67ae937 69 69 list_map_get_attr.append(map_getattr) 70 70 from multiprocessing import Pool 71 inputs = zip(list_map_get_attr,self.fitter, list_fit_function, list_handler, list_q, list_curr_thread,list_ftol)72 print inputs71 inputs = zip(list_map_get_attr,self.fitter, list_fit_function, 72 list_handler, list_q, list_curr_thread,list_ftol) 73 73 result = Pool(1).map(func=map_apply, 74 74 iterable=inputs) 75 75 #self.handler.starting_fit() 76 #Result from the fit77 """78 result = self.fitter.fit(handler=self.handler,79 curr_thread=self,80 ftol=self.ftol)81 """82 print "fithread result", result83 76 self.complete(result= result, 84 77 page_id=self.page_id, … … 89 82 # Real code should not print, but this is an example... 90 83 #print "keyboard exception" 91 #Stop on exception during fitting. Todo: need to put some mssg and reset progress bar. 84 #Stop on exception during fitting. Todo: need to put 85 #some mssg and reset progress bar. 92 86 raise 93 87 #if self.handler is not None: -
sansview/perspectives/fitting/fitpage.py
r4225aed r67ae937 98 98 self.enable_datasource() 99 99 if data_list: 100 qmin, qmax, _= self.compute_data_range(data_list[0])100 qmin, qmax, npts = self.compute_data_range(data_list[0]) 101 101 self.qmin_data_set, self.qmax_data_set = qmin, qmax 102 self.npts_data_set = npts 102 103 for data in self.data_list: 103 104 if data is not None: … … 1010 1011 # when y(q=0)=None at x[0]. 1011 1012 self.qmin_x = float(self.qmin.GetValue()) 1012 self.qmax_x = float( 1013 self.qmax_x = float(self.qmax.GetValue()) 1013 1014 self._manager._reset_schedule_problem(value=0, uid=self.uid) 1014 self._manager.schedule_for_fit(uid=self.uid,value=1, fitproblem =None) 1015 self._manager.set_fit_range(uid=self.uid,qmin= self.qmin_x, 1016 qmax= self.qmax_x) 1017 1015 self._manager.schedule_for_fit(uid=self.uid,value=1, fitproblem=None) 1016 self._manager.set_fit_range(uid=self.uid,qmin=self.qmin_x, 1017 qmax=self.qmax_x) 1018 1018 #single fit 1019 1019 self._manager.onFit(uid=self.uid) … … 1648 1648 """ 1649 1649 if data is not None: 1650 qmin, qmax, _= self.compute_data_range(data)1650 qmin, qmax, npts = self.compute_data_range(data) 1651 1651 self.qmin_data_set = min(self.qmin_data_set, qmin) 1652 1652 self.qmax_data_set = max(self.qmax_data_set, qmax) 1653 1653 self.npts_data_set += npts 1654 1654 1655 1655 def compute_data_range(self, data): … … 1720 1720 self.structurebox.Enable() 1721 1721 data_name = self.data.name 1722 data_min, data_max, npts = self.compute_data_range(self.data) 1722 #data_min, data_max, npts = self.compute_data_range(self.data) 1723 data_min, data_max = self.qmin_data_set, self.qmax_data_set 1724 npts = self.npts_data_set 1723 1725 #set maximum range for x in linear scale 1724 1726 if not hasattr(self.data,"data"): #Display only for 1D data fit -
sansview/perspectives/fitting/fitting.py
r0fd2f27 r67ae937 903 903 smearer = value.get_smearer() 904 904 qmin, qmax = value.get_range() 905 print "fitter_setter", qmin, qmax 905 906 #Extra list of parameters and their constraints 906 907 listOfConstraint = []
Note: See TracChangeset
for help on using the changeset viewer.