Changeset d555416 in sasview


Ignore:
Timestamp:
Apr 4, 2013 4:16:09 PM (12 years ago)
Author:
smk78
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:
6a84c0c
Parents:
240bdc80
Message:

Fix to Ticket #101; Modified Slicer Panel for Box Sum to display total sum and number of points summed; renamed captions for values accordingly

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansdataloader/src/sans/dataloader/manipulations.py

    rf60a8c2 rd555416  
    294294        :param data2D: Data2D object 
    295295         
    296         :return: number of counts, error on number of counts 
     296        :return: number of counts, error on number of counts, 
     297            number of points summed 
    297298         
    298299        """ 
     
    303304        error = 0 if y_counts == 0 else math.sqrt(err_y) 
    304305         
    305         return counts, error 
     306        # Added y_counts to return, SMK & PDB, 04/03/2013 
     307        return counts, error, y_counts 
    306308         
    307309    def _sum(self, data2D): 
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/boxSum.py

    r8c61e14 rd555416  
    5353        self.count = 0 
    5454        self.error = 0 
     55        self.total = 0 
     56        self.totalerror = 0 
     57        self.points = 0 
    5558        ## Flag to determine if the current figure has moved 
    5659        ## set to False == no motion , set to True== motion 
     
    182185        box =  Boxavg(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max) 
    183186        self.count, self.error = box(self.base.data2D) 
     187        # Dig out number of points summed, SMK & PDB, 04/03/2013 
     188        from sans.dataloader.manipulations import Boxsum 
     189        boxtotal =  Boxsum(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max) 
     190        self.total, self.totalerror, self.points = boxtotal(self.base.data2D) 
    184191         
    185192    def moveend(self, ev): 
     
    229236        params["center_x"] = self.center.x 
    230237        params["center_y"] = self.center.y 
    231         params["count"] = self.count 
    232         params["errors"] = self.error 
     238        params["num_points"] = self.points 
     239        params["avg"] = self.count 
     240        params["avg_error"] = self.error 
     241        params["sum"] = self.total 
     242        params["sum_error"] = self.totalerror 
    233243        return params 
    234244     
     
    238248        """ 
    239249        result = {} 
    240         result["count"] = self.count 
    241         result["error"] = self.error 
     250        result["num_points"] = self.points 
     251        result["avg"] = self.count 
     252        result["avg_error"] = self.error 
     253        params["sum"] = self.total 
     254        params["sum_error"] = self.totalerror 
    242255        return result 
    243256         
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/slicerpanel.py

    r8c347a6 rd555416  
    8484            keys.sort() 
    8585            for item in keys: 
    86                 if not item.lower() in ["errors", "count"]: 
     86                if not item.lower() in ["num_points", "avg", "avg_error", "sum", 
     87                                         "sum_error"]: 
    8788                    n += 1 
    8889                    text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT) 
     
    101102                    self.bck.Add(ctl, (n-1, 1), flag=wx.TOP|wx.BOTTOM, border=0) 
    102103            for item in keys: 
    103                 if  item.lower() in ["errors", "count"]: 
     104                if  item.lower() in ["num_points", "avg", "avg_error", "sum", 
     105                                      "sum_error"]: 
    104106                    n += 1 
    105107                    text = wx.StaticText(self, -1, item + ": ",  
Note: See TracChangeset for help on using the changeset viewer.