Changeset 46c4ccb in sasview


Ignore:
Timestamp:
Oct 18, 2011 7:43:27 PM (13 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
bf39777
Parents:
fc1761b
Message:

fit 2 batch make sure theory has the same length as data before plotting residuals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitting.py

    r15f68ce r46c4ccb  
    11251125                            correct_result = True 
    11261126                    else: 
    1127                         if len(res.theory)== len(res.index[res.index]) and \ 
    1128                             len(res.index) == len(data.data): 
    1129                             correct_result = True 
     1127                        copy_data = deepcopy(data) 
     1128                        new_theory = copy_data.data 
     1129                        new_theory[res.index] = res.theory 
     1130                        new_theory[res.index[res.index == False]] = 0 
     1131                        #if len(res.theory)== len(res.index[res.index]) and \ 
     1132                        #len(res.index) == len(data.data[res.index]): 
     1133                        correct_result = True 
    11301134                    #get all fittable parameters of the current model 
    11311135                    param_list = model.getParamList() 
     
    12001204                                         source='fit') 
    12011205                        else: 
    1202                             self._complete2D(image=res.theory, data=data, 
     1206                            self._complete2D(image=new_theory, data=data, 
    12031207                                          model=model, 
    12041208                                          page_id=pid,  elapsed=None,  
Note: See TracChangeset for help on using the changeset viewer.