| 1 |
Adding new band filters (see also Iwave.h): |
| 2 |
|
| 3 |
Note: the spectral range is from 250 nm to 4000 nm (see Iwave.h) which is |
| 4 |
4000-250=3750nm. The step size is (4000-250)/1500=2.5 nm in the ffu.s array. |
| 5 |
|
| 6 |
o bands are defined by their discrete filter function |
| 7 |
o to compute a band position in the 1500 slots of ffu.s array, start |
| 8 |
with 250nm using 2.5nm increments. The result is the starting index |
| 9 |
for the spectral band. |
| 10 |
o 1500 is the number of wavelength spectral description slots. |
| 11 |
- a 'for' loop fills up the slots with 0 |
| 12 |
- then the ffu.s array is filled with each of the spectral band data |
| 13 |
one after the other. |
| 14 |
Example Lsat TM: (435-250) / 2.5 = 74 |
| 15 |
|
| 16 |
o run create_iwave.py and add new filter function to Iwave.cpp, before IWave::equivwl() |
| 17 |
o add else-if in IWave::parse() in Iwave.cpp |
| 18 |
o add print strings in Iwave.cpp |
| 19 |
|
| 20 |
o add satellite sensor to Iwave.h |
| 21 |
o add to GeomCond.cpp and GeomCond.h |
| 22 |
o add to i.atcorr.html |
| 23 |
|
| 24 |
|
| 25 |
Preparation of the Iwave.cpp file code: |
| 26 |
|
| 27 |
The helper script create_iwave.py can help to interpolate the filter functions |
| 28 |
to the correct step size of 2.5 nm (in case that the filter function data |
| 29 |
are delivered with a different step size). |
| 30 |
The output filter function in a format as needed in the Iwave.cpp file. |
| 31 |
|
| 32 |
The script create_iwave.py basically needs a .csv file with spectral |
| 33 |
response for each band in a column. The first column has to be the |
| 34 |
wavelength (nm). The first line (and only first) is a header with |
| 35 |
wavelength, followed by band names file name is used for sensor name. |
| 36 |
See for example ./sensors_csv/ikonos.csv. |
| 37 |
|
| 38 |
Usage |
| 39 |
create_iwave.py <csv file> |
| 40 |
|
| 41 |
It generates the filter function as an insert for IWave.cpp from the given file. |
| 42 |
|
| 43 |
Note: If the spectral response is null for a frequency, leave it empty |
| 44 |
in csv file. Ex.: |
| 45 |
|
| 46 |
WL(nm),band 1,band 2,band 3,band 4 |
| 47 |
455,0.93,,, |
| 48 |
485,0.94,0.00,, |
| 49 |
545,0.00,0.87,0.00, |
| 50 |
|
| 51 |
Program will interpolate filter function to 2.5 nm steps |
| 52 |
and output a CPP template file in the IWave format. |