Changeset ec9a635 in sasview for fittingview/src/sans/perspectives


Ignore:
Timestamp:
Oct 13, 2011 9:48:11 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
5d0a786
Parents:
1aa6145
Message:

removed float error for chi2 cell

File:
1 edited

Legend:

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

    r9a10c12 rec9a635  
    12171217            batch_outputs["Data"] = [] 
    12181218        from sans.guiframe.data_processor import BatchCell 
    1219          
    1220         try: 
     1219        cell = BatchCell() 
     1220        cell.label = data.name 
     1221        cell.value = index 
     1222         
     1223        if theory_data != None: 
    12211224            #Suucessful fit 
    1222             cell = BatchCell() 
    1223             cell.label = data.name 
    1224             cell.value = index 
    12251225            theory_data.id = wx.NewId() 
    12261226            theory_data.name = model.name + "[%s]" % str(model.__class__.__name__) 
    1227             cell.object = [data, theory_data] 
    1228             batch_outputs["Data"].append(cell) 
    1229             for key, value in data.meta_data.iteritems(): 
    1230                 if key not in batch_inputs.keys(): 
    1231                     batch_inputs[key] = [] 
    1232                 if key.lower().strip() != "loader": 
    1233                     batch_inputs[key].append(value) 
    1234             param = "temperature" 
    1235             if hasattr(data.sample, param): 
    1236                 if param not in  batch_inputs.keys(): 
    1237                      batch_inputs[param] = [] 
    1238                 batch_inputs[param].append(data.sample.temperature) 
    1239             # associate residuals plot 
    1240             batch_outputs["Chi2"][index].object = [residuals] 
    1241         except:  
    1242             # theory is None 
    1243             pass 
     1227            try: 
     1228                # associate residuals plot 
     1229                batch_outputs["Chi2"][index].object = [residuals] 
     1230            except: 
     1231                pass 
     1232 
     1233        cell.object = [data, theory_data] 
     1234        batch_outputs["Data"].append(cell) 
     1235        for key, value in data.meta_data.iteritems(): 
     1236            if key not in batch_inputs.keys(): 
     1237                batch_inputs[key] = [] 
     1238            if key.lower().strip() != "loader": 
     1239                batch_inputs[key].append(value) 
     1240        param = "temperature" 
     1241        if hasattr(data.sample, param): 
     1242            if param not in  batch_inputs.keys(): 
     1243                 batch_inputs[param] = [] 
     1244            batch_inputs[param].append(data.sample.temperature) 
     1245         
    12441246 
    12451247    def _fit_completed(self, result, page_id, batch_outputs, 
     
    18121814            residuals.yaxis('\\rm{Residuals} ', 'normalized') 
    18131815        new_plot = residuals 
    1814         new_plot.name = "Residuals for " + str(data.name) 
     1816        new_plot.name = "Residuals for " + str(theory_data.name.split()[0]) 
    18151817        ## allow to highlight data when plotted 
    18161818        new_plot.interactive = True 
Note: See TracChangeset for help on using the changeset viewer.