myimagelib.myImageLib.xy_bin

myimagelib.myImageLib.xy_bin(xo, yo, n=100, mode='log', bins=None)

Bin x, y data on log or linear scale

Parameters
  • xo – input x

  • yo – input y

  • n – points after binning

  • mode – “lin” or “log”, scale to bin the data

  • bins – set the bins to bin data together

Returns

  • x: binned x

  • y: means in bins

11042020

Change function name to xy_bin, to incorporate the mode parameter, so that the function can do both log space binning and linear space binning.

11172020

add bins kwarg, allow user to enter custom bins.

12162021

fix divided by 0 issue.

11142022

Move from corrLib to myImageLib.