Opened 7 years ago

Last modified 7 years ago

#1092 new enhancement

Add fractional bin support to dataloader manipulations

Reported by: awashington Owned by: awashington
Priority: minor Milestone: SasView WishList
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

The Ring class in sas/sascalc/dataloader/manipulations.py allows for determining intensity as a function of angle on a 2D detector. The current implementation, however, doesn't account for fractional pixels. The counts are all allocated to an infinitesimal point in the center of the pixel which is either completely inside or outside the region of interest. Allowing for fractional pixels would remove aliasing from this calculation.

Change History (2)

comment:1 Changed 7 years ago by awashington

Looking over the existing code, the previous author intended to handle fractional pixels, since there is a frac variable which does correctly handle the presence of these fractional pixels. However, the variable itself is only ever set to zero or one. So all we really need to do at this point is calculate frac.

As a side note, this might also be a good time for a refactoring of this code to move more of the calculation into numpy. It's currently occuring in a giant python for loop, but there's nothing preventing it from being vectorised.

comment:2 Changed 7 years ago by awashington

  • Summary changed from Add fractional bin support to to Add fractional bin support to dataloader manipulations
Note: See TracTickets for help on using tickets.