rebin_2D¶
-
ompy.
rebin_2D
(double[:, :] counts, double[:] mids_in, double[:] mids_out, int axis=0)¶ Rebin a matrix of counts from binning mids_in to binning mids_out
This is a currently just a wrapper for rebin() to handle the logistics of getting a matrix as input. Todo: It is unnecessary to calculate the overlap for each bin along the axis that is not being rebinned.
- Parameters
counts – (N,M) Array of counts to rebin
mids_in – Array of mid-bins energies of input matrix along rebin axis
mids_out – Array of mid-bins energies of output matrix along rebin axis
axis – Axis to rebin
- Returns
Matrix of rebinned counts
- Return type
counts_out