Changeset f0c569d in sasview


Ignore:
Timestamp:
Jan 8, 2019 4:48:15 PM (6 years ago)
Author:
butler
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249
Children:
722c425
Parents:
aa9928e
Message:

clean up dispaly of smearing value

2D smearing data was already presented in formatted form though with
only 3 sig figures. Added formatting to slit and pinhole 1D but with 5
sig figs. We should decide which looks better and make all the same.

File:
1 edited

Legend:

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

    raa9928e rf0c569d  
    16511651        #If so check for pinhole vs slit by veryfing whehter dx or dxl or dxw 
    16521652        #have data (currently sasview only supports either dx or dxl/dxw but 
    1653         #not both simultaneously) and as, for 2D, are non zero . 
     1653        #not both simultaneously) and, as for 2D, are non zero . 
    16541654        #Otherwise no smearing can be applied using smear from data (a Gaussian 
    16551655        #width of zero will cause a divide by zero error) 
     
    16601660                #report in % for display makes more sense than absolute value 
    16611661                #for pinhole smearing .. but keep old names of dq_l 
    1662                 self.dq_l = data.dx[0] / data.x[0] * 100 
    1663                 self.dq_r = data.dx[-1] / data.x[-1] * 100 
     1662                self.dq_l = format_number(data.dx[0] / data.x[0] * 100,1) 
     1663                self.dq_r = format_number(data.dx[-1] / data.x[-1] * 100,1) 
    16641664            #If not, is it valid 1D slit resolution data? 
    16651665            elif (data.dxl is not None or data.dxw is not None) \ 
     
    16681668                #for slit units of 1/A make most sense 
    16691669                if data.dxl is not None and np.all(data.dxl, 0): 
    1670                     self.dq_l = data.dxl[0] 
     1670                    self.dq_l = format_number(data.dxl[0],1) 
    16711671                if data.dxw is not None and np.all(data.dxw, 0): 
    1672                     self.dq_r = data.dxw[0] 
     1672                    self.dq_r = format_number(data.dxw[0],1) 
    16731673            #otherwise log that the data did not conatain resolution info 
    16741674            else: 
Note: See TracChangeset for help on using the changeset viewer.