Changeset 2a2af47 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Sep 18, 2009 9:36:17 AM (15 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:
aaea3714
Parents:
09fe12d
Message:

fixing smear when trying to apply smear with no model selected

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpage.py

    r2051cbe r2a2af47  
    652652                ## error occured on chisqr computation 
    653653                pass 
     654            ## set smearing value whether or not the data contain the smearing info 
     655            self.manager.set_smearer(smearer=temp_smear, qmin= float(self.qmin_x), 
     656                                     qmax= float(self.qmax_x))  
    654657            evt = ModelEventbox(model=self.model) 
    655658            wx.PostEvent(self.event_owner, evt)    
     
    902905            are compute when fitting 
    903906        """ 
     907        if self.model ==None: 
     908            msg="Need model and data to smear plot" 
     909            wx.PostEvent(self.manager.parent, StatusEvent(status=\ 
     910                            "Smear: %s"%msg)) 
     911            return 
    904912        temp_smearer = None 
    905913        if self.enable_smearer.GetValue(): 
    906             msg="" 
    907914            temp_smearer= self.smearer 
    908915            if hasattr(self.data,"dxl"): 
  • sansview/perspectives/fitting/fitting.py

    r6ced1cc r2a2af47  
    278278            @param return  
    279279        """ 
    280        
    281280        id=None 
    282          
    283281        if hasattr(item,"id"): 
    284282            id = copy.deepcopy(item.id) 
    285         
    286          
     283 
    287284        data= Data1D(x=item.x, y=item.y,dx=None, dy=None) 
    288         data.copy_from_datainfo(item)  
     285        data.copy_from_datainfo(item) 
    289286        item.clone_without_data(clone=data)     
    290287        data.dy=dy 
    291288        data.name = item.name 
    292         
    293289        ## allow to highlight data when plotted 
    294290        data.interactive = copy.deepcopy(item.interactive) 
    295291        ## when 2 data have the same id override the 1 st plotted 
    296292        data.id = id 
    297         
    298293        data.group_id = item.group_id 
    299294        return data 
Note: See TracChangeset for help on using the changeset viewer.