Hi Juan,
Yes, Meade 'screws up' when writing their FITS data from Envisage (ALL versions) by storing the data in the FITS file 'upside down' (i.e. they start writing from the 'top row' instead of the 'bottom row' - or vice versa, I don't have my notes to hand at the moment).
This is a CRUCIAL ERROR for anyone trying to write a deBayer routine for their RAW files - as the CFA matrix no longer corresponds with the data, unless you 'massage' the data before applying the deBayer routine.
Further, I think that there is also an issue about WHERE the CFA matrix 'starts' as far as the RAW image data is concerned - obviously one might assume that the 'top left' pixel in a RAW image corresponds to the 'top left' pixel in the CFA - but my experiments tonight (after months of suspicion) are beginning to suggest that this is NOT the case. Meade have screwed up here as well (or, at least, they have made things far more difficult for an EXTERNAL deBayer routine to be applied)
Which is a shame, because Envisage cannot reprocess RAW images whilst deBayering them at the same time, and Meade's other package, ASIP, in my experience, totally screws up the FITS header when it writes out a FITS file, rendering it all but useless for any kind of serious processing.
Like I said on my other post - the 'wheel', in this case, needs to be 'reinvented'.
I just hope I can get it done in time - before everyone abandons the otherwise very good DSI-IIC imager, in favour of the (hugely more expensive) modern devices.
Cheers,