Changeset 55bc5a7f in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Dec 19, 2016 4:40:37 AM (7 years ago)
Author:
jhbakker
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b61bd57
Parents:
e1e41de (diff), 67b0a99 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into Jurtest2

Location:
src/sas/sasgui/guiframe
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/gui_manager.py

    rc8e1996 r67b0a99  
    19501950                    item, _, _ = value 
    19511951                    item.Check(True) 
    1952             self._data_panel.on_remove(None, False) 
    19531952 
    19541953            wx.PostEvent(self, StatusEvent(status="Loading Project file...")) 
     
    19631962                # Reset to a base state 
    19641963                self._on_reset_state() 
     1964                self._data_panel.on_remove(None, False) 
    19651965                # Load the project file 
    19661966                self.load_state(path=path, is_project=True) 
     
    24562456                                                group_id=group_id, 
    24572457                                                action='remove')) 
    2458                 # remove res plot: Todo: improve 
    24592458                wx.CallAfter(self._remove_res_plot, new_plot.id) 
    24602459        self._data_manager.delete_data(data_id=data_id, 
  • src/sas/sasgui/guiframe/dataFitting.py

    r9b6d62d r1fac6c0  
    1717    """ 
    1818    """ 
    19     def __init__(self, x=None, y=None, dx=None, dy=None): 
     19    def __init__(self, x=None, y=None, dx=None, dy=None, lam=None, dlam=None, isSesans=False): 
    2020        """ 
    2121        """ 
     
    2424        if y is None: 
    2525            y = [] 
    26         PlotData1D.__init__(self, x, y, dx, dy) 
    27         LoadData1D.__init__(self, x, y, dx, dy) 
     26        self.isSesans = isSesans 
     27        PlotData1D.__init__(self, x, y, dx, dy, lam, dlam) 
     28        LoadData1D.__init__(self, x, y, dx, dy, lam, dlam, isSesans) 
    2829        self.id = None 
    2930        self.list_group_id = [] 
     
    6869        # First, check the data compatibility 
    6970        dy, dy_other = self._validity_check(other) 
    70         result = Data1D(x=[], y=[], dx=None, dy=None) 
     71        result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None) 
    7172        result.clone_without_data(length=len(self.x), clone=self) 
    7273        result.copy_from_datainfo(data1d=self) 
     
    115116        # First, check the data compatibility 
    116117        self._validity_check_union(other) 
    117         result = Data1D(x=[], y=[], dx=None, dy=None) 
     118        result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=None) 
    118119        tot_length = len(self.x) + len(other.x) 
    119120        result = self.clone_without_data(length=tot_length, clone=result) 
     121        if self.dlam == None or other.dlam is None: 
     122            result.dlam = None 
     123        else: 
     124            result.dlam = numpy.zeros(tot_length) 
    120125        if self.dy == None or other.dy is None: 
    121126            result.dy = None 
     
    141146        result.y = numpy.append(self.y, other.y) 
    142147        result.y = result.y[ind] 
     148        result.lam = numpy.append(self.lam, other.lam) 
     149        result.lam = result.lam[ind] 
     150        if result.dlam != None: 
     151            result.dlam = numpy.append(self.dlam, other.dlam) 
     152            result.dlam = result.dlam[ind] 
    143153        if result.dy != None: 
    144154            result.dy = numpy.append(self.dy, other.dy) 
     
    260270        # First, check the data compatibility 
    261271        self._validity_check_union(other) 
    262         result = Data1D(x=[], y=[], dx=None, dy=None) 
     272        result = Data1D(x=[], y=[], lam=[], dx=None, dy=None, dlam=[]) 
    263273        tot_length = len(self.x)+len(other.x) 
    264274        result.clone_without_data(length=tot_length, clone=self) 
     275        if self.dlam == None or other.dlam is None: 
     276            result.dlam = None 
     277        else: 
     278            result.dlam = numpy.zeros(tot_length) 
    265279        if self.dy == None or other.dy is None: 
    266280            result.dy = None 
     
    285299        result.y = numpy.append(self.y, other.y) 
    286300        result.y = result.y[ind] 
     301        result.lam = numpy.append(self.lam, other.lam) 
     302        result.lam = result.lam[ind] 
    287303        if result.dy != None: 
    288304            result.dy = numpy.append(self.dy, other.dy) 
  • src/sas/sasgui/guiframe/data_manager.py

    rd85c194 r1fac6c0  
    6262        if issubclass(Data2D, data.__class__): 
    6363            new_plot = Data2D(image=None, err_image=None)  
    64         else:  
    65             new_plot = Data1D(x=[], y=[], dx=None, dy=None) 
     64        elif data.meta_data['loader'] == 'SESANS': 
     65            new_plot = Data1D(x=[], y=[], dx=None, dy=None, lam=None, dlam=None, isSesans=True) 
     66        else: 
     67            new_plot = Data1D(x=[], y=[], dx=None, dy=None, lam=None, dlam=None) #SESANS check??? 
    6668            
    6769        new_plot.copy_from_datainfo(data) 
Note: See TracChangeset for help on using the changeset viewer.