iq_readout.utils.reshape_histogram_2d#
- reshape_histogram_2d(counts, xx, yy)[source]#
Flattens the output of the histogram_2d and combines the two coordinates to a single variable with shape=(nx_bins * ny_bins, 2) and counts with shape=(nx_bins * ny_bins,).
- NB: this function is used for processing the histogram
before fitting the pdfs
- Parameters:
- counts: np.array(nx_bins, ny_bins)
Counts or PDF
- xx: np.array(nx_bins, ny_bins)
Centers of the bins for the first coordinate
- yy: np.array(nx_bins, ny_bins)
Centers of the bins for the second coordinate
- Returns:
- counts: np.array(nx_bins * ny_bins)
Counts or PDF
- zz: np.array(nx_bins * ny_bins, 2)
Centers of the bins in 2D