Rebin Functions

From LIBISIS
Jump to navigation Jump to search

Rebin functions change the way in which the data is binned, but should not effect the data itself. For instance, one might rebin data from a low resolution run into wider bins.


Rebin Functions

These functions change the binning of histogram data in datasets to coincide with a given bin width and between given limits. Different sections of the data can be rebinned with different widths - this is useful if some sections of data require more detail than others.


>> wwout = rebin_x(ww, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...])
>> wwout = rebin_y(ww, [ylo1, dy1, yhi1, ylo2, dy2, yhi2, ...])
>> wwout = rebin_xy(ww, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...], [ylo1, dy1, yhi1, ylo2, dy2, yhi2, ...])
  • Input is an IXTdataset_2d object
  • Output is an IXTdataset_2d object
  • Requires dataset to contain histogram data
  • Changes x bins so that the bin size between xlo1 and xhi1 are dx1, between xlo2 and xhi2 are dx2 etc.
  • Changes y bins so that the bin size between ylo1 and yhi1 are dy1, between ylo2 and yhi2 are dy2 etc.
  • Only keeps data between the ranges of xlo and xhi
  • Re-evaluates signal data to coincide with the new bins
>> wout = rebin(w, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...])
  • Input is an IXTdataset_1d object
  • Output is an IXTdataset_1d object
  • Requires dataset to contain histogram data
  • Changes x bins so that the bin size between xlo1 and xhi1 are dx1, between xlo2 and xhi2 are dx2 etc.
  • Only keeps data between the ranges of xlo and xhi
  • Re-evaluates signal data to coincide with the new bins

Rebunch Functions

This bunches a number of bins together. For instance if there are 400 bins in the original dataset and the number of bins given is 4, then there will be 100 bins in the new dataset.

>> wwout = rebunch_x(ww, xbins)
>> wwout = rebunch_y(ww, ybins)
>> wwout = rebunch_xy(ww, xbins, ybins)
  • Input is an IXTdataset_2d object
  • Output is an IXTdataset_2d object
  • xbins number of bins in x are bunched together, ybins number of bins in y are bunched together
  • Signal and Error data is re-evaluated to coincide with the new bins
>> wout = rebunch(w, xbins)
  • Input is an IXTdataset_1d object
  • Output is an IXTdataset_1d object
  • xbins number of bins in x are bunched together
  • Signal and Error data is re-evaluated to coincide with the new bins

Regroup Functions

These functions act very similarly to the rebin functions, except new bins are always coincident with original bins. For instance if the bin widths are 10 and a new width of 28 is given, then the bin widths of the new dataset will be 30 since this is now coincident with the original bins.

>> wwout = regroup_x(ww, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...])
>> wwout = regroup_y(ww, [ylo1, dy1, yhi1, ylo2, dy2, yhi2, ...])
>> wwout = regroup_xy(ww, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...], [ylo1, dy1, yhi1, ylo2, dy2, yhi2, ...])
  • Input is an IXTdataset_2d object
  • Output is an IXTdataset_2d object
  • Requires dataset to contain histogram data
  • Changes x bins so that the minimum bin size between xlo1 and xhi1 are dx1, between xlo2 and xhi2 are dx2 etc.
  • Changes y bins so that the minimum bin size between ylo1 and yhi1 are dy1, between ylo2 and yhi2 are dy2 etc.
  • Only keeps data between the ranges of xlo and xhi
  • Re-evaluates signal data to coincide with the new bins
>> wout = regroup(w, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...])
  • Input is an IXTdataset_1d object
  • Output is an IXTdataset_1d object
  • Requires dataset to contain histogram data
  • Changes x bins so that the minimum bin size between xlo1 and xhi1 are dx1, between xlo2 and xhi2 are dx2 etc.
  • Only keeps data between the ranges of xlo and xhi
  • Re-evaluates signal data to coincide with the new bins