In the UI, there is a mapping option (to choose: gamma, linear or log) which can be changed and will affect the final image in the preview and the HDR I save, too.
Where is this option in the CLI? It is not --gamma – this affects the tonemapped LDR only.