I have an image(lumin) of shape 1024X1024 and I have to divide each column of this image by an 1D array (Profile) having having shape (682,). Basically, lumin and profile are taken from a different camera and profile image is converted to 1d array by summing across all column to get an 1D profile which is used to divide the lumin image for noise correction. i.e. one pixel of profile corresponds to 1.5 pixels in lumin image
profile = constant X lumin
constant in this case is 1.5. I have tried to implement this on a simple code, but unable to transform or map profile such that one entry in profile corresponds to 1.5 entries in lumin
#example to implement above problem on an array
lumin = np.array([[20,20,20],[30,30,30],[40,40,40]])
profile = np.array([20,30])
# new_profile = transform profile such that both have same number of elements i.e. elements_profile = 1.5*elements_lumin
print ((lumin.T/new_profile).T)