<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Nikos,</p>
<p>Thank you very much for your assistance. Changing the file names
worked, as you suggested. I will now be able to move forward with
my image processing. <br>
</p>
<p>Thanks again...William<br>
</p>
<br>
<div class="moz-cite-prefix">On 09/09/2016 06:12 PM, Nikos
Alexandris wrote:<br>
</div>
<blockquote
cite="mid:20160910001256.GA27655@mail.nikosalexandris.net"
type="cite">
<br>
William Hudspeth:
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">I am using i.worldview.toar with the
latest version of GRASS 7.3. I was
<br>
able to successfully download and install this extension. I
have tried
<br>
using the module with the following input and error. All of
the input
<br>
files exist, and I get an error stating that "No data base
element files
<br>
found". Help appreciated...
<br>
<br>
i.worldview.toar
<br>
band=worldview2_b1_RED@worldview2,worldview2_b2_GREEN@worldview2,worldview2_b3_BLUE@worldview2,worldview2_b4_NIR@worldview2
<br>
outputsuffix=toar utc=2010-04-11T18:07:06.558405Z doy=101
sea=60.3
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
Nikos Alexandris:
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">Do you really need the 'worldview2'
prefix for your band names? It's
<br>
identical to your Mapset's name. This is what a mapset is
meant (or can
<br>
be used) for: a set of maps. In this case, it's a set of
'worldview2'
<br>
"maps".
<br>
<br>
Would you rename your bands and try again?
<br>
<br>
i.worldview.toar band=b1_RED,b2_GREEN,b3_BLUE,b4_NIR
outputsuffix=toar
<br>
utc=2010-04-11T18:07:06.558405Z doy=101 sea=60.3
<br>
</blockquote>
</blockquote>
<br>
William Hudspeth:
<br>
<blockquote type="cite">
<br>
I have given the bands simpler names, have re-run
i.worldview.toar, and
<br>
am getting the same error:
<br>
<br>
i.worldview.toar
<br>
band=b1_red@worldview2,b2_green@worldview2,b3_blue@worldview2,b4_nir@worldview2
<br>
outputsuffix=toar utc=2010-04-11T18:07:06.558405Z doy=101
sea=60.3
<br>
|! Using Day of Year to calculate Earth-Sun distance.
<br>
<br>
|! Region matching the b1_red@worldview2 spectral band
<br>
<br>
|* Processing the b1_red@worldview2 band
<br>
Traceback (most recent call last):
<br>
File
<br>
"/home/wilbur/.grass7/addons/scripts/i.worldview.toar", line
<br>
416, in <module>
<br>
sys.exit(main())
<br>
File
<br>
"/home/wilbur/.grass7/addons/scripts/i.worldview.toar", line
<br>
320, in main
<br>
acf = float(CF_BW_ESUN[band][2])
<br>
KeyError: 'b1_red'
<br>
WARNING: No data base element files found
<br>
</blockquote>
<br>
William,
<br>
<br>
apologies for the inconvenience. I now had a better look and
remember what is
<br>
what. Comments from the code itself:
<br>
<br>
"""
<br>
Factors for Conversion to Top-of-Atmosphere Spectral Radiance
<br>
(absolute radiometric calibration factors)
<br>
<br>
Structure of the dictionary:
<br>
- Key: Name of band
<br>
- Items in tupple(s):
<br>
- 1st: Absolute Calibration Factors
<br>
- 2nd: Spectral Band's Effective Bandwidth, Δλ
<br>
- 3rd: Band-Averaged Solar Spectral Irradiance
[W/sq.m./micro-m]
<br>
<br>
Retrieving values:
<br>
band = <Name of Band>
<br>
K[band][0] # for Effective Bandwidth
<br>
K[band][1] # for Esun
<br>
K[band][2] # for Absolute Conversion Factor
<br>
"""
<br>
<br>
which are stored in the following python dictionary:
<br>
<br>
CF_BW_ESUN = {
<br>
'Pan': (0.28460000, 1580.8140, 0.056783450),
<br>
'Coastal': (0.04730000, 1758.2229, 0.009295654),
<br>
'Blue': (0.05430000, 1974.2416, 0.012608250),
<br>
'Green': (0.06300000, 1856.4104, 0.009713071),
<br>
'Yellow': (0.03740000, 1738.4791, 0.005829815),
<br>
'Red': (0.05740000, 1559.4555, 0.011036230),
<br>
'RedEdge': (0.03930000, 1342.0695, 0.005188136),
<br>
'NIR1': (0.09890000, 1069.7302, 0.012243800),
<br>
'NIR2': (0.09960000, 861.2866, 0.009042234)}
<br>
<br>
<br>
The module is flexible to request for any of the bands to be
<br>
converted. Yet, it has the disatvanage that requires the very
name(s) of the
<br>
corresponding "key(s)" to access the respective calibration
factors.
<br>
<br>
In short, rename your bands to exactly 'Red', 'Green', 'Blue',
'NIR'. Maybe this can be
<br>
changed, but I wouldn't have the time at the moment for it.
<br>
<br>
If you have any changes, already, please make a pull request in
the github repository.
<br>
<br>
Nikos
<br>
<br>
Nikos
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<b>William Hudspeth, PhD, MPH</b><br>
Earth Data Analysis Center<br>
MSC01 1110<br>
1 University of New Mexico<br>
Albuquerque, New Mexico 87131-0001<br>
tel: 505-277-3622, ext. 249<br>
email: <a class="moz-txt-link-abbreviated" href="mailto:bhudspeth@edac.unm.edu">bhudspeth@edac.unm.edu</a></div>
</body>
</html>