How to create synthetic RAW image?

Thanks @Johannes_Compaan. I read the article, it is interesting but I can’t relate it to my problem.