Changeset bb3eb744 in sasview for src/sas/sasgui/perspectives


Ignore:
Timestamp:
Dec 21, 2016 9:31:55 AM (8 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:
b61bd57, b0bebdc
Parents:
24fd27a (diff), 505706a (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:
Jeff Krzywon <krzywon@…> (12/21/16 09:31:55)
git-committer:
GitHub <noreply@…> (12/21/16 09:31:55)
Message:

Merge pull request #28 from SasView?/ticket-811

Ticket 811

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

Legend:

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

    r06a4306 r505706a  
    10411041                        disp_model = POLYDISPERSITY_MODELS['array']() 
    10421042                        if hasattr(state, "values") and \ 
    1043                                  self.disp_cb_dict[item].GetValue() is True: 
     1043                                 self.disp_cb_dict[item].GetValue(): 
    10441044                            if len(state.values) > 0: 
    10451045                                self.values = state.values 
     
    15411541                        index_data = ((self.qmin_x <= self.data.x) & 
    15421542                                      (self.data.x <= self.qmax_x)) 
    1543                         val = self.data.x[index_data is True] 
    1544                         val = len(val) if isinstance(val, list) else 1 
    1545                         self.Npts_fit.SetValue(str(val)) 
    1546  
     1543                        val = str(len(self.data.x[index_data])) 
     1544                        self.Npts_fit.SetValue(val) 
    15471545                    else: 
    15481546                        # No data in the panel 
     
    21472145                flag = False 
    21482146            else: 
    2149                 self.Npts_fit.SetValue(str(len(index_data[index_data is True]))) 
     2147                self.Npts_fit.SetValue(str(len(index_data[index_data]))) 
    21502148                self.fitrange = True 
    21512149 
     
    21822180                flag = False 
    21832181            else: 
    2184                 val = index_data[index_data is True] 
    2185                 val = len(val) if isinstance(val, list) else 1 
    2186                 self.Npts_fit.SetValue(str(val)) 
     2182                self.Npts_fit.SetValue(str(len(index_data[index_data]))) 
    21872183                self.fitrange = True 
    21882184 
     
    26282624            Layout after self._draw_model 
    26292625        """ 
    2630         if ON_MAC is True: 
     2626        if ON_MAC: 
    26312627            time.sleep(1) 
    26322628 
  • src/sas/sasgui/perspectives/fitting/model_thread.py

    r286c757 rd3911e3  
    8282            fn.set_model(self.model) 
    8383            fn.set_index(index_model) 
    84             # Get necessary data from self.data and set the data for smearing 
    85             fn.get_data() 
    8684            # Calculate smeared Intensity 
    8785            #(by Gaussian averaging): DataLoader/smearing2d/Smearer2D() 
     
    8987        else: 
    9088            # calculation w/o smearing 
    91             value = self.model.evalDistribution(\ 
    92                 [self.data.qx_data[index_model], 
    93                  self.data.qy_data[index_model]]) 
     89            value = self.model.evalDistribution([ 
     90                self.data.qx_data[index_model], 
     91                self.data.qy_data[index_model] 
     92            ]) 
    9493        output = numpy.zeros(len(self.data.qx_data)) 
    9594        # output default is None 
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    rbf44249e r24fd27a  
    16181618                return 
    16191619        # check if it is pinhole smear and get min max if it is. 
    1620         if data.dx is not None and not numpy.any(data.dx): 
     1620        if data.dx is not None and numpy.any(data.dx): 
    16211621            self.smear_type = "Pinhole" 
    16221622            self.dq_l = data.dx[0] 
Note: See TracChangeset for help on using the changeset viewer.