Data.make_bins¶
- Data.make_bins(xcol, bins, mode='lin', bin_start=None, bin_stop=None)¶
Generate bin boundaries and centres along an axis.
- Parameters:
datafile (Data) – Data object to work with if not being used as a bound method.
xcol (index) – Column of data with X values
bins (1d_)array or int or float) – Number of bins (int) or width of bins (if float)
mode (string) – “lin” for linear binning, “log” for logarithmic binning.
- Keyword Arguments:
- Returns:
(tuple of 4 arrays) – bin_start,bin_stop,bin_centres (1D arrays): The locations of the bin boundaries and centres for each bin.