Changeset 951701c in sasview


Ignore:
Timestamp:
Mar 2, 2017 1:31:30 PM (7 years ago)
Author:
GitHub <noreply@…>
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:
09f2328, b61bd57
Parents:
775e0b7 (diff), 8c0d9eb (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.
git-author:
Paul Kienzle <pkienzle@…> (03/02/17 13:31:30)
git-committer:
GitHub <noreply@…> (03/02/17 13:31:30)
Message:

Merge pull request #37 from SasView?/ticket-844-part2

Smearing set properly when sent to fitting and fit plotted when model selected. Closes #844, #862.

Location:
src/sas/sasgui/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    ref2cdb3 r8c0d9eb  
    164164        On_select_data 
    165165        """ 
    166         if event is None and self.dataSource.GetCount() > 0: 
    167             data = self.dataSource.GetClientData(0) 
    168             self.set_data(data) 
    169         elif self.dataSource.GetCount() > 0: 
    170             pos = self.dataSource.GetSelection() 
     166        if self.dataSource.GetCount() > 0: 
     167            pos = self.dataSource.GetSelection() if event is not None else 0 
    171168            data = self.dataSource.GetClientData(pos) 
    172169            self.set_data(data) 
     
    256253        self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 
    257254                  id=self.dI_idata.GetId()) 
    258         self.dI_didata.SetValue(True) 
     255        self.dI_noweight.SetValue(True) 
    259256        # add 4 types of weighting to the sizer 
    260257        sizer_weighting.Add(self.dI_noweight, 0, wx.LEFT, 10) 
     
    266263        sizer_weighting.Add(self.dI_idata) 
    267264        sizer_weighting.Add((10, 10)) 
    268         self.dI_noweight.Enable(False) 
     265        self.dI_noweight.Enable(True) 
    269266        self.dI_didata.Enable(False) 
    270267        self.dI_sqrdata.Enable(False) 
     
    12711268            if copy_flag: 
    12721269                self.get_paste_params(copy_flag) 
    1273                 wx.CallAfter(self._onDraw, None) 
     1270            wx.CallAfter(self._onDraw, None) 
    12741271 
    12751272        else: 
     
    16271624        elif data.dxl is not None or data.dxw is not None: 
    16281625            self.smear_type = "Slit" 
    1629             if data.dxl is not None and not numpy.all(data.dxl, 0): 
     1626            if data.dxl is not None and numpy.all(data.dxl, 0): 
    16301627                self.dq_l = data.dxl[0] 
    1631             if data.dxw is not None and not numpy.all(data.dxw, 0): 
     1628            if data.dxw is not None and numpy.all(data.dxw, 0): 
    16321629                self.dq_r = data.dxw[0] 
    16331630        # return self.smear_type,self.dq_l,self.dq_r 
     
    20162013            self.EditMask_title.Disable() 
    20172014 
    2018         self.onSmear(event=None) 
     2015        self.on_smear_helper() 
    20192016        self.on_set_focus(None) 
    20202017        self.Refresh() 
  • src/sas/sasgui/perspectives/fitting/model_thread.py

    rc1681ea rc1c9929  
    177177            unsmeared_output = numpy.zeros((len(self.data.x))) 
    178178            unsmeared_output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 
     179            self.smearer.model = self.model 
    179180            output = self.smearer(unsmeared_output, first_bin, last_bin) 
    180181 
Note: See TracChangeset for help on using the changeset viewer.