Ignore:
Timestamp:
Mar 31, 2014 7:20:26 AM (10 years ago)
Author:
Jeff Krzywon <jeffery.krzywon@…>
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:
663e988
Parents:
8599f56
Message:

I modified boxSlicer to fix the issue outlined in Trac ticket #210. More details are available in the ticket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sans/guiframe/local_perspectives/plotting/boxSlicer.py

    r5777106 r8f56250  
    2727        ##connecting artist 
    2828        self.connect = self.base.connect 
     29        ## which direction is the preferred interaction direction 
     30        self.direction = None 
    2931        ## determine x y  values 
    3032        self.x = 0.5 * min(math.fabs(self.base.data2D.xmax), 
     
    142144         
    143145        """ 
     146        if self.direction == None: 
     147            self.direction = direction 
     148             
    144149        x_min = -1 * math.fabs(self.vertical_lines.x) 
    145150        x_max = math.fabs(self.vertical_lines.x) 
     
    154159                raise ValueError, msg 
    155160            self.averager = new_slab 
    156         if direction == "X": 
     161        if self.direction == "X": 
    157162            if self.fold: 
    158163                x_low = 0 
     
    160165                x_low = math.fabs(x_min) 
    161166            bin_width = (x_max + x_low)/self.nbins 
    162         else: 
     167        elif self.direction == "Y": 
    163168            if self.fold: 
    164169                y_low = 0 
     
    166171                y_low = math.fabs(y_min) 
    167172            bin_width = (y_max + y_low)/self.nbins 
     173        else: 
     174            msg = "post data:no Box Average direction was supplied" 
     175            raise ValueError, msg 
    168176        ## Average data2D given Qx or Qy 
    169177        box = self.averager(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max, 
Note: See TracChangeset for help on using the changeset viewer.