Changeset 003fa4e in sasview


Ignore:
Timestamp:
Mar 10, 2011 11:53:16 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
3fafe15
Parents:
ae83ad3
Message:

Added dq in cir. averaging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/Plotter2D.py

    ra07e72f r003fa4e  
    1515import os 
    1616import math 
     17import numpy 
    1718import pylab 
    1819import danse.common.plottools 
     
    220221        slicerpop.Append(id,'&Print Preview', 'image preview for print') 
    221222        wx.EVT_MENU(self, id, self.onPrinterPreview) 
     223 
     224        id = wx.NewId() 
     225        slicerpop.Append(id, '&Copy to Clipboard', 'Copy to the clipboard') 
     226        wx.EVT_MENU(self, id, self.OnCopyFigureMenu) 
    222227         
    223228        # saving data 
     
    404409         
    405410        """ 
     411        # Find the best number of bins 
     412        npt = math.sqrt(len(self.data2D.data[numpy.isfinite(self.data2D.data)])) 
     413        npt = math.floor(npt) 
    406414        from DataLoader.manipulations import CircularAverage 
    407415        ## compute the maximum radius of data2D 
     
    412420        self.radius = math.sqrt(math.pow(self.qmax, 2)+ math.pow(self.ymax, 2))  
    413421        ##Compute beam width 
    414         bin_width = (self.qmax + self.qmax)/100 
     422        bin_width = (self.qmax + self.qmax)/npt 
    415423        ## Create data1D circular average of data2D 
    416424        Circle = CircularAverage(r_min=0, r_max=self.radius,  
     
    426434        else: 
    427435            dxw = None 
    428         new_plot = Data1D(x=circ.x, y=circ.y, dy=circ.dy) 
     436 
     437        new_plot = Data1D(x=circ.x, y=circ.y, dy=circ.dy, dx=circ.dx) 
    429438        new_plot.dxl = dxl 
    430439        new_plot.dxw = dxw 
Note: See TracChangeset for help on using the changeset viewer.