How to create synthetic RAW image?

This is how I generate the files:

[/tmp/download/raw]: rm *
[/tmp/download/raw]: convert hald:12 -depth 16 -colorspace RGB -gravity NorthWest -splice 4x4 -gravity SouthEast -splice 4x4 foo.tif
[/tmp/download/raw]: gmic foo.tif -mul 0.25 -adjust_colors 0,0,-100 -rgb2bayer 0 -o foo.tif
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input all frames of TIFF file 'foo.tif' at position 0 (1 image 1736x1736x1x3).
[gmic]-1./ Multiply image [0] by 0.25.
[gmic]-1./ Adjust colors of image [0], with brightness 0, contrast 0, gamma -100, hue shift 0, saturation 0 and value range [0,0].
[gmic]-1./ Transform image [0] to a RGB-Bayer monochrome grid, starting from pattern '0'.
[gmic]-1./ Output image [0] as tif file 'foo.tif', with pixel type 'float', no compression and bigtiff support (1 image 1736x1736x1x1).
[gmic]-1./ End G'MIC interpreter.
[/tmp/download/raw]: exiftool -DNGVersion=1.4.0.0 -PhotometricInterpretation='Linear Raw' foo.tif
    1 image files updated
[/tmp/download/raw]: mv -v foo.tif Hald_CLUT_Identity_12.dng
'foo.tif' -> 'Hald_CLUT_Identity_12.dng'

Then I open the DNG in RT.