I'm using QGIS raster calculator to convert a panchromatic image of digital numbers (DNs) to radiance. The equation I need to use goes:


The raster DN values range from 0 to 1143, but when I apply the raster calculation above the result gives an image of NaNs and statistics as follows:





Any ideas as to why this calculation fails?

1 Answer 1


I generated an aleatory raster (100x100) with values between 0 and 1143 ("test_panc@1") and, afterward, I copy/paste your expression at "Raster calculator expression" window where your "15JAN12-P2AS" name map was substituted by the mine ("test_panc@1"). After click in OK, I got a raster without any nan values; as it can see at below image. So, your expression is apparently correct but the map name should be something as "15JAN12-P2AS@1".

enter image description here

  • Thanks, I ran it with the name 15JAN12-P2AS@1 and still got the same problem. However, when using the SCP (semi-automatic classification plug-in) Band Calc with the same expression as you suggest it gives me an image that looks to be correct (ranges in values from -1.7 to 290.13). Still not sure why the standard raster calculator doesn't give the correct answer though!
    – beadyeyes
    Aug 2, 2016 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.