We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the rebin code I have that did this previously. Want it for smoothing via coarsening the binning:
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function) import numpy as np import argparse import matplotlib.pyplot as plt def rebin2_rmc(xin, yin, minx, xdiv, maxx): xout = np.arange(minx, maxx+2.*xdiv, xdiv) yout = np.zeros_like(xout) ynorm = np.zeros_like(xout) print('Number of points ', len(xout)) for x, y in zip(xin, yin): if minx <= x and x<= maxx: idx = int((x-minx)/xdiv) scale1=1.-(x-xout[idx])/xdiv scale2=1.-scale1 yout[idx] = yout[idx] + y*scale1 yout[idx+1] = yout[idx+1] + y*scale2 ynorm[idx] = ynorm[idx] + scale1 ynorm[idx+1] = ynorm[idx+1] + scale2 yout = yout / ynorm return xout, yout
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is the rebin code I have that did this previously. Want it for smoothing via coarsening the binning:
The text was updated successfully, but these errors were encountered: