Changeset c0ff8cc in sasview for sansview/perspectives/fitting
- Timestamp:
- Apr 18, 2011 10:18:11 AM (14 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:
- 4bd492f
- Parents:
- 69f9084
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/pagestate.py
r2296316 rc0ff8cc 47 47 ["formfactorcombobox", "formfactorcombobox", "float"], 48 48 ["structurecombobox", "structurecombobox", "float"], 49 ["multi_factor","multi_factor","float"], 49 50 ["enable_smearer","enable_smearer","bool"], 50 51 ["disable_smearer","disable_smearer","bool"], … … 149 150 self.is_data = None 150 151 self.data_name = "" 151 152 152 153 if self.data is not None: 153 154 self.data_name = self.data.name … … 207 208 self.values = {} 208 209 self.weights = {} 209 210 210 211 211 #contains link between a model and selected parameters to fit … … 218 218 self.formfactorcombobox = None 219 219 self.structurecombobox = None 220 220 221 ## radio box to select type of model 221 222 self.shape_rbutton = False … … 314 315 obj.qmin = copy.deepcopy(self.qmin) 315 316 obj.qmax = copy.deepcopy(self.qmax) 316 obj.multi_factor = copy.deepcopy(self.multi_factor)317 obj.multi_factor = self.multi_factor 317 318 obj.npts = copy.deepcopy(self.npts ) 318 319 obj.cb1 = copy.deepcopy(self.cb1) … … 341 342 rep += "parameter unit: %s\n\n"%str(item[7]) 342 343 return rep 343 344 344 345 def __repr__(self): 345 346 """ … … 349 350 t = time.localtime(self.timestamp) 350 351 time_str = time.strftime("%b %d %H;%M of %Y", t) 352 351 353 rep += "State created on : %s\n"%time_str 352 354 rep += "State form factor combobox selection: %s\n"%self.formfactorcombobox … … 356 358 rep += "data's id : %s\n"%self.data_id 357 359 rep += "model type (form factor) selected: %s\n"%self.shape_rbutton 360 rep += "multi_factor : %s\n"% str(self.multi_factor) 358 361 rep += "model type (shape independent) selected: %s\n"%self.shape_indep_rbutton 359 362 rep += "model type (structure factor) selected: %s\n"%self.struct_rbutton … … 412 415 rep = self._repr_helper( list=self.orientation_params_disp, rep=rep) 413 416 """ 414 415 417 return rep 416 417 418 418 419 def set_report_string(self): … … 429 430 paramval_string = "" 430 431 chi2_string = "" 432 multi_factor_string = "" 431 433 q_range = "" 432 434 strings = self.__repr__() … … 462 464 chi2 = ("Chi2/Npts = " + value) 463 465 chi2_string = CENTRE % chi2 466 if name == "multi_factor ": 467 muti_factor = ("muti_factor = " + value) 468 muti_factor_string = CENTRE % muti_factor 464 469 if name == "Title": 465 470 if len(value.strip()) == 0: … … 540 545 else: 541 546 add_str = "" 547 542 548 # final report html strings 543 549 report_str = html_str % ("%s") + add_str … … 548 554 dialog = ReportDialog(report_list, None, -1, "") 549 555 dialog.ShowModal() 550 556 557 551 558 def _toXML_helper(self, list, element, newdoc): 552 559 """ … … 638 645 exec "element.setAttribute(item[0], str(self.%s))" % (item[1]) 639 646 inputs.appendChild(element) 640 647 641 648 # For self.values ={ disp_param_name: [vals,...],...} 642 # and for self.weights ={ disp_param_name: [weights,...],...} 649 # and for self.weights ={ disp_param_name: [weights,...],...} 643 650 for item in list_of_model_attributes: 644 651 element = newdoc.createElement(item[0]) … … 673 680 exec com % item[1] 674 681 inputs.appendChild(element) 675 682 676 683 # Save the file 677 684 if doc is None: … … 870 877 images.append(fig) 871 878 872 return images 879 return images 873 880 874 881 class Reader(CansasReader): … … 1501 1508 1502 1509 return doc 1503 1504 1510 1505 1511 # Simple html report templet … … 1542 1548 ELINE = "<p class=MsoNormal> </p>" 1543 1549 1544 1545 1550 if __name__ == "__main__": 1546 1551 state = PageState(parent=None)
Note: See TracChangeset
for help on using the changeset viewer.