Image Subtraction Help

Good evening, I am working on image subtraction code from fits files. I was able to make the transformation to sky coordinates, but am now unsure how to 1) apply the transformation before the subtraction code, and 2) apply image brightness high low scale settings to the image as you would in ds9.
I can give more details if necessary. Thank you!


Could you provide more information please?


I have two Hubble images and made a WCS map transformation from one to the other. I need to subtract the images but am having trouble applying the transformation. It is built in a way where you input a coordinate and it returns the mapped ones. I am not sure how to then turn that into a new image to put into cv.subtract(data1, data2). In addition, I would like to set image scale high and low (brightness) parameters to they match each other as well.