Conversion of WV3 SWIR to TOA Reflectance
This page describes how to convert WorldView-3 SWIR data from DNs to exoatmospheric reflectance.
Open this script in R (special thanks to Elena Aguilar for writing this code!).
Make sure package 'caTools' is installed.
On line 25, change the path from "~/Desktop" to the directory containing your folder
On line 29, change the filename from "SWIR_Layer_Area_Sub" to your filename
Note the gains and offsets on lines 38-55, but do not change them.
On lines 58-75, change the 'absolute calibration factors' and 'bandwidths' for each band to match the information in the .XML header that came with your WorldView-3 image.
On lines 118-120, change the year, month, and day to match your WorldView-3 image.
On line 124, change the hour, minute, and second to match your WorldView-3 image.
On line 169, change the dimensions of the output image array to match your input image.
On line 171, change the pathname of the output image to your desired filename
Run the script.