Now I have the first two macros to AstroImageJ, AIJ ready to test.
First macro convert your Canon CR2 raw subflat files to demosaiced calibrated rggb master flats.
Second macro convert your Canon CR2 subobject files to calibrated and demosaiced rggb files.
There is no need for any bais and dark, it take information from Canon's overscan region. It give perfect temperature match because the dark/bias and object comes from the same image. I have tested on Canon EOS 350D, 5D and 6D.
It doesn't dark/bias calibrate pixel by pixel, it subtract an average value, that's mean that you have to take your object files by dithering method to get rid of static pattern.
This is my first macros for AstroImageJ so expect them to have bugs. Have backup of you files! You use it on your own risk!
The files you get as a result you handle like files from a monocrome camera with rgb filters. There are two green images, green1 and green2, you must align them not just add.
Later when I get a free time I will explain how to align and stack them in AIJ, this function are already built in AstroImageJ, as an alternative you can use your favorite astro edit program to align and stack.