Changeset 7983c731 in sasview for DataLoader


Ignore:
Timestamp:
Feb 12, 2009 3:26:06 PM (16 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:
14d3495
Parents:
ef8b580
Message:

reodered Annulus average data so that the line w/o error bar is not broken.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/manipulations.py

    racb37d9 r7983c731  
    565565            phi_bins[i] = phi_bins[i] / phi_counts[i] 
    566566            phi_err[i] = math.sqrt(phi_err[i]) / phi_counts[i] 
    567             phi_values[i] = 2.0*math.pi/self.nbins_phi*(1.0*i + 0.5) 
     567            phi_values[i] = 2.0*math.pi/self.nbins_phi*(1.0*i + 0.5)-math.pi # move the pi back to -pi <-->+pi 
    568568             
    569569        return Data1D(x=phi_values, y=phi_bins, dy=phi_err) 
     
    10151015            if run.lower()=='phi': 
    10161016                #Calculate x[i] and put back the origin of angle back to the right hand side (from the left). 
    1017                 x[i] = ((self.phi_max-self.phi_min)/self.nbins*(1.0*i + 0.5)+self.phi_min-math.pi)*180/math.pi 
     1017                x[i] = ((self.phi_max-self.phi_min)/self.nbins*(1.0*i + 0.5)+self.phi_min-2*math.pi)*180/math.pi 
    10181018                if x[i]<0: 
    10191019                    x[i]=360+x[i] 
Note: See TracChangeset for help on using the changeset viewer.