Rebin Functions

From LIBISIS
Revision as of 08:52, 18 March 2008 by Dean Whittaker (talk | contribs)
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.

These functions are

>> wout = rebin(w,[xlo, dx, xhi])
>> wwout = rebin_x(ww,[xlo, dx, xhi])
>> wwout = rebin_y(ww,[ylo, dy, yhi])
>> wwout = rebin_xy(ww,[xlo, dx, xhi], [ylo, dy, yhi])
>> wout = rebunch(w, nbins)
>> wwout = rebunch_x(w, nbins)
>> wwout = rebunch_y(w, nbins)
>> wwout = rebunch_xy(w, xbins, ybins)
>> wout = regroup(w, [xlo, dx, xhi])
>> wwout = regroup_x(ww, [xlo, dx, xhi])
>> wwout = regroup_y(ww, [ylo, dy, yhi])
>> wwout = regroup_xy(ww, [xlo, dx, xhi], [ylo, dy, yhi])

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.


>> rebin_x(ww, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...])
>> rebin_y(ww, [ylo1, dy1, yhi1, ylo2, dy2, yhi2, ...])
>> 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
>>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.

>> rebunch_x(ww, xbins)
>> rebunch_y(ww, ybins)
>> 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
>> 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.

>> regroup_x(ww, [xlo1, dx1, xhi1, xlo2, dx2, xhi2, ...])
>> regroup_y(ww, [ylo1, dy1, yhi1, ylo2, dy2, yhi2, ...])
>> 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
>>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