Adizlois/Rayleigh — pull request #3 by jgomezdans (2013-06-15 14:47:12+00:00)
Title: Wang-AtCorr all-in-one

Starting from

1. The unpacked original USGS files (TIFs with DNs),
2. The metadata filename (`*_MTL.txt` file),
3. The location height above sea level,
4. A description of the geogrpahical box of interest,

the program produces the TOA_RAD files for the region of interest, as well as the atmospherically corrected bands for the visible. The latter are all in a single 3-band file with bands 1, 2, 3 (B, G and R). Uses the Wang method, but skeleton easy to change for the other method.

Note: I get very weird results here, definitely needs testing of what's going on (in particular, check that the DN_to_rad method is working fine, as I think it might have had a bug in the past that I didn't clean for this version). Should be easy by looking at all the intermediate files.

Ex:

do_atcorr.py -H 0.5 -i data/LE72040312010347EDC00_MTL.txt \
--roi 578745.000,4650765.000,608535.000,4618935.000 -v

Takes around 3-4 minutes on my laptop, most of the time is the interpolation.