Changeset 05fb6d12 in sasview for fittingview/src/sans/perspectives/fitting
- Timestamp:
- Oct 10, 2011 5:19:58 PM (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:
- e3f6ef5
- Parents:
- 91a43d0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/fitting.py
r91a43d0 r05fb6d12 802 802 self._mac_sleep(0.2) 803 803 ## perform single fit 804 if is_single_fit: 804 try: 805 page = self.fit_panel.get_page_by_id(uid) 806 batch_on = page.batch_on 807 except: 808 batch_on = False 809 # batch fit 810 if batch_on: 805 811 calc_fit = FitThread(handler = handler, 806 812 fn=fitter_list, … … 811 817 completefn=self._single_fit_completed, 812 818 ftol=self.ftol) 819 # single fit: not batch and not simul fit 820 elif is_single_fit: 821 if self._fit_engine == "park": 822 calc_fit = FitThread(handler = handler, 823 fn=fitter_list, 824 pars=pars, 825 batch_inputs=batch_inputs, 826 batch_outputs=batch_outputs, 827 page_id=list_page_id, 828 completefn=self._simul_fit_completed, 829 ftol=self.ftol) 830 else: 831 calc_fit = FitThread(handler = handler, 832 fn=fitter_list, 833 pars=pars, 834 batch_inputs=batch_inputs, 835 batch_outputs=batch_outputs, 836 page_id=list_page_id, 837 completefn=self._single_fit_completed, 838 ftol=self.ftol) 839 840 # simul fit 813 841 else: 814 842 current_page_id = self.sim_page.uid … … 1063 1091 batch_inputs["error on %s" % pars[index]] = [] 1064 1092 for res in result: 1093 #Separate result in to data corresponding to each page 1094 temp_pars = [] 1095 temp_res_param = [] 1096 # Park sorts the params by itself so that we must check 1097 # param name and resort it back as it was. No effects on Scipy. 1098 if res.parameters != None: 1099 model = cpage.model 1100 for fid in self.page_finder[pid]: 1101 if fid != None: 1102 # Below works only for batch using one model 1103 model = self.page_finder[pid][fid].get_model() 1104 break 1105 for p in res.parameters: 1106 model_name, param_name = self.split_string(p.name) 1107 if model.name == model_name: 1108 p_name= model.name+"."+param_name 1109 if p.name == p_name: 1110 temp_res_param.append(p) 1111 temp_pars.append(param_name) 1112 res.parameters = temp_res_param 1113 pars = temp_pars 1114 1065 1115 model, data = res.inputs[0] 1066 1116 temp_model = model#.clone()
Note: See TracChangeset
for help on using the changeset viewer.