For your application, you need the Bayer data, right? It sounds like the de-Bayering (or demosaicing) process won't interfere with the data you want, so it might be simpler to just stick with minimally-processed RGB. Depends what you want the data for, of course - as someone else said, colorimetry g...