Q rings, q indices, number of pixels in each q ring

This module will compute the Q values for all pixels in a shape specified by
detector_size and find the indices of the required Q rings. Count the
number of pixels in each Q ring.
Fixed the problem with - discard ever-other bin to zero and changed the values of the odd number of rings indices


On Oct 6, 2014, at 7:44 PM, Thomas A Caswell <notifications@github.com<mailto:notifications@github.com>> wrote:


In nsls2/recip.py:

> +                q_rings += step_q
> +                q_ring_val[i] = q_rings
> +            else:
> +                q_rings += delta_q
> +                q_ring_val[i] = q_rings
> +
> +        # indices of Q rings
> +        q_inds = np.digitize(q_values, np.array(q_ring_val))
> +
> +        # to discard every-other bin and set the discarded bins indices to 0
> +        for i, item in enumerate(q_inds):
> +            if (item % 2 == 0):
> +                q_inds[i] = 0
> +            else:
> +                if (item > 1):
> +                    q_inds[i] = q_inds[i] - 2


This just shifts all of your values by two, they will be all odd (as you have zeroed all of the even entries).

—
Reply to this email directly or view it on GitHub<https://github.com/Nikea/NSLS2/pull/161/files#r18493149>.