Turn off white balance

I'm trying to measure light quality with the camera, not to capture good looking photos. How do I get raw camera sensor data, without processing such as white balance? If I lock white balance mode when setting up capture session as following, will white balance be turned off during the session?

if device.isWhiteBalanceModeSupported(.locked) {
    device.whiteBalanceMode = .locked
}
Turn off white balance
 
 
Q