Changeset 18d0bba in sasview for invariantview


Ignore:
Timestamp:
Apr 23, 2010 8:07:49 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:
0a8759f
Parents:
901142f
Message:

make sure the data is replot correctly with change of background or scale

Location:
invariantview/perspectives/invariant
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant.py

    r2eaf74d r18d0bba  
    223223        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=self.__data.name)) 
    224224         
    225     def plot_data(self, data): 
     225    def plot_data(self, scale, background): 
    226226        """ 
    227227            replot the current data if the user enters a new scale or background 
    228228        """ 
    229         new_plot = self.copy_data(item=self.__data, dy=self.__data.dy) 
    230         new_plot.x = data.x 
    231         new_plot.y = data.y 
    232         new_plot.dx = data.dx 
    233         new_plot.dy = self.__data.dy 
     229        new_plot = scale * self.__data - background 
     230        new_plot.name = self.__data.name 
     231        new_plot.group_id = self.__data.group_id 
     232        new_plot.id = self.__data.id  
    234233        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=new_plot.name)) 
    235234         
  • invariantview/perspectives/invariant/invariant_panel.py

    r1c271f2 r18d0bba  
    407407            self.get_qstar(inv=inv) 
    408408            #if scale_changed or bkg_changed: 
    409             self._manager.plot_data(data=inv.get_data()) 
     409            self._manager.plot_data(scale=scale, background=background) 
    410410             
    411411        except: 
Note: See TracChangeset for help on using the changeset viewer.