Maybe I am just not understanding something right, so ping @heckflosse or @jdc.
If I look at the overexposed area in the sky in the provided raw image of the boat, and set demosaicing to ‘None’, I readout R = 16383, G1 = 15340 (or slightly different), G2 = 15351 (or slightly different), B = 16383. I now set these levels as white levels in camconst.json. If I then reload the image and set demosaicing to ‘Mono’ I get consistent values of RGB = 1. I interpret this as a confirmation that the white levels are set properly. But when I then switch to any other demosaicing method, the readout shows that the G channel is less than 100%.
I cannot understand why, so I hope someone can enlighten me 
Hi @Thanatomanic thanks for your time…actually I Am busy but I will make new shot soon… Many thanks for now
Hi @Thanatomanic,
I made the shots …I used gofile because filebin got network error
I hope it’s the same…
Ask me whatever you need ![]()
If I’m correct… Do I have to make a camconst.json file where I have options file ??
Would it be as
/home/gabriele/.config/RawTherapee5-dev ??
I don’t know if it’s of value but if I disable Clip out-of-gamut colors and I decrease the Exposure the magenta is more evident 
To update your own camconst.json, just edit the file in the installation folder of RawTherapee. Look for the D500 and just add the D300 entry above it. I am not sure if it would work if you create your own file… Never tried 
The updated version of the camconst.json entry looks like this:
{ // Quality B, samples provided by dasafraga (pixls.us)
"make_model": "Nikon D300",
"dcraw_matrix": [ 9000, -1966, -711, -7030, 14976, 2185, -2354, 2959, 7990 ], // DNG_v13 (Neutral v4)
//"dcraw_matrix": [ 9030, -1992, -716, -8465, 16302, 2256, -2689, 3217, 8068 ], // DNG_v13 (Neutral)
"ranges": {
"white": [
{ "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600 ], "levels": [ 16383, 15292, 16383, 15317 ] }, // R, G1, B, G2 - R G typically saturate, G1 G2 differ slightly
{ "iso": [ 2000, 2500, 3200 ], "levels": [ 16383, 16323, 16383, 16347 ] }
],
"white_max": 16383,
"aperture_scaling": [ // There seems to be no aperture scaling at ISO2000+, but we cannot deal with that
{ "aperture": 2.8, "scale_factor": 1.0246 },
{ "aperture": 3.2, "scale_factor": 1.0214 },
{ "aperture": 3.5, "scale_factor": 1.0140 },
{ "aperture": 4.0, "scale_factor": 1.0106 },
{ "aperture": 4.5, "scale_factor": 1.0076 },
{ "aperture": 5.0, "scale_factor": 1.0024 }
]
}
},
I’m sorry to say that this does not solve the purple issue, and I am really out of my depth to answer the question “why?”. I expect I am missing some essential information on how these entries actually influence the processing, but currently I have no desire to dive into the code. I hope somebody else can take a look. Maybe it would be good to report this as an issue on the GitHub tracker…
To be continued, I hope.
I wonder why some camconst.json entries have only one white level, while the comment mentions different ones, for example
{ "iso": [ 100, 125, 160, 200, 250, 320, 400, 500 ], "levels": 15520 }, // typical G1,G2 15520-15800 R,B 16383
When I use the lowest WL from your entry for all channels, the purple issue goes away.
Hi,
I created a camconst.json file next my options file into .config
“camera_constants”: [
{ // Quality B, samples provided by dasafraga (pixls.us)
“make_model”: “Nikon D300”,
“dcraw_matrix”: [ 9000, -1966, -711, -7030, 14976, 2185, -2354, 2959, 7990 ], // DNG_v13 (Neutral v4)
//“dcraw_matrix”: [ 9030, -1992, -716, -8465, 16302, 2256, -2689, 3217, 8068 ], // DNG_v13 (Neutral)
“ranges”: {
“white”: [
{ “iso”: [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600 ], “levels”: [ 16383, 15292, 16383, 15317 ] }, // R, G1, B, G2 - R G typically saturate, G1 G2 differ slightly
{ “iso”: [ 2000, 2500, 3200 ], “levels”: [ 16383, 16323, 16383, 16347 ] }
],
“white_max”: 16383,
“aperture_scaling”: [ // There seems to be no aperture scaling at ISO2000+, but we cannot deal with that
{ “aperture”: 2.8, “scale_factor”: 1.0246 },
{ “aperture”: 3.2, “scale_factor”: 1.0214 },
{ “aperture”: 3.5, “scale_factor”: 1.0140 },
{ “aperture”: 4.0, “scale_factor”: 1.0106 },
{ “aperture”: 4.5, “scale_factor”: 1.0076 },
{ “aperture”: 5.0, “scale_factor”: 1.0024 }
]
}
}
]}
and it works ![]()
Hi Ingo,
as you stated a single level of 15292
{“camera_constants”: [
{ // Quality B, samples provided by dasafraga (pixls.us), intermediate aperture scaling not available
“make_model”: “Nikon D300”,
“dcraw_matrix”: [ 9000, -1966, -711, -7030, 14976, 2185, -2354, 2959, 7990 ], // DNG_v13 (Neutral v4)
//“dcraw_matrix”: [ 9030, -1992, -716, -8465, 16302, 2256, -2689, 3217, 8068 ], // DNG_v13 (Neutral)
“ranges”: {
“white”: [
{ “iso”: [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600 ], “levels”: 15292 }, // R, G1, B, G2 - R G typically saturate, G1 G2 differ slightly
{ “iso”: [ 2000, 2500, 3200 ], “levels”: [ 16383, 16323, 16383, 16347 ] }
],
“aperture_scaling”: [
{ “aperture”: 2.8, “scale_factor”: 1.025 },
{ “aperture”: 4.0, “scale_factor”: 1.011 }
]
}
}
]}
removes the pink/magenta color but when I compress highlights until to have no clipping and apply HR as Color propagation which make more clipping and I apply more highlights compression I have the artefacts.
Neutral with clipping
Highlights compression until no more clipping
Reconstruction with color propagation which gives clipping
More compression to delete clipping, but artefacts
Perhaps I want more that RT can do ?? ![]()
@dafrasaga The color propagation method has its limits, and I think you found them. There is very little color information to work with in nearly-overexposed areas, so it is also very difficult (if not impossible) to make an educated guess to the reconstruction of these colors.



