Changeset b8080e1 in sasview for src/sas/sascalc/fit
- Timestamp:
- Aug 29, 2018 8:01:23 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 9463ca2
- Parents:
- ce30949
- git-author:
- Piotr Rozyczko <rozyczko@…> (08/29/18 07:59:56)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (08/29/18 08:01:23)
- Location:
- src/sas/sascalc/fit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/AbstractFitEngine.py
racd9c311 rb8080e1 78 78 def get_params(self, fitparams): 79 79 """ 80 return a list of value of param ter to fit81 82 :param fitparams: list of param aters name to fit80 return a list of value of parameter to fit 81 82 :param fitparams: list of parameters name to fit 83 83 84 84 """ -
src/sas/sascalc/fit/MultiplicationModel.py
r574adc7 rb8080e1 68 68 try: 69 69 multiplicity = p_model.multiplicity 70 except :70 except AttributeError: 71 71 multiplicity = 1 72 72 ## functional multiplicity of the model … … 76 76 self.non_fittable = p_model.non_fittable 77 77 self.multiplicity_info = [] 78 self.fun_list = {}78 self.fun_list = [] 79 79 if self.non_fittable > 1: 80 80 try: … … 82 82 self.fun_list = p_model.fun_list 83 83 self.is_multiplicity_model = True 84 except :84 except AttributeError: 85 85 pass 86 86 else: -
src/sas/sascalc/fit/pagestate.py
r9e6aeaf rb8080e1 13 13 ################################################################################ 14 14 import time 15 import re 15 16 import os 16 17 import sys … … 646 647 name = value.split(':', 1)[1].strip() 647 648 file_value = "File name:" + name 649 #Truncating string so print doesn't complain of being outside margins 650 if sys.platform != "win32": 651 MAX_STRING_LENGHT = 50 652 if len(file_value) > MAX_STRING_LENGHT: 653 file_value = "File name:.."+file_value[-MAX_STRING_LENGHT+10:] 648 654 file_name = CENTRE % file_value 649 655 if len(title) == 0: … … 721 727 html_str, text_str, title = self._get_report_string() 722 728 # Allow 2 figures to append 723 image_links = [FEET_2%fig for fig in fig_urls] 724 729 #Constraining image width for OSX and linux, so print doesn't complain of being outside margins 730 if sys.platform == "win32": 731 image_links = [FEET_2%fig for fig in fig_urls] 732 else: 733 image_links = [FEET_2_unix%fig for fig in fig_urls] 725 734 # final report html strings 726 735 report_str = html_str + ELINE.join(image_links) 727 736 report_str += FEET_3 728 737 return report_str, text_str 729 738 … … 954 963 if node.get('version'): 955 964 # Get the version for model conversion purposes 956 self.version = tuple(int(e) for e in957 str.split(node.get('version'), "."))965 x = re.sub('[^\d.]', '', node.get('version')) 966 self.version = tuple(int(e) for e in str.split(x, ".")) 958 967 # The tuple must be at least 3 items long 959 968 while len(self.version) < 3: … … 1368 1377 """ 1369 1378 FEET_2 = \ 1370 """<img src="%s" ></img> 1379 """<img src="%s"></img> 1380 """ 1381 FEET_2_unix = \ 1382 """<img src="%s" width="540"></img> 1371 1383 """ 1372 1384 FEET_3 = \ -
src/sas/sascalc/fit/qsmearing.py
r50fcb09 rb8080e1 90 90 #print "data1D.dx[0]",data1D.dx[0],data1D.dxl[0] 91 91 # If we found resolution smearing data, return a QSmearer 92 if _found_resolution == True:92 if _found_resolution: 93 93 return pinhole_smear(data, model) 94 94 … … 113 113 break 114 114 # If we found slit smearing data, return a slit smearer 115 if _found_slit == True:115 if _found_slit: 116 116 return slit_smear(data, model) 117 117 return None
Note: See TracChangeset
for help on using the changeset viewer.