parameters: (self, q_min, q_max, pixel_size, wavelength, l2)
return_statement: return q_binning
docstring: Returns q binning based on the size of a single pixel within the range of q_min and q_max
          Size is the largest size, i.e. max(height, width)
docstring_summary: Returns q binning based on the size of a single pixel within the range of q_min and q_max
          Size is the largest size, i.e. max(height, width)
docstring_tokens: Returns q binning based on the size of a single pixel within the range of q_min and q_max Size is the largest size i . e . max ( height width )
function: def _pixel_q_binning(self, q_min, q_max, pixel_size, wavelength, l2):
          """
          Returns q binning based on the size of a single pixel within the range of q_min and q_max
          Size is the largest size, i.e. max(height, width)
          """
          bins = []
          q = 0.
          pixels = 1
          while q < q_max:
              two_theta = np.arctan(pixel_size * pixels / l2)
              q = 4 * np.pi * np.sin(two_theta / 2) / wavelength
              bins.append(q)
              pixels += 1
          q_bin_edges = np.array(bins[:-1])
          q_bin_edges = q_bin_edges[np.where(q_bin_edges > q_min)]
          q_bin_widths = np.diff(q_bin_edges)
          q_binning = np.empty(2 * q_bin_edges.size - 1)
          q_binning[0::2] = q_bin_edges
          q_binning[1::2] = q_bin_widths
          return q_binning
function_tokens: def _pixel_q_binning ( self , q_min , q_max , pixel_size , wavelength , l2 ) : bins = [ ] q = 0. pixels = 1 while q < q_max : two_theta = np . arctan ( pixel_size * pixels / l2 ) q = 4 * np . pi * np . sin ( two_theta / 2 ) / wavelength bins . append ( q ) pixels += 1 q_bin_edges = np . array ( bins [ : - 1 ] ) q_bin_edges = q_bin_edges [ np . where ( q_bin_edges > q_min ) ] q_bin_widths = np . diff ( q_bin_edges ) q_binning = np . empty ( 2 * q_bin_edges . size - 1 ) q_binning [ 0 : : 2 ] = q_bin_edges q_binning [ 1 : : 2 ] = q_bin_widths return q_binning