1 extern "C" {
2 #include <grass/gis.h>
3 #include <grass/glocale.h>
4 }
5
6 #include "common.h"
7 #include "iwave.h"
8
9 #ifdef WIN32
10 #pragma warning(disable:4305) /* disable warning about initialization of a float by a double */
11 #endif
12
13 /* Adding new band filters:
14 * see README
15 */
16
17
18 /*
19 spectral band of meteosat
20 */
meteo()21 void IWave::meteo()
22 {
23 static const float sr[305] = {
24 .00, .00, .00, .01, .01, .01, .02,
25 .02, .02, .02, .02, .02, .03, .03,
26 .04, .04, .04, .05, .05, .05, .06,
27 .06, .07, .07, .07, .08, .08, .09,
28 .09, .10, .10, .10, .11, .11, .12,
29 .12, .12, .13, .14, .14, .15, .15,
30 .16, .16, .17, .17, .18, .18, .19,
31 .20, .20, .21, .21, .22, .23, .24,
32 .24, .25, .26, .27, .28, .28, .29,
33 .30, .30, .31, .32, .33, .34, .35,
34 .35, .36, .37, .38, .39, .40, .40,
35 .41, .42, .43, .44, .45, .46, .48,
36 .49, .50, .51, .52, .53, .55, .56,
37 .57, .58, .60, .61, .62, .63, .64,
38 .65, .65, .66, .67, .67, .68, .69,
39 .69, .70, .71, .71, .72, .73, .73,
40 .74, .76, .77, .78, .78, .79, .80,
41 .81, .82, .83, .84, .85, .86, .87,
42 .88, .89, .89, .91, .92, .93, .94,
43 .95, .96, .96, .97, .98, .98, .99,
44 .99, .99, .99, 1.00, 1.00, 1.00, 1.00,
45 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, .99,
46 .99, .99, .99, .98, .98, .98, .98,
47 .98, .97, .97, .97, .97, .97, .97,
48 .97, .96, .96, .96, .96, .96, .96,
49 .96, .96, .96, .96, .95, .95, .95,
50 .94, .93, .93, .92, .92, .91, .90,
51 .89, .89, .88, .88, .87, .86, .86,
52 .85, .85, .84, .84, .83, .82, .82,
53 .81, .80, .80, .79, .79, .78, .77,
54 .77, .76, .76, .75, .75, .74, .74,
55 .74, .73, .73, .72, .71, .70, .68,
56 .67, .65, .64, .63, .62, .61, .60,
57 .59, .58, .57, .56, .55, .54, .53,
58 .52, .51, .50, .49, .49, .48, .47,
59 .46, .45, .43, .42, .41, .40, .39,
60 .38, .37, .36, .35, .34, .33, .31,
61 .30, .29, .28, .28, .27, .25, .24,
62 .23, .22, .21, .20, .19, .18, .17,
63 .16, .15, .14, .13, .12, .11, .11,
64 .10, .09, .08, .08, .08, .07, .06,
65 .06, .05, .05, .05, .04, .04, .03,
66 .03, .02, .02, .01, .01, .01, .01,
67 .01, .00, .00, .00 };
68
69
70 ffu.wlinf=0.3499999f;
71 ffu.wlsup=1.11f;
72
73 int i;
74 for(i = 0; i < 40; i++) ffu.s[0] = 0;
75 for(i = 0; i < 305; i++) ffu.s[40+i] = sr[i];
76 for(i = 345; i < 1501; i++) ffu.s[i] = 0;
77 }
78
79
goes_east()80 void IWave::goes_east()
81 {
82 /* spectral band of goes east */
83 static const float sr[165] = {
84 .00, .00, .00, .01, .01, .03, .05,
85 .09, .13, .22, .30, .38, .46, .52,
86 .58, .63, .68, .70, .73, .75, .77,
87 .79, .81, .82, .84, .85, .86, .87,
88 .88, .89, .90, .91, .92, .93, .93,
89 .94, .95, .96, .96, .97, .98, .99,
90 .99, .99, .98, .98, .97, .97, .96,
91 .95, .95, .94, .94, .93, .93, .92,
92 .92, .91, .91, .91, .91, .91, .91,
93 .91, .91, .91, .91, .90, .89, .88,
94 .88, .86, .84, .83, .81, .79, .77,
95 .75, .73, .71, .69, .69, .68, .67,
96 .66, .65, .64, .63, .61, .60, .59,
97 .57, .56, .54, .52, .50, .49, .47,
98 .46, .44, .43, .41, .40, .38, .36,
99 .35, .33, .32, .30, .29, .28, .27,
100 .26, .25, .23, .22, .21, .20, .19,
101 .18, .17, .16, .15, .14, .13, .12,
102 .11, .10, .10, .09, .08, .08, .07,
103 .06, .06, .05, .05, .04, .04, .03,
104 .03, .03, .02, .02, .02, .02, .01,
105 .01, .01, .01, .01, .00, .00, .00,
106 .00, .00, .00, .00, .00, .00, .00,
107 .00, .00, .00, .00 };
108
109 ffu.wlinf = 0.49f;
110 ffu.wlsup = 0.8999999f;
111 int i = 0;
112 for(i = 0; i < 96; i++) ffu.s[i] = 0;
113 for(i = 0; i < 165; i++) ffu.s[96+i] = sr[i];
114 for(i = 261; i < 1501; i++) ffu.s[i] = 0;
115 }
116
goes_west()117 void IWave::goes_west()
118 {
119 /* spectral band of goes west */
120
121 static const float sr[165] = {
122 .00, .00, .00, .00, .00, .01, .02,
123 .04, .06, .12, .18, .30, .41, .51,
124 .61, .69, .77, .83, .89, .91, .93,
125 .94, .96, .96, .97, .98, .99, .99,
126 .99, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
127 .99, .99, .99, .98, .98, .97, .97,
128 .96, .96, .96, .95, .95, .95, .94,
129 .94, .93, .92, .91, .90, .89, .88,
130 .87, .86, .85, .84, .83, .82, .81,
131 .80, .80, .79, .78, .77, .76, .75,
132 .74, .73, .72, .70, .69, .67, .66,
133 .64, .63, .61, .59, .58, .56, .55,
134 .54, .52, .51, .50, .49, .48, .46,
135 .45, .44, .43, .41, .40, .38, .37,
136 .36, .34, .33, .32, .31, .29, .28,
137 .27, .26, .24, .23, .22, .21, .20,
138 .19, .18, .17, .17, .16, .15, .14,
139 .14, .13, .12, .12, .11, .10, .09,
140 .09, .08, .08, .07, .07, .07, .06,
141 .06, .05, .05, .05, .04, .04, .03,
142 .03, .03, .03, .02, .02, .02, .02,
143 .02, .01, .01, .01, .01, .01, .01,
144 .01, .00, .00, .00, .00, .00, .00,
145 .00, .00, .00, .00 };
146
147 ffu.wlinf = 0.49f;
148 ffu.wlsup = 0.8999999f;
149 int i = 0;
150 for(i = 0; i < 96; i++) ffu.s[i] = 0;
151 for(i = 0; i < 165; i++) ffu.s[96+i] = sr[i];
152 for(i = 261; i < 1501; i++) ffu.s[i] = 0;
153 }
154
avhrr(int iwa)155 void IWave::avhrr(int iwa)
156 {
157 /* 1st spectral band of avhrr (noaa 6) */
158 static const float sr1[80] = {
159 .0000, .0178, .0355, .0533, .0710, .1655, .2600, .3545,
160 .4490, .5215, .5940, .6665, .7390, .7575, .7760, .7945,
161 .8130, .8113, .8095, .8078, .8060, .8201, .8343, .8484,
162 .8625, .8766, .8908, .9049, .9190, .9291, .9393, .9494,
163 .9595, .9696, .9798, .9899, 1.000, .9996, .9992, .9989,
164 .9985, .9981, .9977, .9974, .9970, .9596, .9222, .8849,
165 .8475, .8101, .7727, .7354, .6980, .6047, .5115, .4182,
166 .3250, .2767, .2285, .1802, .1320, .1127, .0935, .0742,
167 .0550, .0480, .0410, .0340, .0270, .0235, .0200, .0165,
168 .0130, .0115, .0100, .0085, .0070, .0052, .0035, .0017
169 };
170
171 /* 2nd spectral band of avhrr (noaa 6) */
172 static const float sr2[173] = {
173
174 .0000, .0020, .0040, .0060, .0080, .0710, .1340, .1970,
175 .2600, .3492, .4385, .5277, .6170, .6678, .7185, .7693,
176 .8200, .8435, .8670, .8905, .9140, .9212, .9285, .9358,
177 .9430, .9415, .9400, .9385, .9370, .9520, .9670, .9820,
178 .9970, .9977, .9985, .9992, 1.000, .9813, .9625, .9438,
179 .9250, .9148, .9045, .8943, .8840, .8751, .8663, .8574,
180 .8485, .8396, .8307, .8219, .8130, .8100, .8070, .8040,
181 .8010, .7980, .7950, .7920, .7890, .7878, .7865, .7853,
182 .7840, .7828, .7815, .7803, .7790, .7751, .7713, .7674,
183 .7635, .7596, .7558, .7519, .7480, .7464, .7448, .7431,
184 .7415, .7399, .7383, .7366, .7350, .7225, .7100, .6975,
185 .6850, .6783, .6715, .6648, .6580, .6515, .6450, .6385,
186 .6320, .6270, .6220, .6170, .6120, .6093, .6065, .6038,
187 .6010, .5993, .5975, .5958, .5940, .5910, .5880, .5850,
188 .5820, .5720, .5620, .5520, .5420, .5243, .5065, .4887,
189 .4710, .4402, .4095, .3787, .3480, .3155, .2830, .2505,
190 .2180, .1935, .1690, .1445, .1200, .1055, .0910, .0765,
191 .0620, .0540, .0460, .0380, .0300, .0257, .0215, .0172,
192 .0130, .0112, .0095, .0077, .0060, .0053, .0045, .0038,
193 .0030, .0025, .0020, .0015, .0010, .0010, .0010, .0010,
194 .0010, .0009, .0007, .0006, .0005, .0004, .0004, .0003,
195 .0002, .0002, .0001, .0001, .0000
196 };
197
198
199 /* 1st spectral band of avhrr (noaa 7) */
200 static const float sr3[121] = {
201 .0000, .0008, .0016, .0024, .0032, .0032, .0031, .0030,
202 .0030, .0029, .0029, .0028, .0028, .0027, .0027, .0026,
203 .0025, .0031, .0036, .0042, .0047, .0288, .0529, .0769,
204 .1010, .1943, .2875, .3808, .4740, .5363, .5985, .6608,
205 .7230, .7390, .7550, .7710, .7870, .7838, .7805, .7773,
206 .7740, .7788, .7835, .7883, .7930, .8100, .8270, .8440,
207 .8610, .8958, .9305, .9653,1.0000, .9860, .9720, .9580,
208 .9440, .9435, .9430, .9425, .9420, .9442, .9465, .9487,
209 .9510, .9575, .9640, .9705, .9770, .9135, .8500, .7865,
210 .7230, .6285, .5340, .4395, .3450, .2955, .2460, .1965,
211 .1470, .1280, .1090, .0900, .0710, .0638, .0565, .0493,
212 .0420, .0383, .0345, .0307, .0270, .0245, .0220, .0195,
213 .0170, .0158, .0145, .0132, .0120, .0114, .0107, .0101,
214 .0095, .0096, .0098, .0099, .0100, .0103, .0105, .0108,
215 .0110, .0100, .0090, .0080, .0070, .0052, .0035, .0017,
216 .0000
217 };
218
219 /* 2nd spectral band of avhrr (noaa 7) */
220 static const float sr4[213] = {
221 .0000, .0018, .0035, .0053, .0070, .0068, .0065, .0063,
222 .0060, .0058, .0055, .0052, .0050, .0050, .0050, .0050,
223 .0050, .0060, .0070, .0080, .0090, .0320, .0550, .0780,
224 .1010, .1788, .2565, .3343, .4120, .4922, .5725, .6527,
225 .7330, .7765, .8200, .8635, .9070, .9218, .9365, .9513,
226 .9660, .9725, .9790, .9855, .9920, .9940, .9960, .9980,
227 1.0000, .9962,.9925, .9887, .9850, .9870, .9890, .9910,
228 .9930, .9763, .9595, .9428, .9260, .9298, .9335, .9373,
229 .9410, .9373, .9335, .9298, .9260, .9120, .8980, .8840,
230 .8700, .8700, .8700, .8700, .8700, .8703, .8705, .8708,
231 .8710, .8708, .8705, .8703, .8700, .8715, .8730, .8745,
232 .8760, .8740, .8720, .8700, .8680, .8690, .8700, .8710,
233 .8720, .8687, .8655, .8623, .8590, .8555, .8520, .8485,
234 .8450, .8428, .8405, .8383, .8360, .8328, .8295, .8263,
235 .8230, .8145, .8060, .7975, .7890, .7872, .7855, .7838,
236 .7820, .7790, .7760, .7730, .7700, .7682, .7665, .7648,
237 .7630, .7545, .7460, .7375, .7290, .6987, .6685, .6382,
238 .6080, .5623, .5165, .4707, .4250, .3812, .3375, .2937/
239 .2500, .2215, .1930, .1645, .1360, .1202, .1045, .0887,
240 .0730, .0647, .0565, .0482, .0400, .0357, .0315, .0272,
241 .0230, .0207, .0185, .0162, .0140, .0125, .0110, .0095,
242 .0080, .0075, .0070, .0065, .0060, .0055, .0050, .0045,
243 .0040, .0039, .0038, .0037, .0036, .0036, .0037, .0037,
244 .0037, .0035, .0034, .0032, .0031, .0029, .0028, .0026,
245 .0025, .0025, .0024, .0024, .0023, .0023, .0022, .0022,
246 .0021, .0021, .0021, .0020, .0020, .0019, .0019, .0018,
247 .0018, .0013, .0009, .0004, .0000
248 };
249
250 /* 1st spectral band of avhrr (noaa 8) */
251 static const float sr5[189] = {
252 .0000, .0012, .0024, .0036, .0048, .0223, .0399, .0574,
253 .0749, .1633, .2517, .3400, .4284, .4937, .5590, .6243,
254 .6896, .7135, .7375, .7614, .7853, .7833, .7813, .7793,
255 .7773, .7774, .7775, .7776, .7777, .7922, .8067, .8211,
256 .8356, .8566, .8777, .8987, .9197, .9332, .9468, .9603,
257 .9739, .9674, .9609, .9545, .9480, .9507, .9534, .9561,
258 .9588, .9691, .9794, .9897,1.0000, .9692, .9385, .9077,
259 .8770, .7775, .6779, .5784, .4789, .4108, .3428, .2747,
260 .2067, .1782, .1497, .1213, .0928, .0820, .0712, .0604,
261 .0496, .0425, .0355, .0284, .0214, .0208, .0202, .0196,
262 .0190, .0167, .0145, .0122, .0100, .0095, .0090, .0085,
263 .0080, .0083, .0086, .0089, .0092, .0094, .0097, .0100,
264 .0103, .0100, .0096, .0093, .0090, .0086, .0083, .0079,
265 .0076, .0082, .0087, .0093, .0099, .0104, .0110, .0115,
266 .0121, .0114, .0108, .0101, .0094, .0088, .0081, .0075,
267 .0068, .0074, .0079, .0085, .0091, .0097, .0102, .0108,
268 .0114, .0115, .0115, .0116, .0117, .0118, .0119, .0119,
269 .0120, .0136, .0152, .0167, .0183, .0204, .0224, .0245,
270 .0265, .0295, .0324, .0354, .0384, .0419, .0453, .0488,
271 .0522, .0514, .0507, .0499, .0491, .0467, .0443, .0420,
272 .0396, .0348, .0299, .0251, .0203, .0183, .0164, .0144,
273 .0125, .0118, .0110, .0103, .0095, .0083, .0071, .0060,
274 .0048, .0041, .0035, .0028, .0022, .0022, .0021, .0021,
275 .0021, .0016, .0010, .0005, .0000
276 };
277
278
279 /* 2nd spectral band of avhrr (noaa 8) */
280 static const float sr6[177] = {
281 .0000, .0095, .0190, .0285, .0381, .0476, .0571, .0666,
282 .0761, .1559, .2358, .3156, .3954, .4855, .5756, .6658,
283 .7559, .7966, .8373, .8779, .9186, .9332, .9478, .9624,
284 .9770, .9814, .9858, .9902, .9946, .9959, .9973, .9986,
285 1.0000, .9965, .9930, .9896, .9861, .9796, .9731, .9666,
286 .9601, .9518, .9435, .9351, .9268, .9171, .9073, .8976,
287 .8879, .8791, .8703, .8615, .8527, .8439, .8351, .8263,
288 .8175, .8140, .8104, .8068, .8033, .7997, .7962, .7926,
289 .7891, .7871, .7850, .7830, .7810, .7790, .7769, .7749,
290 .7729, .7711, .7694, .7677, .7659, .7642, .7624, .7607,
291 .7589, .7558, .7528, .7497, .7466, .7436, .7405, .7375,
292 .7344, .7282, .7220, .7158, .7096, .7034, .6972, .6910,
293 .6848, .6781, .6713, .6646, .6579, .6511, .6444, .6376,
294 .6309, .6265, .6221, .6177, .6133, .6088, .6044, .6000,
295 .5956, .5888, .5820, .5752, .5684, .5616, .5548, .5480,
296 .5412, .5159, .4906, .4653, .4400, .4147, .3894, .3641,
297 .3388, .3061, .2734, .2408, .2081, .1851, .1621, .1392,
298 .1162, .1023, .0884, .0745, .0606, .0532, .0458, .0384/
299 .0310, .0271, .0231, .0192, .0153, .0134, .0115, .0096,
300 .0077, .0071, .0065, .0059, .0053, .0046, .0040, .0034,
301 .0028, .0026, .0024, .0023, .0021, .0019, .0017, .0016,
302 .0014, .0012, .0010, .0009, .0007, .0005, .0003, .0002,
303 .0000
304 };
305
306 /* 1st spectral band of avhrr (noaa 9) */
307 static const float sr7[113] = {
308 .0000, .0001, .0003, .0004, .0006, .0040, .0074, .0108,
309 .0142, .0622, .1101, .1581, .2060, .2810, .3561, .4311,
310 .5061, .5500, .5940, .6379, .6818, .7127, .7437, .7746,
311 .8055, .8122, .8190, .8170, .8150, .8063, .7975, .7887,
312 .7800, .7881, .7962, .8044, .8125, .8335, .8544, .8753,
313 .8963, .9000, .9037, .9074, .9111, .8899, .8688, .8476,
314 .8265, .8198, .8130, .8110, .8090, .8277, .8464, .8650,
315 .8837, .9128, .9419, .9709,1.0000, .9678, .9356, .9035,
316 .8713, .7712, .6711, .5711, .4710, .4067, .3424, .2782,
317 .2139, .1849, .1559, .1269, .0979, .0861, .0743, .0625,
318 .0507, .0454, .0400, .0347, .0294, .0266, .0238, .0210,
319 .0182, .0170, .0157, .0145, .0133, .0124, .0115, .0107,
320 .0098, .0092, .0086, .0080, .0074, .0071, .0069, .0066,
321 .0063, .0062, .0061, .0061, .0060, .0045, .0030, .0015,
322 .0000
323 };
324
325 /* 2nd spectral band of avhrr (noaa 9) */
326 static const float sr8[197] = {
327 .0000, .0011, .0022, .0033, .0044, .0207, .0369, .0532,
328 .0694, .1410, .2127, .2843, .3559, .4388, .5217, .6047,
329 .6876, .7304, .7731, .8159, .8586, .8782, .8977, .9173,
330 .9369, .9491, .9614, .9736, .9859, .9894, .9930, .9965,
331 1.0000, .9956, .9912, .9869, .9825, .9699, .9574, .9448,
332 .9323, .9243, .9163, .9083, .9003, .8971, .8939, .8907,
333 .8875, .8881, .8887, .8893, .8899, .8931, .8963, .8994,
334 .9026, .9046, .9067, .9087, .9108, .9114, .9120, .9126,
335 .9132, .9065, .8997, .8930, .8863, .8807, .8750, .8694,
336 .8638, .8605, .8571, .8538, .8504, .8532, .8560, .8588,
337 .8616, .8644, .8672, .8701, .8729, .8749, .8770, .8790,
338 .8811, .8766, .8721, .8677, .8632, .8502, .8372, .8242,
339 .8112, .7959, .7806, .7653, .7500, .7423, .7347, .7270,
340 .7193, .7166, .7138, .7111, .7084, .7169, .7255, .7340,
341 .7425, .7382, .7338, .7295, .7251, .6819, .6387, .5955,
342 .5523, .4922, .4321, .3721, .3120, .2722, .2325, .1927,
343 .1529, .1336, .1144, .0951, .0759, .0673, .0586, .0500,
344 .0414, .0370, .0327, .0283, .0240, .0217, .0195, .0172,
345 .0150, .0139, .0128, .0118, .0107, .0099, .0090, .0082,
346 .0074, .0070, .0066, .0061, .0057, .0054, .0051, .0049,
347 .0046, .0044, .0042, .0041, .0039, .0037, .0036, .0034,
348 .0033, .0032, .0031, .0030, .0029, .0028, .0027, .0026,
349 .0025, .0025, .0025, .0024, .0024, .0023, .0022, .0021,
350 .0020, .0019, .0018, .0018, .0017, .0016, .0015, .0015,
351 .0014, .0010, .0007, .0003, .0000
352 };
353
354 /* 1st spectral band of avhrr (noaa 10) */
355 static const float sr9[101] = {
356 .0000, .0005, .0010, .0015, .0020, .0023, .0025, .0028,
357 .0030, .0239, .0448, .0657, .0866, .1852, .2838, .3824,
358 .4810, .5470, .6130, .6790, .7450, .7640, .7830, .8020,
359 .8210, .8182, .8154, .8126, .8098, .8219, .8339, .8460,
360 .8580, .8808, .9035, .9263, .9490, .9607, .9723, .9840,
361 .9956, .9875, .9793, .9712, .9630, .9595, .9560, .9525,
362 .9490, .9618, .9745, .9872,1.0000, .9980, .9960, .9940,
363 .9920, .9013, .8105, .7197, .6290, .5400, .4510, .3620,
364 .2730, .2315, .1900, .1485, .1070, .0935, .0800, .0665,
365 .0530, .0468, .0405, .0343, .0280, .0255, .0230, .0205,
366 .0180, .0165, .0150, .0135, .0120, .0110, .0100, .0090,
367 .0080, .0070, .0061, .0051, .0042, .0034, .0026, .0018,
368 .0010, .0007, .0005, .0002, .0000
369 };
370
371 /* 2nd spectral band of avhrr (noaa 10) */
372 static const float sr10[237] = {
373 .0000, .0006, .0012, .0018, .0024, .0030, .0036, .0042,
374 .0048, .0049, .0049, .0050, .0051, .0051, .0052, .0052,
375 .0053, .0053, .0054, .0054, .0055, .0055, .0056, .0056,
376 .0057, .0054, .0050, .0047, .0044, .0041, .0037, .0034,
377 .0031, .0031, .0032, .0032, .0033, .0033, .0033, .0034,
378 .0034, .0239, .0445, .0650, .0855, .1561, .2267, .2974,
379 .3680, .4508, .5335, .6163, .6990, .7430, .7870, .8310,
380 .8750, .8918, .9085, .9253, .9420, .9510, .9600, .9690,
381 .9780, .9835, .9890, .9945,1.0000, .9933, .9866, .9800,
382 .9733, .9661, .9589, .9517, .9445, .9329, .9213, .9096,
383 .8980, .8935, .8890, .8845, .8800, .8788, .8775, .8763,
384 .8750, .8658, .8565, .8473, .8380, .8415, .8450, .8485,
385 .8520, .8508, .8495, .8483, .8470, .8410, .8350, .8290,
386 .8230, .8148, .8065, .7983, .7900, .7983, .8065, .8148,
387 .8230, .8190, .8150, .8110, .8070, .7990, .7910, .7830,
388 .7750, .7712, .7675, .7637, .7600, .7425, .7250, .7075,
389 .6900, .6855, .6810, .6765, .6720, .6710, .6700, .6690,
390 .6680, .6655, .6630, .6605, .6580, .6455, .6330, .6205,
391 .6080, .5993, .5905, .5818, .5730, .5602, .5475, .5347,
392 .5220, .4872, .4525, .4177, .3830, .3435, .3040, .2645,
393 .2250, .2015, .1780, .1545, .1310, .1155, .1000, .0845,
394 .0690, .0613, .0535, .0457, .0380, .0337, .0295, .0252,
395 .0210, .0189, .0168, .0147, .0126, .0114, .0102, .0091,
396 .0079, .0073, .0067, .0060, .0054, .0051, .0047, .0044,
397 .0041, .0040, .0038, .0037, .0036, .0035, .0034, .0033,
398 .0032, .0031, .0030, .0030, .0029, .0028, .0027, .0027,
399 .0026, .0026, .0025, .0025, .0024, .0023, .0022, .0022,
400 .0021, .0020, .0019, .0018, .0017, .0016, .0016, .0015,
401 .0015, .0015, .0014, .0014, .0014, .0014, .0014, .0015,
402 .0015, .0011, .0008, .0004, .0000
403 };
404
405 /* 1st spectral band of avhrr (noaa 11) */
406 static const float sr11[113] = {
407 .0000, .0033, .0065, .0098, .0130, .0500, .0870, .1240,
408 .1610, .2385, .3160, .3935, .4710, .5150, .5590, .6030,
409 .6470, .6768, .7065, .7363, .7660, .7745, .7830, .7915,
410 .8000, .7918, .7835, .7753, .7670, .7747, .7825, .7903,
411 .7980, .8215, .8450, .8685, .8920, .8907, .8895, .8882,
412 .8870, .8702, .8535, .8367, .8200, .8110, .8020, .7930,
413 .7840, .8050, .8260, .8470, .8680, .9010, .9340, .9670,
414 1.0000, .9562, .9125, .8687, .8250, .7192, .6135, .5077,
415 .4020, .3467, .2915, .2362, .1810, .1568, .1325, .1083,
416 .0840, .0735, .0630, .0525, .0420, .0380, .0340, .0300,
417 .0260, .0242, .0225, .0207, .0190, .0180, .0170, .0160,
418 .0150, .0137, .0125, .0112, .0100, .0087, .0075, .0062,
419 .0050, .0052, .0055, .0057, .0060, .0060, .0060, .0060,
420 .0060, .0060, .0060, .0060, .0060, .0045, .0030, .0015,
421 .0000
422 };
423
424 /* 2nd spectral band of avhrr (noaa 11) */
425 static const float sr12[209] = {
426 .0000, .0005, .0010, .0015, .0020, .0025, .0030, .0035,
427 .0040, .0039, .0037, .0036, .0035, .0034, .0032, .0031,
428 .0030, .0029, .0028, .0026, .0025, .0024, .0023, .0021,
429 .0020, .0020, .0020, .0020, .0020, .0020, .0020, .0020,
430 .0020, .0028, .0035, .0043, .0050, .0173, .0295, .0418,
431 .0540, .1150, .1760, .2370, .2980, .3822, .4665, .5507,
432 .6350, .6865, .7380, .7895, .8410, .8623, .8835, .9048,
433 .9260, .9415, .9570, .9725, .9880, .9910, .9940, .9970,
434 1.0000, .9925, .9850, .9775, .9700, .9600, .9500, .9400,
435 .9300, .9193, .9085, .8978, .8870, .8770, .8670, .8570,
436 .8470, .8478, .8485, .8493, .8500, .8518, .8535, .8553,
437 .8570, .8602, .8635, .8668, .8700, .8673, .8645, .8618,
438 .8590, .8505, .8420, .8335, .8250, .8183, .8115, .8047,
439 .7980, .7983, .7985, .7988, .7990, .7935, .7880, .7825,
440 .7770, .7835, .7900, .7965, .8030, .8075, .8120, .8165,
441 .8210, .8108, .8005, .7903, .7800, .7767, .7735, .7703,
442 .7670, .7473, .7275, .7077, .6880, .6755, .6630, .6505,
443 .6380, .6350, .6320, .6290, .6260, .6345, .6430, .6515/
444 .6600, .6695, .6790, .6885, .6980, .6790, .6600, .6410,
445 .6220, .5645, .5070, .4495, .3920, .3420, .2920, .2420,
446 .1920, .1667, .1415, .1162, .0910, .0795, .0680, .0565,
447 .0450, .0411, .0372, .0334, .0295, .0256, .0217, .0179,
448 .0140, .0129, .0117, .0106, .0095, .0084, .0072, .0061,
449 .0050, .0048, .0045, .0043, .0040, .0038, .0035, .0033,
450 .0030, .0029, .0027, .0026, .0025, .0024, .0022, .0021,
451 .0020, .0017, .0015, .0012, .0010, .0007, .0005, .0002,
452 .0000
453 };
454
455 /* 1st spectral band of avhrr (noaa 12) */
456 static const float sr13[201] = {
457 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
458 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
459 .0000, .0000, .0000, .0000, .0000, .0048, .0135, .0200,
460 .0270, .1046, .2094, .3253, .4360, .5286, .6030, .6621,
461 .7090, .7464, .7753, .7966, .8110, .8196, .8249, .8301,
462
463 .8380, .8507, .8668, .8837, .8990, .9109, .9198, .9265,
464 .9320, .9371, .9419, .9466, .9510, .9552, .9587, .9612,
465 .9620, .9610, .9593, .9582, .9590, .9625, .9673, .9715,
466 .9730, .9707, .9666, .9635, .9640, .9701, .9799, .9908,
467 1.0000, .9805, .9590, .9407, .9180, .8357, .7325, .6205,
468 .5120, .4170, .3365, .2692, .2140, .1695, .1343, .1066,
469 .0850, .0679, .0546, .0442, .0360, .0294, .0240, .0196,
470 .0160, .0130, .0105, .0089, .0080, .0080, .0083, .0085,
471 .0080, .0064, .0041, .0018, .0000, .0000, .0000, .0000,
472 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
473 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
474 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
475 .0000, .0024, .0056, .0087, .0110, .0118, .0117, .0112,
476 .0110, .0117, .0130, .0145, .0160, .0171, .0178, .0184,
477 .0190, .0197, .0205, .0213, .0220, .0226, .0229, .0228,
478 .0220, .0205, .0187, .0170, .0160, .0159, .0160, .0157,
479 .0140, .0106, .0063, .0023, .0000, .0001, .0018, .0038,
480 .0050, .0044, .0027, .0009, .0000, .0006, .0023, .0040,
481 .0050, .0046, .0032, .0015, .0000, .0000, .0000, .0000,
482 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
483 .0000
484 };
485
486 /* 2nd spectral band of avhrr (noaa 12) */
487 static const float sr14[189] = {
488 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
489 .0000, .0050, .0111, .0162, .0180, .0153, .0097, .0038,
490 .0000, .0005, .0060, .0168, .0330, .0555, .0869, .1303,
491 .1890, .2643, .3509, .4418, .5300, .6096, .6796, .7403,
492 .7920, .8350, .8702, .8988, .9220, .9408, .9559, .9680,
493 .9780, .9863, .9929, .9975,1.0000, .0115, .9987, .9958,
494 .9920, .9876, .9821, .9748, .9650, .9522, .9370, .9203,
495 .9030, .8858, .8694, .8543, .8410, .8299, .8207, .8129,
496 .8060, .7997, .7943, .7902, .7880, .7879, .7893, .7916,
497 .7940, .7959, .7971, .7972, .7960, .7935, .7900, .7860,
498 .7820, .7783, .7747, .7704, .7650, .7582, .7506, .7433,
499 .7370, .7326, .7299, .7288, .7290, .7303, .7323, .7350,
500 .7380, .7411, .7441, .7468, .7490, .7504, .7510, .7505,
501 .7490, .7463, .7421, .7365, .7290, .7197, .7086, .6960,
502 .6820, .6670, .6518, .6371, .6240, .6131, .6043, .5973,
503 .5920, .5881, .5857, .5849, .5860, .5889, .5929, .5969,
504 .6000, .6011, .5986, .5905, .5750, .5508, .5186, .4792,
505 .4340, .3842, .3326, .2822, .2360, .1964, .1633, .1357,
506 .1130, .0943, .0789, .0664, .0560, .0473, .0400, .0339,
507 .0290, .0250, .0217, .0191, .0170, .0152, .0137, .0123,
508 .0110, .0098, .0086, .0077, .0070, .0066, .0063, .0059,
509 .0050, .0035, .0019, .0005, .0000, .0006, .0019, .0033,
510 .0040, .0036, .0025, .0011, .0000, .0000, .0000, .0000,
511 .0000, .0000, .0000, .0000, .0000
512 };
513
514 /* 1st spectral band of avhrr (noaa 14) -from NOAA/POD Guide */
515 static const float sr15[241] = {
516 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
517 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
518 .0000, .0003, .0007, .0010, .0013, .0152, .0290, .0429,
519 .0568, .1226, .1884, .2543, .3201, .3727, .4254, .4780,
520 .5306, .5528, .5749, .5971, .6193, .6267, .6342, .6417,
521 .6492, .6538, .6583, .6629, .6675, .6734, .6793, .6853,
522 .6912, .6948, .6984, .7020, .7056, .7106, .7156, .7206,
523 .7256, .7243, .7229, .7216, .7203, .7188, .7174, .7159,
524 .7145, .7130, .7116, .7102, .7088, .7154, .7221, .7287,
525 .7353, .7292, .7232, .7172, .7111, .6501, .5891, .5281,
526 .4671, .4037, .3402, .2768, .2133, .1830, .1527, .1223,
527 .0920, .0797, .0675, .0553, .0431, .0406, .0381, .0357,
528 .0332, .0279, .0226, .0173, .0120, .0117, .0114, .0110,
529 .0107, .0100, .0093, .0086, .0080, .0076, .0072, .0069,
530 .0065, .0062, .0059, .0055, .0052, .0051, .0050, .0048,
531 .0047, .0048, .0049, .0050, .0051, .0051, .0050, .0050,
532 .0050, .0050, .0051, .0052, .0052, .0053, .0054, .0054,
533 .0055, .0057, .0059, .0061, .0063, .0068, .0072, .0076,
534 .0080, .0084, .0088, .0092, .0096, .0100, .0104, .0108,
535 .0113, .0116, .0119, .0122, .0125, .0127, .0128, .0130,
536 .0132, .0130, .0128, .0126, .0123, .0120, .0116, .0112,
537 .0108, .0104, .0099, .0095, .0090, .0086, .0082, .0078,
538 .0074, .0072, .0070, .0067, .0065, .0063, .0060, .0058,
539 .0055, .0053, .0050, .0048, .0046, .0044, .0042, .0040,
540 .0038, .0036, .0034, .0032, .0030, .0028, .0027, .0025,
541 .0023, .0022, .0022, .0021, .0020, .0019, .0018, .0017,
542 .0016, .0016, .0015, .0014, .0014, .0013, .0012, .0012,
543 .0011, .0011, .0011, .0011, .0011, .0011, .0011, .0011,
544 .0011, .0011, .0011, .0011, .0011, .0011, .0011, .0010,
545 .0010, .0010, .0010, .0010, .0010, .0010, .0010, .0010,
546 .0010
547 };
548
549 /* 2nd spectral band of avhrr (noaa 14) */
550 static const float sr16[176] = {
551 .0000,.0000,.0000,.0000,.0000,.0000,.0022,.0045,
552 .0067,.0090,.0107,.0125,.0143,.0160,.0543,.0925,
553 .1308,.1690,.2573,.3455,.4338,.5220,.5978,.6735,
554 .7492,.8250,.8503,.8755,.9007,.9260,.9362,.9465,
555 .9568,.9670,.9737,.9805,.9872,.9940,.9935,.9930,
556 .9925,.9920,.9940,.9960,.9980,1.000,.9885,.9770,
557 .9655,.9540,.9398,.9255,.9112,.8970,.8855,.8740,
558 .8625,.8510,.8400,.8290,.8180,.8070,.8052,.8035,
559 .8018,.8000,.8065,.8130,.8195,.8260,.8257,.8255,
560 .8253,.8250,.8245,.8240,.8235,.8230,.8230,.8230,
561 .8230,.8230,.8210,.8190,.8170,.8150,.8147,.8145,
562 .8142,.8140,.8183,.8225,.8267,.8310,.8367,.8425,
563 .8482,.8540,.8547,.8555,.8562,.8570,.8510,.8450,
564 .8390,.8330,.8170,.8010,.7850,.7690,.7587,.7485,
565 .7383,.7280,.7203,.7125,.7048,.6970,.6957,.6945,
566 .6932,.6920,.6970,.7020,.7070,.7120,.7035,.6950,
567 .6865,.6780,.6370,.5960,.5550,.5140,.4560,.3980,
568 .3400,.2820,.2458,.2095,.1732,.1370,.1190,.1010,
569 .0830,.0650,.0560,.0470,.0380,.0290,.0250,.0210,
570 .0170,.0130,.0095,.0060,.0050,.0040,.0020,.0000,
571 .0010,.0020,.0018,.0015,.0012,.0010,.0010,.0010,
572 .0010,.0010,.0008,.0005,.0003,.0000,.0000,.0000
573 };
574
575 static const float wli[16] = { 0.55, 0.69, 0.5, 0.64, 0.54, 0.68, 0.53, 0.68, 0.53, 0.60, 0.54, 0.60, 0.50, 0.65, 0.50, 0.68 };
576 static const float wls[16] = { 0.75, 1.12, 0.8, 1.17, 1.01, 1.12, 0.81, 1.17, 0.78, 1.19, 0.82, 1.12, 1.00, 1.12, 1.11, 1.10 };
577
578 ffu.wlinf = (float)wli[iwa-1];
579 ffu.wlsup = (float)wls[iwa-1];
580
581 int i;
582 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
583
584 switch(iwa)
585 {
586 case 1: for(i = 0; i < 80; i++) ffu.s[120+i] = sr1[i];
587 break;
588 case 2: for(i = 0; i < 173; i++) ffu.s[176+i] = sr2[i];
589 break;
590 case 3: for(i = 0; i < 121; i++) ffu.s[100+i] = sr3[i];
591 break;
592 case 4: for(i = 0; i < 213; i++) ffu.s[156+i] = sr4[i];
593 break;
594 case 5: for(i = 0; i < 189; i++) ffu.s[116+i] = sr5[i];
595 break;
596 case 6: for(i = 0; i < 177; i++) ffu.s[172+i] = sr6[i];
597 break;
598 case 7: for(i = 0; i < 113; i++) ffu.s[112+i] = sr7[i];
599 break;
600 case 8: for(i = 0; i < 197; i++) ffu.s[172+i] = sr8[i];
601 break;
602 case 9: for(i = 0; i < 101; i++) ffu.s[112+i] = sr9[i];
603 break;
604 case 10: for(i = 0; i < 237; i++) ffu.s[140+i] = sr10[i];
605 break;
606 case 11: for(i = 0; i < 113; i++) ffu.s[116+i] = sr11[i];
607 break;
608 case 12: for(i = 0; i < 209; i++) ffu.s[140+i] = sr12[i];
609 break;
610 case 13: for(i = 0; i < 201; i++) ffu.s[100+i] = sr13[i];
611 break;
612 case 14: for(i = 0; i < 189; i++) ffu.s[160+i] = sr14[i];
613 break;
614 case 15: for(i = 0; i < 241; i++) ffu.s[100+i] = sr15[i];
615 break;
616 case 16: for(i = 0; i < 176; i++) ffu.s[168+i] = sr16[i];
617 }
618 }
619
hrv(int iwa)620 void IWave::hrv(int iwa)
621 {
622
623 /* 1st spectral band of hrv1 */
624 static const float sr1[73] = {
625 .0010, .0023, .0035, .0048, .0060, .0492, .0925, .1357,
626 .1790, .2598, .3405, .4213, .5020, .5575, .6130, .6685,
627 .7240, .7588, .7935, .8283, .8630, .8900, .9170, .9440,
628 .9710, .9782, .9855, .9927,1.0000, .9875, .9750, .9625,
629 .9500, .9255, .9010, .8765, .8520, .8225, .7930, .7635,
630 .7340, .7105, .6870, .6635, .6400, .5945, .5490, .5035,
631 .4580, .3985, .3390, .2795, .2200, .1787, .1375, .0962,
632 .0550, .0437, .0325, .0212, .0100, .0085, .0070, .0055,
633 .0040, .0035, .0030, .0025, .0020, .0015, .0010, .0005,
634 .0000
635 };
636
637 /* 2nd spectral band of hrv1 */
638 static const float sr2[49] = {
639 .0190, .0845, .1500, .2155, .2810, .3870, .4930, .5990,
640 .7050, .7663, .8275, .8888, .9500, .9557, .9615, .9672,
641 .9730, .9797, .9865, .9933,1.0000, .8445, .6890, .5335,
642 .3780, .3152, .2525, .1897, .1270, .1067, .0865, .0662,
643 .0460, .0395, .0330, .0265, .0200, .0172, .0145, .0117,
644 .0090, .0080, .0070, .0060, .0050, .0045, .0040, .0035,
645 .0030
646 };
647
648 /* 3rd spectral band of hrv1 */
649 static const float sr3[81] = {
650 .0010, .0033, .0055, .0078, .0100, .0238, .0375, .0513,
651 .0650, .0953, .1255, .1558, .1860, .2470, .3080, .3690,
652 .4300, .4918, .5535, .6153, .6770, .7222, .7675, .8127,
653 .8580, .8825, .9070, .9315, .9560, .9670, .9780, .9890,
654 1.0000, .9915, .9830, .9745, .9660, .9557, .9455, .9352,
655 .9250, .9112, .8975, .8837, .8700, .8777, .8855, .8932,
656 .9010, .8342, .7675, .7007, .6340, .5600, .4860, .4120,
657 .3380, .2875, .2370, .1865, .1360, .1130, .0900, .0670,
658 .0440, .0360, .0280, .0200, .0120, .0108, .0095, .0083,
659 .0070, .0067, .0065, .0062, .0060, .0047, .0035, .0022,
660 .0010
661 };
662
663 /* panchromatic band of hrv1 */
664 static const float sr4[129] = {
665 .0000, .0013, .0025, .0038, .0050, .0322, .0595, .0867,
666 .1140, .1723, .2305, .2888, .3470, .3748, .4025, .4303,
667 .4580, .4750, .4920, .5090, .5260, .5538, .5815, .6093,
668 .6370, .6575, .6780, .6985, .7190, .7228, .7265, .7303,
669 .7340, .7370, .7400, .7430, .7460, .7595, .7730, .7865,
670 .8000, .8163, .8325, .8488, .8650, .8767, .8885, .9003,
671 .9120, .9137, .9155, .9172, .9190, .9245, .9300, .9355,
672 .9410, .9387, .9365, .9342, .9320, .9373, .9425, .9478,
673 .9530, .9575, .9620, .9665, .9710, .9783, .9855, .9928,
674 1.0000, .9898, .9795, .9693, .9590, .9450, .9310, .9170,
675 .9030, .8780, .8530, .8280, .8030, .7770, .7510, .7250,
676 .6990, .6820, .6650, .6480, .6310, .6235, .6160, .6085,
677 .6010, .5535, .5060, .4585, .4110, .3620, .3130, .2640,
678 .2150, .1825, .1500, .1175, .0850, .0720, .0590, .0460,
679 .0330, .0282, .0235, .0187, .0140, .0120, .0100, .0080,
680 .0060, .0055, .0050, .0045, .0040, .0035, .0030, .0025,
681 .0020
682 };
683
684 /* 1st spectral band of hrv2 */
685 static const float sr5[73] = {
686 .0010, .0015, .0020, .0025, .0030, .0040, .0050, .0060,
687 .0070, .0850, .1630, .2410, .3190, .3918, .4645, .5373,
688 .6100, .6500, .6900, .7300, .7700, .7965, .8230, .8495,
689 .8760, .8957, .9155, .9352, .9550, .9663, .9775, .9888,
690 1.0000, .9915, .9830, .9745, .9660, .9362, .9065, .8767,
691 .8470, .8147, .7825, .7502, .7180, .6660, .6140, .5620,
692 .5100, .4638, .4175, .3713, .3250, .2737, .2225, .1712,
693 .1200, .1012, .0825, .0637, .0450, .0377, .0305, .0232,
694 .0160, .0122, .0085, .0047, .0010, .0007, .0005, .0002,
695 .0000
696 };
697
698 /* 2nd spectral band of hrv2 */
699 static const float sr6[57] = {
700 .0040, .0045, .0050, .0055, .0060, .0115, .0170, .0225,
701 .0280, .0893, .1505, .2118, .2730, .3593, .4455, .5318,
702 .6180, .6803, .7425, .8048, .8670, .9003, .9335, .9668,
703 1.0000, .9365, .8730, .8095, .7460, .6830, .6200, .5570,
704 .4940, .4405, .3870, .3335, .2800, .2452, .2105, .1757,
705 .1410, .1222, .1035, .0847, .0660, .0575, .0490, .0405,
706 .0320, .0283, .0245, .0208, .0170, .0152, .0135, .0117,
707 .0100
708 };
709
710 /* 3rd spectral band of hrv2 */
711 static const float sr7[81] = {
712 .0020, .0030, .0040, .0050, .0060, .0105, .0150, .0195,
713 .0240, .0380, .0520, .0660, .0800, .1140, .1480, .1820,
714 .2160, .2722, .3285, .3847, .4410, .5018, .5625, .6233,
715 .6840, .7298, .7755, .8213, .8670, .8920, .9170, .9420,
716 .9670, .9753, .9835, .9918,1.0000, .9967, .9935, .9902,
717 .9870, .9793, .9715, .9638, .9560, .9500, .9440, .9380,
718 .9320, .9047, .8775, .8502, .8230, .7665, .7100, .6535,
719 .5970, .5305, .4640, .3975, .3310, .2850, .2390, .1930,
720 .1470, .1250, .1030, .0810, .0590, .0497, .0405, .0312,
721 .0220, .0185, .0150, .0115, .0080, .0062, .0045, .0027,
722 .0010
723 };
724
725 /* panchromatic spectral band of hrv2 */
726 static const float sr8[129] = {
727 .0010, .0013, .0015, .0018, .0020, .0137, .0255, .0372,
728 .0490, .0898, .1305, .1713, .2120, .2468, .2815, .3163,
729 .3510, .3725, .3940, .4155, .4370, .4655, .4940, .5225,
730 .5510, .5742, .5975, .6207, .6440, .6505, .6570, .6635,
731 .6700, .6752, .6805, .6858, .6910, .7032, .7155, .7278,
732 .7400, .7530, .7660, .7790, .7920, .8027, .8135, .8242,
733 .8350, .8427, .8505, .8582, .8660, .8692, .8725, .8758,
734 .8790, .8830, .8870, .8910, .8950, .9025, .9100, .9175,
735 .9250, .9365, .9480, .9595, .9710, .9783, .9855, .9928,
736 1.0000, .9930, .9860, .9790, .9720, .9548, .9375, .9202,
737 .9030, .8802, .8575, .8347, .8120, .7945, .7770, .7595,
738 .7420, .7062, .6705, .6347, .5990, .5587, .5185, .4782,
739 .4380, .3893, .3405, .2918, .2430, .2085, .1740, .1395,
740 .1050, .0895, .0740, .0585, .0430, .0367, .0305, .0242,
741 .0180, .0155, .0130, .0105, .0080, .0070, .0060, .0050,
742 .0040, .0035, .0030, .0025, .0020, .0018, .0015, .0013,
743 .0010
744 };
745
746 static const float wli[8] = { 0.4699999, 0.60, 0.73, 0.4699999, 0.4699999, 0.5899999, 0.74, 0.4699999 };
747 static const float wls[8] = { 0.6499999, 0.72, 0.93, 0.7900000, 0.6499999, 0.7300000, 0.94, 0.7900000 };
748
749 ffu.wlinf = wli[iwa-1];
750 ffu.wlsup = wls[iwa-1];
751
752 int i;
753 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
754
755 switch(iwa)
756 {
757 case 1: for(i = 0; i < 73; i++) ffu.s[88+i] = sr1[i];
758 break;
759 case 2: for(i = 0; i < 49; i++) ffu.s[140+i] = sr2[i];
760 break;
761 case 3: for(i = 0; i < 81; i++) ffu.s[192+i] = sr3[i];
762 break;
763 case 4: for(i = 0; i < 129; i++) ffu.s[88+i] = sr4[i];
764 break;
765 case 5: for(i = 0; i < 73; i++) ffu.s[88+i] = sr5[i];
766 break;
767 case 6: for(i = 0; i < 57; i++) ffu.s[136+i] = sr6[i];
768 break;
769 case 7: for(i = 0; i < 81; i++) ffu.s[196+i] = sr7[i];
770 break;
771 case 8: for(i = 0; i < 129; i++) ffu.s[88+i] = sr8[i];
772 break;
773 }
774 }
775
776
tm(int iwa)777 void IWave::tm(int iwa)
778 {
779 /* 1st spectral band of thematic mapper */
780 static const float sr1[53] = {
781 .0030, .0085, .0140, .0255, .0370, .0500, .0630, .2010,
782 .3390, .5030, .6670, .6935, .7200, .7525, .7850, .8030,
783 .8210, .8370, .8530, .8780, .9030, .9135, .9240, .9355,
784 .9470, .9625, .9780, .9835, .9890, .9860, .9830, .9060,
785 .8290, .7815, .7340, .5265, .3190, .1995, .0800, .0630,
786 .0460, .0380, .0300, .0230, .0160, .0120, .0080, .0065,
787 .0050, .0045, .0040, .0035, .0030
788 };
789
790 /* 2nd spectral band of thematic mapper */
791 static const float sr2[61] = {
792 .0010, .0055, .0100, .0165, .0230, .0305, .0380, .1010,
793 .1640, .2710, .3780, .4750, .5720, .6150, .6580, .6945,
794 .7310, .7575, .7840, .8105, .8370, .8510, .8650, .8770,
795 .8890, .8965, .9040, .9055, .9070, .9070, .9070, .9095,
796 .9120, .9310, .9500, .9685, .9870, .9951, .9980, .9705,
797 .9430, .8655, .7880, .6250, .4620, .3330, .2040, .1505,
798 .0970, .0745, .0520, .0440, .0360, .0285, .0210, .0165,
799 .0120, .0090, .0060, .0030, .0000
800 };
801
802 /* 3rd spectral band of thematic mapper */
803 static const float sr3[65] = {
804 .0020, .0020, .0020, .0020, .0020, .0030, .0040, .0060,
805 .0080, .0140, .0200, .0290, .0380, .0730, .1080, .2020,
806 .2960, .3840, .4720, .5245, .5770, .6625, .7480, .7830,
807 .8180, .8430, .8680, .8845, .9010, .9030, .9050, .9055,
808 .9060, .9200, .9340, .9520, .9700, .9815, .9930,1.0000,
809 .9980, .9770, .9560, .8715, .7870, .5775, .3680, .2435,
810 .1190, .0920, .0650, .0555, .0460, .0385, .0310, .0255,
811 .0200, .0160, .0120, .0090, .0060, .0055, .0050, .0040,
812 .0030
813 };
814
815 /* 4th spectral band of thematic mapper */
816 static const float sr4[89] = {
817 .0020, .0035, .0050, .0060, .0070, .0080, .0090, .0140,
818 .0190, .0260, .0330, .0520, .0710, .1035, .1360, .2055,
819 .2750, .3615, .4480, .5505, .6530, .7410, .8290, .8795,
820 .9300, .9520, .9740, .9870,1.0000, .9955, .9910, .9855,
821 .9800, .9685, .9570, .9465, .9360, .9260, .9160, .9165,
822 .9170, .9180, .9190, .9195, .9200, .9215, .9230, .9240,
823 .9250, .9160, .9070, .8965, .8860, .8835, .8810, .8825,
824 .8840, .8825, .8810, .8705, .8600, .8410, .8220, .8030,
825 .7840, .7715, .7590, .7370, .7150, .5905, .4660, .3385,
826 .2110, .1440, .0770, .0540, .0310, .0230, .0150, .0115,
827 .0080, .0070, .0060, .0050, .0040, .0030, .0020, .0010,
828 .0000
829 };
830
831 /* 5th spectral band of thematic mapper */
832 static const float sr5[156] = {
833 .0000, .0003, .0007, .0010, .0013, .0015, .0018, .0020,
834 .0038, .0055, .0073, .0090, .0123, .0155, .0188, .0220,
835 .0393, .0565, .0738, .0910, .1410, .1910, .2410, .2910,
836 .3617, .4325, .5032, .5740, .6383, .7025, .7668, .8310,
837 .8622, .8935, .9248, .9560, .9522, .9485, .9447, .9410,
838 .9417, .9425, .9433, .9440, .9505, .9570, .9635, .9700,
839 .9738, .9775, .9813, .9850, .9833, .9815, .9797, .9780,
840 .9747, .9715, .9682, .9650, .9682, .9715, .9747, .9780,
841 .9793, .9805, .9818, .9830, .9837, .9845, .9852, .9860,
842 .9838, .9815, .9793, .9770, .9815, .9860, .9905, .9950,
843 .9963, .9975, .9988,1.0000, .9992, .9985, .9977, .9970,
844 .9912, .9855, .9797, .9740, .9697, .9655, .9613, .9570,
845 .9553, .9535, .9517, .9500, .9505, .9510, .9515, .9520,
846 .9370, .9220, .9070, .8920, .8260, .7600, .6940, .6280,
847 .5507, .4735, .3962, .3190, .2780, .2370, .1960, .1550,
848 .1340, .1130, .0920, .0710, .0643, .0575, .0508, .0440,
849 .0385, .0330, .0275, .0220, .0197, .0175, .0152, .0130,
850 .0120, .0110, .0100, .0090, .0077, .0065, .0052, .0040,
851 .0037, .0035, .0032, .0030, .0027, .0025, .0022, .0020,
852 .0015, .0010, .0005, .0000
853 };
854
855 /* 7th spectral band of thematic mapper */
856 static const float sr6[185] = {
857 .0000, .0005, .0010, .0015, .0020, .0025, .0030, .0035,
858 .0040, .0043, .0045, .0048, .0050, .0055, .0060, .0065,
859 .0070, .0075, .0080, .0085, .0090, .0103, .0115, .0128,
860 .0140, .0153, .0165, .0178, .0190, .0233, .0275, .0318,
861 .0360, .0400, .0440, .0480, .0520, .0563, .0605, .0648,
862 .0690, .0768, .0845, .0923, .1000, .1125, .1250, .1375,
863 .1500, .1753, .2005, .2258, .2510, .2870, .3230, .3590,
864 .3950, .4313, .4675, .5038, .5400, .5788, .6175, .6563,
865 .6950, .7345, .7740, .8135, .8530, .8737, .8945, .9152,
866 .9360, .9398, .9435, .9473, .9510, .9472, .9435, .9397,
867 .9360, .9385, .9410, .9435, .9460, .9500, .9540, .9580,
868 .9620, .9693, .9765, .9838, .9910, .9930, .9950, .9970,
869 .9990,1.0000, .9988, .9975, .9960, .9952, .9945, .9937,
870 .9930, .9922, .9915, .9908, .9900, .9815, .9730, .9645,
871 .9560, .9525, .9490, .9455, .9420, .9370, .9320, .9270,
872 .9220, .9205, .9190, .9175, .9160, .9135, .9110, .9085,
873 .9060, .9020, .8980, .8940, .8900, .8730, .8560, .8390,
874 .8220, .8058, .7895, .7732, .7570, .7545, .7520, .7495,
875 .7470, .7623, .7775, .7928, .8080, .8245, .8410, .8575,
876 .8740, .8292, .7845, .7397, .6950, .6290, .5630, .4970,
877 .4310, .3747, .3185, .2622, .2060, .1735, .1410, .1085,
878 .0760, .0653, .0545, .0438, .0330, .0275, .0220, .0165,
879 .0110, .0097, .0085, .0072, .0060, .0045, .0030, .0015,
880 .0000
881 };
882
883 static const float wli[6] = { 0.43, 0.5000000, 0.5799999, 0.73, 1.5025, 1.95 };
884 static const float wls[6] = { 0.56, 0.6499999, 0.7400000, 0.95, 1.8900, 2.41 };
885
886 ffu.wlinf = wli[iwa-1];
887 ffu.wlsup = wls[iwa-1];
888
889 int i;
890 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
891
892 switch(iwa)
893 {
894 case 1: for(i = 0; i < 53; i++) ffu.s[72+i] = sr1[i];
895 break;
896 case 2: for(i = 0; i < 61; i++) ffu.s[100+i] = sr2[i];
897 break;
898 case 3: for(i = 0; i < 65; i++) ffu.s[132+i] = sr3[i];
899 break;
900 case 4: for(i = 0; i < 89; i++) ffu.s[192+i] = sr4[i];
901 break;
902 case 5: for(i = 0; i < 156; i++) ffu.s[501+i] = sr5[i];
903 break;
904 case 6: for(i = 0; i < 185; i++) ffu.s[680+i] = sr6[i];
905 break;
906 }
907 }
908
mss(int iwa)909 void IWave::mss(int iwa)
910 {
911 /* 1st spectral band of multi spectral scanner */
912 static const float sr1[67] = {
913 .00, .01, .01, .01, .02, .04, .05,
914 .09, .13, .21, .29, .45, .61, .72,
915 .82, .85, .89, .92, .95, .96, .98,
916 .99, .99, 1.00, 1.00, 1.00, 1.00, 1.00,
917 1.00, 1.00, .99, .99, .98, .98, .98,
918 .97, .97, .96, .96, .96, .96, .95,
919 .95, .93, .91, .89, .87, .85, .82,
920 .73, .65, .54, .43, .38, .33, .24,
921 .15, .11, .08, .06, .04, .03, .03,
922 .02, .02, .02, .01
923 };
924
925 /* 2nd spectral band of multi spectral scanner */
926 static const float sr2[69] = {
927 .01, .01, .01, .01, .01, .01, .02,
928 .03, .04, .08, .13, .21, .29, .43,
929 .57, .69, .80, .86, .92, .94, .96,
930 .97, .99, .99, 1.00, 1.00, 1.00, .99,
931 .98, .97, .96, .94, .93, .90, .88,
932 .92, .96, .96, .96, .95, .95, .90,
933 .84, .82, .80, .79, .78, .79, .80,
934 .80, .80, .73, .67, .59, .50, .38,
935 .25, .18, .11, .09, .08, .07, .06,
936 .05, .05, .04, .04, .03, .03
937 };
938
939 /* 3rd spectral band of multi spectral scanner */
940 static const float sr3[81] = {
941 .01, .01, .01, .02, .02, .02, .02,
942 .03, .03, .05, .07, .10, .14, .17,
943 .20, .31, .41, .48, .56, .66, .75,
944 .83, .90, .93, .97, .98, .99, 1.00,
945 1.00, 1.00, .99, .99, .98, .97, .96,
946 .94, .93, .90, .88, .87, .86, .84,
947 .83, .82, .82, .82, .82, .82, .83,
948 .83, .83, .83, .83, .81, .80, .78,
949 .75, .68, .61, .55, .49, .41, .34,
950 .29, .24, .19, .15, .12, .08, .07,
951 .07, .05, .03, .03, .03, .02, .02,
952 .01, .01, .01, .01
953 };
954
955 /* 4th spectral band of multi spectral scanner */
956 static const float sr4[127] = {
957 .01, .02, .02, .04, .06, .14, .21,
958 .45, .68, .76, .83, .89, .94, .94,
959 .94, .94, .95, .95, .96, .97, .98,
960 .99, .99, 1.00, 1.00, 1.00, 1.00, 1.00,
961 1.00, 1.00, .99, .98, .97, .96, .95,
962 .94, .93, .92, .92, .91, .90, .89,
963 .88, .87, .86, .86, .85, .83, .82,
964 .81, .80, .78, .77, .76, .76, .75,
965 .74, .72, .70, .69, .68, .66, .64,
966 .63, .62, .61, .60, .58, .57, .56/
967 .55, .55, .54, .52, .51, .50, .49,
968 .47, .46, .45, .44, .43, .42, .41,
969 .40, .39, .39, .38, .37, .36, .35,
970 .34, .33, .32, .31, .30, .29, .28,
971 .27, .26, .25, .24, .23, .22, .21,
972 .20, .20, .19, .18, .16, .15, .14,
973 .13, .12, .12, .11, .10, .08, .07,
974 .06, .06, .05, .04, .03, .02, .01,
975 .01
976 };
977
978 static const float wli[4] = { 0.4749999, 0.5799999, 0.6549999, 0.7849999 };
979 static const float wls[4] = { 0.6399999, 0.7500000, 0.8549998, 1.1000000 };
980
981 ffu.wlinf = wli[iwa-1];
982 ffu.wlsup = wls[iwa-1];
983
984 int i;
985 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
986
987 switch(iwa)
988 {
989 case 1: for(i = 0; i < 67; i++) ffu.s[90+i] = sr1[i];
990 break;
991 case 2: for(i = 0; i < 69; i++) ffu.s[132+i] = sr2[i];
992 break;
993 case 3: for(i = 0; i < 81; i++) ffu.s[162+i] = sr3[i];
994 break;
995 case 4: for(i = 0; i < 127; i++) ffu.s[214+i] = sr4[i];
996 break;
997 }
998 }
999
mas(int iwa)1000 void IWave::mas(int iwa)
1001 {
1002 /* first spectral band of Modis airborne simulator */
1003 static const float sr1[35] = {
1004 .0244, .0338, .0536, .1052, .1941, .3166, .4797, .6893,
1005 .9417,1.2218,1.4890,1.7202,1.9194,2.0812,2.1934,2.2580,
1006 2.3031,2.3395,2.3620,2.3575,2.3228,2.2421,2.1129,1.9317,
1007 1.7031,1.4126,1.0985, .8088, .5573, .3477, .1843, .0918,
1008 .0473, .0308, .0248
1009 };
1010
1011 /* second spectral band of Modis airborne simulator */
1012 static const float sr2[38] = {
1013 .0197, .0223, .0298, .0481, .0877, .1645, .2829, .4699,
1014 .7101, .9752,1.2209,1.4459,1.6307,1.7482,1.8092,1.8370,
1015 1.8465,1.8527,1.8574,1.8627,1.8703,1.8733,1.8763,1.8769,
1016 1.8731,1.8599,1.8221,1.7208,1.5341,1.2689, .9810, .6911,
1017 .4250, .2204, .0947, .0447, .0253, .0209
1018 };
1019
1020 /* third spectral band of Modis airborne simulator */
1021 static const float sr3[34] = {
1022 .0273, .0357, .0560, .1265, .3269, .6239, .9777,1.3481,
1023 1.7037,2.0081,2.1885,2.2765,2.3178,2.3474,2.3777,2.4053,
1024 2.4286,2.4487,2.4604,2.4324,2.2594,1.9695,1.6105,1.2200,
1025 .8289, .4724, .2484, .1443, .0998, .0726, .0546, .0421,
1026 .0333, .0270
1027 };
1028
1029 /* fourth spectral band of Modis airborne simulator */
1030 static const float sr4[40] = {
1031 .0242, .0276, .0364, .0505, .0717, .1058, .1841, .3889,
1032 .7570,1.1872,1.6245,1.9511,2.0986,2.1652,2.2058,2.2430,
1033 2.2471,2.2299,2.2190,2.2052,2.1875,2.1519,2.0989,2.0314,
1034 1.9292,1.7185,1.3603, .9476, .5555, .2803, .1608, .1090,
1035 .0926, .0830, .0720, .0590, .0476, .0377, .0300, .0245
1036 };
1037
1038 /* fifth spectral band of Modis airborne simulator */
1039
1040 static const float sr5[56] = {
1041 .0232, .0234, .0254, .0259, .0300, .0313, .0325, .0368,
1042 .0397, .0432, .0454, .0525, .0624, .0839, .1305, .2066,
1043 .3012, .4087, .5292, .6814, .8961,1.1607,1.4407,1.6803,
1044 1.8543,1.9683,2.0260,2.0562,2.0704,2.0550,2.0031,1.9304,
1045 1.8731,1.8325,1.7974,1.7334,1.6188,1.4710,1.2919,1.0871,
1046 .8785, .6871, .5194, .3728, .2565, .1667, .1099, .0720,
1047 .0536, .0434, .0375, .0355, .0324, .0281, .0251, .0214
1048 };
1049
1050
1051 /* sixth spectral band of Modis airborne simulator */
1052 static const float sr6[40] = {
1053 .0229, .0271, .0404, .0690, .1237, .2051, .3206, .4619,
1054 .6269, .8073,1.0025,1.2045,1.4075,1.5980,1.7690,1.9111,
1055 2.0102,2.0697,2.0965,2.1009,2.0903,2.0685,2.0262,1.9608,
1056 1.8675,1.7447,1.5974,1.4411,1.2742,1.0954, .9031, .7062,
1057 .5164, .3475, .2148, .1205, .0665, .0376, .0254, .0211
1058 };
1059
1060 /* seventh spectral band of Modis airborne simulator */
1061 static const float sr7[117] = {
1062 .0075, .0087, .0108, .0133, .0168, .0208, .0257, .0312,
1063 .0379, .0456, .0540, .0629, .0728, .0828, .0937, .1054,
1064 .1189, .1329, .1478, .1618, .1729, .1845, .1963, .2095,
1065 .2206, .2326, .2448, .2578, .2714, .2864, .3033, .3192,
1066 .3349, .3515, .3724, .3922, .4100, .4291, .4477, .4674,
1067 .4824, .4992, .5197, .5436, .5681, .5908, .6099, .6204,
1068 .6284, .6393, .6466, .6466, .6488, .6531, .6575, .6612,
1069 .6572, .6566, .6577, .6602, .6649, .6595, .6568, .6522,
1070 .6606, .6656, .6606, .6517, .6426, .6374, .6311, .6217,
1071 .6053, .5933, .5827, .5672, .5483, .5325, .5241, .5121,
1072 .5077, .4958, .4827, .4718, .4552, .4369, .4200, .4076,
1073 .3921, .3730, .3550, .3397, .3224, .3045, .2849, .2622,
1074 .2426, .2223, .2035, .1830, .1628, .1416, .1211, .1033,
1075 .0871, .0731, .0606, .0491, .0395, .0315, .0245, .0189,
1076 .0151, .0117, .0093, .0076, .0070
1077 };
1078
1079 /* third band of MODIS (469nm) soil and vegetation differences */
1080 static const float sr8[13] = {
1081 .0732, .8372,3.6403,4.9195,5.0091,5.0102,5.0102,5.0099,
1082 4.9670,4.0931,1.2880, .1186, .0237
1083 };
1084
1085 /* fifth band of MODIS ( 1.24micron) leaf and canopy properties */
1086 static const float sr9[25] = {
1087 .0094, .0143, .0248, .0457, .0902, .1928, .4494,1.1087,
1088 2.4282,3.6387,4.5556,4.9434,4.9975,4.9434,4.5556,3.6387,
1089 2.4282,1.1087, .4494, .1928, .0902, .0457, .0248, .0143,
1090 .0094
1091 };
1092
1093 /* sixth band of MODIS ( 1.64microns) snow and cloud differences */
1094 static const float sr10[27] = {
1095 .0215, .0307, .0493, .0827, .1454, .2693, .5240,1.0412,
1096 1.9431,2.6724,3.3494,3.8269,4.0296,4.0624,4.0296,3.8269,
1097 3.3494,2.6724,1.9097,1.0412, .5240, .2693, .1454, .0827,
1098 .0493, .0307, .0215
1099 };
1100
1101 static const float wli[10] = { 0.5025, 0.6075, 0.8300, 0.9000, 1.8200, 2.0950, 3.5800, 0.4550, 1.2100, 1.6075 };
1102 static const float wls[10] = { 0.5875, 0.7000, 0.9125, 0.9975, 1.9575, 2.1925, 3.8700, 0.4850, 1.2700, 1.6725 };
1103
1104 ffu.wlinf = wli[iwa-1];
1105 ffu.wlsup = wls[iwa-1];
1106
1107 int i;
1108 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
1109
1110 switch(iwa)
1111 {
1112 case 1: for(i = 0; i < 35; i++) ffu.s[101+i] = sr1[i];
1113 break;
1114 case 2: for(i = 0; i < 38; i++) ffu.s[143+i] = sr2[i];
1115 break;
1116 case 3: for(i = 0; i < 34; i++) ffu.s[232+i] = sr3[i];
1117 break;
1118 case 4: for(i = 0; i < 40; i++) ffu.s[260+i] = sr4[i];
1119 break;
1120 case 5: for(i = 0; i < 56; i++) ffu.s[628+i] = sr5[i];
1121 break;
1122 case 6: for(i = 0; i < 40; i++) ffu.s[738+i] = sr6[i];
1123 break;
1124 case 7: for(i = 0; i < 117; i++) ffu.s[1332+i] = sr7[i];
1125 break;
1126 case 8: for(i = 0; i < 13; i++) ffu.s[82+i] = sr8[i];
1127 break;
1128 case 9: for(i = 0; i < 25; i++) ffu.s[384+i] = sr9[i];
1129 break;
1130 case 10: for(i = 0; i < 27; i++) ffu.s[543+i] = sr10[i];
1131 break;
1132 }
1133 }
1134
modis(int iwa)1135 void IWave::modis(int iwa)
1136 {
1137 /* band 1 of MODIS (vegetation monitoring at 250m) */
1138 static const float sr1[31] = {
1139 .0000, .0000, .0101, .0984, .2914, .5020, .6564, .6881,
1140 .7064, .7114, .7292, .7523, .7721, .7852, .8112, .8664,
1141 .9309, .9794,1.0000, .9855, .9333, .8429, .7187, .5672,
1142 .3996, .2327, .1024, .0369, .0157, .0092, .0000
1143 };
1144
1145 /* band 2 of MODIS (vegetation monitoring at 250m) */
1146 static const float sr2[34] = {
1147 .0000, .0216, .0502, .0923, .1431, .1938, .2713, .4292,
1148 .6543, .8606, .9672, .9609, .9418, .9273, .9311, .9550,
1149 .9827, .9948,1.0000, .9782, .9308, .7860, .5430, .2931,
1150 .1477, .0824, .0520, .0367, .0276, .0213, .0159, .0112,
1151 .0076, .0000
1152 };
1153
1154 /* band 3 of MODIS (vegetation monitoring at 500m / MVI) */
1155 static const float sr3[14] = {
1156 .0000, .0222, .2021, .7451,1.0141, .9036, .8745, .9242,
1157 1.0009, .9305, .5877, .1496, .0170, .0000
1158 };
1159
1160 /* band 4 of MODIS (green channel at 500m ) */
1161 static const float sr4[13] = {
1162 .0286, .2645, .7583, .9889,1.0002, .9750, .9726, .9878,
1163 .9622, .7041, .2147, .0163, .0000
1164 };
1165
1166 /* band 5 of MODIS (cloud channel at 500m ) */
1167 static const float sr5[23] = {
1168 .0000, .0188, .0381, .0984, .1872, .3188, .4933, .6582,
1169 .8046, .8877, .9564, .9973,1.0000, .9451, .8172, .6366,
1170 .3949, .2260, .1218, .0623, .0253, .0173, .0000
1171 };
1172
1173 /* band 6 of MODIS (snow/ice channel at 500m ) */
1174 static const float sr6[27] = {
1175 .0000, .0580, .0910, .1611, .2705, .4289, .6049, .7688,
1176 .8948, .9729,1.0000, .9969, .9875, .9648, .9278, .8629,
1177 .7530, .6041, .4342, .2748, .1614, .0911, .0508, .0299,
1178 .0162, .0108, .0000
1179 };
1180
1181 /* band 7 of MODIS (liquid water absorption channel at 500m ) */
1182 static const float sr7[51] = {
1183 .0000, .0124, .0165, .0229, .0317, .0444, .0630, .0918,
1184 .1358, .2006, .2904, .4032, .5329, .6632, .7775, .8680,
1185 .9308, .9700, .9913,1.0000,1.0009, .9961, .9866, .9715,
1186 .9498, .9209, .8851, .8446, .8022, .7614, .7241, .6860,
1187 .6423, .5915, .5326, .4637, .3846, .3042, .2317, .1698,
1188 .1195, .0814, .0553, .0381, .0266, .0189, .0137, .0097,
1189 .0056, .0001, .0000
1190 };
1191
1192 static const float wli[7] = { 0.6100, 0.8200, 0.4500, 0.5400, 1.2150, 1.6000, 2.0575 };
1193 static const float wls[7] = { 0.6850, 0.9025, 0.4825, 0.5700, 1.2700, 1.6650, 2.1825 };
1194
1195 ffu.wlinf = wli[iwa-1];
1196 ffu.wlsup = wls[iwa-1];
1197
1198 int i;
1199 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
1200
1201 switch(iwa)
1202 {
1203 case 1: for(i = 0; i < 31; i++) ffu.s[144+i] = sr1[i];
1204 break;
1205 case 2: for(i = 0; i < 34; i++) ffu.s[228+i] = sr2[i];
1206 break;
1207 case 3: for(i = 0; i < 14; i++) ffu.s[80+i] = sr3[i];
1208 break;
1209 case 4: for(i = 0; i < 13; i++) ffu.s[116+i] = sr4[i];
1210 break;
1211 case 5: for(i = 0; i < 23; i++) ffu.s[386+i] = sr5[i];
1212 break;
1213 case 6: for(i = 0; i < 27; i++) ffu.s[540+i] = sr6[i];
1214 break;
1215 case 7: for(i = 0; i < 51; i++) ffu.s[723+i] = sr7[i];
1216 break;
1217 }
1218 }
1219
polder(int iwa)1220 void IWave::polder(int iwa)
1221 {
1222 /* band 1 of POLDER (443 mic, polarized channel) */
1223 static const float sr1[27] = {
1224 .0003, .0042, .0028, .0036, .0060, .0134, .0430, .1284,
1225 .3394, .6162, .8056, .9060, .9656, .9968, .9880, .8944,
1226
1227 .6612, .3880, .1950, .0966, .0512, .0292, .0180, .0122,
1228 .0040, .0000, .0000
1229 };
1230
1231 /* band 2 of POLDER (490 mic) */
1232 static const float sr2[46] = {
1233 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
1234 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
1235 .0000, .0000, .0000, .0000, .0012, .0014, .0022, .0032,
1236 .0060, .0116, .0252, .0666, .1932, .4896, .8104, .9414,
1237 .9544, .9710, .9898, .9544, .6920, .3438, .1466, .0630,
1238 .0304, .0170, .0102, .0070, .0000, .0000
1239 };
1240
1241 /* band 3 of POLDER (565 mic) */
1242 static const float sr3[26] = {
1243 .0000, .0016, .0048, .0074, .0130, .0258, .0566, .1368,
1244 .3294, .6592, .9270, .9946, .9798, .9544, .9262, .8814,
1245 .7692, .5420, .2814, .1218, .0518, .0244, .0118, .0066,
1246 .0038, .0000
1247 };
1248
1249 /* band 4 of POLDER (670 P1, polarized channel) */
1250 static const float sr4[30] = {
1251 .0000, .0000, .0000, .0000, .0010, .0044, .0022, .0140,
1252 .0176, .0394, .1004, .2476, .5462, .8672, .9902, .9874,
1253 .9572, .9484, .9264, .8274, .5688, .2828, .1154, .0500,
1254 .0224, .0186, .0160, .0072, .0000, .0000
1255 };
1256
1257 /* band 5 of POLDER (763 mic, oxygen absorption channel) */
1258 static const float sr5[15] = {
1259 .0000, .0004, .0046, .0134, .0834, .4148, .8056, .9274,
1260 .9880, .7488, .2416, .0416, .0094, .0008, .0000
1261 };
1262
1263 /* band 6 of POLDER (765 mic, oxygen absorption channel) */
1264 static const float sr6[53] = {
1265 .0000, .0000, .0010, .0018, .0010, .0030, .0046, .0080,
1266 .0096, .0140, .0202, .0300, .0410, .0622, .0958, .1516,
1267 .2400, .3648, .5174, .6640, .7798, .8494, .8858, .9066,
1268 .9202, .9374, .9516, .9692, .9886, .9932, .9650, .8684,
1269 .6836, .4686, .2922, .1724, .1012, .0594, .0360, .0238,
1270 .0144, .0104, .0088, .0060, .0052, .0046, .0038, .0052,
1271 .0028, .0022, .0000, .0000, .0000
1272 };
1273
1274 /* band 7 of POLDER (865 P1, polarized channel) */
1275 static const float sr7[45] = {
1276 .0000, .0004, .0008, .0024, .0030, .0056, .0102, .0186,
1277 .0338, .0622, .1110, .1974, .3410, .5432, .7610, .9218,
1278 .9896, .9936, .9744, .9514, .9352, .9222, .9150, .9094,
1279 .8954, .8592, .7766, .6354, .4604, .3006, .1838, .1082,
1280 .0626, .0346, .0198, .0112, .0064, .0038, .0028, .0016,
1281 .0014, .0006, .0000, .0000, .0000
1282 };
1283
1284 /* band 8 of POLDER (910 mic, water vapor absorption channel) */
1285 static const float sr8[31] = {
1286 .0000, .0000, .0000, .0012, .0016, .0018, .0032, .0046,
1287 .0082, .0158, .0354, .0876, .2242, .5142, .8436, .9848,
1288 .9838, .9534, .9254, .9084, .8560, .6444, .3388, .1424,
1289 .0566, .0238, .0098, .0000, .0000, .0000, .0000
1290 };
1291
1292 static const float wli[8] = { 0.4125, 0.4100, 0.5325, 0.6300, 0.7450, 0.7000, 0.8100, 0.8650 };
1293 static const float wls[8] = { 0.4775, 0.5225, 0.5950, 0.7025, 0.7800, 0.8300, 0.9200, 0.9400 };
1294
1295 ffu.wlinf = wli[iwa-1];
1296 ffu.wlsup = wls[iwa-1];
1297
1298 int i;
1299 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
1300
1301 switch(iwa)
1302 {
1303 case 1: for(i = 0; i < 27; i++) ffu.s[65+i] = sr1[i];
1304 break;
1305 case 2: for(i = 0; i < 46; i++) ffu.s[64+i] = sr2[i];
1306 break;
1307 case 3: for(i = 0; i < 26; i++) ffu.s[113+i] = sr3[i];
1308 break;
1309 case 4: for(i = 0; i < 30; i++) ffu.s[152+i] = sr4[i];
1310 break;
1311 case 5: for(i = 0; i < 15; i++) ffu.s[198+i] = sr5[i];
1312 break;
1313 case 6: for(i = 0; i < 53; i++) ffu.s[180+i] = sr6[i];
1314 break;
1315 case 7: for(i = 0; i < 45; i++) ffu.s[224+i] = sr7[i];
1316 break;
1317 case 8: for(i = 0; i < 31; i++) ffu.s[246+i] = sr8[i];
1318 break;
1319 }
1320 }
1321
etmplus(int iwa)1322 void IWave::etmplus(int iwa)
1323 {
1324 /* Spectral filter data found on the following page:
1325 http://ltpwww.gsfc.nasa.gov/IAS/handbook/handbook_toc.html
1326 */
1327 /* 1st spectral band of enhanced thematic mapper plus */
1328 static const float sr1[36] = {
1329 .0000, .0160, .0710, .2870, .6665, .7920, .8570, .8390,
1330 .8060, .7790, .8460, .9010, .8995, .8900, .8510, .8750,
1331 .8930, .8840, .9300, .9580, .9540, .9800, .9750, .9650,
1332 .9625, .9950, .9900, .9900, .9795, .9830, .9685, .9600,
1333 .7685, .2930, .0545, .0090
1334 };
1335
1336 /* 2nd spectral band of enhanced thematic mapper plus */
1337 static const float sr2[52] = {
1338 .0000, .0006, .0015, .0030, .0118, .0260, .0740, .1740,
1339 .3480, .5520, .6960, .7590, .7845, .8220, .8695, .9050,
1340 .9285, .9470, .9525, .9520, .9515, .9530, .9500, .9540,
1341 .9670, .9590, .9405, .9330, .9385, .9510, .9565, .9550,
1342 .9560, .9730, .9915, 1.0000, .9760, .9420, .9300, .9120,
1343 .7985, .5740, .3400, .1850, .1055, .0620, .0375, .0210,
1344 .0109, .0048, .0022, .0000
1345 };
1346
1347 /* 3rd spectral band of enhanced thematic mapper plus */
1348 static const float sr3[39] = {
1349 .0000, .0000, .0001, .0005, .0020, .0095, .0470, .1740,
1350 .4190, .7310, .9210, .9425, .9370, .9365, .9490, .9645,
1351 .9730, .9705, .9580, .9550, .9620, .9800, .9930, .9980,
1352 1.0000, .9955, .9920, .9885, .9770, .9545, .9320, .8805,
1353 .7290, .4440, .1830, .0660, .0250, .0122, .0000
1354 };
1355
1356 /* 4th spectral band of enhanced thematic mapper plus */
1357 static const float sr4[68] = {
1358 .0000, .0010, .0199, .0315, .0518, .0690, .1100, .1750,
1359 .2710, .4020, .5555, .7050, .8120, .8710, .8955, .9080,
1360 .9180, .9260, .9280, .9300, .9255, .9250, .9280, .9230,
1361 .9165, .9080, .9035, .9090, .9240, .9460, .9655, .9710,
1362 .9690, .9670, .9655, .9670, .9605, .9490, .9310, .9250,
1363 .9295, .9430, .9610, .9850, .9925, .9980, .9915, .9940,
1364 .9970, .9980, .9995, .9910, .9880, .9690, .9265, .8680,
1365 .8175, .8190, .8800, .8540, .5725, .2560, .1035, .0440,
1366 .0220, .0110, .0071, .0000
1367 };
1368
1369 /* 5th spectral band of enhanced thematic mapper plus */
1370 static const float sr5[114] = {
1371 .0060, .0060, .0120, .0060, .0135, .0210, .0400, .0530,
1372 .0760, .1028, .1480, .2052, .2740, .3660, .4620, .5138,
1373 .5780, .6250, .6670, .7090, .7370, .7710, .8080, .8315,
1374 .8590, .8750, .8930, .9012, .8960, .8952, .8945, .8878,
1375 .8760, .8685, .8725, .8772, .8740, .8605, .8680, .8785,
1376 .8990, .8940, .9000, .9020, .9190, .9248, .9290, .9455,
1377 .9475, .9532, .9520, .9667, .9610, .9597, .9780, .9587,
1378 .9535, .9512, .9517, .9550, .9440, .9345, .9305, .9385,
1379 .9480, .9397, .9385, .9470, .9450, .9450, .9553, .9647,
1380 .9690, .9732, .9910, .9960, .9975, .9945, 1.0000, .9912,
1381 .9865, .9885, .9895, .9875, .9810, .9812, .9780, .9685,
1382 .9600, .9383, .9020, .8545, .7910, .6927, .6077, .5258,
1383 .4275, .3420, .2670, .2027, .1585, .1187, .0840, .0722,
1384 .0535, .0438, .0390, .0305, .0205, .0217, .0110, .0100,
1385 .0060, .0079
1386 };
1387
1388 /* 7th spectral band of enhanced thematic mapper plus */
1389 static const float sr6[155] = {
1390 .0029, .0030, .0023, .0030, .0008, .0020, .0040, .0020,
1391 .0020, .0120, .0085, .0090, .0178, .0170, .0312, .0370,
1392 .0457, .0580, .0762, .0880, .1098, .1490, .1960, .2420,
1393 .3030, .3670, .4367, .5190, .6100, .6765, .7183, .7560,
1394 .7738, .7840, .7755, .7890, .7818, .7780, .7665, .7615,
1395 .7680, .7750, .7690, .7880, .8085, .7940, .8230, .8115,
1396 .8195, .8365, .8370, .8360, .8512, .8585, .8552, .8710,
1397 .8735, .8750, .8590, .8715, .8592, .8720, .8625, .8650,
1398 .8680, .8765, .8730, .8690, .8760, .8680, .8792, .8735,
1399 .8760, .8800, .8745, .8700, .8578, .8630, .8585, .8440,
1400 .8585, .8545, .8625, .8680, .8560, .8470, .8612, .8510,
1401 .8520, .8380, .8465, .8403, .8305, .8355, .8382, .8220,
1402 .8380, .8385, .8425, .8535, .8622, .8730, .8680, .8790,
1403 .8908, .8980, .9195, .9200, .9263, .9275, .9340, .9360,
1404 .9532, .9540, .9517, .9600, .9728, .9850, .9720, .9700,
1405 .9938, .9895, .9748, 1.0000, .9912, .9680, .9657, .9555,
1406 .9295, .9290, .9255, .9030, .9235, .9290, .9285, .9200,
1407 .8532, .7750, .6588, .5315, .4035, .2750, .2175, .1310,
1408 .1035, .0750, .0518, .0290, .0290, .0155, .0192, .0130,
1409 .0065, .0150, .0022
1410 };
1411
1412 /* 8th spectral band of enhanced thematic mapper plus (Pan) */
1413 static const float sr7[175] = {
1414 .0000, .0000, .0027, .0175, .0563, .1500, .3285, .5015,
1415 .5845, .5990, .6018, .6095, .6142, .6100, .6035, .6035,
1416 .6118, .6270, .6385, .6445, .6438, .6320, .6260, .6245,
1417 .6320, .6420, .6593, .6775, .6897, .6970, .7005, .7050,
1418 .7110, .7130, .7165, .7180, .7120, .7070, .7040, .7030,
1419 .7147, .7300, .7440, .7535, .7615, .7640, .7532, .7450,
1420 .7352, .7290, .7285, .7310, .7328, .7340, .7435, .7495,
1421 .7540, .7580, .7617, .7680, .7720, .7790, .7815, .7850,
1422 .7900, .7930, .7917, .7915, .7950, .7980, .8017, .8060,
1423 .8133, .8200, .8275, .8315, .8370, .8420, .8485, .8545,
1424 .8605, .8680, .8722, .8795, .8852, .8920, .8945, .8960,
1425 .8945, .8940, .8942, .8955, .8975, .9000, .9032, .9035,
1426 .9022, .9000, .8967, .8935, .8827, .8790, .8782, .8730,
1427 .8760, .8800, .8812, .8865, .8910, .8930, .9035, .9105,
1428 .9183, .9200, .9175, .9160, .9183, .9180, .9167, .9155,
1429 .9173, .9270, .9290, .9375, .9497, .9570, .9637, .9695,
1430 .9715, .9770, .9795, .9840, .9908, .9970, .9985, .9980,
1431 .9952, .9940, .9920, .9930, .9925, .9870, .9755, .9650,
1432 .9583, .9490, .9347, .9240, .9133, .9070, .9052, .9085,
1433 .9193, .9400, .9657, .9780, .9625, .8950, .7520, .5715,
1434 .3962, .2580, .1675, .1080, .0688, .0440, .0297, .0195,
1435 .0130, .0080, .0055, .0035, .0023, .0020, .0010
1436 };
1437
1438 static const float wli[7] = {0.4325, 0.4975, 0.6100, 0.7475, 1.5100, 1.9975, 0.4975};
1439 static const float wls[7] = {0.5225, 0.6275, 0.7075, 0.9175, 1.7950, 2.3850, 0.9350};
1440
1441 ffu.wlinf = (float)wli[iwa-1];
1442 ffu.wlsup = (float)wls[iwa-1];
1443
1444 int i;
1445 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
1446
1447 switch(iwa)
1448 {
1449 case 1: for(i = 0; i < 36; i++) ffu.s[73+i] = sr1[i];
1450 break;
1451 case 2: for(i = 0; i < 52; i++) ffu.s[99+i] = sr2[i];
1452 break;
1453 case 3: for(i = 0; i < 39; i++) ffu.s[144+i] = sr3[i];
1454 break;
1455 case 4: for(i = 0; i < 68; i++) ffu.s[199+i] = sr4[i];
1456 break;
1457 case 5: for(i = 0; i < 114; i++) ffu.s[504+i] = sr5[i];
1458 break;
1459 case 6: for(i = 0; i < 155; i++) ffu.s[699+i] = sr6[i];
1460 break;
1461 case 7: for(i = 0; i < 175; i++) ffu.s[99+i] = sr7[i];
1462 break;
1463 }
1464 }
1465
solirr(const double fwl) const1466 double IWave::solirr(const double fwl) const
1467 {
1468 /* si (in w/m2/micron) contains the values of the solar
1469 irradiance between 0.25 and 4.0 microns, by step of 0.0025 m.
1470 the value of the total irradiance is 1372 w/m2 on the whole
1471 spectrum (1358 w/m2 between 0.25 and 4.0 microns) */
1472
1473 static const float si[1501] = {
1474 69.30, 77.65, 86.00, 100.06, 114.12, 137.06, 160.00,
1475 169.52, 179.04, 178.02, 177.00, 193.69, 210.38, 241.69,
1476 273.00, 318.42, 363.84, 434.42, 505.00, 531.50, 558.00,
1477 547.50, 537.00, 559.02, 581.03, 619.52, 658.00, 694.39,
1478 730.78, 774.39, 817.99, 871.99, 925.99, 912.04, 898.09,
1479 920.69, 943.29, 925.99, 908.69, 936.09, 963.49, 994.94,
1480 1026.39, 980.74, 935.09,1036.29,1137.49,1163.74,1189.99,
1481 1109.34,1028.69,1088.99,1149.29,1033.69, 918.09,1031.89,
1482 1145.69,1035.09, 924.49,1269.29,1614.09,1631.09,1648.09,
1483 1677.19,1706.29,1744.89,1783.49,1750.19,1716.89,1705.19,
1484 1693.49,1597.69,1501.89,1630.99,1760.09,1775.24,1790.39,
1485 1859.94,1929.49,1993.44,2057.39,2039.23,2021.08,2030.73,
1486 2040.38,2026.53,2012.68,1999.53,1986.38,2002.88,2019.38,
1487 2038.09,2056.79,1967.74,1878.68,1905.83,1932.98,1953.58,
1488 1974.18,1935.68,1897.19,1916.78,1936.38,1937.23,1938.09,
1489 1881.44,1824.79,1814.09,1803.39,1832.24,1861.09,1885.93,
1490 1910.78,1904.68,1898.58,1875.73,1852.88,1865.64,1878.39,
1491 1874.74,1871.09,1872.44,1873.79,1850.39,1826.99,1837.04,
1492 1847.09,1841.18,1835.28,1849.48,1863.69,1851.03,1838.38,
1493 1840.73,1843.08,1802.83,1762.58,1778.78,1794.99,1777.48,
1494 1759.98,1764.73,1769.49,1753.48,1737.48,1713.14,1688.80,
1495 1702.88,1716.97,1696.07,1675.17,1672.03,1668.89,1663.56,
1496 1658.23,1647.75,1637.27,1630.02,1622.77,1606.06,1589.36,
1497 1552.29,1515.22,1528.91,1542.60,1548.90,1555.21,1544.41,
1498 1533.62,1525.24,1516.86,1507.92,1498.98,1484.07,1469.17,
1499 1464.28,1459.39,1448.73,1438.08,1423.16,1408.24,1407.53,
1500 1406.82,1397.82,1388.82,1378.51,1368.21,1352.13,1336.05,
1501 1343.88,1351.71,1339.60,1327.50,1320.72,1313.94,1294.94,
1502 1275.94,1280.92,1285.90,1278.04,1270.19,1263.68,1257.18,
1503 1249.80,1242.41,1231.30,1220.19,1212.14,1204.10,1201.69,
1504 1199.29,1194.78,1190.27,1185.47,1180.68,1174.38,1168.09,
1505 1156.17,1144.26,1143.46,1142.67,1132.95,1123.23,1116.71,
1506 1110.19,1110.89,1111.59,1094.80,1078.01,1077.75,1077.49,
1507 1073.89,1070.29,1058.71,1047.13,1045.66,1044.20,1037.03,
1508 1029.86,1010.40, 990.94, 966.91, 942.89, 972.87,1002.86,
1509 978.93, 955.00, 960.95, 966.91, 983.31, 999.71, 991.91,
1510 984.11, 979.05, 973.99, 968.79, 963.60, 958.23, 952.87,
1511 947.93, 942.99, 937.99, 933.00, 928.00, 923.00, 918.18,
1512 913.37, 908.74, 904.11, 899.05, 893.99, 889.18, 884.37,
1513 879.74, 875.12, 870.24, 865.36, 860.94, 856.53, 852.02,
1514 847.50, 843.00, 838.50, 833.99, 829.49, 824.98, 820.48,
1515 815.99, 811.50, 806.99, 802.49, 798.17, 793.86, 789.74,
1516 785.63, 781.25, 776.87, 772.92, 768.98, 764.80, 760.63,
1517 756.06, 751.49, 746.99, 742.49, 738.18, 733.88, 729.76,
1518 725.63, 721.24, 716.86, 712.92, 708.99, 704.81, 700.63,
1519 696.25, 691.87, 687.94, 684.01, 680.01, 676.00, 671.80,
1520 667.61, 663.23, 658.86, 655.32, 651.77, 649.07, 646.37,
1521 643.74, 641.11, 638.05, 634.99, 632.18, 629.37, 626.74,
1522 624.12, 621.06, 618.00, 615.18, 612.37, 609.92, 607.48,
1523 604.79, 602.11, 599.24, 596.38, 593.93, 591.48, 588.79,
1524 586.11, 583.25, 580.40, 577.94, 575.48, 572.99, 570.51,
1525 568.00, 565.49, 562.98, 560.47, 557.98, 555.50, 553.01,
1526 550.51, 548.00, 545.49, 542.98, 540.48, 537.98, 535.49,
1527 533.19, 530.90, 528.94, 526.99, 524.80, 522.62, 520.24,
1528 517.87, 515.44, 513.01, 509.59, 506.17, 502.89, 499.62,
1529 496.35, 493.09, 489.81, 486.54, 483.27, 480.01, 476.73,
1530 473.46, 470.19, 466.92, 463.64, 460.37, 457.10, 453.84,
1531 450.57, 447.30, 444.03, 440.76, 437.48, 434.21, 430.94,
1532 427.67, 424.40, 421.13, 417.86, 414.59, 411.32, 408.05,
1533 404.78, 401.51, 398.24, 394.97, 391.70, 388.43, 392.57,
1534 396.71, 401.92, 407.14, 405.32, 403.50, 401.67, 399.84,
1535 398.02, 396.21, 394.37, 392.54, 390.72, 388.90, 387.06,
1536 385.23, 383.42, 381.60, 379.77, 377.95, 376.12, 374.30,
1537 372.48, 370.66, 368.82, 366.99, 365.17, 363.35, 361.52,
1538 359.69, 357.87, 356.05, 354.22, 352.39, 350.57, 348.75,
1539 346.92, 345.10, 343.27, 341.45, 341.84, 342.24, 342.95,
1540 343.66, 342.27, 340.89, 339.49, 338.09, 336.69, 335.30,
1541 333.91, 332.53, 331.13, 329.73, 328.34, 326.96, 325.56,
1542 324.16, 322.77, 321.39, 319.99, 318.59, 317.20, 315.82,
1543 314.42, 313.03, 311.63, 310.24, 308.85, 307.46, 306.06,
1544 304.66, 303.28, 301.90, 300.50, 299.10, 297.71, 296.32,
1545 294.93, 293.54, 293.41, 293.28, 293.35, 293.42, 292.26,
1546 291.10, 289.97, 288.84, 287.69, 286.54, 285.39, 284.25,
1547 283.10, 281.96, 280.81, 279.67, 278.52, 277.38, 276.23,
1548 275.08, 273.94, 272.80, 271.65, 270.51, 269.36, 268.22,
1549 267.07, 265.93, 264.78, 263.64, 262.49, 261.34, 260.20,
1550 259.06, 257.91, 256.77, 255.62, 254.47, 253.33, 252.20,
1551 251.16, 250.13, 249.11, 248.09, 246.97, 245.86, 244.74,
1552 243.61, 242.49, 241.37, 240.24, 239.12, 238.00, 236.89,
1553 235.76, 234.64, 233.51, 232.38, 231.26, 230.13, 229.01,
1554 227.90, 226.77, 225.65, 224.53, 223.42, 222.29, 221.16,
1555 220.04, 218.92, 217.80, 216.68, 215.55, 214.43, 213.30,
1556 212.18, 211.06, 209.94, 208.82, 207.69, 206.99, 206.29,
1557 205.65, 205.02, 203.98, 202.95, 201.90, 200.85, 199.81,
1558 198.78, 197.74, 196.70, 195.65, 194.61, 193.57, 192.54,
1559 191.50, 190.47, 189.42, 188.37, 187.33, 186.30, 185.26,
1560 184.22, 183.18, 182.14, 181.10, 180.06, 179.02, 177.98,
1561 176.93, 175.89, 174.86, 173.83, 172.78, 171.73, 170.70,
1562 169.67, 168.62, 167.57, 167.59, 167.60, 167.76, 167.93,
1563 167.09, 166.26, 165.42, 164.58, 163.75, 162.92, 162.08,
1564 161.25, 160.41, 159.58, 158.74, 157.91, 157.07, 156.24,
1565 155.40, 154.57, 153.73, 152.90, 152.06, 151.23, 150.39,
1566 149.56, 148.72, 147.89, 147.06, 146.23, 145.39, 144.55,
1567 143.71, 142.88, 142.05, 141.22, 140.38, 139.54, 138.70,
1568 137.86, 137.99, 138.11, 138.36, 138.60, 137.94, 137.29,
1569 136.64, 136.00, 135.35, 134.71, 134.05, 133.39, 132.74,
1570 132.09, 131.45, 130.81, 130.15, 129.49, 128.84, 128.20,
1571 127.55, 126.90, 126.25, 125.60, 124.94, 124.29, 123.64,
1572 123.00, 122.35, 121.70, 121.05, 120.40, 119.74, 119.09,
1573 118.45, 117.81, 117.15, 116.50, 115.85, 115.19, 115.25,
1574 115.31, 115.46, 115.62, 115.11, 114.60, 114.09, 113.58,
1575 113.06, 112.54, 112.03, 111.53, 111.01, 110.50, 109.99,
1576 109.47, 108.95, 108.44, 107.93, 107.42, 106.92, 106.42,
1577 105.89, 105.37, 104.85, 104.34, 103.83, 103.33, 102.81,
1578 102.29, 101.79, 101.29, 100.77, 100.25, 99.74, 99.22,
1579 98.71, 98.20, 97.69, 97.18, 97.12, 97.07, 97.09,
1580 97.11, 96.68, 96.26, 95.84, 95.42, 94.99, 94.56,
1581 94.14, 93.72, 93.31, 92.89, 92.46, 92.03, 91.61,
1582 91.19, 90.76, 90.34, 89.92, 89.49, 89.07, 88.66,
1583 88.24, 87.81, 87.39, 86.97, 86.55, 86.12, 85.69,
1584 85.26, 84.85, 84.43, 84.01, 83.59, 83.17, 82.75,
1585 82.32, 81.89, 81.89, 81.89, 81.95, 82.02, 81.68,
1586 81.35, 81.00, 80.65, 80.32, 79.99, 79.64, 79.30,
1587 78.96, 78.61, 78.27, 77.94, 77.60, 77.26, 76.91,
1588 76.57, 76.24, 75.90, 75.56, 75.22, 74.88, 74.54,
1589 74.20, 73.86, 73.52, 73.18, 72.84, 72.50, 72.16,
1590 71.82, 71.48, 71.14, 70.80, 70.47, 70.13, 69.79,
1591 69.76, 69.73, 69.76, 69.80, 69.52, 69.24, 68.96,
1592 68.68, 68.41, 68.14, 67.85, 67.57, 67.29, 67.02,
1593 66.75, 66.48, 66.19, 65.90, 65.63, 65.36, 65.08,
1594 64.80, 64.53, 64.25, 63.97, 63.69, 63.41, 63.14,
1595 62.85, 62.57, 62.30, 62.03, 61.75, 61.47, 61.19,
1596 60.92, 60.64, 60.36, 60.08, 59.81, 59.80, 59.80,
1597 59.82, 59.85, 59.63, 59.40, 59.17, 58.95, 58.73,
1598 58.50, 58.28, 58.06, 57.83, 57.60, 57.37, 57.15,
1599 56.93, 56.70, 56.48, 56.26, 56.03, 55.79, 55.57,
1600 55.36, 55.13, 54.90, 54.66, 54.43, 54.22, 54.00,
1601 53.77, 53.55, 53.32, 53.09, 52.87, 52.65, 52.43,
1602 52.20, 51.97, 51.75, 51.72, 51.68, 51.67, 51.67,
1603 51.48, 51.30, 51.11, 50.92, 50.73, 50.55, 50.37,
1604 50.18, 49.98, 49.79, 49.61, 49.43, 49.23, 49.04,
1605 48.85, 48.67, 48.48, 48.30, 48.12, 47.93, 47.73,
1606 47.54, 47.36, 47.18, 46.98, 46.79, 46.60, 46.42,
1607 46.24, 46.06, 45.87, 45.67, 45.48, 45.30, 45.12,
1608 44.93, 44.87, 44.82, 44.80, 44.79, 44.62, 44.45,
1609 44.29, 44.14, 43.98, 43.83, 43.66, 43.49, 43.34,
1610 43.18, 43.02, 42.86, 42.70, 42.55, 42.38, 42.21,
1611 42.06, 41.90, 41.74, 41.58, 41.42, 41.26, 41.10,
1612 40.94, 40.78, 40.62, 40.46, 40.31, 40.14, 39.97,
1613 39.81, 39.66, 39.50, 39.34, 39.18, 39.03, 38.99,
1614 38.96, 38.94, 38.92, 38.79, 38.66, 38.52, 38.38,
1615 38.25, 38.12, 37.99, 37.86, 37.72, 37.58, 37.44,
1616 37.30, 37.17, 37.05, 36.91, 36.77, 36.64, 36.50,
1617 36.36, 36.23, 36.09, 35.96, 35.82, 35.69, 35.55,
1618 35.42, 35.28, 35.15, 35.01, 34.88, 34.75, 34.61,
1619 34.47, 34.34, 34.20, 34.07, 34.05, 34.03, 34.03,
1620 34.03, 33.91, 33.79, 33.68, 33.57, 33.46, 33.35,
1621 33.23, 33.12, 33.01, 32.90, 32.78, 32.67, 32.55,
1622 32.44, 32.33, 32.23, 32.11, 32.00, 31.89, 31.77,
1623 31.66, 31.55, 31.43, 31.31, 31.20, 31.10, 30.99,
1624 30.87, 30.76, 30.66, 30.54, 30.42, 30.31, 30.20,
1625 30.08, 29.97, 29.93, 29.90, 29.88, 29.87, 29.76,
1626 29.66, 29.56, 29.46, 29.36, 29.27, 29.17, 29.08,
1627 28.98, 28.88, 28.77, 28.67, 28.58, 28.49, 28.39,
1628 28.30, 28.20, 28.10, 28.00, 27.91, 27.81, 27.71,
1629 27.61, 27.52, 27.41, 27.31, 27.21, 27.12, 27.03,
1630 26.93, 26.83, 26.74, 26.64, 26.54, 26.44, 26.35,
1631 26.33, 26.31, 26.29, 26.28, 26.20, 26.12, 26.04,
1632 25.95, 25.87, 25.79, 25.71, 25.64, 25.54, 25.45,
1633 25.37, 25.30, 25.21, 25.12, 25.05, 24.98, 24.89,
1634 24.80, 24.71, 24.63, 24.55, 24.47, 24.39, 24.31,
1635 24.22, 24.14, 24.05, 23.97, 23.89, 23.81, 23.73,
1636 23.66, 23.56, 23.47, 23.39, 23.31, 23.28, 23.26,
1637 23.23, 23.21, 23.13, 23.06, 22.99, 22.92, 22.84,
1638 22.76, 22.69, 22.63, 22.55, 22.47, 22.41, 22.35,
1639 22.27, 22.19, 22.11, 22.04, 21.97, 21.90, 21.83,
1640 21.76, 21.68, 21.60, 21.53, 21.47, 21.39, 21.31,
1641 21.24, 21.18, 21.11, 21.03, 20.96, 20.89, 20.81,
1642 20.73, 20.66, 20.60, 20.57, 20.55, 20.54, 20.53,
1643 20.46, 20.40, 20.34, 20.28, 20.21, 20.14, 20.08,
1644 20.03, 19.96, 19.90, 19.83, 19.77, 19.71, 19.65,
1645 19.59, 19.53, 19.46, 19.39, 19.33, 19.27, 19.21,
1646 19.15, 19.08, 19.02, 18.96, 18.90, 18.84, 18.78,
1647 18.71, 18.64, 18.58, 18.53, 18.46, 18.40, 18.33,
1648 18.27, 18.26, 18.25, 18.24, 18.24, 18.19, 18.14,
1649 18.08, 18.03, 17.98, 17.93, 17.88, 17.83, 17.77,
1650 17.71, 17.66, 17.62, 17.56, 17.50, 17.45, 17.41,
1651 17.35, 17.29, 17.25, 17.21, 17.14, 17.08, 17.04,
1652 17.00, 16.93, 16.87, 16.83, 16.79, 16.72, 16.66,
1653 16.61, 16.57, 16.51, 16.46, 16.41, 16.36, 16.34,
1654 16.33, 16.31, 16.30, 16.26, 16.22, 16.17, 16.13,
1655 16.08, 16.04, 16.00, 15.96, 15.90, 15.84, 15.81,
1656 15.78, 15.73, 15.68, 15.63, 15.59, 15.55, 15.50,
1657 15.45, 15.40, 15.36, 15.32, 15.28, 15.24, 15.18,
1658 15.13, 15.09, 15.05, 15.01, 14.96, 14.91, 14.87,
1659 14.82, 14.78, 14.73, 14.69, 14.66, 14.64, 14.64,
1660 14.63, 14.59, 14.55, 14.50, 14.45, 14.41, 14.38,
1661 14.35, 14.32, 14.26, 14.21, 14.18, 14.15, 14.10,
1662 14.05, 14.01, 13.98, 13.94, 13.91, 13.86, 13.82,
1663 13.78, 13.74, 13.70, 13.67, 13.62, 13.58, 13.54,
1664 13.50, 13.46, 13.43, 13.39, 13.35, 13.30, 13.25,
1665 13.22, 13.18, 13.17, 13.16, 13.14, 13.12, 13.09,
1666 13.06, 13.03, 13.00, 12.96, 12.92, 12.89, 12.85,
1667 12.81, 12.78, 12.74, 12.70, 12.67, 12.65, 12.61,
1668 12.57, 12.53, 12.50, 12.46, 12.43, 12.39, 12.36,
1669 12.32, 12.28, 12.25, 12.22, 12.18, 12.15, 12.11,
1670 12.07, 12.04, 12.01, 11.97, 11.94, 11.90, 11.86,
1671 11.85, 11.85, 11.85, 11.84, 11.81, 11.78, 11.75,
1672 11.72, 11.69, 11.66, 11.63, 11.60, 11.58, 11.55,
1673 11.51, 11.47, 11.45, 11.42, 11.39, 11.36, 11.33,
1674 11.30, 11.27, 11.24, 11.21, 11.18, 11.15, 11.12,
1675 11.09, 11.06, 11.03, 11.00, 10.97, 10.94, 10.91,
1676 10.89, 10.85, 10.82, 10.78, 10.75, 10.73, 10.72,
1677 10.71, 10.70, 10.67, 10.64, 10.62, 10.59, 10.55,
1678 10.52, 10.50, 10.47, 10.44, 10.42, 10.39, 10.37,
1679 10.34, 10.31, 10.28, 10.25, 10.22, 10.20, 10.17,
1680 10.15, 10.12, 10.10, 10.06, 10.03, 10.00, 9.98,
1681 9.95, 9.92, 9.89, 9.86, 9.84, 9.82, 9.79,
1682 9.75, 9.73, 9.71, 9.70, 9.70, 9.70, 9.70,
1683 9.67, 9.63, 9.61, 9.59, 9.58, 9.56, 9.53,
1684 9.50, 9.48, 9.45, 9.43, 9.41, 9.39, 9.36,
1685 9.34, 9.32, 9.30, 9.27, 9.24, 9.22, 9.20,
1686 9.18, 9.15, 9.13, 9.11, 9.08, 9.06, 9.05,
1687 9.02, 8.99, 8.96, 8.94, 8.92, 8.90, 8.87,
1688 8.85, 8.83, 8.81
1689 };
1690
1691 double pas = 0.0025;
1692 int iwl = (int)((fwl - 0.250) / pas + 1.5);
1693
1694 if(iwl >= 0) return si[iwl-1];
1695
1696 cout << " wavelength less than 0.25 micron: " << endl << " let's take s(l)=s(0.25)" << endl;
1697 return si[0];
1698 }
1699
irs_1c_liss(int iwa)1700 void IWave::irs_1c_liss(int iwa)
1701 {
1702 /* 2nd spectral band of IRS 1C LISS III */
1703 static const float sr2[61] = {
1704 .0006, .0009, .0012, .0020, .0036, .0080, .0216, .0655,
1705 .1690, .3080, .4280, .5600, .7010, .7600, .7640, .7690,
1706 .7960, .8400, .8760, .8820, .8670, .8560, .8620, .8890,
1707 .9240, .9480, .9590, .9540, .9460, .9490, .9660, .9860,
1708 1.0000,.9960, .9740, .9490, .9340, .9340, .9340, .9210,
1709 .8820, .8300, .7880, .7770, .7670, .6640, .4190, .1980,
1710 .0882, .0396, .0192, .0107, .0066, .0041, .0026, .0018,
1711 .0012, .0010, .0007, .0006
1712 };
1713
1714 /* 3rd spectral band of IRS 1C LISS III */
1715 static const float sr3[45] = {
1716 .0041, .0110, .0357, .1310, .4020, .7200, .8300, .8700,
1717 .8980, .9120, .9230, .9300, .9320, .9310, .9270, .9300,
1718 .9390, .9510, .9580, .9600, .9630, .9700, .9890,1.0000,
1719 .9880, .9390, .8740, .8220, .8040, .8350, .9000, .9620,
1720 .9730, .9410, .9170, .8790, .6460, .2940, .1050, .0390,
1721 .0105, .0040, .0020, .0010, .0000
1722 };
1723
1724 /* 4th spectral band of IRS 1C LISS III */
1725 static const float sr4[65] = {
1726 .0090, .0149, .0244, .0400, .0649, .1020, .1520, .2170,
1727 .2940, .3820, .4830, .6120, .7270, .8320, .9180, .9760,
1728 1.0000,.9970, .9800, .9590, .9410, .9330, .9330, .9390,
1729 .9480, .9550, .9620, .9580, .9500, .9380, .9270, .9150,
1730 .9100, .9050, .9050, .9020, .8970, .8900, .8830, .8740,
1731 .8690, .8700, .8720, .8740, .8680, .8490, .8150, .7720,
1732 .7310, .6990, .6840, .6800, .6640, .5750, .4060, .2280,
1733 .1240, .0641, .0356, .0206, .0126, .0080, .0052, .0035,
1734 .0025
1735 };
1736
1737 /* 5th spectral band of IRS 1C LISS III */
1738 static const float sr5[155] = {
1739 .0000, .0000, .0000, .0000, .0001, .0001, .0001, .0001,
1740 .0000, .0001, .0001, .0021, .0001, .0000, .0001, .0001,
1741 .0001, .0001, .0001, .0002, .0002, .0002, .0001, .0005,
1742 .0004, .0006, .0007, .0010, .0011, .0015, .0020, .0024,
1743 .0030, .0039, .0051, .0068, .0088, .0114, .0153, .0206,
1744 .0281, .0372, .0515, .0708, .0983, .1370, .1870, .2580,
1745 .3470, .4410, .5340, .6190, .6920, .7510, .7940, .8270,
1746 .8500, .8680, .8800, .8920, .9010, .9090, .9170, .9250,
1747 .9310, .9400, .9490, .9590, .9700, .9760, .9850, .9920,
1748 .9960,1.0000,1.0000, .9960, .9910, .9860, .9790, .9730,
1749 .9680, .9660, .9620, .9640, .9670, .9700, .9750, .9810,
1750 .9850, .9880, .9840, .9770, .9690, .9560, .9400, .9240,
1751 .9080, .8880, .8710, .8570, .8410, .8300, .8220, .8180,
1752 .8170, .8220, .8290, .8370, .8460, .8550, .8450, .8310,
1753 .8110, .7870, .7580, .7180, .6780, .6380, .5990, .5640,
1754 .5280, .4930, .4590, .4210, .3770, .3320, .2770, .2160,
1755 .1580, .1110, .0772, .0528, .0357, .0242, .0165, .0117,
1756 .0083, .0059, .0042, .0031, .0023, .0017, .0013, .0009,
1757 .0007, .0005, .0004, .0002, .0002, .0001, .0001, .0001,
1758 .0001, .0000, .0000
1759 };
1760
1761 static const float wli[4] = { 0.502, 0.612, 0.752, 1.452 };
1762 static const float wls[4] = { 0.620, 0.700, 0.880, 1.760 };
1763
1764 ffu.wlinf = wli[iwa-1];
1765 ffu.wlsup = wls[iwa-1];
1766
1767 int i;
1768 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
1769
1770 switch(iwa)
1771 {
1772 case 1: for(i = 0; i < 61; i++) ffu.s[101+i] = sr2[i];
1773 break;
1774 case 2: for(i = 0; i < 45; i++) ffu.s[145+i] = sr3[i];
1775 break;
1776 case 3: for(i = 0; i < 65; i++) ffu.s[201+i] = sr4[i];
1777 break;
1778 case 4: for(i = 0; i < 155; i++) ffu.s[481+i] = sr5[i];
1779 break;
1780 }
1781 }
1782
aster(int iwa)1783 void IWave::aster(int iwa)
1784 {
1785 /* Spectral filter data found on the following page:
1786 http://www.science.aster.ersdac.or.jp/en/about_aster/sensor/
1787 */
1788 /* Band 1 of Aster; Central Wavelength = 556nm */
1789 static const float sr1[67] = {
1790 .0000, .0054, .0073, .0078, .0076, .0074, .0093, .0217,
1791 .0580, .0947, .1566, .2694, .3712, .4813, .6204, .7414,
1792 .8392, .9077, .9552, .9878, .9973, .9992, .9781, .9373,
1793 .8900, .8784, .8786, .8941, .8993, .9049, .9231, .9238,
1794 .9184, .9301, .9423, .9493, .9522, .9548, .9598, .9593,
1795 .9528, .9256, .8967, .8748, .8265, .7625, .7065, .6282,
1796 .5206, .3775, .2535, .1629, .1168, .0859, .0593, .0451,
1797 .0355, .0174, .0078, .0049, .0040, .0038, .0053, .0052,
1798 .0037, .0023, .0000
1799 };
1800
1801 /* Band 2 of Aster; Central Wavelength = 659nm */
1802 static const float sr2[59] = {
1803 .0000, .0038, .0034, .0008, .0008, .0024, .0029, .0006,
1804 .0047, .0050, .0033, .0049, .0126, .0000, .1220, .2738,
1805 .4703, .6723, .8350, .9709, .9990, .9835, .9715, .9710,
1806 .9734, .9430, .9095, .9305, .9418, .9386, .9202, .9100,
1807 .8973, .8606, .8195, .7986, .7889, .7702, .7538, .6961,
1808 .6087, .5186, .4523, .4258, .3811, .3244, .2591, .1854,
1809 .1121, .0623, .0469, .0334, .0181, .0112, .0010, .0054,
1810 .0044, .0017, .0000
1811 };
1812
1813 /* Band 3N (N=Nadir pointing) of Aster; Central Wavelength = 807nm */
1814 static const float sr3[77] = {
1815 .0000, .0017, .0078, .0167, .0285, .0447, .0492, .0509,
1816 .0744, .1160, .1768, .2527, .3625, .5534, .8008,1.0000,
1817 .9903, .9613, .9012, .9032, .9197, .9655, .9868, .9942,
1818 .9857, .9745, .9648, .9465, .9368, .9634, .9760, .9820,
1819 .9938, .9968, .9908, .9810, .9756, .9855, .9832, .9694,
1820 .9587, .9527, .9499, .9357, .9263, .9552, .9579, .9489,
1821 .9447, .9399, .9322, .8945, .8220, .7353, .6193, .4813,
1822 .3584, .2614, .1890, .1269, .0841, .0618, .0442, .0318,
1823 .0277, .0245, .0213, .0130, .0075, .0074, .0068, .0049,
1824 .0030, .0024, .0024, .0017, .0000
1825 };
1826
1827 /* Band 4 of Aster; Central Wavelength = 1657nm */
1828 static const float sr4[89] = {
1829 .0000, .0001, .0001, .0002, .0004, .0005, .0007, .0009,
1830 .0012, .0014, .0017, .0021, .0024, .0028, .0032, .0036,
1831 .0040, .0045, .0054, .0065, .0080, .0112, .0170, .0245,
1832 .0330, .0450, .0740, .0990, .1520, .2140, .3050, .4200,
1833 .5970, .6750, .7900, .8270, .8400, .8408, .9010, .9050,
1834 .9100, .9140, .9050, .9260, .9470, .9670, .9760, .9840,
1835 .9710, .9790, .9880,1.0000, .9902, .9840, .9780, .9710,
1836 .9470, .9510, .9450, .9380, .9340, .9300, .9360, .9420,
1837 .9140, .8970, .7980, .7000, .5970, .4610, .3700, .2630,
1838 .1730, .1259, .0888, .0619, .0450, .0346, .0267, .0207,
1839 .0160, .0120, .0086, .0060, .0040, .0025, .0013, .0003,
1840 .0000
1841 };
1842
1843 /* Band 5 of Aster; Central Wavelength = 2169nm */
1844 static const float sr5[74] = {
1845 .0000, .0001, .0007, .0017, .0030, .0045, .0062, .0080,
1846 .0100, .0124, .0157, .0200, .0290, .0410, .0780, .1310,
1847 .2050, .3030, .5410, .7050, .7790, .7910, .8030, .8220,
1848 .8400, .9180, .9590,1.0000, .9750, .9020, .7790, .6890,
1849 .5900, .4180, .3030, .2300, .1720, .1070, .0700, .0610,
1850 .0498, .0385, .0273, .0160, .0140, .0120, .0100, .0080,
1851 .0070, .0060, .0050, .0040, .0038, .0036, .0034, .0033,
1852 .0031, .0029, .0027, .0025, .0024, .0023, .0021, .0020,
1853 .0019, .0017, .0016, .0015, .0013, .0011, .0008, .0005,
1854 .0002, .0000
1855 };
1856
1857 /* Band 6 of Aster; Central Wavelength = 2209nm */
1858 static const float sr6[78] = {
1859 .0000, .0001, .0001, .0003, .0005, .0007, .0010, .0014,
1860 .0018, .0022, .0027, .0032, .0037, .0044, .0050, .0057,
1861 .0064, .0072, .0080, .0092, .0110, .0133, .0160, .0194,
1862 .0240, .0298, .0370, .0490, .0660, .1070, .1720, .2540,
1863 .3520, .5000, .6020, .7420, .7620, .7790, .8520, .8690,
1864 .8860, .9020, .9290, .9550, .9840,1.0000, .9340, .8200,
1865 .7540, .5160, .3280, .2380, .1640, .1070, .0570, .0468,
1866 .0365, .0263, .0160, .0140, .0120, .0100, .0080, .0070,
1867 .0060, .0050, .0040, .0036, .0032, .0029, .0025, .0022,
1868 .0018, .0015, .0011, .0006, .0002, .0000
1869 };
1870
1871 /* Band 7 of Aster; Central Wavelength = 2263nm */
1872 static const float sr7[78] = {
1873 .0000, .0012, .0031, .0054, .0080, .0111, .0149, .0195,
1874 .0250, .0330, .0490, .0700, .1150, .1760, .2500, .3850,
1875 .5080, .6560, .7950, .8690, .8480, .9100, .9100, .9260,
1876 .9260, .9430, .9590, .9750, .9750,1.0000, .9590, .8690,
1877 .7990, .7050, .6230, .5000, .3930, .3030, .2420, .1760,
1878 .1270, .1060, .0840, .0625, .0410, .0370, .0330, .0290,
1879 .0250, .0230, .0215, .0199, .0182, .0165, .0147, .0130,
1880 .0112, .0093, .0084, .0078, .0074, .0070, .0067, .0062,
1881 .0058, .0053, .0049, .0044, .0040, .0035, .0031, .0027,
1882 .0022, .0018, .0013, .0008, .0004, .0000
1883 };
1884
1885 /* Band 8 of Aster; Central Wavelength = 2334nm */
1886 static const float sr8[92] = {
1887 .0000, .0026, .0055, .0081, .0103, .0120, .0131, .0138,
1888 .0147, .0160, .0195, .0260, .0347, .0450, .0610, .0820,
1889 .1060, .1390, .2040, .2860, .4490, .6040, .7020, .8330,
1890 .9710, .9880, .9550, .9800, .9770, .9750, .9720, .9700,
1891 .9670, .9470, .9620, .9770, .9920,1.0000, .9800, .9960,
1892 .9920, .9960, .9550, .9630, .9060, .8370, .7840, .7020,
1893 .5800, .4410, .3430, .2780, .2200, .1670, .1307, .0996,
1894 .0747, .0570, .0440, .0332, .0250, .0200, .0171, .0150,
1895 .0134, .0120, .0108, .0098, .0089, .0080, .0070, .0059,
1896 .0049, .0040, .0031, .0022, .0015, .0012, .0010, .0009,
1897 .0008, .0007, .0006, .0005, .0004, .0004, .0003, .0002,
1898 .0002, .0001, .0001, .0000
1899 };
1900
1901 /* Band 9 of Aster; Central Wavelength = 2400nm */
1902 static const float sr9[98] = {
1903 .0000, .0004, .0012, .0020, .0028, .0036, .0044, .0053,
1904 .0062, .0071, .0080, .0089, .0098, .0108, .0120, .0133,
1905 .0148, .0169, .0200, .0290, .0450, .0650, .0780, .1100,
1906 .1550, .2290, .3270, .4240, .5390, .7270, .7840, .9060,
1907 .9270, .8980, .9000, .9010, .9030, .9040, .9060, .9310,
1908 .9270, .9220, .9610,1.0000, .9800, .9590, .9270, .8940,
1909 .8690, .8330, .8160, .7670, .7020, .6610, .5630, .4240,
1910 .3430, .2610, .1920, .1439, .1021, .0695, .0490, .0369,
1911 .0274, .0205, .0160, .0132, .0111, .0094, .0080, .0066,
1912 .0053, .0044, .0040, .0051, .0073, .0087, .0088, .0088,
1913 .0087, .0087, .0086, .0085, .0084, .0082, .0079, .0076,
1914 .0072, .0067, .0062, .0055, .0047, .0039, .0029, .0018,
1915 .0005, .0000
1916 };
1917
1918 static const float wli[9] = { 0.4800, 0.5875, 0.7225, 1.5300, 2.1025, 2.1050, 2.2000, 2.2475, 2.2950 };
1919 static const float wls[9] = { 0.6450, 0.7325, 0.9125, 1.7500, 2.2850, 2.2975, 2.3925, 2.4750, 2.5375 };
1920
1921 ffu.wlinf = wli[iwa-1];
1922 ffu.wlsup = wls[iwa-1];
1923
1924 int i;
1925 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
1926
1927 switch(iwa)
1928 {
1929 case 1: for(i = 0; i < 67; i++) ffu.s[92+i] = sr1[i];
1930 break;
1931 case 2: for(i = 0; i < 59; i++) ffu.s[135+i] = sr2[i];
1932 break;
1933 case 3: for(i = 0; i < 77; i++) ffu.s[189+i] = sr3[i];
1934 break;
1935 case 4: for(i = 0; i < 89; i++) ffu.s[512+i] = sr4[i];
1936 break;
1937 case 5: for(i = 0; i < 74; i++) ffu.s[741+i] = sr5[i];
1938 break;
1939 case 6: for(i = 0; i < 78; i++) ffu.s[742+i] = sr6[i];
1940 break;
1941 case 7: for(i = 0; i < 78; i++) ffu.s[780+i] = sr7[i];
1942 break;
1943 case 8: for(i = 0; i < 92; i++) ffu.s[799+i] = sr8[i];
1944 break;
1945 case 9: for(i = 0; i < 98; i++) ffu.s[818+i] = sr9[i];
1946 }
1947 }
1948
1949 /* Following filter function created using create_iwave.py */
1950
avnir(int iwa)1951 void IWave::avnir(int iwa)
1952 {
1953 /* "band 1" of AVNIR */
1954 static const float sr1[52] = {
1955 .0008, .0017, .0049, .0080, .0186, .0293, .0776, .1260,
1956 .2609, .3958, .5315, .6672, .6947, .7223, .7262, .7300,
1957 .7272, .7245, .7717, .8189, .8502, .8815, .9068, .9322,
1958 .9496, .9669, .9708, .9747, .9873, 1.0000, .9849, .9699,
1959 .9507, .9316, .9365, .9415, .9632, .9849, .9600, .9351,
1960 .7552, .5754, .3911, .2068, .1361, .0655, .0440, .0226,
1961 .0150, .0075, .0046, .0018
1962 };
1963
1964 /* "band 2" of AVNIR */
1965 static const float sr2[52] = {
1966 .0008, .0015, .0030, .0045, .0123, .0202, .0470, .0739,
1967 .1358, .1977, .3205, .4433, .5633, .6832, .7137, .7442,
1968 .7594, .7746, .8089, .8432, .8576, .8719, .8721, .8724,
1969 .8873, .9022, .9254, .9486, .9625, .9764, .9882, 1.0000,
1970 .9904, .9808, .9349, .8890, .8367, .7843, .7651, .7458,
1971 .7156, .6854, .5639, .4425, .3005, .1586, .0985, .0384,
1972 .0236, .0088, .0053, .0017
1973 };
1974
1975 /* "band 3" of AVNIR */
1976 static const float sr3[72] = {
1977 .0008, .0016, .0025, .0034, .0043, .0051, .0075, .0099,
1978 .0126, .0153, .0228, .0304, .0462, .0620, .0995, .1370,
1979 .2107, .2844, .3857, .4871, .5747, .6624, .7198, .7771,
1980 .7896, .8021, .7991, .7960, .7989, .8017, .8312, .8606,
1981 .8982, .9359, .9592, .9825, .9912, 1.0000, .9931, .9862,
1982 .9568, .9275, .9046, .8818, .8607, .8395, .8344, .8293,
1983 .8215, .8136, .7470, .6804, .5481, .4158, .3100, .2043,
1984 .1471, .0898, .0634, .0369, .0273, .0177, .0135, .0093,
1985 .0076, .0060, .0045, .0030, .0023, .0015, .0016, .0016
1986
1987 };
1988
1989 /* "band 4" of AVNIR */
1990 static const float sr4[102] = {
1991 .0011, .0023, .0023, .0022, .0033, .0045, .0080, .0115,
1992 .0190, .0264, .0484, .0704, .1138, .1572, .2351, .3129,
1993 .4431, .5733, .7244, .8754, .9377, 1.0000, .9884, .9768,
1994 .9528, .9288, .9091, .8894, .8763, .8633, .8627, .8622,
1995 .8753, .8885, .9136, .9388, .9437, .9486, .9531, .9576,
1996 .9411, .9247, .8969, .8691, .8467, .8242, .7893, .7545,
1997 .7331, .7117, .6911, .6705, .6560, .6414, .6357, .6299,
1998 .6258, .6217, .6227, .6237, .6025, .5812, .5843, .5874,
1999 .5867, .5860, .5696, .5532, .5251, .4969, .4438, .3908,
2000 .3191, .2475, .1906, .1338, .1033, .0727, .0543, .0359,
2001 .0292, .0224, .0161, .0097, .0069, .0040, .0038, .0036,
2002 .0030, .0025, .0024, .0024, .0015, .0007, .0004, .0000,
2003 .0003, .0007, .0006, .0006, .0006, .0006
2004 };
2005
2006 static const float wli[4] = {0.3975, 0.4925, 0.5625, 0.7175};
2007 static const float wls[4] = {0.5275, 0.6225, 0.7425, 0.9725};
2008
2009 ffu.wlinf = (float)wli[iwa-1];
2010 ffu.wlsup = (float)wls[iwa-1];
2011
2012 int i;
2013 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
2014
2015 switch(iwa)
2016 {
2017 case 1: for(i = 0; i < 52; i++) ffu.s[59+i] = sr1[i];
2018 break;
2019 case 2: for(i = 0; i < 52; i++) ffu.s[97+i] = sr2[i];
2020 break;
2021 case 3: for(i = 0; i < 72; i++) ffu.s[125+i] = sr3[i];
2022 break;
2023 case 4: for(i = 0; i < 102; i++) ffu.s[187+i] = sr4[i];
2024 break;
2025 }
2026 }
2027
2028 /* Following filter function created using create_iwave.py */
2029
ikonos(int iwa)2030 void IWave::ikonos(int iwa)
2031 {
2032
2033 /* Ikonos Green of ikonos */
2034 static const float sr1[274] = {
2035 .0008, .0011, .0015, .0012, .0009, .0008, .0007, .0007,
2036 .0007, .0010, .0013, .0015, .0017, .0018, .0019, .0024,
2037 .0028, .0040, .0052, .0064, .0077, .0082, .0088, .0103,
2038 .0119, .0147, .0175, .0262, .0350, .0602, .0854, .1392,
2039 .1929, .2617, .3305, .3750, .4195, .4638, .5082, .5607,
2040 .6132, .6437, .6742, .6973, .7204, .7406, .7608, .7605,
2041 .7601, .7742, .7883, .8225, .8566, .8730, .8894, .9165,
2042 .9436, .9718, 1.0000, .9934, .9868, .9562, .9255, .8434,
2043 .7613, .6519, .5424, .4282, .3139, .2590, .2041, .1780,
2044 .1519, .1188, .0856, .0644, .0432, .0371, .0310, .0288,
2045 .0266, .0244, .0222, .0221, .0221, .0242, .0262, .0279,
2046 .0296, .0283, .0270, .0248, .0226, .0240, .0254, .0280,
2047 .0305, .0289, .0274, .0243, .0213, .0215, .0217, .0257,
2048 .0296, .0319, .0342, .0306, .0271, .0233, .0195, .0195,
2049 .0195, .0193, .0190, .0165, .0140, .0107, .0073, .0067,
2050 .0060, .0056, .0051, .0065, .0079, .0101, .0123, .0161,
2051 .0200, .0210, .0221, .0214, .0208, .0199, .0190, .0172,
2052 .0155, .0126, .0097, .0083, .0068, .0059, .0049, .0052,
2053 .0054, .0085, .0115, .0169, .0222, .0231, .0240, .0180,
2054 .0121, .0080, .0040, .0031, .0022, .0024, .0026, .0024,
2055 .0023, .0029, .0035, .0030, .0025, .0024, .0023, .0032,
2056 .0040, .0038, .0036, .0032, .0027, .0025, .0024, .0025,
2057 .0026, .0024, .0022, .0019, .0016, .0016, .0016, .0018,
2058 .0020, .0020, .0020, .0023, .0025, .0031, .0036, .0046,
2059 .0056, .0061, .0066, .0071, .0075, .0078, .0080, .0087,
2060 .0095, .0089, .0083, .0085, .0088, .0090, .0093, .0100,
2061 .0107, .0116, .0125, .0128, .0131, .0131, .0131, .0125,
2062 .0119, .0112, .0105, .0100, .0095, .0091, .0088, .0086,
2063 .0084, .0083, .0082, .0081, .0080, .0082, .0084, .0082,
2064 .0081, .0081, .0080, .0080, .0080, .0074, .0069, .0062,
2065 .0054, .0051, .0048, .0046, .0045, .0043, .0041, .0038,
2066 .0036, .0035, .0035, .0034, .0033, .0030, .0028, .0028,
2067 .0028, .0026, .0024, .0024, .0023, .0025, .0026, .0026,
2068 .0026, .0026, .0026, .0021, .0016, .0018, .0019, .0022,
2069 .0024, .0019
2070 };
2071
2072 /* Ikonos Red of ikonos */
2073 static const float sr2[274] = {
2074 .0006, .0007, .0008, .0008, .0007, .0008, .0008, .0007,
2075 .0006, .0007, .0008, .0007, .0006, .0008, .0009, .0007,
2076 .0006, .0010, .0013, .0013, .0012, .0019, .0027, .0018,
2077 .0010, .0011, .0013, .0016, .0019, .0023, .0027, .0030,
2078 .0034, .0037, .0040, .0049, .0057, .0074, .0091, .0102,
2079 .0113, .0113, .0113, .0122, .0130, .0151, .0172, .0208,
2080 .0245, .0306, .0367, .0435, .0503, .0565, .0628, .0861,
2081 .1094, .1512, .1931, .2421, .2911, .3653, .4396, .5451,
2082 .6507, .7286, .8066, .8391, .8717, .8801, .8884, .8891,
2083 .8898, .8824, .8749, .8635, .8521, .8722, .8923, .9450,
2084 .9977, .9819, .9661, .9369, .9077, .9005, .8932, .9195,
2085 .9459, .9715, .9972, .9785, .9598, .9186, .8774, .8136,
2086 .7497, .6259, .5020, .3926, .2832, .2215, .1599, .1334,
2087 .1068, .0947, .0825, .0732, .0640, .0557, .0474, .0397,
2088 .0320, .0273, .0227, .0196, .0166, .0155, .0145, .0147,
2089 .0148, .0155, .0162, .0174, .0186, .0193, .0199, .0193,
2090 .0188, .0170, .0152, .0138, .0125, .0122, .0119, .0114,
2091 .0109, .0122, .0135, .0150, .0165, .0174, .0183, .0171,
2092 .0159, .0135, .0112, .0088, .0063, .0059, .0055, .0044,
2093 .0034, .0036, .0039, .0037, .0035, .0032, .0030, .0030,
2094 .0031, .0027, .0023, .0029, .0034, .0035, .0036, .0044,
2095 .0053, .0059, .0065, .0068, .0072, .0080, .0089, .0092,
2096 .0095, .0088, .0080, .0075, .0070, .0067, .0064, .0063,
2097 .0061, .0059, .0056, .0054, .0053, .0057, .0061, .0068,
2098 .0074, .0070, .0067, .0067, .0067, .0081, .0094, .0111,
2099 .0128, .0135, .0143, .0151, .0159, .0165, .0171, .0172,
2100 .0172, .0168, .0163, .0158, .0152, .0143, .0134, .0127,
2101 .0120, .0113, .0106, .0103, .0100, .0096, .0092, .0095,
2102 .0098, .0093, .0089, .0087, .0084, .0081, .0078, .0077,
2103 .0075, .0072, .0070, .0064, .0059, .0056, .0054, .0050,
2104 .0046, .0043, .0039, .0038, .0036, .0034, .0033, .0031,
2105 .0029, .0029, .0028, .0028, .0028, .0025, .0022, .0024,
2106 .0025, .0024, .0022, .0024, .0025, .0023, .0021, .0019,
2107 .0017, .0019, .0021, .0021, .0020, .0021, .0022, .0018,
2108 .0014, .0015
2109 };
2110
2111 /* Ikonos NIR of ikonos */
2112 static const float sr3[272] = {
2113 .0003, .0005, .0004, .0004, .0005, .0006, .0005, .0003,
2114 .0006, .0008, .0007, .0007, .0005, .0004, .0009, .0015,
2115 .0018, .0020, .0025, .0030, .0033, .0035, .0038, .0040,
2116 .0041, .0041, .0060, .0078, .0081, .0084, .0083, .0082,
2117 .0066, .0051, .0038, .0026, .0035, .0043, .0049, .0055,
2118 .0055, .0055, .0042, .0029, .0023, .0017, .0016, .0015,
2119 .0026, .0036, .0040, .0043, .0034, .0025, .0023, .0020,
2120 .0017, .0013, .0014, .0015, .0015, .0015, .0018, .0021,
2121 .0022, .0024, .0025, .0027, .0030, .0034, .0031, .0029,
2122 .0029, .0029, .0035, .0041, .0050, .0060, .0066, .0072,
2123 .0083, .0093, .0093, .0093, .0090, .0087, .0091, .0095,
2124 .0099, .0103, .0118, .0133, .0169, .0204, .0244, .0285,
2125 .0316, .0347, .0388, .0428, .0502, .0575, .0715, .0855,
2126 .1052, .1249, .1506, .1764, .2174, .2584, .3386, .4188,
2127 .5285, .6381, .7213, .8045, .8414, .8784, .8990, .9196,
2128 .9364, .9532, .9545, .9559, .9424, .9289, .9339, .9389,
2129 .9628, .9866, .9917, .9968, .9524, .9079, .8388, .7698,
2130 .6808, .5919, .5067, .4215, .3634, .3053, .2658, .2262,
2131 .1923, .1583, .1315, .1046, .0860, .0674, .0560, .0447,
2132 .0373, .0299, .0269, .0239, .0230, .0220, .0202, .0184,
2133 .0171, .0159, .0161, .0162, .0159, .0157, .0161, .0165,
2134 .0168, .0171, .0167, .0163, .0142, .0121, .0106, .0091,
2135 .0079, .0068, .0065, .0062, .0059, .0056, .0049, .0042,
2136 .0042, .0042, .0046, .0050, .0045, .0040, .0040, .0040,
2137 .0033, .0027, .0028, .0030, .0028, .0025, .0029, .0033,
2138 .0029, .0026, .0026, .0026, .0027, .0028, .0027, .0027,
2139 .0028, .0028, .0027, .0026, .0026, .0026, .0025, .0025,
2140 .0024, .0024, .0024, .0023, .0026, .0029, .0028, .0027,
2141 .0029, .0031, .0035, .0039, .0040, .0040, .0040, .0040,
2142 .0037, .0035, .0031, .0026, .0024, .0022, .0019, .0016,
2143 .0015, .0014, .0014, .0013, .0013, .0014, .0012, .0011,
2144 .0011, .0012, .0012, .0012, .0011, .0010, .0013, .0016,
2145 .0013, .0010, .0012, .0013, .0014, .0014, .0022, .0029,
2146 .0023, .0018, .0020, .0023, .0018, .0013, .0011, .0009
2147
2148 };
2149
2150 static const float wli[3] = {0.3500, 0.3500, 0.3525};
2151 static const float wls[3] = {1.0350, 1.0350, 1.0325};
2152
2153 ffu.wlinf = (float)wli[iwa-1];
2154 ffu.wlsup = (float)wls[iwa-1];
2155
2156 int i;
2157 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
2158
2159 switch(iwa)
2160 {
2161 case 1: for(i = 0; i < 274; i++) ffu.s[40+i] = sr1[i];
2162 break;
2163 case 2: for(i = 0; i < 274; i++) ffu.s[40+i] = sr2[i];
2164 break;
2165 case 3: for(i = 0; i < 272; i++) ffu.s[41+i] = sr3[i];
2166 break;
2167 }
2168 }
2169
2170 /* Following filter function created using create_iwave.py */
2171
rapideye(int iwa)2172 void IWave::rapideye(int iwa)
2173 {
2174
2175 /* "Blue" of rapideye */
2176 static const float sr1[129] = {
2177 .0020, .0000, .0000, .0015, .0000, .0000, .0010, .0095,
2178 .3210, .7250, .7400, .7590, .7700, .7810, .7840, .7935,
2179 .7960, .8005, .8060, .8040, .8070, .8170, .8200, .8275,
2180 .8400, .8470, .8620, .8765, .8860, .9105, .9280, .9415,
2181 .9690, .9685, 1.0000, .9875, .4370, .0190, .0010, .0000,
2182 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2183 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2184 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2185 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2186 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2187 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2188 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2189 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2190 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2191 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2192 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0005,
2193 .0000
2194 };
2195
2196 /* "Green" of rapideye */
2197 static const float sr2[184] = {
2198 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2199 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2200 .0000, .0035, .0020, .0030, .0080, .0000, .0000, .0000,
2201 .0000, .0000, .0000, .0005, .0020, .0000, .0000, .0000,
2202 .0000, .0000, .0000, .0000, .0010, .0030, .0130, .0875,
2203 .5390, .8690, .8680, .8765, .8710, .8755, .8820, .8815,
2204 .8810, .8885, .8970, .8985, .9010, .9125, .9240, .9290,
2205 .9360, .9475, .9530, .9625, .9740, .9755, .9760, .9910,
2206 .9880, .9880, .9940, .9845, .4170, .0265, .0020, .0005,
2207 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2208 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2209 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2210 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2211 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2212 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2213 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2214 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2215 .0000, .0000, .0010, .0010, .0010, .0005, .0000, .0000,
2216 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2217 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2218 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2219 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2220 .0000, .0000, .0000, .0000, .0000, .0000, .0010, .0000
2221
2222 };
2223
2224 /* "Red" of rapideye */
2225 static const float sr3[96] = {
2226 .0000, .0010, .0000, .0000, .0000, .0000, .0000, .0000,
2227 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2228 .0000, .0000, .0010, .0000, .0000, .0000, .0000, .0000,
2229 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2230 .0000, .0000, .0005, .0000, .0000, .0000, .0000, .0000,
2231 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2232 .0005, .0000, .0000, .0000, .0000, .0020, .0000, .0000,
2233 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2234 .0000, .0010, .0025, .0090, .0620, .4370, .8595, .8540,
2235 .8785, .8810, .8875, .9020, .9105, .9150, .9255, .9390,
2236 .9490, .9580, .9645, .9700, .9785, .9890, .9900, .9850,
2237 .9970, .9890, .9940, .4630, .0430, .0050, .0010, .0000
2238
2239 };
2240
2241 /* "RedEdge " of rapideye */
2242 static const float sr4[100] = {
2243 .0000, .0270, .0000, .0000, .0000, .0000, .0000, .0000,
2244 .0000, .0000, .0000, .0000, .0005, .0000, .0005, .0010,
2245 .0000, .0000, .0000, .0000, .0005, .0000, .0000, .0000,
2246 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2247 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2248 .0000, .0000, .0000, .0000, .0000, .0220, .0000, .0000,
2249 .0000, .0000, .0000, .0000, .0000, .0000, .0005, .0000,
2250 .0000, .0000, .0000, .0010, .0000, .0000, .0000, .0000,
2251 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2252 .0010, .0020, .0055, .0210, .1085, .4910, .9490, .9980,
2253 .9995, .9980, .9915, .9870, .9855, .9820, .9740, .9660,
2254 .9640, .9610, .9455, .9390, .8980, .4250, .0940, .0200,
2255 .0055, .0020, .0010, .0000
2256 };
2257
2258 /* "NIR " of rapideye */
2259 static const float sr5[162] = {
2260 .0000, .0010, .0000, .0000, .0000, .0000, .0000, .0000,
2261 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0010,
2262 .0000, .0000, .0000, .0000, .0000, .0110, .0000, .0000,
2263 .0000, .0000, .0000, .0000, .0010, .0000, .0000, .0000,
2264 .0010, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2265 .0000, .0000, .0005, .0000, .0000, .0000, .0000, .0000,
2266 .0000, .0000, .0000, .0000, .0000, .0000, .0010, .0010,
2267 .0000, .0000, .0000, .0000, .0000, .0000, .0005, .0030,
2268 .0010, .0000, .0000, .0000, .0000, .0000, .0010, .0020,
2269 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2270 .0000, .0000, .0015, .0030, .0000, .0000, .0000, .0000,
2271 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2272 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2273 .0000, .0000, .0000, .0000, .0005, .0010, .0015, .0030,
2274 .0055, .0120, .0275, .0680, .1920, .4970, .8825, 1.0000,
2275 .9775, .9670, .9760, .9830, .9795, .9700, .9620, .9580,
2276 .9575, .9580, .9585, .9560, .9535, .9480, .9425, .9370,
2277 .9320, .9280, .9270, .9260, .9255, .9230, .9165, .9060,
2278 .8965, .8890, .8845, .8820, .8735, .8570, .8400, .8400,
2279 .8135, .5820, .2440, .0800, .0285, .0110, .0050, .0020,
2280 .0010, .0010
2281 };
2282
2283 static const float wli[5] = {0.4200, 0.4200, 0.4575, 0.4975, 0.4675};
2284 static const float wls[5] = {0.7425, 0.8800, 0.6975, 0.7475, 0.8725};
2285
2286 ffu.wlinf = (float)wli[iwa-1];
2287 ffu.wlsup = (float)wls[iwa-1];
2288
2289 int i;
2290 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
2291
2292 switch(iwa)
2293 {
2294 case 1: for(i = 0; i < 129; i++) ffu.s[68+i] = sr1[i];
2295 break;
2296 case 2: for(i = 0; i < 184; i++) ffu.s[68+i] = sr2[i];
2297 break;
2298 case 3: for(i = 0; i < 96; i++) ffu.s[83+i] = sr3[i];
2299 break;
2300 case 4: for(i = 0; i < 100; i++) ffu.s[99+i] = sr4[i];
2301 break;
2302 case 5: for(i = 0; i < 162; i++) ffu.s[87+i] = sr5[i];
2303 break;
2304 }
2305 }
2306
2307 /* Following filter function created using create_iwave.py */
2308
vgt1_spot4(int iwa)2309 void IWave::vgt1_spot4(int iwa)
2310 {
2311
2312 /* B0 of VGT1_spot4 */
2313 static const float sr1[40] = {
2314 .0001, .0003, .0005, .0007, .0010, .0013, .0028, .0050,
2315 .0182, .0377, .0828, .1423, .2234, .3168, .4108, .5052,
2316 .5925, .6759, .7509, .8212, .8815, .9361, .9699, .9920,
2317 .9907, .9761, .9528, .9248, .8811, .8287, .7223, .5857,
2318 .4394, .2876, .1820, .1024, .0579, .0331, .0196, .0125
2319
2320 };
2321
2322 /* B2 of VGT1_spot4 */
2323 static const float sr2[82] = {
2324 .0000, .0017, .0017, .0016, .0016, .0016, .0024, .0031,
2325 .0039, .0046, .0439, .0832, .1225, .1618, .2737, .3856,
2326 .4975, .6094, .6615, .7136, .7657, .8178, .8278, .8377,
2327 .8477, .8577, .8673, .8769, .8865, .8961, .9088, .9214,
2328 .9341, .9468, .9595, .9722, .9849, .9976, .9895, .9815,
2329 .9734, .9653, .9169, .8685, .8201, .7717, .6989, .6260,
2330 .5532, .4804, .4243, .3681, .3120, .2559, .2229, .1899,
2331 .1569, .1239, .1063, .0887, .0712, .0536, .0454, .0372,
2332 .0289, .0207, .0175, .0143, .0111, .0079, .0069, .0060,
2333 .0050, .0040, .0034, .0027, .0021, .0015, .0015, .0015,
2334 .0015, .0015
2335 };
2336
2337 /* B3 of VGT1_spot4 */
2338 static const float sr3[134] = {
2339 .0000, .0007, .0008, .0008, .0009, .0010, .0011, .0013,
2340 .0014, .0015, .0019, .0022, .0026, .0030, .0051, .0072,
2341 .0092, .0113, .0210, .0308, .0406, .0503, .0806, .1109,
2342 .1411, .1714, .2271, .2828, .3385, .3942, .4584, .5226,
2343 .5869, .6511, .6966, .7421, .7876, .8331, .8607, .8883,
2344 .9159, .9435, .9552, .9668, .9785, .9902, .9927, .9951,
2345 .9976, 1.0000, .9999, .9997, .9996, .9994, .9984, .9974,
2346 .9964, .9954, .9927, .9900, .9873, .9846, .9766, .9686,
2347 .9606, .9526, .9445, .9365, .9284, .9203, .9008, .8813,
2348 .8618, .8423, .7897, .7370, .6844, .6318, .5584, .4849,
2349 .4114, .3380, .2893, .2407, .1920, .1434, .1222, .1010,
2350 .0798, .0586, .0505, .0425, .0345, .0264, .0229, .0194,
2351 .0159, .0124, .0111, .0098, .0085, .0072, .0065, .0057,
2352 .0050, .0042, .0038, .0034, .0031, .0027, .0024, .0021,
2353 .0017, .0014, .0014, .0014, .0013, .0013, .0013, .0013,
2354 .0012, .0012, .0012, .0011, .0011, .0011, .0010, .0009,
2355 .0009, .0008, .0007, .0006, .0006, .0005
2356 };
2357
2358 /* MIR of VGT1_spot4 */
2359 static const float sr4[141] = {
2360 .0000, .0010, .0010, .0010, .0010, .0010, .0011, .0011,
2361 .0012, .0013, .0014, .0014, .0015, .0016, .0016, .0017,
2362 .0018, .0018, .0019, .0021, .0022, .0024, .0026, .0028,
2363 .0030, .0032, .0035, .0038, .0041, .0044, .0050, .0055,
2364 .0060, .0066, .0075, .0083, .0092, .0101, .0118, .0136,
2365 .0154, .0171, .0203, .0235, .0267, .0299, .0366, .0433,
2366 .0501, .0568, .0708, .0848, .0989, .1129, .1406, .1684,
2367 .1961, .2239, .2691, .3142, .3594, .4045, .4677, .5308,
2368 .5939, .6571, .7099, .7628, .8156, .8685, .8934, .9183,
2369 .9433, .9682, .9761, .9841, .9920, 1.0000, .9971, .9941,
2370 .9912, .9883, .9840, .9797, .9753, .9710, .9517, .9325,
2371 .9132, .8939, .8713, .8488, .8262, .8036, .7457, .6878,
2372 .6299, .5720, .5109, .4498, .3887, .3276, .2926, .2576,
2373 .2226, .1876, .1704, .1531, .1358, .1186, .1078, .0970,
2374 .0863, .0755, .0685, .0614, .0544, .0474, .0430, .0385,
2375 .0340, .0296, .0269, .0242, .0214, .0187, .0172, .0157,
2376 .0142, .0127, .0118, .0109, .0101, .0092, .0086, .0080,
2377 .0075, .0069, .0064, .0060, .0055
2378 };
2379
2380 static const float wli[4] = {0.4000, 0.5775, 0.6975, 1.4475};
2381 static const float wls[4] = {0.5000, 0.7825, 1.0325, 1.8000};
2382
2383 ffu.wlinf = (float)wli[iwa-1];
2384 ffu.wlsup = (float)wls[iwa-1];
2385
2386 int i;
2387 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
2388
2389 switch(iwa)
2390 {
2391 case 1: for(i = 0; i < 40; i++) ffu.s[60+i] = sr1[i];
2392 break;
2393 case 2: for(i = 0; i < 82; i++) ffu.s[131+i] = sr2[i];
2394 break;
2395 case 3: for(i = 0; i < 134; i++) ffu.s[179+i] = sr3[i];
2396 break;
2397 case 4: for(i = 0; i < 141; i++) ffu.s[479+i] = sr4[i];
2398 break;
2399 }
2400 }
2401
2402 /* Following filter function created using create_iwave.py */
2403
vgt2_spot5(int iwa)2404 void IWave::vgt2_spot5(int iwa)
2405 {
2406
2407 /* B0 of VGT2_spot5 */
2408 static const float sr1[61] = {
2409 .0007, .0008, .0010, .0010, .0011, .0012, .0013, .0029,
2410 .0045, .0209, .0374, .0964, .1553, .2551, .3549, .4536,
2411 .5524, .6318, .7111, .7602, .8093, .8304, .8514, .8698,
2412 .8882, .9441, 1.0000, .9787, .9574, .7493, .5412, .3553,
2413 .1694, .1083, .0472, .0318, .0163, .0116, .0069, .0053,
2414 .0036, .0028, .0020, .0017, .0014, .0011, .0009, .0008,
2415 .0008, .0008, .0007, .0006, .0006, .0006, .0005, .0004,
2416 .0004, .0004, .0004, .0003, .0003
2417 };
2418
2419 /* B2 of VGT2_spot5 */
2420 static const float sr2[82] = {
2421 .0000, .0006, .0006, .0006, .0007, .0007, .0033, .0059,
2422 .0084, .0110, .0688, .1265, .1842, .2420, .3532, .4643,
2423 .5755, .6866, .7306, .7745, .8185, .8625, .8766, .8906,
2424 .9046, .9187, .9307, .9426, .9546, .9666, .9749, .9833,
2425 .9917, 1.0000, .9957, .9915, .9872, .9829, .9387, .8945,
2426 .8503, .8061, .7316, .6570, .5825, .5079, .4468, .3856,
2427 .3245, .2634, .2293, .1952, .1611, .1270, .1095, .0921,
2428 .0746, .0572, .0490, .0408, .0326, .0244, .0208, .0171,
2429 .0135, .0099, .0085, .0071, .0057, .0043, .0037, .0031,
2430 .0025, .0019, .0017, .0014, .0012, .0010, .0009, .0008,
2431 .0007, .0006
2432 };
2433
2434 /* B3 of VGT2_spot5 */
2435 static const float sr3[122] = {
2436 .0000, .0003, .0003, .0003, .0003, .0003, .0003, .0003,
2437 .0004, .0004, .0005, .0006, .0008, .0009, .0017, .0024,
2438 .0032, .0040, .0082, .0124, .0166, .0208, .0361, .0514,
2439 .0667, .0820, .1175, .1530, .1885, .2240, .2774, .3309,
2440 .3844, .4378, .4906, .5434, .5962, .6490, .6899, .7308,
2441 .7716, .8125, .8369, .8612, .8856, .9100, .9248, .9396,
2442 .9544, .9692, .9761, .9829, .9898, .9967, .9975, .9983,
2443 .9992, 1.0000, .9939, .9878, .9817, .9756, .9618, .9480,
2444 .9342, .9204, .9030, .8856, .8682, .8508, .8236, .7965,
2445 .7693, .7422, .6945, .6467, .5989, .5512, .4910, .4308,
2446 .3706, .3104, .2681, .2258, .1836, .1413, .1213, .1013,
2447 .0813, .0613, .0530, .0447, .0364, .0281, .0245, .0209,
2448 .0172, .0136, .0120, .0104, .0089, .0073, .0065, .0056,
2449 .0047, .0039, .0036, .0032, .0029, .0025, .0023, .0021,
2450 .0018, .0016, .0015, .0014, .0012, .0011, .0010, .0008,
2451 .0007, .0006
2452 };
2453
2454 /* MIR of VGT2_spot5 */
2455 static const float sr4[141] = {
2456 .0000, .0005, .0006, .0006, .0007, .0008, .0008, .0008,
2457 .0009, .0009, .0009, .0009, .0009, .0009, .0011, .0014,
2458 .0016, .0019, .0022, .0024, .0027, .0029, .0034, .0040,
2459 .0045, .0050, .0060, .0070, .0080, .0090, .0108, .0126,
2460 .0143, .0161, .0196, .0231, .0266, .0301, .0372, .0444,
2461 .0515, .0586, .0723, .0860, .0997, .1134, .1401, .1668,
2462 .1936, .2203, .2668, .3134, .3599, .4065, .4664, .5263,
2463 .5863, .6462, .6929, .7396, .7862, .8329, .8630, .8931,
2464 .9233, .9534, .9644, .9754, .9863, .9973, .9980, .9987,
2465 .9993, 1.0000, .9987, .9974, .9962, .9949, .9914, .9879,
2466 .9845, .9810, .9687, .9564, .9440, .9317, .9055, .8793,
2467 .8532, .8270, .7811, .7351, .6892, .6433, .5746, .5059,
2468 .4371, .3684, .3244, .2803, .2363, .1923, .1713, .1502,
2469 .1292, .1082, .0970, .0859, .0747, .0636, .0575, .0514,
2470 .0453, .0392, .0360, .0327, .0295, .0262, .0235, .0209,
2471 .0182, .0155, .0139, .0123, .0106, .0090, .0082, .0073,
2472 .0065, .0057, .0053, .0050, .0046, .0043, .0040, .0037,
2473 .0033, .0030, .0026, .0022, .0019
2474 };
2475
2476 static const float wli[4] = {0.4000, 0.5775, 0.6975, 1.4475};
2477 static const float wls[4] = {0.5525, 0.7825, 1.0025, 1.8000};
2478
2479 ffu.wlinf = (float)wli[iwa-1];
2480 ffu.wlsup = (float)wls[iwa-1];
2481
2482 int i;
2483 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
2484
2485 switch(iwa)
2486 {
2487 case 1: for(i = 0; i < 61; i++) ffu.s[60+i] = sr1[i];
2488 break;
2489 case 2: for(i = 0; i < 82; i++) ffu.s[131+i] = sr2[i];
2490 break;
2491 case 3: for(i = 0; i < 122; i++) ffu.s[179+i] = sr3[i];
2492 break;
2493 case 4: for(i = 0; i < 141; i++) ffu.s[479+i] = sr4[i];
2494 break;
2495 }
2496 }
2497
2498
worldview2(int iwa)2499 void IWave::worldview2(int iwa)
2500 {
2501
2502 /* Panchromatic of worldview2 */
2503 static const float sr1[225] = {
2504 .0000, .0001, .0003, .0005, .0017, .0030, .0559, .1098,
2505 .2713, .4362, .4618, .4875, .4949, .5050, .5152, .5256,
2506 .5296, .5356, .5298, .5222, .5272, .5337, .5286, .5231,
2507 .5411, .5573, .5582, .5582, .5809, .6055, .6162, .6268,
2508 .6121, .5954, .6120, .6307, .6492, .6715, .6637, .6547,
2509 .6725, .6931, .6913, .6882, .6783, .6650, .6833, .7016,
2510 .7060, .7136, .7098, .7098, .7384, .7658, .7628, .7578,
2511 .7592, .7598, .7800, .7941, .7979, .8007, .8114, .8193,
2512 .8208, .8230, .8298, .8389, .8489, .8608, .8580, .8585,
2513 .8652, .8703, .8779, .8893, .8965, .9093, .9131, .9179,
2514 .9142, .9108, .9170, .9249, .9368, .9508, .9440, .9369,
2515 .9323, .9294, .9383, .9512, .9600, .9628, .9575, .9539,
2516 .9548, .9574, .9682, .9777, .9613, .9492, .9470, .9533,
2517 .9467, .9522, .9625, .9696, .9840, 1.0000, .9943, .9940,
2518 .9810, .9696, .9683, .9684, .9737, .9789, .9668, .9637,
2519 .9523, .9467, .9459, .9529, .9548, .9626, .9621, .9566,
2520 .9504, .9410, .9362, .9246, .9234, .9217, .9336, .9408,
2521 .9580, .9638, .9581, .9413, .9243, .9030, .8959, .8872,
2522 .9105, .9294, .7440, .5539, .3202, .0858, .0514, .0173,
2523 .0120, .0066, .0044, .0021, .0015, .0009, .0007, .0005,
2524 .0005, .0004, .0004, .0004, .0004, .0004, .0004, .0004,
2525 .0004, .0004, .0003, .0003, .0003, .0003, .0003, .0003,
2526 .0003, .0002, .0003, .0003, .0003, .0003, .0003, .0002,
2527 .0002, .0003, .0003, .0003, .0003, .0002, .0002, .0003,
2528 .0003, .0003, .0003, .0003, .0003, .0003, .0003, .0002,
2529 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
2530 .0002, .0002, .0002, .0002, .0002, .0002, .0001, .0001,
2531 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
2532 .0001
2533 };
2534
2535 /* Coastal Blue of worldview2 */
2536 static const float sr2[174] = {
2537 .0000, .0000, .0002, .0006, .0034, .0274, .1329, .3560,
2538 .5926, .7007, .7396, .7653, .7878, .8171, .8387, .8618,
2539 .8835, .9051, .9171, .9272, .9477, .9651, .9793, .9859,
2540 .9891, .9972, .9746, .8539, .5880, .2816, .0805, .0089,
2541 .0013, .0004, .0001, .0001, .0000, .0000, .0000, .0000,
2542 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2543 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2544 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2545 .0000, .0000, .0000, .0001, .0000, .0000, .0000, .0000,
2546 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2547 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2548 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2549 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2550 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2551 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2552 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2553 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0001,
2554 .0001, .0000, .0000, .0000, .0000, .0001, .0002, .0004,
2555 .0003, .0001, .0000, .0001, .0003, .0007, .0004, .0001,
2556 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2557 .0000, .0001, .0001, .0002, .0002, .0001, .0001, .0001,
2558 .0001, .0002, .0002, .0002, .0001, .0001
2559 };
2560
2561 /* Blue of worldview2 */
2562 static const float sr3[158] = {
2563 .0001, .0001, .0001, .0003, .0010, .0023, .0054, .0198,
2564 .0818, .2452, .5033, .7010, .7576, .7783, .7886, .8000,
2565 .8017, .8099, .8211, .8260, .8309, .8423, .8627, .8785,
2566 .8769, .8783, .8876, .9076, .9306, .9502, .9768, 1.0000,
2567 .9789, .8558, .5939, .2976, .1257, .0504, .0182, .0057,
2568 .0030, .0017, .0010, .0006, .0004, .0003, .0002, .0001,
2569 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
2570 .0001, .0001, .0000, .0000, .0000, .0000, .0000, .0000,
2571 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2572 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2573 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2574 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2575 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2576 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2577 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2578 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2579 .0001, .0001, .0001, .0000, .0000, .0001, .0001, .0001,
2580 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2581 .0000, .0000, .0000, .0000, .0001, .0001, .0000, .0001,
2582 .0001, .0001, .0001, .0001, .0001, .0001
2583 };
2584
2585 /* Green of worldview2 */
2586 static const float sr4[245] = {
2587 .0000, .0001, .0001, .0004, .0011, .0031, .0111, .0405,
2588 .1338, .3515, .6060, .7230, .7600, .7794, .7888, .8068,
2589 .8280, .8408, .8420, .8443, .8469, .8503, .8597, .8635,
2590 .8691, .8826, .9007, .9245, .9422, .9623, .9766, .9857,
2591 .9948, 1.0000, .9931, .9791, .9077, .6640, .3014, .0929,
2592 .0252, .0056, .0025, .0011, .0005, .0002, .0001, .0001,
2593 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2594 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2595 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2596 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2597 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2598 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2599 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2600 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2601 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2602 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2603 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2604 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2605 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2606 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2607 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2608 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2609 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2610 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2611 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2612 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2613 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2614 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2615 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2616 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2617 .0000, .0001, .0001, .0001, .0001
2618 };
2619
2620 /* Yellow of worldview2 */
2621 static const float sr5[33] = {
2622 .0001, .0001, .0003, .0009, .0022, .0059, .0266, .1347,
2623 .3892, .6636, .8482, .8998, .9200, .9326, .9402, .9470,
2624 .9524, .9664, .9815, .9897, .9927, 1.0000, .9694, .7594,
2625 .4367, .1343, .0309, .0074, .0022, .0007, .0003, .0002,
2626 .0001
2627 };
2628
2629 /* Red of worldview2 */
2630 static const float sr6[43] = {
2631 .0000, .0001, .0001, .0003, .0006, .0016, .0049, .0228,
2632 .0956, .2944, .5961, .8223, .8728, .8853, .9279, .9557,
2633 .9650, .9671, .9656, .9578, .9555, .9528, .9558, .9653,
2634 .9704, .9765, .9875, .9966, .9991, .9921, .9837, .9783,
2635 .8853, .6326, .2918, .0833, .0204, .0056, .0019, .0008,
2636 .0004, .0002, .0001
2637 };
2638
2639 /* Red Edge of worldview2 */
2640 static const float sr7[60] = {
2641 .0001, .0001, .0002, .0002, .0001, .0000, .0000, .0000,
2642 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2643 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2644 .0000, .0000, .0000, .0000, .0001, .0002, .0008, .0031,
2645 .0188, .0996, .3468, .6229, .8538, .9528, .9784, .9876,
2646 .9890, .9939, .9999, .9993, .9894, .9868, .9810, .9771,
2647 .9442, .8464, .6158, .3598, .1388, .0305, .0071, .0022,
2648 .0007, .0003, .0001, .0001
2649 };
2650
2651 /* NIR1 of worldview2 */
2652 static const float sr8[86] = {
2653 .0001, .0001, .0002, .0003, .0004, .0007, .0014, .0029,
2654 .0060, .0127, .0277, .0589, .1231, .2602, .5068, .7600,
2655 .9406, .9958, .9976, .9889, .9831, .9729, .9583, .9411,
2656 .9319, .9194, .9091, .8976, .8821, .8712, .8631, .8443,
2657 .8365, .8380, .8412, .8357, .8338, .8425, .8308, .8186,
2658 .8168, .8067, .8108, .7942, .7799, .7673, .7496, .7393,
2659 .7387, .7341, .7118, .6971, .6805, .6586, .6498, .6325,
2660 .6199, .6091, .5990, .5909, .5661, .5071, .4028, .2752,
2661 .1577, .0738, .0328, .0138, .0054, .0026, .0018, .0013,
2662 .0010, .0009, .0009, .0008, .0007, .0007, .0008, .0007,
2663 .0007, .0006, .0006, .0003, .0003, .0000
2664 };
2665
2666 /* NIR2 of worldview2 */
2667 static const float sr9[288] = {
2668 .0000, .0001, .0001, .0000, .0000, .0000, .0000, .0000,
2669 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2670 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2671 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2672 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2673 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2674 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2675 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2676 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2677 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2678 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2679 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2680 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2681 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2682 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2683 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2684 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2685 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2686 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2687 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2688 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
2689 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0001,
2690 .0005, .0005, .0008, .0010, .0010, .0011, .0011, .0011,
2691 .0011, .0011, .0011, .0011, .0010, .0011, .0011, .0012,
2692 .0012, .0012, .0014, .0013, .0015, .0022, .0043, .0106,
2693 .0306, .1079, .3137, .5719, .7893, .9515, .9871, .9917,
2694 .9934, .9997, .9967, .9833, .9709, .9524, .9330, .9224,
2695 .9109, .8998, .8921, .8786, .8646, .8505, .8413, .8273,
2696 .8082, .7940, .7744, .7603, .7469, .7258, .7090, .6892,
2697 .6617, .6406, .6209, .5965, .5747, .5519, .5309, .5116,
2698 .4937, .4741, .4543, .4378, .4214, .4060, .3897, .3766,
2699 .3635, .3499, .3367, .3270, .3171, .3058, .2949, .2822,
2700 .2714, .2608, .2509, .2434, .2357, .2277, .2176, .2087,
2701 .1986, .1882, .1787, .1684, .1590, .1481, .1378, .1246,
2702 .1096, .0917, .0715, .0503, .0328, .0199, .0098, .0047,
2703 .0022, .0010, .0005, .0003, .0002, .0001, .0001, .0001
2704
2705 };
2706
2707 static const float wli[9] = {0.4325, 0.3825, 0.4225, 0.4875, 0.5675, 0.6050, 0.6175, 0.7375, 0.3550};
2708 static const float wls[9] = {0.9950, 0.8175, 0.8175, 1.1000, 0.6500, 0.7125, 0.7675, 0.9525, 1.0750};
2709
2710 ffu.wlinf = (float)wli[iwa-1];
2711 ffu.wlsup = (float)wls[iwa-1];
2712
2713 int i;
2714 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
2715
2716 switch(iwa)
2717 {
2718 case 1: for(i = 0; i < 225; i++) ffu.s[73+i] = sr1[i];
2719 break;
2720 case 2: for(i = 0; i < 174; i++) ffu.s[53+i] = sr2[i];
2721 break;
2722 case 3: for(i = 0; i < 158; i++) ffu.s[69+i] = sr3[i];
2723 break;
2724 case 4: for(i = 0; i < 245; i++) ffu.s[95+i] = sr4[i];
2725 break;
2726 case 5: for(i = 0; i < 33; i++) ffu.s[127+i] = sr5[i];
2727 break;
2728 case 6: for(i = 0; i < 43; i++) ffu.s[142+i] = sr6[i];
2729 break;
2730 case 7: for(i = 0; i < 60; i++) ffu.s[147+i] = sr7[i];
2731 break;
2732 case 8: for(i = 0; i < 86; i++) ffu.s[195+i] = sr8[i];
2733 break;
2734 case 9: for(i = 0; i < 288; i++) ffu.s[42+i] = sr9[i];
2735 break;
2736 }
2737 }
2738
quickbird2(int iwa)2739 void IWave::quickbird2(int iwa)
2740 {
2741
2742 /* pan of quickbird2 */
2743 static const float sr1[286] = {
2744 .0007, .0014, .0013, .0012, .0011, .0011, .0010, .0009,
2745 .0010, .0012, .0016, .0020, .0044, .0069, .0089, .0109,
2746 .0138, .0167, .0213, .0259, .0311, .0362, .0434, .0506,
2747 .0588, .0669, .0758, .0846, .0939, .1032, .1125, .1219,
2748 .1334, .1450, .1567, .1684, .1789, .1895, .2011, .2127,
2749 .2163, .2198, .2392, .2586, .2669, .2753, .2854, .2955,
2750 .3055, .3154, .3259, .3364, .3410, .3456, .3501, .3546,
2751 .3579, .3611, .3648, .3685, .3733, .3781, .3875, .3969,
2752 .4055, .4141, .4276, .4410, .4543, .4676, .4829, .4982,
2753 .5167, .5352, .5532, .5712, .5925, .6137, .6382, .6627,
2754 .6839, .7051, .7275, .7499, .7705, .7910, .8105, .8301,
2755 .8465, .8629, .8770, .8911, .9081, .9251, .9293, .9335,
2756 .9426, .9518, .9570, .9621, .9610, .9598, .9753, .9907,
2757 .9941, .9975, .9922, .9869, .9935, 1.0000, .9938, .9876,
2758 .9877, .9878, .9770, .9662, .9573, .9483, .9340, .9197,
2759 .9190, .9183, .9063, .8944, .8912, .8880, .8831, .8781,
2760 .8865, .8949, .8921, .8893, .8858, .8823, .8869, .8916,
2761 .8848, .8780, .8879, .8978, .8933, .8888, .8801, .8714,
2762 .8690, .8667, .8677, .8687, .8699, .8712, .8668, .8625,
2763 .8718, .8810, .8814, .8818, .8897, .8976, .9024, .9072,
2764 .9183, .9295, .9311, .9326, .9198, .9070, .9130, .9191,
2765 .9173, .9155, .9097, .9039, .8988, .8936, .8871, .8805,
2766 .8761, .8717, .8605, .8493, .8475, .8457, .8505, .8553,
2767 .8568, .8582, .8582, .8583, .8627, .8671, .8505, .8339,
2768 .8390, .8440, .8470, .8500, .8526, .8553, .8447, .8341,
2769 .8368, .8394, .8235, .8076, .8091, .8106, .7850, .7594,
2770 .7616, .7638, .7490, .7342, .7204, .7066, .7003, .6941,
2771 .6788, .6634, .6589, .6545, .6365, .6186, .6094, .6003,
2772 .5961, .5919, .5832, .5744, .5527, .5309, .5139, .4969,
2773 .4883, .4798, .4630, .4463, .4305, .4147, .4097, .4048,
2774 .3893, .3738, .3593, .3448, .3283, .3118, .3035, .2952,
2775 .2840, .2729, .2648, .2567, .2498, .2428, .2322, .2216,
2776 .2162, .2107, .2039, .1971, .1874, .1776, .1703, .1630,
2777 .1557, .1485, .1421, .1358, .1299, .1240, .1162, .1085,
2778 .1020, .0954, .0893, .0831, .0773, .0715, .0675, .0634,
2779 .0591, .0548, .0512, .0476, .0288, .0101
2780 };
2781
2782 /* blue of quickbird2 */
2783 static const float sr2[292] = {
2784 .0005, .0010, .0015, .0021, .0026, .0031, .0037, .0042,
2785 .0044, .0045, .0049, .0053, .0047, .0041, .0037, .0033,
2786 .0030, .0027, .0025, .0023, .0018, .0013, .0015, .0018,
2787 .0020, .0022, .0023, .0024, .0025, .0026, .0025, .0025,
2788 .0027, .0029, .0035, .0040, .0053, .0066, .0098, .0131,
2789 .0208, .0284, .0483, .0681, .1116, .1552, .2164, .2776,
2790 .3544, .4313, .5306, .6299, .6770, .7241, .7577, .7914,
2791 .8176, .8439, .8667, .8896, .9037, .9178, .9235, .9293,
2792 .9447, .9602, .9801, 1.0000, .9958, .9916, .9548, .9179,
2793 .8452, .7724, .6729, .5734, .4787, .3840, .3247, .2653,
2794 .2123, .1592, .1204, .0816, .0754, .0692, .0663, .0633,
2795 .0551, .0469, .0381, .0293, .0235, .0176, .0152, .0127,
2796 .0126, .0125, .0127, .0129, .0128, .0126, .0119, .0111,
2797 .0106, .0101, .0098, .0096, .0094, .0093, .0095, .0098,
2798 .0102, .0106, .0105, .0104, .0091, .0079, .0066, .0054,
2799 .0045, .0036, .0031, .0026, .0026, .0025, .0025, .0025,
2800 .0025, .0025, .0027, .0028, .0027, .0027, .0027, .0027,
2801 .0030, .0033, .0039, .0044, .0067, .0089, .0125, .0162,
2802 .0202, .0242, .0256, .0271, .0231, .0191, .0137, .0083,
2803 .0070, .0056, .0063, .0070, .0086, .0102, .0111, .0121,
2804 .0106, .0091, .0064, .0037, .0032, .0027, .0028, .0029,
2805 .0028, .0027, .0029, .0031, .0032, .0032, .0034, .0036,
2806 .0034, .0033, .0034, .0036, .0036, .0036, .0034, .0031,
2807 .0032, .0034, .0033, .0032, .0031, .0031, .0031, .0030,
2808 .0031, .0033, .0033, .0033, .0035, .0036, .0036, .0037,
2809 .0039, .0040, .0041, .0041, .0042, .0043, .0042, .0042,
2810 .0046, .0050, .0049, .0048, .0053, .0059, .0058, .0057,
2811 .0057, .0056, .0055, .0053, .0053, .0052, .0052, .0052,
2812 .0052, .0052, .0052, .0053, .0055, .0057, .0063, .0068,
2813 .0075, .0083, .0090, .0098, .0101, .0105, .0107, .0109,
2814 .0101, .0093, .0085, .0076, .0069, .0061, .0056, .0050,
2815 .0046, .0042, .0039, .0035, .0032, .0029, .0025, .0021,
2816 .0019, .0017, .0016, .0016, .0015, .0014, .0013, .0012,
2817 .0012, .0012, .0012, .0012, .0012, .0011, .0011, .0011,
2818 .0011, .0010, .0011, .0011, .0012, .0012, .0012, .0012,
2819 .0013, .0015, .0016, .0018, .0017, .0015, .0015, .0015,
2820 .0015, .0014, .0013, .0012
2821 };
2822
2823 /* green of quickbird2 */
2824 static const float sr3[282] = {
2825 .0015, .0031, .0036, .0040, .0031, .0022, .0023, .0023,
2826 .0019, .0015, .0015, .0014, .0011, .0008, .0010, .0011,
2827 .0012, .0012, .0012, .0012, .0012, .0012, .0012, .0011,
2828 .0012, .0012, .0013, .0014, .0016, .0019, .0021, .0023,
2829 .0026, .0028, .0033, .0037, .0046, .0055, .0077, .0098,
2830 .0138, .0178, .0206, .0234, .0268, .0301, .0356, .0412,
2831 .0504, .0597, .0789, .0982, .1274, .1566, .1924, .2282,
2832 .2739, .3196, .3686, .4175, .4726, .5277, .5928, .6579,
2833 .7138, .7698, .8005, .8312, .8378, .8445, .8575, .8705,
2834 .8893, .9082, .9271, .9460, .9640, .9819, .9910, 1.0000,
2835 .9967, .9934, .9876, .9818, .9755, .9691, .9733, .9774,
2836 .9822, .9869, .9761, .9652, .9316, .8979, .8445, .7910,
2837 .7230, .6551, .5687, .4822, .3973, .3124, .2579, .2033,
2838 .1706, .1378, .1139, .0901, .0729, .0557, .0461, .0365,
2839 .0322, .0278, .0270, .0262, .0268, .0274, .0275, .0275,
2840 .0259, .0242, .0214, .0186, .0167, .0148, .0140, .0132,
2841 .0132, .0132, .0132, .0132, .0124, .0116, .0104, .0092,
2842 .0076, .0061, .0052, .0043, .0038, .0032, .0030, .0029,
2843 .0029, .0029, .0035, .0040, .0051, .0062, .0069, .0076,
2844 .0076, .0076, .0067, .0057, .0047, .0037, .0032, .0026,
2845 .0024, .0022, .0024, .0026, .0028, .0030, .0029, .0028,
2846 .0030, .0031, .0032, .0034, .0037, .0040, .0039, .0038,
2847 .0041, .0044, .0043, .0041, .0040, .0038, .0036, .0035,
2848 .0034, .0032, .0031, .0030, .0030, .0030, .0031, .0031,
2849 .0032, .0032, .0033, .0033, .0035, .0037, .0041, .0044,
2850 .0048, .0051, .0060, .0069, .0073, .0078, .0084, .0091,
2851 .0091, .0092, .0091, .0090, .0088, .0086, .0083, .0080,
2852 .0078, .0076, .0075, .0075, .0075, .0076, .0077, .0078,
2853 .0080, .0081, .0081, .0082, .0080, .0078, .0072, .0067,
2854 .0061, .0056, .0051, .0046, .0043, .0039, .0035, .0031,
2855 .0029, .0027, .0023, .0020, .0018, .0017, .0016, .0015,
2856 .0014, .0012, .0012, .0013, .0012, .0011, .0010, .0009,
2857 .0010, .0010, .0009, .0009, .0008, .0008, .0008, .0009,
2858 .0009, .0009, .0009, .0010, .0010, .0011, .0012, .0013,
2859 .0012, .0011, .0011, .0011, .0010, .0009, .0009, .0010,
2860 .0009, .0009
2861 };
2862
2863 /* red of quickbird2 */
2864 static const float sr4[282] = {
2865 .0019, .0037, .0031, .0024, .0020, .0016, .0018, .0019,
2866 .0016, .0012, .0011, .0011, .0010, .0009, .0009, .0010,
2867 .0009, .0009, .0011, .0013, .0010, .0007, .0009, .0012,
2868 .0012, .0013, .0013, .0013, .0012, .0012, .0011, .0010,
2869 .0013, .0015, .0018, .0021, .0024, .0028, .0029, .0031,
2870 .0030, .0029, .0029, .0028, .0029, .0030, .0032, .0035,
2871 .0036, .0037, .0034, .0032, .0026, .0021, .0021, .0022,
2872 .0023, .0024, .0025, .0027, .0029, .0031, .0032, .0033,
2873 .0034, .0035, .0036, .0037, .0041, .0046, .0049, .0053,
2874 .0056, .0060, .0061, .0063, .0065, .0066, .0068, .0069,
2875 .0073, .0078, .0084, .0090, .0096, .0102, .0110, .0118,
2876 .0128, .0139, .0158, .0177, .0207, .0238, .0286, .0334,
2877 .0399, .0464, .0548, .0631, .0751, .0872, .1077, .1281,
2878 .1666, .2050, .2675, .3301, .4130, .4960, .5790, .6620,
2879 .7337, .8054, .8447, .8840, .8976, .9112, .9265, .9418,
2880 .9608, .9798, .9878, .9958, .9979, 1.0000, .9961, .9923,
2881 .9723, .9524, .9125, .8726, .8128, .7530, .6767, .6004,
2882 .5119, .4235, .3520, .2806, .2228, .1651, .1304, .0957,
2883 .0744, .0531, .0417, .0302, .0261, .0220, .0210, .0201,
2884 .0204, .0207, .0211, .0215, .0205, .0196, .0172, .0148,
2885 .0121, .0095, .0081, .0066, .0058, .0050, .0048, .0045,
2886 .0043, .0042, .0043, .0045, .0048, .0051, .0055, .0060,
2887 .0063, .0067, .0064, .0062, .0053, .0045, .0038, .0031,
2888 .0029, .0027, .0026, .0024, .0025, .0025, .0025, .0025,
2889 .0024, .0024, .0025, .0026, .0025, .0024, .0025, .0026,
2890 .0026, .0025, .0026, .0026, .0026, .0025, .0024, .0023,
2891 .0024, .0024, .0023, .0022, .0022, .0021, .0021, .0020,
2892 .0019, .0019, .0019, .0020, .0021, .0021, .0023, .0025,
2893 .0026, .0028, .0028, .0028, .0027, .0025, .0020, .0015,
2894 .0013, .0012, .0011, .0011, .0010, .0010, .0010, .0010,
2895 .0010, .0010, .0009, .0008, .0008, .0008, .0008, .0007,
2896 .0007, .0007, .0007, .0007, .0007, .0007, .0006, .0006,
2897 .0006, .0006, .0007, .0007, .0007, .0008, .0007, .0007,
2898 .0007, .0006, .0007, .0009, .0009, .0009, .0008, .0008,
2899 .0008, .0008, .0009, .0009, .0009, .0009, .0008, .0006,
2900 .0007, .0008
2901 };
2902
2903 /* nir of quickbird2 */
2904 static const float sr5[292] = {
2905 .0007, .0014, .0021, .0029, .0036, .0044, .0051, .0059,
2906 .0061, .0063, .0062, .0060, .0057, .0054, .0045, .0035,
2907 .0028, .0021, .0023, .0024, .0021, .0017, .0020, .0023,
2908 .0021, .0019, .0017, .0016, .0018, .0019, .0019, .0018,
2909 .0017, .0015, .0015, .0015, .0017, .0019, .0018, .0017,
2910 .0021, .0024, .0025, .0025, .0028, .0031, .0036, .0040,
2911 .0044, .0047, .0047, .0047, .0048, .0049, .0045, .0042,
2912 .0043, .0044, .0046, .0048, .0050, .0052, .0054, .0056,
2913 .0054, .0052, .0047, .0042, .0036, .0030, .0028, .0026,
2914 .0026, .0026, .0026, .0025, .0027, .0029, .0027, .0026,
2915 .0030, .0034, .0043, .0053, .0066, .0079, .0089, .0099,
2916 .0101, .0102, .0090, .0079, .0064, .0049, .0049, .0048,
2917 .0056, .0063, .0070, .0077, .0078, .0079, .0072, .0065,
2918 .0054, .0044, .0041, .0038, .0038, .0037, .0037, .0036,
2919 .0036, .0036, .0038, .0039, .0042, .0045, .0047, .0049,
2920 .0053, .0057, .0059, .0061, .0064, .0068, .0070, .0073,
2921 .0079, .0086, .0093, .0100, .0106, .0112, .0117, .0122,
2922 .0126, .0129, .0132, .0135, .0140, .0144, .0150, .0156,
2923 .0164, .0172, .0184, .0196, .0218, .0241, .0268, .0294,
2924 .0319, .0343, .0375, .0407, .0448, .0490, .0545, .0599,
2925 .0664, .0729, .0817, .0905, .1050, .1195, .1410, .1625,
2926 .2024, .2424, .3015, .3606, .4268, .4930, .5640, .6350,
2927 .7166, .7983, .8726, .9469, .9735, 1.0000, .9986, .9971,
2928 .9837, .9702, .9526, .9350, .9179, .9009, .8853, .8698,
2929 .8606, .8515, .8449, .8382, .8352, .8322, .8289, .8256,
2930 .8230, .8204, .8137, .8070, .7957, .7844, .7669, .7495,
2931 .7267, .7040, .6911, .6782, .6638, .6494, .6313, .6132,
2932 .5900, .5669, .5493, .5317, .5117, .4917, .4644, .4371,
2933 .3943, .3515, .3134, .2753, .2485, .2216, .1910, .1604,
2934 .1385, .1166, .1003, .0840, .0756, .0672, .0540, .0409,
2935 .0307, .0205, .0170, .0135, .0118, .0100, .0089, .0078,
2936 .0071, .0064, .0059, .0054, .0050, .0046, .0040, .0035,
2937 .0031, .0028, .0026, .0024, .0023, .0022, .0022, .0021,
2938 .0020, .0019, .0018, .0018, .0019, .0019, .0018, .0016,
2939 .0017, .0017, .0017, .0017, .0019, .0020, .0021, .0021,
2940 .0021, .0020, .0020, .0019, .0018, .0017, .0018, .0018,
2941 .0018, .0017, .0018, .0020
2942 };
2943
2944 static const float wli[5] = {0.3475, 0.3225, 0.3475, 0.3475, 0.3225};
2945 static const float wls[5] = {1.0625, 1.0525, 1.0525, 1.0525, 1.0525};
2946
2947 ffu.wlinf = (float)wli[iwa-1];
2948 ffu.wlsup = (float)wls[iwa-1];
2949
2950 int i;
2951 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
2952
2953 switch(iwa)
2954 {
2955 case 1: for(i = 0; i < 286; i++) ffu.s[39+i] = sr1[i];
2956 break;
2957 case 2: for(i = 0; i < 292; i++) ffu.s[29+i] = sr2[i];
2958 break;
2959 case 3: for(i = 0; i < 282; i++) ffu.s[39+i] = sr3[i];
2960 break;
2961 case 4: for(i = 0; i < 282; i++) ffu.s[39+i] = sr4[i];
2962 break;
2963 case 5: for(i = 0; i < 292; i++) ffu.s[29+i] = sr5[i];
2964 break;
2965 }
2966 }
2967
landsat_8(int iwa)2968 void IWave::landsat_8(int iwa)
2969 {
2970
2971 /* Coastal Aerosol of landsat_8 */
2972 static const float sr1[14] = {
2973 .0003, .0034, .0552, .5178, .9335, .9838, .9902, 1.0000,
2974 .9777, .7456, .1596, .0145, .0017, .0000
2975 };
2976
2977 /* Blue of landsat_8 */
2978 static const float sr2[37] = {
2979 .0000, .0001, .0003, .0010, .0037, .0202, .1309, .6088,
2980 .8942, .9104, .8980, .8805, .8747, .8892, .8612, .8346,
2981 .8659, .9014, .9188, .9430, .9624, .9660, .9856, .9755,
2982 .9768, .9741, .9641, .9743, .9657, .9844, .9556, .3627,
2983 .0139, .0021, .0008, .0002, .0001
2984 };
2985
2986 /* Green of landsat_8 */
2987 static const float sr3[37] = {
2988 .0000, .0000, .0002, .0008, .0018, .0042, .0104, .0335,
2989 .1234, .4499, .8652, .9544, .9613, .9612, .9783, .9789,
2990 1.0000, .9832, .9651, .9471, .9665, .9599, .9700, .9822,
2991 .9672, .9770, .9800, .9685, .9796, .9763, .9742, .8569,
2992 .5253, .1391, .0141, .0018, .0001
2993 };
2994
2995 /* Red of landsat_8 */
2996 static const float sr4[25] = {
2997 .0000, .0001, .0014, .0072, .0486, .2998, .8350, .9508,
2998 .9573, .9842, .9832, .9594, .9544, .9817, .9885, .9770,
2999 .9889, .9807, .9665, .9669, .7291, .1239, .0125, .0014,
3000 .0001
3001 };
3002
3003 /* Pan of landsat_8 */
3004 static const float sr5[84] = {
3005 .0000, .0001, .0010, .0032, .0090, .0330, .1243, .3979,
3006 .7148, .8242, .8490, .8612, .8582, .8571, .8606, .8515,
3007 .8573, .8607, .8603, .8718, .8887, .9042, .9117, .9064,
3008 .9199, .9162, .8927, .8781, .8757, .8724, .8899, .8800,
3009 .8824, .9024, .9076, .9141, .9196, .9227, .9301, .9432,
3010 .9403, .9449, .9425, .9431, .9338, .9393, .9524, .9678,
3011 .9679, .9593, .9493, .9503, .9558, .9637, .9659, .9749,
3012 .9779, .9693, .9729, .9678, .9668, .9690, .9810, .9728,
3013 .9533, .9607, .9695, .9686, .9771, .9890, .9880, .9993,
3014 .9991, .9946, .9859, .9348, .6102, .2170, .0576, .0190,
3015 .0077, .0038, .0015, .0001
3016 };
3017
3018 /* Nir of landsat_8 */
3019 static const float sr6[27] = {
3020 .0000, .0002, .0005, .0012, .0032, .0090, .0283, .1149,
3021 .4035, .8177, .9868, .9884, .9898, .9740, .9512, .9523,
3022 .9401, .9613, .9366, .7120, .2888, .0793, .0207, .0062,
3023 .0019, .0006, .0001
3024 };
3025
3026 /* Cirrus of landsat_8 */
3027 static const float sr7[27] = {
3028 .0000, .0000, .0003, .0006, .0013, .0023, .0047, .0111,
3029 .0345, .1154, .3867, .7721, .9009, .9312, .9917, 1.0000,
3030 .9771, .8713, .6549, .2979, .0896, .0261, .0083, .0028,
3031 .0011, .0002, .0000
3032 };
3033
3034 /* SWIR1 of landsat_8 */
3035 static const float sr8[74] = {
3036 .0000, .0000, .0002, .0005, .0008, .0014, .0020, .0029,
3037 .0040, .0055, .0079, .0110, .0153, .0218, .0326, .0479,
3038 .0709, .1019, .1509, .2203, .3106, .4215, .5522, .6767,
3039 .7715, .8541, .8958, .9130, .9251, .9264, .9238, .9228,
3040 .9224, .9266, .9434, .9462, .9473, .9529, .9514, .9590,
3041 .9592, .9615, .9605, .9647, .9700, .9769, .9813, .9886,
3042 .9990, .9996, .9898, .9671, .9267, .8410, .7231, .5732,
3043 .4230, .2918, .1960, .1285, .0828, .0528, .0346, .0225,
3044 .0147, .0096, .0064, .0043, .0028, .0018, .0011, .0007,
3045 .0004, .0001
3046 };
3047
3048 /* SWIR2 of landsat_8 */
3049 static const float sr9[125] = {
3050 .0000, .0001, .0003, .0004, .0007, .0009, .0013, .0017,
3051 .0023, .0030, .0039, .0051, .0067, .0089, .0116, .0150,
3052 .0199, .0259, .0337, .0454, .0598, .0794, .1067, .1447,
3053 .1912, .2537, .3269, .4126, .5056, .5932, .6764, .7565,
3054 .8032, .8463, .8757, .8861, .9081, .9180, .9310, .9414,
3055 .9430, .9452, .9492, .9494, .9549, .9491, .9492, .9471,
3056 .9555, .9478, .9516, .9450, .9419, .9450, .9384, .9470,
3057 .9459, .9493, .9370, .9388, .9368, .9271, .9337, .9280,
3058 .9361, .9351, .9514, .9520, .9638, .9635, .9633, .9607,
3059 .9578, .9533, .9553, .9603, .9498, .9606, .9525, .9600,
3060 .9656, .9655, .9793, .9842, .9883, .9977, .9926, 1.0000,
3061 .9958, .9877, .9876, .9780, .9735, .9762, .9740, .9599,
3062 .9551, .9472, .9148, .8836, .8044, .6985, .5776, .4527,
3063 .3356, .2446, .1739, .1220, .0861, .0607, .0434, .0312,
3064 .0226, .0166, .0122, .0090, .0067, .0050, .0037, .0027,
3065 .0019, .0013, .0009, .0006, .0003
3066 };
3067
3068 static const float wli[9] = {0.4275, 0.4350, 0.5100, 0.6225, 0.4850, 0.8300, 1.3375, 1.5125, 2.0375};
3069 static const float wls[9] = {0.4625, 0.5275, 0.6025, 0.6850, 0.6950, 0.8975, 1.4050, 1.6975, 2.3500};
3070
3071 ffu.wlinf = (float)wli[iwa-1];
3072 ffu.wlsup = (float)wls[iwa-1];
3073
3074 int i;
3075 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
3076
3077 switch(iwa)
3078 {
3079 case 1: for(i = 0; i < 14; i++) ffu.s[71+i] = sr1[i];
3080 break;
3081 case 2: for(i = 0; i < 37; i++) ffu.s[74+i] = sr2[i];
3082 break;
3083 case 3: for(i = 0; i < 37; i++) ffu.s[104+i] = sr3[i];
3084 break;
3085 case 4: for(i = 0; i < 25; i++) ffu.s[149+i] = sr4[i];
3086 break;
3087 case 5: for(i = 0; i < 84; i++) ffu.s[94+i] = sr5[i];
3088 break;
3089 case 6: for(i = 0; i < 27; i++) ffu.s[232+i] = sr6[i];
3090 break;
3091 case 7: for(i = 0; i < 27; i++) ffu.s[435+i] = sr7[i];
3092 break;
3093 case 8: for(i = 0; i < 74; i++) ffu.s[505+i] = sr8[i];
3094 break;
3095 case 9: for(i = 0; i < 125; i++) ffu.s[715+i] = sr9[i];
3096 break;
3097 }
3098 }
3099
geoeye1(int iwa)3100 void IWave::geoeye1(int iwa)
3101 {
3102 /* "Panchromatic" of geoeye1 */
3103 static const float sr1[216] = {
3104 .0000, .0001, .0001, .0004, .0007, .0027, .0046, .0863,
3105 .1679, .4137, .6595, .6918, .7240, .7334, .7428, .7525,
3106 .7622, .7650, .7679, .7528, .7378, .7411, .7443, .7345,
3107 .7247, .7443, .7638, .7579, .7520, .7812, .8105, .8202,
3108 .8299, .8051, .7802, .7983, .8164, .8400, .8636, .8480,
3109 .8325, .8532, .8739, .8670, .8601, .8408, .8216, .8401,
3110 .8586, .8624, .8661, .8594, .8527, .8830, .9134, .9046,
3111 .8959, .8935, .8912, .9079, .9246, .9236, .9226, .9300,
3112 .9375, .9355, .9335, .9372, .9409, .9505, .9601, .9559,
3113 .9516, .9537, .9557, .9621, .9684, .9765, .9847, .9869,
3114 .9890, .9792, .9693, .9744, .9796, .9898, 1.0000, .9886,
3115 .9772, .9706, .9641, .9722, .9804, .9813, .9823, .9745,
3116 .9666, .9669, .9672, .9730, .9787, .9610, .9434, .9406,
3117 .9378, .9368, .9358, .9411, .9463, .9588, .9714, .9646,
3118 .9577, .9439, .9301, .9266, .9232, .9256, .9279, .9167,
3119 .9055, .8945, .8834, .8836, .8839, .8859, .8878, .8823,
3120 .8767, .8675, .8583, .8486, .8389, .8350, .8310, .8382,
3121 .8454, .8521, .8588, .8479, .8370, .8163, .7957, .7838,
3122 .7719, .7910, .8100, .6449, .4797, .2768, .0738, .0443,
3123 .0148, .0102, .0057, .0037, .0018, .0013, .0008, .0006,
3124 .0004, .0004, .0004, .0004, .0003, .0003, .0003, .0003,
3125 .0004, .0003, .0003, .0003, .0002, .0002, .0002, .0002,
3126 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3127 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3128 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3129 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3130 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001
3131
3132 };
3133
3134 /* "Blue" of geoeye1 */
3135 static const float sr2[62] = {
3136 .0000, .0000, .0002, .0003, .0003, .0003, .0004, .0004,
3137 .0004, .0004, .0005, .0006, .0006, .0007, .0010, .0013,
3138 .0036, .0060, .0222, .0384, .1251, .2119, .4473, .6828,
3139 .7713, .8597, .8677, .8756, .8771, .8786, .8878, .8971,
3140 .9065, .9160, .9209, .9259, .9328, .9397, .9416, .9435,
3141 .9595, .9754, .9877, 1.0000, .9868, .9736, .7085, .4435,
3142 .2623, .0812, .0470, .0129, .0082, .0035, .0024, .0013,
3143 .0011, .0008, .0007, .0006, .0003, .0001
3144 };
3145
3146 /* "Green" of geoeye1 */
3147 static const float sr3[82] = {
3148 .0000, .0000, .0001, .0003, .0003, .0003, .0003, .0003,
3149 .0003, .0003, .0003, .0003, .0003, .0003, .0003, .0003,
3150 .0004, .0004, .0005, .0005, .0011, .0016, .0117, .0219,
3151 .1132, .2045, .4832, .7619, .8086, .8554, .8617, .8680,
3152 .8817, .8955, .8955, .8955, .8957, .8960, .9002, .9044,
3153 .9032, .9020, .9193, .9366, .9503, .9641, .9762, .9883,
3154 .9942, 1.0000, .9882, .9763, .8664, .7564, .4210, .0857,
3155 .0462, .0067, .0040, .0014, .0010, .0006, .0005, .0004,
3156 .0004, .0003, .0003, .0003, .0003, .0003, .0003, .0003,
3157 .0003, .0003, .0003, .0003, .0003, .0003, .0003, .0003,
3158 .0002, .0000
3159 };
3160
3161 /* "Red" of geoeye1 */
3162 static const float sr4[144] = {
3163 .0001, .0001, .0002, .0001, .0000, .0000, .0000, .0000,
3164 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3165 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3166 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3167 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3168 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3169 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3170 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3171 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3172 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3173 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3174 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3175 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3176 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3177 .0000, .0000, .0001, .0002, .0003, .0017, .0032, .0247,
3178 .0463, .2688, .4913, .7407, .9901, .9918, .9936, .9968,
3179 1.0000, .9856, .9713, .9688, .9663, .8722, .7781, .4300,
3180 .0819, .0431, .0044, .0025, .0007, .0004, .0002, .0001
3181
3182 };
3183
3184 /* "Near IR" of geoeye1 */
3185 static const float sr5[86] = {
3186 .0001, .0001, .0001, .0002, .0003, .0004, .0006, .0009,
3187 .0021, .0033, .0080, .0128, .0459, .0791, .2192, .3593,
3188 .6220, .8847, .9423, 1.0000, .9865, .9731, .9620, .9510,
3189 .9322, .9135, .8973, .8811, .8735, .8660, .8582, .8503,
3190 .8385, .8268, .8155, .8042, .7969, .7895, .7832, .7769,
3191 .7689, .7608, .7526, .7444, .7341, .7237, .7111, .6985,
3192 .6851, .6717, .6579, .6440, .6250, .6061, .5877, .5693,
3193 .5586, .5479, .5373, .5267, .5096, .4925, .4802, .4679,
3194 .4608, .4536, .4466, .4396, .4300, .4205, .3784, .3364,
3195 .2346, .1329, .0784, .0240, .0139, .0038, .0024, .0010,
3196 .0007, .0004, .0004, .0004, .0003, .0001
3197 };
3198
3199 static const float wli[5] = {0.4300, 0.3975, 0.4475, 0.3550, 0.7425};
3200 static const float wls[5] = {0.9700, 0.5525, 0.6525, 0.7150, 0.9575};
3201
3202 ffu.wlinf = (float)wli[iwa-1];
3203 ffu.wlsup = (float)wls[iwa-1];
3204
3205 int i;
3206 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
3207
3208 switch(iwa)
3209 {
3210 case 1: for(i = 0; i < 216; i++) ffu.s[72+i] = sr1[i];
3211 break;
3212 case 2: for(i = 0; i < 62; i++) ffu.s[59+i] = sr2[i];
3213 break;
3214 case 3: for(i = 0; i < 82; i++) ffu.s[79+i] = sr3[i];
3215 break;
3216 case 4: for(i = 0; i < 144; i++) ffu.s[42+i] = sr4[i];
3217 break;
3218 case 5: for(i = 0; i < 86; i++) ffu.s[197+i] = sr5[i];
3219 break;
3220 }
3221 }
3222
spot6(int iwa)3223 void IWave::spot6(int iwa)
3224 {
3225
3226 /* Spot6 Blue of spot6 */
3227 static const float sr1[202] = {
3228 .0001, .0001, .0001, .0001, .0001, .0001, .0002, .0002,
3229 .0005, .0012, .0022, .0039, .0084, .0182, .0319, .0680,
3230 .1467, .2649, .4506, .6147, .7798, .8575, .8527, .8532,
3231 .8547, .8756, .9153, .9331, .9370, .9338, .9225, .9209,
3232 .9396, .9636, .9747, .9664, .9522, .9582, .9861, 1.0000,
3233 .9973, .9840, .9234, .8339, .6537, .4313, .2393, .1046,
3234 .0502, .0279, .0156, .0081, .0049, .0033, .0024, .0017,
3235 .0012, .0009, .0006, .0005, .0005, .0004, .0004, .0003,
3236 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3237 .0002, .0002, .0002, .0001, .0001, .0001, .0001, .0001,
3238 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3239 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3240 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3241 .0001, .0002, .0002, .0002, .0001, .0001, .0001, .0001,
3242 .0001, .0001, .0001, .0002, .0002, .0001, .0001, .0001,
3243 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3244 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3245 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3246 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3247 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3248 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3249 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3250 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3251 .0001, .0001, .0001, .0001, .0001, .0001, .0002, .0002,
3252 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0001,
3253 .0001, .0001
3254 };
3255
3256 /* Spot6 Green of spot6 */
3257 static const float sr2[72] = {
3258 .0001, .0001, .0001, .0002, .0003, .0004, .0006, .0010,
3259 .0019, .0033, .0061, .0127, .0313, .0704, .1541, .3075,
3260 .5195, .7467, .9229, 1.0057, 1.0230, 1.0212, 1.0164, 1.0096,
3261 1.0029, .9996, 1.0026, 1.0091, 1.0100, .9990, .9815, .9702,
3262 .9709, .9807, .9944, .9991, .9871, .9639, .8850, .7236,
3263 .5325, .2984, .1244, .0510, .0246, .0118, .0055, .0025,
3264 .0013, .0008, .0006, .0004, .0003, .0002, .0002, .0001,
3265 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3266 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001
3267
3268 };
3269
3270 /* Spot6 Red of spot6 */
3271 static const float sr3[75] = {
3272 .0001, .0001, .0002, .0003, .0004, .0005, .0006, .0009,
3273 .0016, .0031, .0065, .0125, .0222, .0387, .0747, .1634,
3274 .3494, .5463, .7600, .9267, .9767, .9951, .9979, .9662,
3275 .9217, .8987, .9033, .9255, .9573, .9887, 1.0107, 1.0137,
3276 .9960, .9674, .9391, .9198, .9138, .9211, .9366, .9466,
3277 .9308, .8765, .7978, .6985, .5868, .4715, .3531, .2351,
3278 .1401, .0776, .0416, .0206, .0098, .0045, .0023, .0013,
3279 .0008, .0005, .0005, .0004, .0003, .0003, .0002, .0001,
3280 .0001, .0000, .0000, .0000, .0000, .0001, .0001, .0001,
3281 .0002, .0001, .0000
3282 };
3283
3284 /* Spot6 NIR of spot6 */
3285 static const float sr4[200] = {
3286 .0000, .0000, .0008, .0008, .0010, .0000, .0000, .0000,
3287 .0001, .0001, .0001, .0001, .0000, .0000, .0000, .0000,
3288 .0001, .0001, .0001, .0001, .0000, .0000, .0000, .0000,
3289 .0000, .0000, .0000, .0000, .0000, .0000, .0001, .0001,
3290 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3291 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3292 .0002, .0003, .0003, .0003, .0003, .0003, .0004, .0005,
3293 .0006, .0006, .0004, .0003, .0001, .0001, .0001, .0001,
3294 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3295 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3296 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3297 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3298 .0000, .0000, .0000, .0000, .0000, .0001, .0001, .0001,
3299 .0001, .0001, .0002, .0002, .0003, .0004, .0005, .0007,
3300 .0010, .0014, .0019, .0028, .0042, .0065, .0104, .0170,
3301 .0290, .0496, .0862, .1462, .2549, .3877, .5465, .7084,
3302 .8466, .9436, .9893, 1.0000, .9932, .9834, .9753, .9694,
3303 .9633, .9552, .9448, .9330, .9201, .9087, .8988, .8904,
3304 .8829, .8749, .8643, .8520, .8377, .8224, .8081, .7954,
3305 .7842, .7751, .7670, .7592, .7514, .7431, .7336, .7233,
3306 .7118, .6987, .6841, .6699, .6567, .6454, .6366, .6299,
3307 .6230, .6150, .6053, .5943, .5805, .5570, .5102, .4427,
3308 .3607, .2673, .1717, .0941, .0480, .0243, .0132, .0074,
3309 .0046, .0029, .0020, .0014, .0011, .0008, .0007, .0006,
3310 .0005, .0004, .0003, .0003, .0002, .0002, .0001, .0001
3311
3312 };
3313
3314 /* Spot6 Pan of spot6 */
3315 static const float sr5[159] = {
3316 .0001, .0001, .0001, .0001, .0002, .0002, .0002, .0002,
3317 .0003, .0004, .0007, .0010, .0017, .0036, .0066, .0105,
3318 .0161, .0327, .0717, .1335, .2227, .3529, .5156, .6744,
3319 .7759, .8080, .8143, .8112, .8188, .8450, .8704, .8801,
3320 .8818, .8903, .9054, .9170, .9198, .9199, .9258, .9378,
3321 .9461, .9454, .9412, .9432, .9542, .9668, .9732, .9716,
3322 .9700, .9751, .9831, .9870, .9830, .9731, .9665, .9703,
3323 .9820, .9939, .9973, .9903, .9797, .9738, .9773, .9886,
3324 .9989, 1.0017, .9947, .9834, .9750, .9752, .9831, .9934,
3325 .9995, .9972, .9883, .9779, .9716, .9725, .9790, .9867,
3326 .9906, .9880, .9807, .9719, .9663, .9660, .9693, .9736,
3327 .9754, .9719, .9638, .9531, .9437, .9383, .9375, .9407,
3328 .9449, .9469, .9449, .9373, .9260, .9148, .9056, .9009,
3329 .9006, .9039, .9079, .9100, .9088, .9026, .8936, .8832,
3330 .8737, .8675, .8649, .8644, .8650, .8654, .8633, .8590,
3331 .8522, .8434, .8344, .8267, .8205, .8160, .8128, .8096,
3332 .8061, .7995, .7908, .7812, .7707, .7633, .7544, .7290,
3333 .6647, .5549, .4157, .2694, .1503, .0778, .0392, .0209,
3334 .0115, .0067, .0044, .0026, .0017, .0011, .0008, .0006,
3335 .0004, .0003, .0003, .0002, .0002, .0001, .0001
3336 };
3337
3338 static const float wli[5] = {0.4075, 0.4875, 0.5825, 0.4425, 0.4000};
3339 static const float wls[5] = {0.9125, 0.6675, 0.7700, 0.9425, 0.7975};
3340
3341 ffu.wlinf = (float)wli[iwa-1];
3342 ffu.wlsup = (float)wls[iwa-1];
3343
3344 int i;
3345 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
3346
3347 switch(iwa)
3348 {
3349 case 1: for(i = 0; i < 202; i++) ffu.s[63+i] = sr1[i];
3350 break;
3351 case 2: for(i = 0; i < 72; i++) ffu.s[95+i] = sr2[i];
3352 break;
3353 case 3: for(i = 0; i < 75; i++) ffu.s[133+i] = sr3[i];
3354 break;
3355 case 4: for(i = 0; i < 200; i++) ffu.s[77+i] = sr4[i];
3356 break;
3357 case 5: for(i = 0; i < 159; i++) ffu.s[60+i] = sr5[i];
3358 break;
3359 }
3360 }
3361
3362 /* Following filter function created using create_iwave.py */
3363
spot7(int iwa)3364 void IWave::spot7(int iwa)
3365 {
3366
3367 /* spot7 blue of spot7 */
3368 static const float sr1[229] = {
3369 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3370 .0001, .0001, .0001, .0001, .0001, .0002, .0004, .0007,
3371 .0014, .0036, .0145, .0771, .2058, .3851, .5883, .7118,
3372 .7732, .8001, .8134, .8290, .8540, .8798, .8934, .9007,
3373 .9104, .9133, .9290, .9436, .9534, .9595, .9525, .9394,
3374 .9498, .9599, .9648, .9754, .9792, .9920, 1.0000, .9602,
3375 .8198, .6370, .4136, .1930, .0761, .0275, .0075, .0037,
3376 .0029, .0021, .0007, .0003, .0002, .0002, .0002, .0002,
3377 .0003, .0003, .0003, .0003, .0003, .0003, .0003, .0003,
3378 .0003, .0003, .0003, .0003, .0003, .0003, .0003, .0003,
3379 .0003, .0003, .0003, .0003, .0003, .0003, .0002, .0002,
3380 .0002, .0002, .0003, .0003, .0003, .0003, .0003, .0003,
3381 .0002, .0002, .0002, .0002, .0003, .0003, .0003, .0005,
3382 .0007, .0013, .0010, .0004, .0003, .0015, .0014, .0046,
3383 .0036, .0034, .0002, .0011, .0031, .0034, .0041, .0024,
3384 .0014, .0004, .0004, .0005, .0003, .0004, .0002, .0002,
3385 .0003, .0002, .0002, .0002, .0002, .0001, .0002, .0001,
3386 .0002, .0001, .0002, .0002, .0002, .0001, .0002, .0002,
3387 .0003, .0004, .0003, .0003, .0001, .0002, .0001, .0001,
3388 .0001, .0002, .0001, .0001, .0000, .0001, .0000, .0001,
3389 .0000, .0001, .0002, .0002, .0001, .0002, .0002, .0002,
3390 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3391 .0001, .0001, .0001, .0002, .0002, .0003, .0004, .0004,
3392 .0005, .0005, .0005, .0005, .0005, .0005, .0005, .0005,
3393 .0005, .0004, .0004, .0005, .0006, .0006, .0008, .0015,
3394 .0021, .0020, .0022, .0019, .0018, .0014, .0013, .0011,
3395 .0009, .0008, .0008, .0007, .0008, .0009, .0011, .0012,
3396 .0012, .0022, .0021, .0027, .0028, .0021, .0021, .0009,
3397 .0008, .0003, .0002, .0001, .0000
3398 };
3399
3400 /* spot7 green of spot7 */
3401 static const float sr2[180] = {
3402 .0001, .0001, .0002, .0004, .0007, .0019, .0051, .0154,
3403 .0747, .2220, .4198, .6371, .7791, .8264, .8142, .8193,
3404 .8678, .9098, .9331, .9473, .9534, .9543, .9588, .9665,
3405 .9740, .9853, .9949, .9985, .9979, .9994, .9992, .9761,
3406 .9071, .8632, .7668, .6158, .5032, .3340, .1427, .0470,
3407 .0192, .0085, .0037, .0014, .0007, .0004, .0002, .0001,
3408 .0000, .0000, .0000, .0001, .0000, .0000, .0000, .0000,
3409 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3410 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3411 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3412 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3413 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3414 .0000, .0000, .0001, .0001, .0003, .0004, .0003, .0001,
3415 .0001, .0002, .0001, .0002, .0002, .0002, .0000, .0000,
3416 .0000, .0000, .0001, .0001, .0001, .0002, .0002, .0002,
3417 .0003, .0003, .0002, .0002, .0001, .0001, .0001, .0001,
3418 .0001, .0001, .0000, .0000, .0000, .0000, .0001, .0001,
3419 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0002,
3420 .0003, .0004, .0006, .0008, .0008, .0008, .0007, .0006,
3421 .0003, .0003, .0003, .0003, .0003, .0003, .0002, .0001,
3422 .0001, .0001, .0002, .0003, .0004, .0005, .0005, .0005,
3423 .0006, .0004, .0004, .0002, .0002, .0002, .0001, .0001,
3424 .0001, .0001, .0001, .0001
3425 };
3426
3427 /* spot7 red of spot7 */
3428 static const float sr3[235] = {
3429 .0001, .0001, .0001, .0002, .0002, .0002, .0006, .0033,
3430 .0059, .0064, .0040, .0009, .0013, .0016, .0013, .0009,
3431 .0011, .0013, .0012, .0012, .0012, .0013, .0015, .0010,
3432 .0008, .0011, .0013, .0012, .0012, .0008, .0008, .0009,
3433 .0010, .0009, .0008, .0007, .0006, .0007, .0007, .0008,
3434 .0009, .0008, .0008, .0008, .0008, .0009, .0009, .0009,
3435 .0009, .0008, .0008, .0008, .0008, .0009, .0011, .0011,
3436 .0011, .0009, .0008, .0007, .0008, .0008, .0008, .0010,
3437 .0011, .0013, .0011, .0010, .0008, .0007, .0008, .0008,
3438 .0008, .0009, .0014, .0024, .0029, .0031, .0026, .0019,
3439 .0019, .0027, .0045, .0078, .0140, .0292, .0802, .1791,
3440 .2523, .3239, .3762, .3703, .3855, .4631, .5767, .6899,
3441 .7903, .8963, .9694, .9814, .9837, .9964, .9995, .9920,
3442 .9851, .9778, .9612, .9341, .9075, .8951, .9035, .9239,
3443 .9382, .9348, .9219, .9104, .9044, .8952, .8624, .7922,
3444 .6672, .5121, .3598, .2257, .1290, .0793, .0577, .0468,
3445 .0390, .0318, .0232, .0138, .0070, .0040, .0028, .0025,
3446 .0026, .0028, .0027, .0027, .0024, .0019, .0015, .0016,
3447 .0019, .0017, .0019, .0018, .0013, .0009, .0008, .0008,
3448 .0008, .0008, .0008, .0010, .0007, .0010, .0011, .0015,
3449 .0014, .0016, .0016, .0015, .0014, .0012, .0011, .0008,
3450 .0009, .0008, .0007, .0007, .0005, .0006, .0005, .0005,
3451 .0007, .0006, .0005, .0004, .0005, .0011, .0016, .0017,
3452 .0016, .0019, .0018, .0013, .0013, .0006, .0003, .0003,
3453 .0002, .0004, .0004, .0004, .0003, .0004, .0006, .0008,
3454 .0010, .0012, .0013, .0013, .0015, .0015, .0014, .0011,
3455 .0011, .0017, .0026, .0033, .0026, .0032, .0044, .0040,
3456 .0028, .0021, .0010, .0009, .0006, .0006, .0004, .0004,
3457 .0003, .0003, .0003, .0002, .0002, .0002, .0002, .0001,
3458 .0002, .0001, .0001
3459 };
3460
3461 /* spot7 nir of spot7 */
3462 static const float sr4[219] = {
3463 .0000, .0000, .0001, .0003, .0004, .0005, .0005, .0004,
3464 .0004, .0003, .0003, .0004, .0005, .0008, .0009, .0009,
3465 .0008, .0006, .0007, .0010, .0013, .0019, .0021, .0022,
3466 .0018, .0013, .0010, .0008, .0005, .0003, .0003, .0002,
3467 .0001, .0001, .0001, .0001, .0002, .0002, .0002, .0002,
3468 .0002, .0003, .0003, .0003, .0003, .0001, .0004, .0007,
3469 .0010, .0010, .0006, .0003, .0005, .0008, .0010, .0011,
3470 .0008, .0006, .0007, .0010, .0013, .0013, .0010, .0006,
3471 .0004, .0002, .0002, .0002, .0003, .0003, .0003, .0003,
3472 .0002, .0002, .0003, .0005, .0007, .0009, .0009, .0010,
3473 .0007, .0004, .0002, .0001, .0002, .0001, .0001, .0002,
3474 .0001, .0001, .0001, .0002, .0001, .0001, .0002, .0002,
3475 .0001, .0001, .0002, .0002, .0002, .0002, .0002, .0002,
3476 .0002, .0002, .0001, .0002, .0001, .0001, .0002, .0002,
3477 .0002, .0002, .0002, .0002, .0002, .0002, .0001, .0001,
3478 .0001, .0001, .0002, .0002, .0002, .0002, .0003, .0003,
3479 .0004, .0005, .0006, .0007, .0010, .0015, .0024, .0039,
3480 .0065, .0113, .0202, .0353, .0606, .1026, .1796, .3276,
3481 .4949, .6522, .7976, .9149, .9645, .9593, .9472, .9500,
3482 .9614, .9741, .9798, .9945, .9989, .9942, .9787, .9669,
3483 .9546, .9411, .9290, .9171, .9071, .8970, .8867, .8749,
3484 .8603, .8429, .8247, .8050, .7864, .7700, .7573, .7482,
3485 .7402, .7312, .7216, .7074, .6893, .6667, .6404, .6118,
3486 .5830, .5529, .5224, .4938, .4658, .4379, .4077, .3707,
3487 .3252, .2748, .2212, .1662, .1137, .0696, .0391, .0211,
3488 .0120, .0073, .0049, .0035, .0029, .0024, .0021, .0018,
3489 .0016, .0014, .0012, .0010, .0007, .0005, .0004, .0003,
3490 .0002, .0001, .0001
3491 };
3492
3493 /* spot7 pan of spot7 */
3494 static const float sr5[235] = {
3495 .0001, .0001, .0001, .0001, .0000, .0001, .0001, .0001,
3496 .0001, .0002, .0003, .0004, .0008, .0026, .0089, .0293,
3497 .0911, .2322, .4161, .5766, .6555, .6834, .7001, .7313,
3498 .7615, .7761, .7760, .7811, .7970, .8226, .8557, .8692,
3499 .8794, .8849, .8867, .8913, .8908, .8982, .9110, .9220,
3500 .9366, .9446, .9460, .9504, .9514, .9529, .9519, .9403,
3501 .9273, .9205, .9230, .9388, .9551, .9536, .9457, .9484,
3502 .9614, .9764, .9866, .9868, .9811, .9784, .9806, .9841,
3503 .9873, .9898, .9901, .9918, .9963, .9997, .9971, .9877,
3504 .9793, .9768, .9791, .9821, .9814, .9755, .9703, .9717,
3505 .9777, .9819, .9814, .9786, .9764, .9741, .9742, .9739,
3506 .9734, .9716, .9677, .9634, .9616, .9617, .9620, .9614,
3507 .9587, .9529, .9441, .9352, .9302, .9315, .9357, .9386,
3508 .9379, .9331, .9277, .9235, .9198, .9155, .9093, .8992,
3509 .8850, .8686, .8561, .8524, .8583, .8648, .8692, .8681,
3510 .8631, .8572, .8521, .8469, .8403, .8349, .8280, .8152,
3511 .7916, .7543, .7074, .6639, .6386, .6187, .5794, .5198,
3512 .4311, .3047, .1803, .1007, .0572, .0331, .0176, .0090,
3513 .0044, .0026, .0017, .0013, .0011, .0009, .0009, .0008,
3514 .0008, .0010, .0007, .0010, .0011, .0011, .0007, .0008,
3515 .0009, .0009, .0008, .0009, .0008, .0008, .0008, .0008,
3516 .0009, .0010, .0012, .0008, .0007, .0009, .0010, .0007,
3517 .0007, .0006, .0006, .0006, .0004, .0004, .0008, .0005,
3518 .0006, .0004, .0007, .0006, .0005, .0004, .0003, .0004,
3519 .0005, .0004, .0004, .0004, .0004, .0004, .0004, .0004,
3520 .0004, .0004, .0003, .0003, .0003, .0003, .0003, .0003,
3521 .0002, .0004, .0003, .0003, .0002, .0002, .0004, .0003,
3522 .0003, .0002, .0003, .0002, .0002, .0002, .0002, .0002,
3523 .0001, .0002, .0001, .0002, .0002, .0002, .0001, .0001,
3524 .0002, .0001, .0000
3525 };
3526
3527 static const float wli[5] = {0.4000, 0.5075, 0.4000, 0.4025, 0.4050};
3528 static const float wls[5] = {0.9725, 0.9575, 0.9875, 0.9500, 0.9925};
3529
3530 ffu.wlinf = (float)wli[iwa-1];
3531 ffu.wlsup = (float)wls[iwa-1];
3532
3533 int i;
3534 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
3535
3536 switch(iwa)
3537 {
3538 case 1: for(i = 0; i < 229; i++) ffu.s[60+i] = sr1[i];
3539 break;
3540 case 2: for(i = 0; i < 180; i++) ffu.s[102+i] = sr2[i];
3541 break;
3542 case 3: for(i = 0; i < 235; i++) ffu.s[60+i] = sr3[i];
3543 break;
3544 case 4: for(i = 0; i < 219; i++) ffu.s[61+i] = sr4[i];
3545 break;
3546 case 5: for(i = 0; i < 235; i++) ffu.s[62+i] = sr5[i];
3547 break;
3548 }
3549 }
3550
3551 /* Following filter function created using create_iwave.py */
3552
pleiades1a(int iwa)3553 void IWave::pleiades1a(int iwa)
3554 {
3555
3556 /* Pleiades1a blue of pleiades1a */
3557 static const float sr1[208] = {
3558 .0100, .0296, .0886, .1300, .1355, .2482, .4389, .5185,
3559 .4758, .5178, .6596, .7786, .7959, .7725, .7796, .8094,
3560 .8324, .8437, .8410, .8332, .8250, .8246, .8369, .8711,
3561 .9167, .9474, .9601, .9669, .9748, .9730, .9684, .9664,
3562 .9744, .9903, 1.0000, .9938, .9817, .9813, .9671, .8859,
3563 .7175, .4994, .3052, .1740, .0953, .0549, .0349, .0264,
3564 .0232, .0225, .0212, .0175, .0120, .0074, .0047, .0034,
3565 .0026, .0020, .0015, .0011, .0007, .0005, .0004, .0004,
3566 .0005, .0010, .0014, .0014, .0009, .0003, .0001, .0001,
3567 .0001, .0001, .0001, .0001, .0000, .0000, .0000, .0000,
3568 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3569 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3570 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3571 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3572 .0000, .0000, .0001, .0002, .0005, .0008, .0010, .0007,
3573 .0005, .0004, .0006, .0012, .0016, .0017, .0010, .0004,
3574 .0002, .0001, .0001, .0001, .0001, .0000, .0000, .0001,
3575 .0001, .0000, .0001, .0001, .0001, .0001, .0002, .0002,
3576 .0004, .0005, .0007, .0008, .0007, .0005, .0004, .0003,
3577 .0003, .0003, .0002, .0002, .0002, .0003, .0003, .0004,
3578 .0005, .0006, .0008, .0012, .0018, .0031, .0056, .0105,
3579 .0168, .0214, .0218, .0179, .0138, .0108, .0090, .0081,
3580 .0080, .0081, .0090, .0103, .0127, .0164, .0224, .0311,
3581 .0416, .0503, .0537, .0489, .0395, .0294, .0215, .0164,
3582 .0130, .0109, .0095, .0085, .0078, .0075, .0073, .0074,
3583 .0075, .0077, .0079, .0079, .0078, .0073, .0067, .0058
3584
3585 };
3586
3587 /* Pleiades1a green of pleiades1a */
3588 static const float sr2[191] = {
3589 .0001, .0001, .0001, .0001, .0002, .0003, .0004, .0005,
3590 .0008, .0046, .0086, .0145, .0246, .0486, .1109, .2379,
3591 .4375, .6562, .8184, .8944, .9165, .9230, .9287, .9374,
3592 .9507, .9616, .9692, .9772, .9815, .9834, .9876, .9958,
3593 1.0000, .9973, .9849, .9679, .9538, .9542, .9675, .9818,
3594 .9868, .9724, .9345, .8829, .8441, .8255, .8103, .7517,
3595 .6227, .4368, .2572, .1376, .0778, .0485, .0346, .0270,
3596 .0215, .0162, .0108, .0061, .0031, .0016, .0008, .0005,
3597 .0003, .0002, .0001, .0001, .0001, .0001, .0001, .0001,
3598 .0001, .0001, .0001, .0001, .0002, .0002, .0002, .0002,
3599 .0001, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3600 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3601 .0000, .0000, .0000, .0000, .0001, .0002, .0002, .0002,
3602 .0001, .0001, .0001, .0000, .0000, .0000, .0000, .0000,
3603 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3604 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3605 .0000, .0001, .0000, .0000, .0001, .0001, .0001, .0002,
3606 .0004, .0010, .0042, .0067, .0079, .0069, .0030, .0011,
3607 .0007, .0006, .0005, .0005, .0005, .0006, .0008, .0011,
3608 .0017, .0031, .0056, .0092, .0126, .0146, .0143, .0119,
3609 .0091, .0069, .0057, .0053, .0054, .0061, .0068, .0084,
3610 .0108, .0141, .0186, .0234, .0276, .0301, .0304, .0290,
3611 .0269, .0250, .0240, .0235, .0239, .0248, .0260, .0271,
3612 .0270, .0257, .0230, .0191, .0150, .0111, .0081
3613 };
3614
3615 /* Pleiades1a red of pleiades1a */
3616 static const float sr3[208] = {
3617 .0097, .0035, .0035, .0114, .0267, .0374, .0905, .0908,
3618 .0400, .0209, .0081, .0027, .0011, .0006, .0005, .0006,
3619 .0010, .0019, .0015, .0006, .0003, .0003, .0003, .0003,
3620 .0005, .0008, .0005, .0002, .0001, .0001, .0000, .0000,
3621 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3622 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3623 .0000, .0000, .0001, .0001, .0001, .0001, .0001, .0001,
3624 .0001, .0002, .0002, .0003, .0004, .0006, .0010, .0033,
3625 .0100, .0182, .0331, .0625, .1184, .2220, .3759, .5579,
3626 .7347, .8643, .9326, .9533, .9627, .9534, .9444, .9463,
3627 .9569, .9700, .9846, .9956, .9999, 1.0000, .9970, .9951,
3628 .9890, .9864, .9814, .9690, .9551, .9378, .9176, .8929,
3629 .8669, .8448, .8226, .7893, .7378, .6630, .5666, .4496,
3630 .3262, .2196, .1417, .0926, .0620, .0457, .0356, .0311,
3631 .0295, .0234, .0190, .0159, .0132, .0108, .0084, .0064,
3632 .0047, .0034, .0024, .0017, .0013, .0010, .0007, .0006,
3633 .0005, .0004, .0004, .0003, .0003, .0003, .0003, .0003,
3634 .0003, .0003, .0003, .0004, .0005, .0005, .0006, .0007,
3635 .0007, .0007, .0006, .0005, .0004, .0004, .0002, .0003,
3636 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3637 .0002, .0002, .0003, .0003, .0003, .0005, .0005, .0007,
3638 .0008, .0011, .0014, .0019, .0025, .0034, .0042, .0054,
3639 .0063, .0069, .0071, .0070, .0066, .0068, .0067, .0069,
3640 .0071, .0074, .0081, .0087, .0097, .0107, .0120, .0137,
3641 .0160, .0181, .0207, .0237, .0270, .0311, .0353, .0399,
3642 .0439, .0463, .0455, .0409, .0333, .0251, .0179, .0125
3643
3644 };
3645
3646 /* Pleiades1a nir of pleiades1a */
3647 static const float sr4[208] = {
3648 .0024, .0017, .0021, .0021, .0013, .0007, .0006, .0006,
3649 .0008, .0012, .0021, .0024, .0013, .0006, .0004, .0003,
3650 .0003, .0003, .0003, .0005, .0009, .0010, .0007, .0004,
3651 .0003, .0002, .0002, .0003, .0004, .0006, .0007, .0007,
3652 .0006, .0004, .0003, .0003, .0003, .0003, .0004, .0005,
3653 .0006, .0007, .0009, .0009, .0009, .0008, .0007, .0006,
3654 .0005, .0006, .0006, .0008, .0014, .0024, .0027, .0014,
3655 .0006, .0004, .0002, .0002, .0002, .0002, .0002, .0002,
3656 .0003, .0007, .0014, .0013, .0006, .0002, .0001, .0001,
3657 .0000, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3658 .0001, .0001, .0001, .0001, .0002, .0002, .0002, .0002,
3659 .0002, .0001, .0001, .0001, .0001, .0001, .0001, .0000,
3660 .0000, .0000, .0001, .0001, .0001, .0001, .0001, .0002,
3661 .0002, .0003, .0004, .0005, .0006, .0008, .0010, .0012,
3662 .0014, .0016, .0018, .0019, .0021, .0023, .0025, .0038,
3663 .0045, .0054, .0067, .0084, .0108, .0152, .0214, .0295,
3664 .0417, .0591, .0841, .1200, .1685, .2344, .3148, .4102,
3665 .5131, .6196, .7196, .8080, .8783, .9313, .9662, .9859,
3666 .9959, 1.0000, .9979, .9931, .9853, .9735, .9606, .9494,
3667 .9376, .9313, .9284, .9275, .9289, .9299, .9302, .9309,
3668 .9315, .9278, .9226, .9162, .9073, .8975, .8845, .8736,
3669 .8604, .8494, .8370, .8259, .8132, .7983, .7852, .7720,
3670 .7580, .7433, .7273, .7098, .6906, .6694, .6464, .6221,
3671 .5966, .5716, .5472, .5225, .4996, .4771, .4563, .4366,
3672 .4164, .3950, .3688, .3351, .2940, .2473, .1978, .1498,
3673 .1077, .0744, .0496, .0331, .0218, .0147, .0104, .0077
3674
3675 };
3676
3677 /* Pleiades1a pan of pleiades1a */
3678 static const float sr5[162] = {
3679 .0000, .0004, .0008, .0030, .0061, .0130, .0240, .0422,
3680 .0718, .1152, .1739, .2443, .3204, .3941, .4553, .5016,
3681 .5325, .5538, .5684, .5825, .5968, .6108, .6233, .6336,
3682 .6422, .6502, .6571, .6641, .6708, .6766, .6809, .6830,
3683 .6835, .6832, .6832, .6847, .6893, .6965, .7074, .7194,
3684 .7324, .7450, .7555, .7639, .7717, .7777, .7827, .7872,
3685 .7914, .7950, .7975, .7998, .8008, .8004, .8003, .8001,
3686 .8013, .8037, .8078, .8137, .8211, .8304, .8391, .8483,
3687 .8565, .8635, .8690, .8739, .8769, .8801, .8826, .8851,
3688 .8895, .8940, .8995, .9057, .9125, .9190, .9246, .9290,
3689 .9339, .9375, .9416, .9450, .9481, .9511, .9533, .9561,
3690 .9582, .9602, .9610, .9632, .9650, .9675, .9730, .9775,
3691 .9829, .9875, .9928, .9967, .9995, 1.0000, .9944, .9883,
3692 .9812, .9752, .9701, .9661, .9633, .9625, .9622, .9634,
3693 .9655, .9672, .9673, .9678, .9654, .9634, .9580, .9534,
3694 .9487, .9424, .9359, .9300, .9245, .9191, .9142, .9089,
3695 .9041, .8981, .8928, .8871, .8829, .8773, .8735, .8695,
3696 .8665, .8661, .8589, .8478, .8332, .8137, .7867, .7491,
3697 .6982, .6307, .5507, .4617, .3696, .2824, .2075, .1465,
3698 .1010, .0687, .0471, .0324, .0247, .0174, .0127, .0117,
3699 .0087, .0082
3700 };
3701
3702 static const float wli[5] = {0.4300, 0.4725, 0.4300, 0.4300, 0.4475};
3703 static const float wls[5] = {0.9500, 0.9500, 0.9500, 0.9500, 0.8525};
3704
3705 ffu.wlinf = (float)wli[iwa-1];
3706 ffu.wlsup = (float)wls[iwa-1];
3707
3708 int i;
3709 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
3710
3711 switch(iwa)
3712 {
3713 case 1: for(i = 0; i < 208; i++) ffu.s[72+i] = sr1[i];
3714 break;
3715 case 2: for(i = 0; i < 191; i++) ffu.s[89+i] = sr2[i];
3716 break;
3717 case 3: for(i = 0; i < 208; i++) ffu.s[72+i] = sr3[i];
3718 break;
3719 case 4: for(i = 0; i < 208; i++) ffu.s[72+i] = sr4[i];
3720 break;
3721 case 5: for(i = 0; i < 162; i++) ffu.s[79+i] = sr5[i];
3722 break;
3723 }
3724 }
3725
3726 /* Following filter function created using create_iwave.py */
3727
pleiades1b(int iwa)3728 void IWave::pleiades1b(int iwa)
3729 {
3730
3731 /* Pleiades1b blue of pleiades1b */
3732 static const float sr1[208] = {
3733 .0016, .0013, .0043, .0111, .0176, .0234, .0574, .1346,
3734 .2238, .3085, .4616, .6508, .7554, .7477, .7168, .7185,
3735 .7567, .8101, .8422, .8234, .7752, .7527, .7802, .8199,
3736 .8517, .8603, .8587, .8658, .8828, .9040, .9197, .9326,
3737 .9502, .9758, .9950, 1.0000, .9951, .9806, .9417, .8436,
3738 .6711, .4633, .2889, .1671, .0902, .0505, .0315, .0238,
3739 .0213, .0206, .0196, .0168, .0114, .0067, .0041, .0030,
3740 .0024, .0020, .0016, .0011, .0013, .0008, .0006, .0004,
3741 .0004, .0004, .0005, .0011, .0020, .0012, .0004, .0001,
3742 .0001, .0001, .0001, .0001, .0001, .0000, .0000, .0000,
3743 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3744 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3745 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3746 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3747 .0000, .0000, .0000, .0000, .0001, .0002, .0008, .0011,
3748 .0008, .0004, .0004, .0004, .0007, .0016, .0024, .0010,
3749 .0003, .0002, .0001, .0001, .0000, .0000, .0000, .0000,
3750 .0000, .0000, .0000, .0001, .0000, .0001, .0001, .0001,
3751 .0002, .0003, .0004, .0007, .0009, .0007, .0006, .0004,
3752 .0003, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
3753 .0003, .0004, .0004, .0005, .0007, .0010, .0016, .0026,
3754 .0046, .0091, .0172, .0238, .0215, .0159, .0120, .0095,
3755 .0079, .0072, .0072, .0076, .0084, .0099, .0123, .0163,
3756 .0226, .0320, .0444, .0547, .0564, .0480, .0358, .0258,
3757 .0189, .0144, .0117, .0099, .0086, .0078, .0072, .0070,
3758 .0069, .0069, .0070, .0073, .0074, .0075, .0075, .0071
3759
3760 };
3761
3762 /* Pleiades1b green of pleiades1b */
3763 static const float sr2[192] = {
3764 .0001, .0001, .0001, .0002, .0003, .0005, .0006, .0008,
3765 .0015, .0041, .0100, .0196, .0325, .0568, .1238, .2859,
3766 .5290, .7716, .8838, .9080, .9131, .9137, .9225, .9367,
3767 .9498, .9545, .9586, .9642, .9705, .9723, .9675, .9589,
3768 .9524, .9525, .9560, .9552, .9490, .9471, .9544, .9711,
3769 .9898, 1.0000, .9954, .9698, .9253, .8633, .7948, .7239,
3770 .6453, .5439, .4170, .2767, .1575, .0856, .0492, .0327,
3771 .0238, .0182, .0141, .0100, .0058, .0030, .0015, .0008,
3772 .0005, .0003, .0002, .0001, .0001, .0001, .0001, .0001,
3773 .0000, .0001, .0000, .0000, .0001, .0001, .0001, .0003,
3774 .0003, .0002, .0001, .0001, .0000, .0000, .0000, .0000,
3775 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3776 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0001,
3777 .0003, .0002, .0001, .0000, .0000, .0000, .0000, .0000,
3778 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3779 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3780 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3781 .0000, .0001, .0001, .0001, .0003, .0007, .0032, .0142,
3782 .0083, .0022, .0009, .0006, .0004, .0004, .0004, .0004,
3783 .0005, .0006, .0008, .0011, .0019, .0037, .0064, .0103,
3784 .0131, .0133, .0111, .0084, .0066, .0057, .0054, .0056,
3785 .0062, .0072, .0089, .0115, .0149, .0193, .0235, .0264,
3786 .0270, .0255, .0234, .0214, .0199, .0193, .0191, .0197,
3787 .0207, .0220, .0232, .0238, .0230, .0207, .0172, .0133
3788
3789 };
3790
3791 /* Pleiades1b red of pleiades1b */
3792 static const float sr3[208] = {
3793 .0005, .0009, .0005, .0012, .0051, .0080, .0067, .0109,
3794 .0247, .0654, .1225, .0570, .0214, .0128, .0063, .0024,
3795 .0009, .0005, .0004, .0004, .0005, .0008, .0010, .0006,
3796 .0004, .0003, .0002, .0003, .0004, .0005, .0005, .0004,
3797 .0003, .0002, .0001, .0001, .0001, .0001, .0001, .0000,
3798 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3799 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3800 .0000, .0000, .0001, .0001, .0001, .0001, .0001, .0002,
3801 .0002, .0002, .0007, .0012, .0021, .0038, .0068, .0123,
3802 .0222, .0413, .0781, .1519, .2777, .4510, .6291, .7625,
3803 .8329, .8579, .8659, .8693, .8752, .8858, .9006, .9175,
3804 .9349, .9478, .9570, .9623, .9648, .9624, .9613, .9620,
3805 .9699, .9812, .9934, 1.0000, .9810, .9523, .9132, .8694,
3806 .8252, .7830, .7361, .6735, .5878, .4805, .3630, .2523,
3807 .1626, .1022, .0641, .0419, .0285, .0205, .0154, .0121,
3808 .0099, .0083, .0071, .0061, .0052, .0043, .0035, .0028,
3809 .0036, .0030, .0023, .0018, .0013, .0010, .0008, .0006,
3810 .0005, .0004, .0004, .0004, .0003, .0003, .0003, .0003,
3811 .0003, .0003, .0003, .0003, .0004, .0004, .0005, .0006,
3812 .0006, .0007, .0007, .0006, .0005, .0005, .0004, .0003,
3813 .0003, .0003, .0002, .0002, .0002, .0002, .0002, .0002,
3814 .0002, .0002, .0002, .0003, .0003, .0003, .0003, .0004,
3815 .0005, .0006, .0008, .0010, .0013, .0018, .0024, .0033,
3816 .0044, .0057, .0069, .0078, .0083, .0084, .0082, .0081,
3817 .0080, .0078, .0078, .0080, .0082, .0085, .0088, .0093,
3818 .0098, .0101, .0104, .0104, .0102, .0095, .0086, .0073
3819
3820 };
3821
3822 /* Pleiades1b nir of pleiades1b */
3823 static const float sr4[208] = {
3824 .0002, .0008, .0004, .0005, .0017, .0027, .0012, .0007,
3825 .0007, .0008, .0008, .0010, .0015, .0022, .0020, .0010,
3826 .0005, .0003, .0002, .0002, .0002, .0003, .0004, .0006,
3827 .0006, .0004, .0003, .0002, .0002, .0002, .0002, .0002,
3828 .0004, .0006, .0007, .0006, .0005, .0004, .0004, .0004,
3829 .0004, .0005, .0006, .0006, .0007, .0008, .0008, .0007,
3830 .0006, .0006, .0005, .0005, .0005, .0006, .0007, .0012,
3831 .0023, .0029, .0020, .0008, .0004, .0002, .0001, .0001,
3832 .0001, .0001, .0001, .0001, .0002, .0003, .0005, .0008,
3833 .0007, .0003, .0002, .0001, .0001, .0001, .0000, .0000,
3834 .0000, .0000, .0000, .0000, .0001, .0001, .0001, .0001,
3835 .0001, .0002, .0002, .0002, .0002, .0001, .0001, .0001,
3836 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
3837 .0001, .0001, .0001, .0001, .0002, .0002, .0003, .0003,
3838 .0004, .0005, .0006, .0008, .0010, .0012, .0014, .0016,
3839 .0018, .0020, .0023, .0025, .0029, .0052, .0064, .0080,
3840 .0101, .0131, .0171, .0229, .0310, .0427, .0592, .0835,
3841 .1179, .1664, .2311, .3159, .4172, .5285, .6410, .7472,
3842 .8386, .9088, .9594, .9881, 1.0000, .9992, .9896, .9677,
3843 .9514, .9375, .9255, .9152, .9088, .9026, .8967, .8925,
3844 .8855, .8777, .8676, .8569, .8474, .8360, .8237, .8130,
3845 .8016, .7922, .7828, .7769, .7715, .7631, .7543, .7452,
3846 .7349, .7255, .7146, .7031, .6919, .6816, .6705, .6595,
3847 .6476, .6292, .6111, .5934, .5761, .5600, .5449, .5306,
3848 .5155, .4977, .4734, .4388, .3934, .3368, .2743, .2114,
3849 .1536, .1063, .0704, .0459, .0295, .0193, .0127, .0085
3850
3851 };
3852
3853 /* Pleiades1b pan of pleiades1b */
3854 static const float sr5[203] = {
3855 .0001, .0001, .0002, .0004, .0008, .0028, .0056, .0120,
3856 .0221, .0389, .0664, .1067, .1614, .2272, .2987, .3678,
3857 .4258, .4697, .4992, .5193, .5333, .5467, .5603, .5736,
3858 .5855, .5957, .6041, .6120, .6188, .6256, .6319, .6378,
3859 .6422, .6444, .6449, .6449, .6451, .6468, .6513, .6591,
3860 .6691, .6812, .6937, .7056, .7158, .7251, .7324, .7384,
3861 .7439, .7493, .7536, .7581, .7611, .7639, .7652, .7662,
3862 .7666, .7675, .7688, .7723, .7771, .7834, .7917, .8015,
3863 .8110, .8200, .8291, .8365, .8427, .8482, .8519, .8555,
3864 .8583, .8620, .8667, .8716, .8780, .8847, .8913, .8989,
3865 .9046, .9105, .9155, .9208, .9253, .9290, .9329, .9370,
3866 .9401, .9442, .9469, .9503, .9521, .9543, .9574, .9608,
3867 .9663, .9721, .9788, .9846, .9912, .9957, .9991, 1.0000,
3868 .9963, .9915, .9870, .9817, .9771, .9746, .9729, .9739,
3869 .9742, .9769, .9798, .9828, .9846, .9851, .9837, .9826,
3870 .9790, .9746, .9697, .9648, .9598, .9533, .9484, .9445,
3871 .9397, .9345, .9297, .9248, .9183, .9112, .9061, .9006,
3872 .8953, .8908, .8895, .8885, .8810, .8708, .8567, .8369,
3873 .8102, .7729, .7190, .6529, .5711, .4796, .3846, .2948,
3874 .2166, .1531, .1057, .0717, .0491, .0338, .0257, .0182,
3875 .0132, .0122, .0090, .0084, .0043, .0033, .0027, .0022,
3876 .0018, .0015, .0014, .0012, .0011, .0010, .0009, .0009,
3877 .0008, .0007, .0007, .0007, .0006, .0006, .0006, .0006,
3878 .0006, .0005, .0005, .0005, .0005, .0004, .0004, .0004,
3879 .0005, .0004, .0004, .0004, .0004, .0004, .0004, .0003,
3880 .0004, .0003, .0003
3881 };
3882
3883 static const float wli[5] = {0.4300, 0.4700, 0.4300, 0.4300, 0.4425};
3884 static const float wls[5] = {0.9500, 0.9500, 0.9500, 0.9500, 0.9500};
3885
3886 ffu.wlinf = (float)wli[iwa-1];
3887 ffu.wlsup = (float)wls[iwa-1];
3888
3889 int i;
3890 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
3891
3892 switch(iwa)
3893 {
3894 case 1: for(i = 0; i < 208; i++) ffu.s[72+i] = sr1[i];
3895 break;
3896 case 2: for(i = 0; i < 192; i++) ffu.s[88+i] = sr2[i];
3897 break;
3898 case 3: for(i = 0; i < 208; i++) ffu.s[72+i] = sr3[i];
3899 break;
3900 case 4: for(i = 0; i < 208; i++) ffu.s[72+i] = sr4[i];
3901 break;
3902 case 5: for(i = 0; i < 203; i++) ffu.s[77+i] = sr5[i];
3903 break;
3904 }
3905 }
3906
3907
worldview3(int iwa)3908 void IWave::worldview3(int iwa)
3909 {
3910
3911 /* Pan of worldview3 */
3912 static const float sr1[162] = {
3913 .0000, .0001, .0002, .0005, .0018, .0040, .0437, .0999,
3914 .2023, .3598, .4607, .4963, .5229, .5402, .5483, .5464,
3915 .5491, .5563, .5584, .5565, .5580, .5663, .5684, .5652,
3916 .5674, .5758, .5779, .5740, .5814, .5982, .6074, .6086,
3917 .6140, .6240, .6297, .6323, .6369, .6421, .6537, .6723,
3918 .6853, .6929, .6990, .7052, .7116, .7163, .7205, .7239,
3919 .7298, .7369, .7446, .7530, .7589, .7626, .7700, .7778,
3920 .7844, .7917, .7971, .8030, .8088, .8133, .8203, .8269,
3921 .8358, .8451, .8507, .8532, .8567, .8614, .8684, .8768,
3922 .8824, .8882, .8900, .8896, .8910, .8936, .9016, .9128,
3923 .9218, .9295, .9286, .9244, .9243, .9263, .9334, .9439,
3924 .9480, .9513, .9530, .9507, .9534, .9566, .9606, .9626,
3925 .9653, .9670, .9676, .9686, .9538, .9360, .9365, .9431,
3926 .9533, .9661, .9744, .9783, .9859, .9935, .9972, .9997,
3927 .9985, .9964, .9917, .9875, .9869, .9871, .9841, .9803,
3928 .9789, .9753, .9744, .9739, .9753, .9755, .9726, .9685,
3929 .9654, .9614, .9579, .9573, .9557, .9525, .9487, .9448,
3930 .9443, .9420, .9429, .9446, .9411, .9377, .9310, .9255,
3931 .9240, .9205, .8438, .7458, .5255, .2833, .1646, .0703,
3932 .0337, .0104, .0031, .0017, .0010, .0006, .0004, .0002,
3933 .0002, .0001
3934 };
3935
3936 /* Coastal_MS7 of worldview3 */
3937 static const float sr2[34] = {
3938 .0000, .0000, .0002, .0006, .0025, .0226, .1048, .3527,
3939 .5648, .6403, .6701, .7018, .7234, .7547, .7860, .8122,
3940 .8297, .8511, .8795, .8988, .8979, .9066, .9363, .9680,
3941 .9882, 1.0000, .8771, .4725, .1212, .0196, .0037, .0011,
3942 .0003, .0001
3943 };
3944
3945 /* Blue_MS4 of worldview3 */
3946 static const float sr3[176] = {
3947 .0000, .0001, .0002, .0004, .0008, .0020, .0052, .0145,
3948 .0523, .1391, .3701, .6262, .7571, .7961, .8125, .8259,
3949 .8327, .8311, .8464, .8596, .8824, .8860, .9003, .9034,
3950 .9042, .9240, .9537, .9661, .9668, .9831, .9967, .9997,
3951 .9531, .8053, .5343, .2451, .0889, .0348, .0099, .0041,
3952 .0016, .0007, .0004, .0003, .0002, .0001, .0000, .0000,
3953 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3954 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3955 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3956 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3957 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3958 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3959 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3960 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3961 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3962 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3963 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3964 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3965 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3966 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3967 .0000, .0000, .0000, .0000, .0001, .0001, .0001, .0001,
3968 .0001, .0001, .0001, .0003, .0003, .0001, .0001, .0001
3969
3970 };
3971
3972 /* Green_MS3 of worldview3 */
3973 static const float sr4[45] = {
3974 .0000, .0001, .0007, .0065, .0851, .4023, .6996, .7702,
3975 .7801, .8082, .7873, .8085, .8168, .8360, .8423, .7935,
3976 .8164, .8616, .8783, .8763, .8792, .8934, .9187, .9544,
3977 .9716, .9713, .9720, .9459, .9458, .9834, .9994, .9601,
3978 .7693, .4286, .1704, .0586, .0208, .0075, .0030, .0015,
3979 .0008, .0004, .0002, .0001, .0001
3980 };
3981
3982 /* Yellow_MS6 of worldview3 */
3983 static const float sr5[165] = {
3984 .0000, .0000, .0002, .0007, .0037, .0342, .2139, .6005,
3985 .8636, .8941, .9078, .9180, .9227, .9286, .9467, .9433,
3986 .9607, .9878, .9963, .9933, .9959, .9587, .6899, .3138,
3987 .0944, .0261, .0093, .0036, .0016, .0007, .0004, .0002,
3988 .0001, .0001, .0000, .0000, .0000, .0000, .0000, .0000,
3989 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3990 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3991 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3992 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3993 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3994 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3995 .0000, .0000, .0001, .0003, .0005, .0008, .0019, .0057,
3996 .0055, .0016, .0005, .0002, .0001, .0001, .0001, .0000,
3997 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3998 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
3999 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4000 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4001 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4002 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4003 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4004 .0000, .0000, .0000, .0001, .0001
4005 };
4006
4007 /* Red_MS2 of worldview3 */
4008 static const float sr6[42] = {
4009 .0000, .0001, .0004, .0020, .0203, .1547, .4879, .8183,
4010 .9395, .9432, .9370, .9429, .9488, .9468, .9548, .9586,
4011 .9625, .9732, .9790, .9840, .9931, .9922, .9949, .9945,
4012 .9875, .9886, .9949, .9993, .9714, .8022, .4694, .1876,
4013 .0607, .0229, .0093, .0039, .0018, .0008, .0004, .0003,
4014 .0002, .0001
4015 };
4016
4017 /* Red Edge_MS5 of worldview3 */
4018 static const float sr7[38] = {
4019 .0000, .0001, .0002, .0005, .0012, .0032, .0088, .0326,
4020 .1111, .3243, .6486, .8933, .9838, .9935, .9864, .9820,
4021 .9795, .9812, .9855, .9921, .9979, .9995, .9895, .9330,
4022 .7780, .4940, .2209, .0826, .0292, .0123, .0055, .0027,
4023 .0013, .0007, .0004, .0002, .0001, .0001
4024 };
4025
4026 /* NIR1_MS1 of worldview3 */
4027 static const float sr8[76] = {
4028 .0001, .0001, .0001, .0003, .0006, .0013, .0027, .0053,
4029 .0104, .0231, .0588, .1652, .3962, .6715, .8709, .9739,
4030 1.0000, .9922, .9818, .9712, .9554, .9382, .9261, .9178,
4031 .9153, .9139, .9153, .9127, .9056, .8989, .8899, .8803,
4032 .8697, .8670, .8662, .8676, .8673, .8596, .8528, .8439,
4033 .8341, .8247, .8115, .7939, .7757, .7585, .7400, .7253,
4034 .7101, .6925, .6740, .6561, .6427, .6302, .6203, .6125,
4035 .6055, .6017, .6020, .6027, .5664, .4018, .2039, .0823,
4036 .0309, .0135, .0063, .0033, .0021, .0015, .0010, .0007,
4037 .0004, .0002, .0001, .0001
4038 };
4039
4040 /* NIR2_MS8 of worldview3 */
4041 static const float sr9[89] = {
4042 .0000, .0001, .0021, .0050, .0071, .0155, .0519, .1987,
4043 .5721, .8996, .9942, .9981, .9767, .9538, .9337, .9134,
4044 .8942, .8730, .8531, .8382, .8188, .8047, .7914, .7726,
4045 .7577, .7403, .7301, .7191, .7061, .6928, .6801, .6680,
4046 .6568, .6439, .6304, .6170, .6000, .5864, .5722, .5544,
4047 .5405, .5268, .5100, .4928, .4761, .4612, .4439, .4297,
4048 .4132, .3972, .3822, .3674, .3515, .3365, .3214, .3091,
4049 .2956, .2844, .2740, .2628, .2523, .2411, .2303, .2218,
4050 .2105, .2013, .1933, .1836, .1755, .1660, .1567, .1508,
4051 .1429, .1366, .1304, .1232, .1151, .0999, .0731, .0419,
4052 .0195, .0082, .0035, .0017, .0008, .0005, .0003, .0002,
4053 .0001
4054 };
4055
4056 /* SWIR1 of worldview3 */
4057 static const float sr10[63] = {
4058 .0000, .0000, .0002, .0003, .0003, .0004, .0004, .0005,
4059 .0007, .0008, .0011, .0015, .0021, .0030, .0044, .0068,
4060 .0111, .0188, .0331, .0607, .1164, .2198, .4033, .6350,
4061 .8383, .9524, .9828, .9904, .9904, .9880, .9882, .9949,
4062 .9986, .9536, .7801, .5373, .3037, .1597, .0858, .0470,
4063 .0273, .0163, .0103, .0067, .0046, .0032, .0023, .0017,
4064 .0013, .0010, .0009, .0007, .0006, .0005, .0004, .0004,
4065 .0004, .0003, .0003, .0003, .0003, .0003, .0001
4066 };
4067
4068 /* SWIR2 of worldview3 */
4069 static const float sr11[56] = {
4070 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
4071 .0001, .0001, .0002, .0002, .0004, .0006, .0014, .0034,
4072 .0098, .0310, .1039, .2858, .6176, .9095, .9226, .8949,
4073 .9136, .9476, .9752, .9884, .9883, .9859, .9913, .9971,
4074 .9966, 1.0000, .9555, .7257, .4157, .1524, .0495, .0153,
4075 .0057, .0023, .0011, .0006, .0003, .0002, .0002, .0001,
4076 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001
4077
4078 };
4079
4080 /* SWIR3 of worldview3 */
4081 static const float sr12[39] = {
4082 .0000, .0001, .0001, .0002, .0003, .0005, .0013, .0033,
4083 .0101, .0339, .1087, .2884, .5790, .7930, .8898, .8970,
4084 .9117, .9246, .9352, .9474, .9610, .9773, .9953, .9989,
4085 .9866, .9786, .8403, .5534, .2201, .0665, .0197, .0062,
4086 .0025, .0011, .0005, .0003, .0001, .0000, .0001
4087 };
4088
4089 /* SWIR4 of worldview3 */
4090 static const float sr13[50] = {
4091 .0000, .0001, .0001, .0002, .0002, .0003, .0004, .0007,
4092 .0011, .0019, .0034, .0064, .0131, .0284, .0659, .1419,
4093 .3122, .5747, .8196, .9650, .9582, .9516, .9666, .9852,
4094 .9952, .9995, .9999, .9997, .9949, .9868, .9743, .9339,
4095 .7642, .5640, .3207, .1506, .0712, .0328, .0161, .0082,
4096 .0045, .0026, .0015, .0009, .0006, .0004, .0003, .0001,
4097 .0001, .0001
4098 };
4099
4100 /* SWIR5 of worldview3 */
4101 static const float sr14[54] = {
4102 .0001, .0002, .0001, .0000, .0001, .0000, .0002, .0001,
4103 .0003, .0005, .0008, .0014, .0027, .0054, .0119, .0282,
4104 .0703, .1534, .3105, .5282, .7231, .8960, .9577, .9628,
4105 .9709, .9846, .9959, .9999, .9898, .9701, .9473, .9435,
4106 .9416, .8180, .6295, .3992, .1832, .0741, .0302, .0124,
4107 .0059, .0029, .0016, .0009, .0005, .0003, .0003, .0001,
4108 .0001, .0002, .0001, .0000, .0001, .0000
4109 };
4110
4111 /* SWIR6 of worldview3 */
4112 static const float sr15[51] = {
4113 .0000, .0001, .0001, .0001, .0001, .0001, .0003, .0004,
4114 .0006, .0011, .0019, .0033, .0063, .0125, .0283, .0650,
4115 .1343, .2683, .4892, .7200, .9225, .9984, .9977, .9954,
4116 .9949, .9915, .9896, .9825, .9642, .9341, .8872, .8615,
4117 .8581, .7748, .6345, .4488, .2272, .1005, .0451, .0194,
4118 .0093, .0047, .0026, .0015, .0009, .0005, .0004, .0003,
4119 .0002, .0001, .0001
4120 };
4121
4122 /* SWIR7 of worldview3 */
4123 static const float sr16[47] = {
4124 .0000, .0001, .0001, .0001, .0003, .0006, .0012, .0025,
4125 .0061, .0156, .0468, .1112, .2458, .4584, .6318, .7693,
4126 .9092, .9488, .9662, .9842, .9932, .9963, .9989, 1.0000,
4127 .9969, .9914, .9850, .9769, .9635, .9483, .9148, .7730,
4128 .6197, .4182, .2046, .0865, .0340, .0125, .0053, .0024,
4129 .0012, .0006, .0003, .0002, .0001, .0001, .0001
4130 };
4131
4132 /* SWIR8 of worldview3 */
4133 static const float sr17[83] = {
4134 .0000, .0001, .0002, .0002, .0002, .0002, .0002, .0002,
4135 .0002, .0002, .0002, .0003, .0003, .0003, .0004, .0005,
4136 .0009, .0014, .0025, .0049, .0100, .0217, .0479, .0922,
4137 .1664, .2868, .4459, .6204, .7669, .8738, .9340, .9624,
4138 .9784, .9885, .9946, .9984, 1.0000, .9993, .9970, .9937,
4139 .9905, .9896, .9899, .9885, .9839, .9739, .9568, .9309,
4140 .9055, .8919, .8997, .9116, .8201, .6699, .5134, .2892,
4141 .1348, .0631, .0270, .0123, .0058, .0030, .0017, .0010,
4142 .0006, .0005, .0003, .0003, .0002, .0002, .0002, .0002,
4143 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
4144 .0002, .0002, .0002
4145 };
4146
4147 static const float wli[17] = {0.4300, 0.3825, 0.4250, 0.4975, 0.5675, 0.6150, 0.6800, 0.7400, 0.8425, 1.1375, 1.5025, 1.6125, 1.6675, 2.0975, 2.1375, 2.2025, 2.2300};
4148 static const float wls[17] = {0.8350, 0.4675, 0.8650, 0.6100, 0.9800, 0.7200, 0.7750, 0.9300, 1.0650, 1.2950, 1.6425, 1.7100, 1.7925, 2.2325, 2.2650, 2.3200, 2.4375};
4149
4150 ffu.wlinf = (float)wli[iwa-1];
4151 ffu.wlsup = (float)wls[iwa-1];
4152
4153 int i;
4154 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
4155
4156 switch(iwa)
4157 {
4158 case 1: for(i = 0; i < 162; i++) ffu.s[72+i] = sr1[i];
4159 break;
4160 case 2: for(i = 0; i < 34; i++) ffu.s[53+i] = sr2[i];
4161 break;
4162 case 3: for(i = 0; i < 176; i++) ffu.s[70+i] = sr3[i];
4163 break;
4164 case 4: for(i = 0; i < 45; i++) ffu.s[99+i] = sr4[i];
4165 break;
4166 case 5: for(i = 0; i < 165; i++) ffu.s[127+i] = sr5[i];
4167 break;
4168 case 6: for(i = 0; i < 42; i++) ffu.s[146+i] = sr6[i];
4169 break;
4170 case 7: for(i = 0; i < 38; i++) ffu.s[172+i] = sr7[i];
4171 break;
4172 case 8: for(i = 0; i < 76; i++) ffu.s[196+i] = sr8[i];
4173 break;
4174 case 9: for(i = 0; i < 89; i++) ffu.s[237+i] = sr9[i];
4175 break;
4176 case 10: for(i = 0; i < 63; i++) ffu.s[355+i] = sr10[i];
4177 break;
4178 case 11: for(i = 0; i < 56; i++) ffu.s[501+i] = sr11[i];
4179 break;
4180 case 12: for(i = 0; i < 39; i++) ffu.s[545+i] = sr12[i];
4181 break;
4182 case 13: for(i = 0; i < 50; i++) ffu.s[567+i] = sr13[i];
4183 break;
4184 case 14: for(i = 0; i < 54; i++) ffu.s[739+i] = sr14[i];
4185 break;
4186 case 15: for(i = 0; i < 51; i++) ffu.s[755+i] = sr15[i];
4187 break;
4188 case 16: for(i = 0; i < 47; i++) ffu.s[781+i] = sr16[i];
4189 break;
4190 case 17: for(i = 0; i < 83; i++) ffu.s[792+i] = sr17[i];
4191 break;
4192 }
4193 }
4194
4195 /* Following filter function created using create_iwave.py */
4196
worldview4(int iwa)4197 void IWave::worldview4(int iwa)
4198 {
4199
4200 /* PAN of worldview4 */
4201 static const float sr1[300] = {
4202 .0006, .0004, .0003, .0003, .0003, .0003, .0002, .0003,
4203 .0003, .0006, .0005, .0004, .0005, .0004, .0004, .0004,
4204 .0004, .0005, .0004, .0004, .0005, .0006, .0006, .0009,
4205 .0010, .0013, .0023, .0026, .0042, .0085, .0106, .0189,
4206 .0496, .0763, .1245, .4001, .9077, 1.6745, 27.1900, 66.4800,
4207 173.1000, 371.5500, 532.6000, 651.1500, 724.4000, 747.4000, 748.4000, 725.4000,
4208 730.9000, 766.6000, 782.6000, 778.3500, 781.3000, 791.5000, 794.5000, 790.3500,
4209 789.3000, 791.2000, 793.9000, 797.3000, 801.4000, 806.1500, 806.1000, 801.8500,
4210 797.5000, 793.1500, 797.0000, 807.8000, 815.8000, 821.3500, 830.0000, 841.1500,
4211 848.7000, 853.2000, 853.5000, 850.4000, 848.3000, 846.9000, 846.0000, 845.6000,
4212 849.2000, 855.7000, 867.5000, 883.0000, 894.7000, 903.8000, 909.1000, 911.7500,
4213 912.6000, 912.1000, 911.8000, 911.6500, 912.1000, 912.8500, 918.1000, 926.2000,
4214 933.2000, 939.6500, 941.0000, 939.4500, 943.6000, 950.9000, 958.8000, 966.8500,
4215 967.2000, 963.4500, 958.0000, 951.7500, 954.2000, 961.2000, 972.6000, 986.2000,
4216 990.5000, 990.3500, 986.0000, 979.8500, 981.8000, 987.5500, 993.2000, 998.8500,
4217 996.0000, 989.3500, 982.8000, 976.3000, 977.5000, 981.8000, 986.7000, 991.7500,
4218 990.9000, 987.6500, 979.9000, 970.4000, 951.5000, 929.1500, 929.5000, 938.1500,
4219 945.1000, 951.5500, 950.6000, 947.1000, 950.0000, 954.8500, 959.3000, 963.5500,
4220 962.8000, 960.5500, 951.6000, 940.6000, 933.8000, 928.1500, 923.7000, 919.7000,
4221 917.5000, 915.7500, 911.8000, 907.4000, 899.2000, 890.1000, 882.0000, 874.0500,
4222 871.5000, 870.2500, 867.7000, 864.9000, 861.1000, 857.0000, 853.4000, 850.0000,
4223 847.5000, 845.2000, 843.2000, 841.1500, 837.6000, 833.7000, 825.7000, 816.4500,
4224 797.3000, 770.1500, 589.6000, 379.2500, 227.9000, 93.1300, 47.0400, 11.8300,
4225 3.4490, 1.7920, .9647, .5530, .3255, .2005, .1280, .0836,
4226 .0555, .0382, .0273, .0196, .0141, .0103, .0079, .0059,
4227 .0043, .0033, .0026, .0020, .0016, .0013, .0011, .0009,
4228 .0007, .0006, .0005, .0005, .0004, .0004, .0003, .0003,
4229 .0003, .0002, .0002, .0001, .0001, .0001, .0000, .0000,
4230 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4231 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4232 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4233 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4234 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4235 .0000, .0000, .0000, .0000, .0000, .0000, .0001, .0001,
4236 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
4237 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
4238 .0001, .0001, .0001, .0002, .0002, .0002, .0002, .0003,
4239 .0003, .0004, .0004, .0005
4240 };
4241
4242 /* BLUE of worldview4 */
4243 static const float sr2[300] = {
4244 .0002, .0002, .0002, .0002, .0002, .0002, .0002, .0002,
4245 .0002, .0002, .0002, .0002, .0002, .0006, .0016, .0037,
4246 .0017, .0013, .0017, .0046, .0037, .0021, .0022, .0033,
4247 .0046, .0062, .0081, .0178, .0225, .0299, .0488, .1271,
4248 .4051, 1.0773, 1.9750, 4.2975, 22.2000, 121.9500, 363.4000, 660.7500,
4249 847.6000, 835.0500, 842.5000, 874.7500, 900.6000, 907.2000, 905.2000, 904.5500,
4250 921.4000, 927.7500, 936.3000, 943.5500, 944.9000, 937.1500, 943.7000, 949.4500,
4251 954.3000, 955.0500, 970.3000, 985.5000, 996.9000, 986.9000, 900.2000, 622.1000,
4252 307.2000, 124.7450, 48.3300, 17.3800, 7.9600, 3.9710, 2.1150, 1.1680,
4253 .6575, .3779, .2284, .1399, .0863, .0576, .0412, .0330,
4254 .0282, .0257, .0240, .0216, .0191, .0165, .0135, .0105,
4255 .0083, .0065, .0051, .0042, .0037, .0034, .0031, .0029,
4256 .0032, .0038, .0046, .0045, .0037, .0024, .0014, .0008,
4257 .0004, .0003, .0003, .0003, .0002, .0002, .0002, .0001,
4258 .0002, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
4259 .0002, .0003, .0004, .0007, .0014, .0022, .0034, .0052,
4260 .0080, .0112, .0137, .0150, .0156, .0174, .0221, .0291,
4261 .0321, .0272, .0217, .0202, .0231, .0333, .0578, .1310,
4262 .3364, .3719, .1200, .0380, .0169, .0103, .0077, .0067,
4263 .0068, .0078, .0092, .0114, .0142, .0180, .0246, .0390,
4264 .0713, .1522, .2836, .3465, .2985, .2152, .1397, .0849,
4265 .0491, .0273, .0148, .0087, .0052, .0035, .0025, .0023,
4266 .0021, .0022, .0025, .0036, .0064, .0149, .0443, .2951,
4267 .2662, .0410, .0092, .0041, .0021, .0014, .0010, .0009,
4268 .0007, .0009, .0012, .0016, .0022, .0028, .0032, .0029,
4269 .0025, .0025, .0032, .0068, .0176, .0320, .0459, .0545,
4270 .0478, .0408, .0251, .0137, .0068, .0027, .0010, .0004,
4271 .0003, .0002, .0002, .0002, .0002, .0001, .0001, .0001,
4272 .0001, .0001, .0002, .0002, .0002, .0003, .0004, .0009,
4273 .0016, .0024, .0032, .0036, .0037, .0054, .0100, .0166,
4274 .0214, .0198, .0123, .0056, .0020, .0008, .0005, .0004,
4275 .0003, .0004, .0004, .0005, .0007, .0012, .0024, .0046,
4276 .0078, .0099, .0091, .0062, .0038, .0025, .0019, .0018,
4277 .0019, .0022, .0026, .0033, .0038, .0041, .0044, .0037,
4278 .0029, .0023, .0018, .0016, .0014, .0015, .0016, .0016,
4279 .0017, .0023, .0029, .0038, .0052, .0060, .0055, .0051,
4280 .0042, .0034, .0031, .0027, .0026, .0023, .0024, .0025,
4281 .0031, .0037, .0037, .0063
4282 };
4283
4284 /* GREEN of worldview4 */
4285 static const float sr3[300] = {
4286 .0000, .0001, .0001, .0001, .0000, .0001, .0001, .0001,
4287 .0001, .0001, .0001, .0004, .0004, .0003, .0002, .0001,
4288 .0001, .0002, .0001, .0002, .0002, .0001, .0001, .0002,
4289 .0002, .0001, .0001, .0001, .0002, .0002, .0001, .0002,
4290 .0002, .0002, .0002, .0002, .0002, .0003, .0002, .0002,
4291 .0002, .0004, .0003, .0002, .0003, .0005, .0007, .0005,
4292 .0005, .0006, .0010, .0023, .0041, .0050, .0063, .0107,
4293 .0250, .0816, .2668, .7958, 2.2440, 15.6995, 107.2000, 531.2000,
4294 808.4000, 840.0000, 844.1000, 845.3500, 850.0000, 852.9500, 870.1000, 900.4000,
4295 911.8000, 902.2500, 899.4000, 912.4500, 914.1000, 897.8500, 888.5000, 899.7000,
4296 913.9000, 924.8000, 939.1000, 955.9000, 967.8000, 978.0500, 991.5000, 999.8500,
4297 997.7000, 995.7000, 969.6000, 779.7000, 445.3000, 185.9500, 62.1200, 21.0900,
4298 6.2660, 3.0140, 1.5690, .8639, .4572, .2479, .1353, .0793,
4299 .0499, .0342, .0255, .0205, .0171, .0142, .0113, .0085,
4300 .0061, .0044, .0033, .0025, .0020, .0018, .0016, .0016,
4301 .0015, .0015, .0014, .0012, .0010, .0008, .0006, .0005,
4302 .0005, .0005, .0004, .0004, .0005, .0005, .0006, .0006,
4303 .0007, .0007, .0009, .0009, .0010, .0012, .0011, .0009,
4304 .0005, .0002, .0001, .0001, .0001, .0000, .0000, .0001,
4305 .0001, .0000, .0000, .0001, .0000, .0000, .0000, .0001,
4306 .0002, .0007, .0010, .0006, .0006, .0005, .0005, .0005,
4307 .0005, .0004, .0009, .0019, .0027, .0010, .0006, .0003,
4308 .0003, .0003, .0004, .0004, .0003, .0002, .0004, .0021,
4309 .0015, .0005, .0003, .0002, .0001, .0002, .0003, .0004,
4310 .0002, .0004, .0013, .0064, .0010, .0001, .0003, .0058,
4311 .0086, .0150, .0020, .0105, .0061, .0074, .0068, .0044,
4312 .0059, .0029, .0039, .0026, .0022, .0033, .0022, .0020,
4313 .0020, .0008, .0021, .0025, .0017, .0010, .0025, .0021,
4314 .0017, .0017, .0013, .0013, .0014, .0025, .0017, .0016,
4315 .0018, .0017, .0017, .0016, .0010, .0011, .0013, .0006,
4316 .0006, .0006, .0008, .0006, .0005, .0005, .0006, .0004,
4317 .0004, .0004, .0003, .0003, .0002, .0003, .0002, .0003,
4318 .0003, .0002, .0002, .0002, .0003, .0002, .0003, .0003,
4319 .0003, .0004, .0004, .0004, .0005, .0006, .0006, .0006,
4320 .0006, .0006, .0005, .0005, .0005, .0005, .0005, .0005,
4321 .0006, .0006, .0008, .0009, .0012, .0016, .0021, .0028,
4322 .0036, .0047, .0058, .0070, .0084, .0101, .0116, .0133,
4323 .0149, .0168, .0191, .0215
4324 };
4325
4326 /* RED of worldview4 */
4327 static const float sr4[285] = {
4328 .0000, .0001, .0383, .7053, .0358, .0092, .0032, .0001,
4329 .0001, .0000, .0000, .0000, .0000, .0001, .0000, .0000,
4330 .0000, .0000, .0001, .0107, .0254, .0006, .0275, .0105,
4331 .0027, .0177, .0003, .0003, .0003, .0064, .0008, .0007,
4332 .0220, .0008, .0036, .1027, .0042, .0000, .0001, .0000,
4333 .0000, .0000, .0000, .0000, .0001, .0000, .0000, .0001,
4334 .0000, .0000, .0006, .0010, .0001, .0002, .0006, .0001,
4335 .0002, .0008, .0004, .0002, .0007, .0005, .0001, .0004,
4336 .0010, .0005, .0009, .0031, .0013, .0010, .0023, .0020,
4337 .0013, .0011, .0002, .0001, .0000, .0000, .0000, .0000,
4338 .0000, .0000, .0000, .0000, .0000, .0000, .0001, .0000,
4339 .0001, .0001, .0001, .0001, .0002, .0002, .0002, .0003,
4340 .0005, .0008, .0015, .0032, .0082, .0227, .0774, .2953,
4341 1.5805, 14.3900, 141.0950, 563.0000, 897.4000, 931.3000, 927.6000, 934.5000,
4342 966.0000, 996.2000, 997.9000, 998.8000, 996.3500, 983.4000, 960.7500, 934.0000,
4343 900.5500, 478.4000, 98.1600, 12.3400, 2.4640, .6180, .2024, .0744,
4344 .0321, .0150, .0079, .0044, .0027, .0018, .0012, .0009,
4345 .0007, .0006, .0005, .0004, .0003, .0003, .0003, .0003,
4346 .0003, .0003, .0003, .0003, .0003, .0003, .0004, .0004,
4347 .0003, .0004, .0005, .0005, .0004, .0004, .0006, .0009,
4348 .0012, .0009, .0008, .0012, .0017, .0039, .0110, .0339,
4349 .0443, .0386, .0332, .0425, .0740, .0506, .0118, .0045,
4350 .0023, .0019, .0016, .0035, .0065, .0041, .0023, .0018,
4351 .0029, .0066, .0064, .0040, .0023, .0037, .0056, .0063,
4352 .0031, .0030, .0020, .0046, .0040, .0022, .0021, .0035,
4353 .0023, .0020, .0012, .0024, .0016, .0021, .0019, .0019,
4354 .0017, .0020, .0018, .0019, .0011, .0010, .0010, .0008,
4355 .0007, .0008, .0003, .0009, .0005, .0004, .0003, .0003,
4356 .0002, .0004, .0002, .0001, .0002, .0001, .0001, .0002,
4357 .0002, .0001, .0001, .0002, .0001, .0001, .0002, .0002,
4358 .0002, .0002, .0003, .0003, .0004, .0005, .0007, .0008,
4359 .0008, .0009, .0009, .0009, .0009, .0008, .0007, .0007,
4360 .0006, .0006, .0004, .0004, .0003, .0003, .0003, .0002,
4361 .0002, .0002, .0002, .0001, .0001, .0001, .0001, .0001,
4362 .0001, .0001, .0001, .0001, .0001, .0001, .0001, .0001,
4363 .0001, .0001, .0001, .0002, .0002
4364 };
4365
4366 /* NIR of worldview4 */
4367 static const float sr5[253] = {
4368 .0000, .0001, .0003, .0000, .0000, .0004, .0002, .0000,
4369 .0001, .0000, .0000, .0001, .0000, .0001, .0001, .0001,
4370 .0038, .0035, .0005, .0001, .0002, .0010, .0020, .0008,
4371 .0002, .0002, .0005, .0051, .0042, .0007, .0005, .0046,
4372 .0185, .0029, .0158, .0197, .0007, .0011, .0030, .0000,
4373 .0000, .0000, .0000, .0001, .0000, .0001, .0001, .0000,
4374 .0000, .0001, .0000, .0000, .0000, .0001, .0001, .0000,
4375 .0001, .0000, .0001, .0005, .0001, .0000, .0000, .0002,
4376 .0005, .0003, .0003, .0002, .0000, .0001, .0002, .0007,
4377 .0006, .0004, .0003, .0004, .0004, .0006, .0008, .0010,
4378 .0018, .0006, .0001, .0001, .0002, .0002, .0001, .0000,
4379 .0000, .0001, .0001, .0000, .0000, .0001, .0001, .0003,
4380 .0004, .0004, .0004, .0003, .0003, .0003, .0003, .0004,
4381 .0003, .0002, .0001, .0001, .0002, .0002, .0002, .0002,
4382 .0002, .0002, .0002, .0002, .0003, .0002, .0002, .0002,
4383 .0002, .0002, .0004, .0007, .0008, .0008, .0007, .0008,
4384 .0010, .0014, .0022, .0035, .0054, .0068, .0077, .0089,
4385 .0112, .0155, .0241, .0386, .0645, .0989, .1433, .2049,
4386 .3111, .5073, .8975, 1.6600, 3.2385, 6.2560, 12.6250, 30.0100,
4387 72.9400, 169.0000, 385.7500, 711.4000, 944.5000, 998.7000, 955.8500, 902.2000,
4388 862.8500, 834.8000, 808.6000, 810.3000, 820.4000, 829.6000, 839.5500, 850.1000,
4389 860.4000, 871.8000, 885.0500, 883.9000, 879.0000, 874.4000, 868.7000, 861.7000,
4390 854.7500, 848.5000, 844.5500, 839.5000, 831.0000, 818.1000, 801.0000, 782.2000,
4391 765.1000, 750.5000, 737.1000, 722.9000, 706.3500, 687.6000, 667.6500, 649.4000,
4392 632.6500, 616.7000, 601.4500, 585.3000, 569.0000, 554.6000, 542.6500, 533.4000,
4393 526.2000, 519.7000, 513.0000, 505.9000, 498.9000, 491.3000, 483.5000, 476.1000,
4394 470.8500, 464.8000, 439.0000, 361.6000, 229.5500, 114.5000, 48.9100, 20.0800,
4395 9.9340, 5.4760, 3.5535, 2.3530, 1.4815, .6544, .3131, .1551,
4396 .0848, .0475, .0282, .0174, .0105, .0068, .0048, .0033,
4397 .0023, .0016, .0011, .0008, .0007, .0003, .0003, .0004,
4398 .0004, .0003, .0002, .0001, .0001, .0001, .0001, .0002,
4399 .0001, .0000, .0001, .0001, .0001
4400 };
4401
4402 static const float wli[5] = {0.3500, 0.3500, 0.3500, 0.3875, 0.3925};
4403 static const float wls[5] = {1.1000, 1.1000, 1.1000, 1.1000, 1.0250};
4404
4405 ffu.wlinf = (float)wli[iwa-1];
4406 ffu.wlsup = (float)wls[iwa-1];
4407
4408 int i;
4409 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
4410
4411 switch(iwa)
4412 {
4413 case 1: for(i = 0; i < 300; i++) ffu.s[40+i] = sr1[i];
4414 break;
4415 case 2: for(i = 0; i < 300; i++) ffu.s[40+i] = sr2[i];
4416 break;
4417 case 3: for(i = 0; i < 300; i++) ffu.s[40+i] = sr3[i];
4418 break;
4419 case 4: for(i = 0; i < 285; i++) ffu.s[55+i] = sr4[i];
4420 break;
4421 case 5: for(i = 0; i < 253; i++) ffu.s[57+i] = sr5[i];
4422 break;
4423 }
4424 }
4425
4426
sentinel2a(int iwa)4427 void IWave::sentinel2a(int iwa)
4428 {
4429
4430 /* S2A_SR_AV_B1 of sentinel_2A_msi */
4431 static const float sr1[21] = {
4432 .0000, .0000, .0029, .0035, .0032, .0020, .0009, .0014,
4433 .0017, .0290, .4483, .7620, .8098, .8542, .9068, 1.0000,
4434 .9130, .8257, .4721, .0437, .0000
4435 };
4436
4437 /* S2A_SR_AV_B2 of sentinel_2A_msi */
4438 static const float sr2[41] = {
4439 .0000, .0000, .0300, .0222, .0246, .0188, .0185, .0184,
4440 .0274, .1130, .5534, .7526, .7633, .8004, .8928, .9161,
4441 .8899, .8802, .9323, .9329, .8474, .7778, .7874, .8669,
4442 .9507, .9675, .9541, .9613, .9771, .9470, .8717, .8191,
4443 .8395, .9380, 1.0000, .8257, .3050, .0867, .0266, .0017,
4444 .0000
4445 };
4446
4447 /* S2A_SR_AV_B3 of sentinel_2A_msi */
4448 static const float sr3[21] = {
4449 .0000, .0072, .0735, .4349, .8489, .9236, .8882, .8430,
4450 .8622, .9423, 1.0000, .9630, .8558, .7766, .7506, .7907,
4451 .8141, .5164, .1072, .0098, .0000
4452 };
4453
4454 /* S2A_SR_AV_B4 of sentinel_2A_msi */
4455 static const float sr4[18] = {
4456 .0000, .0000, .0712, .7496, .9871, .9955, .9589, .8163,
4457 .7572, .8102, .8737, .9341, .9598, .9581, .9193, .4768,
4458 .0531, .0000
4459 };
4460
4461 /* S2A_SR_AV_B5 of sentinel_2A_msi */
4462 static const float sr5[10] = {
4463 .0000, .0284, .5775, .9989, .9887, .9485, .8949, .7908,
4464 .1601, .0000
4465 };
4466
4467 /* S2A_SR_AV_B6 of sentinel_2A_msi */
4468 static const float sr6[10] = {
4469 .0000, .0000, .1564, .8922, .9281, .9751, .9937, .9718,
4470 .4060, .0000
4471 };
4472
4473 /* S2A_SR_AV_B7 of sentinel_2A_msi */
4474 static const float sr7[14] = {
4475 .0000, .0000, .0117, .2673, .8612, .9951, .9773, .8429,
4476 .7911, .8224, .7922, .5010, .0985, .0026
4477 };
4478
4479 /* S2A_SR_AV_B8 of sentinel_2A_msi */
4480 static const float sr8[61] = {
4481 .0000, .0007, .0000, .0000, .0000, .0000, .0001, .0175,
4482 .0681, .1959, .5035, .8030, .9709, .9884, .9395, .9540,
4483 .9826, .9839, .9777, .9876, .9835, .9572, .9065, .8516,
4484 .7916, .7496, .7268, .7256, .7192, .7083, .7001, .7182,
4485 .7583, .7968, .8035, .7892, .7582, .7226, .6744, .6301,
4486 .5962, .5714, .5490, .5351, .5300, .5321, .5329, .5305,
4487 .5313, .5424, .5577, .5482, .4929, .4280, .4006, .4209,
4488 .4080, .2572, .0934, .0259, .0020
4489 };
4490
4491 /* S2A_SR_AV_B8A of sentinel_2A_msi */
4492 static const float sr9[21] = {
4493 .0000, .0000, .0002, .0000, .0000, .0000, .0020, .0261,
4494 .1647, .6099, .9522, .9754, .9782, .9909, .9996, .9954,
4495 .9600, .4897, .0799, .0106, .0000
4496 };
4497
4498 /* S2A_SR_AV_B9 of sentinel_2A_msi */
4499 static const float sr10[14] = {
4500 .0000, .0000, .0389, .3895, .9058, .9893, .9892, .9922,
4501 .9889, .9502, .8891, .4643, .0408, .0000
4502 };
4503
4504 /* S2A_SR_AV_B10 of sentinel_2A_msi */
4505 static const float sr11[33] = {
4506 .0000, .0000, .0001, .0000, .0001, .0002, .0004, .0011,
4507 .0059, .0447, .2716, .6625, .8856, .9620, .9848, .9965,
4508 .9995, .9910, .9742, .9486, .9045, .8307, .5816, .2193,
4509 .0505, .0055, .0008, .0002, .0002, .0001, .0000, .0001,
4510 .0000
4511 };
4512
4513 /* S2A_SR_AV_B11 of sentinel_2A_msi */
4514 static const float sr12[56] = {
4515 .0000, .0001, .0005, .0009, .0021, .0053, .0158, .0396,
4516 .0880, .1826, .3802, .6472, .8372, .8870, .8945, .9165,
4517 .9389, .9514, .9573, .9635, .9696, .9759, .9802, .9814,
4518 .9805, .9827, .9891, .9933, .9888, .9800, .9712, .9664,
4519 .9667, .9735, .9856, .9955, .9989, .9988, .9997, .9998,
4520 .9887, .9699, .9499, .9386, .9201, .8250, .5879, .3237,
4521 .1371, .0462, .0163, .0065, .0029, .0014, .0004, .0000
4522
4523 };
4524
4525 /* S2A_SR_AV_B12 of sentinel_2A_msi */
4526 static const float sr13[99] = {
4527 .0000, .0003, .0029, .0071, .0085, .0105, .0134, .0185,
4528 .0277, .0446, .0732, .1242, .2035, .3060, .4080, .4898,
4529 .5434, .5738, .5989, .6278, .6637, .7041, .7413, .7788,
4530 .8097, .8327, .8511, .8555, .8595, .8642, .8697, .8805,
4531 .8895, .8983, .9048, .9056, .9048, .9031, .9020, .9048,
4532 .9081, .9143, .9213, .9285, .9341, .9374, .9377, .9429,
4533 .9421, .9375, .9330, .9183, .9083, .9097, .9229, .9195,
4534 .9245, .9344, .9468, .9557, .9625, .9663, .9655, .9627,
4535 .9573, .9531, .9517, .9533, .9606, .9705, .9829, .9924,
4536 .9988, .9995, .9939, .9800, .9583, .9330, .9060, .8752,
4537 .8406, .8007, .7491, .6697, .5660, .4520, .3421, .2454,
4538 .1681, .1165, .0824, .0588, .0429, .0335, .0274, .0228,
4539 .0163, .0069, .0021
4540 };
4541
4542 static const float wli[13] = {0.4075, 0.4350, 0.5350, 0.6425, 0.6925, 0.7275, 0.7650, 0.7575, 0.8325, 0.9275, 1.3325, 1.5425, 2.0750};
4543 static const float wls[13] = {0.4600, 0.5375, 0.5875, 0.6875, 0.7175, 0.7525, 0.8000, 0.9100, 0.8850, 0.9625, 1.4150, 1.6825, 2.3225};
4544
4545 ffu.wlinf = (float)wli[iwa-1];
4546 ffu.wlsup = (float)wls[iwa-1];
4547
4548 int i;
4549 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
4550
4551 switch(iwa)
4552 {
4553 case 1: for(i = 0; i < 21; i++) ffu.s[63+i] = sr1[i];
4554 break;
4555 case 2: for(i = 0; i < 41; i++) ffu.s[74+i] = sr2[i];
4556 break;
4557 case 3: for(i = 0; i < 21; i++) ffu.s[114+i] = sr3[i];
4558 break;
4559 case 4: for(i = 0; i < 18; i++) ffu.s[157+i] = sr4[i];
4560 break;
4561 case 5: for(i = 0; i < 10; i++) ffu.s[177+i] = sr5[i];
4562 break;
4563 case 6: for(i = 0; i < 10; i++) ffu.s[191+i] = sr6[i];
4564 break;
4565 case 7: for(i = 0; i < 14; i++) ffu.s[206+i] = sr7[i];
4566 break;
4567 case 8: for(i = 0; i < 61; i++) ffu.s[203+i] = sr8[i];
4568 break;
4569 case 9: for(i = 0; i < 21; i++) ffu.s[233+i] = sr9[i];
4570 break;
4571 case 10: for(i = 0; i < 14; i++) ffu.s[271+i] = sr10[i];
4572 break;
4573 case 11: for(i = 0; i < 33; i++) ffu.s[433+i] = sr11[i];
4574 break;
4575 case 12: for(i = 0; i < 56; i++) ffu.s[517+i] = sr12[i];
4576 break;
4577 case 13: for(i = 0; i < 99; i++) ffu.s[730+i] = sr13[i];
4578 break;
4579 }
4580 }
4581
sentinel2b(int iwa)4582 void IWave::sentinel2b(int iwa)
4583 {
4584
4585 /* SR_AV_B1 of sentinel_2B_msi */
4586 static const float sr1[21] = {
4587 .0000, .0000, .0076, .0059, .0053, .0025, .0026, .0034,
4588 .0035, .0506, .5946, .8712, .9090, .9460, .9615, 1.0000,
4589 .9591, .8855, .4542, .0305, .0000
4590 };
4591
4592 /* SR_AV_B2 of sentinel_2B_msi */
4593 static const float sr2[40] = {
4594 .0000, .0009, .0201, .0155, .0133, .0120, .0133, .0145,
4595 .0307, .1862, .6524, .8282, .8388, .8945, .9366, .9221,
4596 .8979, .9149, .9188, .8927, .8578, .8507, .9040, .9581,
4597 .9993, .9896, .9782, .9582, .9248, .8973, .8919, .9178,
4598 .9535, .9922, .9816, .8147, .3326, .0963, .0322, .0022
4599
4600 };
4601
4602 /* SR_AV_B3 of sentinel_2B_msi */
4603 static const float sr3[21] = {
4604 .0000, .0000, .0261, .1695, .6992, .9455, .9359, .9015,
4605 .9150, .9640, .9997, .9766, .9082, .8476, .8319, .8488,
4606 .8728, .8097, .3521, .0590, .0026
4607 };
4608
4609 /* SR_AV_B4 of sentinel_2B_msi */
4610 static const float sr4[18] = {
4611 .0000, .0000, .0739, .6036, .9209, .9112, .8981, .9025,
4612 .9217, .9542, .9865, .9998, .9752, .9456, .8678, .4935,
4613 .0688, .0008
4614 };
4615
4616 /* SR_AV_B5 of sentinel_2B_msi */
4617 static const float sr5[11] = {
4618 .0000, .0000, .0573, .7091, .9912, .9913, .9709, .9345,
4619 .7672, .1073, .0000
4620 };
4621
4622 /* SR_AV_B6 of sentinel_2B_msi */
4623 static const float sr6[10] = {
4624 .0000, .0174, .5842, .9164, .9398, .9786, 1.0000, .8192,
4625 .0520, .0000
4626 };
4627
4628 /* SR_AV_B7 of sentinel_2B_msi */
4629 static const float sr7[14] = {
4630 .0000, .0000, .0747, .4790, .9421, .9557, .9931, .9839,
4631 .9372, .8869, .8022, .4818, .0415, .0000
4632 };
4633
4634 /* SR_AV_B8 of sentinel_2B_msi */
4635 static const float sr8[56] = {
4636 .0000, .0000, .0030, .0393, .1496, .5284, .9050, .9466,
4637 .9799, .9982, .9985, .9756, .9517, .9463, .9421, .9040,
4638 .8526, .8193, .8037, .7756, .7423, .7166, .7265, .7560,
4639 .7817, .7829, .7804, .7817, .7776, .7592, .7338, .7062,
4640 .6740, .6362, .6032, .5866, .5815, .5757, .5710, .5709,
4641 .5754, .5794, .5757, .5594, .5459, .5409, .5320, .4968,
4642 .4561, .4444, .4402, .3356, .1742, .0698, .0242, .0031
4643
4644 };
4645
4646 /* SR_AV_B8A of sentinel_2B_msi */
4647 static const float sr9[15] = {
4648 .0000, .0008, .0323, .2572, .7963, .9841, .9990, .9972,
4649 .9832, .9740, .9582, .8364, .3774, .0562, .0016
4650 };
4651
4652 /* SR_AV_B9 of sentinel_2B_msi */
4653 static const float sr10[13] = {
4654 .0000, .0121, .2550, .8373, .9494, .9974, .9803, .9738,
4655 .9279, .8551, .6211, .0948, .0017
4656 };
4657
4658 /* SR_AV_B10 of sentinel_2B_msi */
4659 static const float sr11[32] = {
4660 .0000, .0001, .0001, .0001, .0002, .0003, .0008, .0048,
4661 .0421, .1953, .5416, .8805, .9800, .9977, .9978, .9842,
4662 .9670, .9513, .9392, .9352, .9011, .7493, .4241, .1101,
4663 .0129, .0016, .0004, .0002, .0002, .0001, .0002, .0000
4664
4665 };
4666
4667 /* SR_AV_B11 of sentinel_2B_msi */
4668 static const float sr12[58] = {
4669 .0000, .0001, .0003, .0007, .0013, .0027, .0064, .0171,
4670 .0521, .1397, .3312, .6062, .8367, .9466, .9751, .9769,
4671 .9724, .9691, .9716, .9789, .9842, .9839, .9804, .9763,
4672 .9763, .9820, .9905, .9959, .9934, .9849, .9752, .9705,
4673 .9738, .9830, .9945, 1.0000, .9950, .9858, .9796, .9825,
4674 .9906, .9894, .9617, .9080, .8576, .8434, .8446, .7568,
4675 .5117, .2569, .0947, .0291, .0106, .0046, .0022, .0011,
4676 .0004, .0000
4677 };
4678
4679 /* SR_AV_B12 of sentinel_2B_msi */
4680 static const float sr13[98] = {
4681 .0000, .0002, .0023, .0059, .0095, .0146, .0232, .0372,
4682 .0632, .1107, .1938, .3172, .4861, .6721, .8143, .8863,
4683 .9012, .8924, .8833, .8827, .8958, .9128, .9300, .9434,
4684 .9480, .9481, .9455, .9419, .9438, .9462, .9484, .9507,
4685 .9519, .9526, .9528, .9538, .9552, .9580, .9609, .9641,
4686 .9629, .9607, .9577, .9531, .9554, .9554, .9528, .9486,
4687 .9484, .9466, .9428, .9389, .9448, .9485, .9514, .9553,
4688 .9501, .9497, .9574, .9739, .9687, .9676, .9687, .9700,
4689 .9679, .9655, .9623, .9594, .9610, .9637, .9659, .9689,
4690 .9734, .9772, .9810, .9833, .9879, .9932, .9975, 1.0000,
4691 .9932, .9687, .9158, .8319, .7091, .5640, .4259, .3098,
4692 .2182, .1494, .1042, .0741, .0529, .0380, .0270, .0138,
4693 .0026, .0000
4694 };
4695
4696 static const float wli[13] = {0.4075, 0.4350, 0.5325, 0.6425, 0.6900, 0.7275, 0.7625, 0.7700, 0.8450, 0.9275, 1.3375, 1.5375, 2.0625};
4697 static const float wls[13] = {0.4600, 0.5350, 0.5850, 0.6875, 0.7175, 0.7525, 0.7975, 0.9100, 0.8825, 0.9600, 1.4175, 1.6825, 2.3075};
4698
4699 ffu.wlinf = (float)wli[iwa-1];
4700 ffu.wlsup = (float)wls[iwa-1];
4701
4702 int i;
4703 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
4704
4705 switch(iwa)
4706 {
4707 case 1: for(i = 0; i < 21; i++) ffu.s[63+i] = sr1[i];
4708 break;
4709 case 2: for(i = 0; i < 40; i++) ffu.s[74+i] = sr2[i];
4710 break;
4711 case 3: for(i = 0; i < 21; i++) ffu.s[113+i] = sr3[i];
4712 break;
4713 case 4: for(i = 0; i < 18; i++) ffu.s[157+i] = sr4[i];
4714 break;
4715 case 5: for(i = 0; i < 11; i++) ffu.s[176+i] = sr5[i];
4716 break;
4717 case 6: for(i = 0; i < 10; i++) ffu.s[191+i] = sr6[i];
4718 break;
4719 case 7: for(i = 0; i < 14; i++) ffu.s[205+i] = sr7[i];
4720 break;
4721 case 8: for(i = 0; i < 56; i++) ffu.s[208+i] = sr8[i];
4722 break;
4723 case 9: for(i = 0; i < 15; i++) ffu.s[238+i] = sr9[i];
4724 break;
4725 case 10: for(i = 0; i < 13; i++) ffu.s[271+i] = sr10[i];
4726 break;
4727 case 11: for(i = 0; i < 32; i++) ffu.s[435+i] = sr11[i];
4728 break;
4729 case 12: for(i = 0; i < 58; i++) ffu.s[515+i] = sr12[i];
4730 break;
4731 case 13: for(i = 0; i < 98; i++) ffu.s[725+i] = sr13[i];
4732 break;
4733 }
4734 }
4735
planetscope0c0d(int iwa)4736 void IWave::planetscope0c0d(int iwa)
4737 {
4738
4739 /* Blue of planetscope_0c_0d */
4740 static const float sr1[114] = {
4741 .0203, .0270, .0202, .0135, .0067, .0000, .0000, .0000,
4742 .0000, .0000, .0135, .0270, .0405, .0540, .0607, .0675,
4743 .0742, .0810, .2973, .5135, .7297, .9460, .9595, .9730,
4744 .9865, 1.0000, .9865, .9730, .9595, .9460, .9257, .9055,
4745 .8852, .8650, .8380, .8110, .7840, .7570, .7232, .6895,
4746 .6558, .6220, .5745, .5270, .4795, .4320, .3915, .3510,
4747 .3105, .2700, .2498, .2295, .2092, .1890, .1620, .1350,
4748 .1080, .0810, .0675, .0540, .0405, .0270, .0270, .0270,
4749 .0270, .0270, .0202, .0135, .0067, .0000, .0000, .0000,
4750 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4751 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4752 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4753 .0000, .0000, .0068, .0135, .0203, .0270, .0270, .0270,
4754 .0270, .0270, .0270, .0270, .0270, .0270, .0270, .0270,
4755 .0270, .0270
4756 };
4757
4758 /* Green of planetscope_0c_0d */
4759 static const float sr2[98] = {
4760 .0218, .0290, .0732, .1175, .1618, .2060, .2427, .2795,
4761 .3162, .3530, .3750, .3970, .4190, .4410, .4485, .4560,
4762 .4635, .4710, .5002, .5295, .5587, .5880, .6322, .6765,
4763 .7208, .7650, .8017, .8385, .8753, .9120, .9267, .9415,
4764 .9563, .9710, .9782, .9855, .9928, 1.0000, .9852, .9705,
4765 .9557, .9410, .9190, .8970, .8750, .8530, .8310, .8090,
4766 .7870, .7650, .7355, .7060, .6765, .6470, .6102, .5735,
4767 .5368, .5000, .4632, .4265, .3897, .3530, .3087, .2645,
4768 .2202, .1760, .1615, .1470, .1325, .1180, .1032, .0885,
4769 .0737, .0590, .0590, .0590, .0590, .0590, .0515, .0440,
4770 .0365, .0290, .0290, .0290, .0290, .0290, .0365, .0440,
4771 .0515, .0590, .0590, .0590, .0590, .0590, .0663, .0735,
4772 .0807, .0880
4773 };
4774
4775 /* Red of planetscope_0c_0d */
4776 static const float sr3[98] = {
4777 .0555, .0740, .0832, .0925, .1018, .1110, .1202, .1295,
4778 .1387, .1480, .1387, .1295, .1202, .1110, .1202, .1295,
4779 .1387, .1480, .1480, .1480, .1480, .1480, .1387, .1295,
4780 .1202, .1110, .1110, .1110, .1110, .1110, .1110, .1110,
4781 .1110, .1110, .1110, .1110, .1110, .1110, .1110, .1110,
4782 .1110, .1110, .1110, .1110, .1110, .1110, .1295, .1480,
4783 .1665, .1850, .2590, .3330, .4070, .4810, .5737, .6665,
4784 .7592, .8520, .8890, .9260, .9630, 1.0000, 1.0000, 1.0000,
4785 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, .9815, .9630,
4786 .9445, .9260, .9168, .9075, .8982, .8890, .8798, .8705,
4787 .8612, .8520, .8427, .8335, .8242, .8150, .7873, .7595,
4788 .7317, .7040, .6577, .6115, .5653, .5190, .3985, .2780,
4789 .1575, .0370
4790 };
4791
4792 /* NIR of planetscope_0c_0d */
4793 static const float sr4[102] = {
4794 .0750, .1000, .0750, .0500, .0250, .0000, .0000, .0000,
4795 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4796 .0000, .0000, .0000, .0000, .0000, .0000, .0250, .0500,
4797 .0750, .1000, .0750, .0500, .0250, .0000, .0000, .0000,
4798 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4799 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4800 .0000, .0000, .0000, .0000, .0000, .0000, .1000, .2000,
4801 .3000, .4000, .5250, .6500, .7750, .9000, .9250, .9500,
4802 .9750, 1.0000, .9750, .9500, .9250, .9000, .8750, .8500,
4803 .8250, .8000, .8000, .8000, .8000, .8000, .7750, .7500,
4804 .7250, .7000, .7000, .7000, .7000, .7000, .6750, .6500,
4805 .6250, .6000, .5750, .5500, .5250, .5000, .4500, .4000,
4806 .3500, .3000, .2500, .2000, .1500, .1000
4807 };
4808
4809 static const float wli[4] = {0.4075, 0.4475, 0.4575, 0.6275};
4810 static const float wls[4] = {0.6925, 0.6925, 0.7025, 0.8825};
4811
4812 ffu.wlinf = (float)wli[iwa-1];
4813 ffu.wlsup = (float)wls[iwa-1];
4814
4815 int i;
4816 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
4817
4818 switch(iwa)
4819 {
4820 case 1: for(i = 0; i < 114; i++) ffu.s[63+i] = sr1[i];
4821 break;
4822 case 2: for(i = 0; i < 98; i++) ffu.s[79+i] = sr2[i];
4823 break;
4824 case 3: for(i = 0; i < 98; i++) ffu.s[83+i] = sr3[i];
4825 break;
4826 case 4: for(i = 0; i < 102; i++) ffu.s[151+i] = sr4[i];
4827 break;
4828 }
4829 }
4830
planetscope0e(int iwa)4831 void IWave::planetscope0e(int iwa)
4832 {
4833
4834 /* Blue of planetscope_0e */
4835 static const float sr1[236] = {
4836 .0130, .0147, .0165, .0183, .0200, .0168, .0135, .0102,
4837 .0070, .0083, .0095, .0107, .0120, .0188, .0255, .0323,
4838 .0390, .0730, .1070, .1410, .1750, .3500, .5250, .7000,
4839 .8750, .9062, .9375, .9688, 1.0000, .9992, .9985, .9978,
4840 .9970, .9840, .9710, .9580, .9450, .9177, .8905, .8632,
4841 .8360, .8033, .7705, .7377, .7050, .6600, .6150, .5700,
4842 .5250, .4853, .4455, .4057, .3660, .3458, .3255, .3052,
4843 .2850, .2657, .2465, .2272, .2080, .1898, .1715, .1532,
4844 .1350, .1237, .1125, .1013, .0900, .0860, .0820, .0780,
4845 .0740, .0717, .0695, .0673, .0650, .0628, .0605, .0583,
4846 .0560, .0545, .0530, .0515, .0500, .0503, .0505, .0507,
4847 .0510, .0522, .0535, .0548, .0560, .0600, .0640, .0680,
4848 .0720, .0770, .0820, .0870, .0920, .0983, .1045, .1108,
4849 .1170, .1203, .1235, .1268, .1300, .1265, .1230, .1195,
4850 .1160, .1118, .1075, .1033, .0990, .0775, .0560, .0345,
4851 .0130, .0097, .0065, .0032, .0000, .0000, .0000, .0000,
4852 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4853 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4854 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4855 .0000, .0000, .0000, .0000, .0000, .0003, .0005, .0008,
4856 .0010, .0023, .0035, .0047, .0060, .0060, .0060, .0060,
4857 .0060, .0055, .0050, .0045, .0040, .0040, .0040, .0040,
4858 .0040, .0047, .0055, .0063, .0070, .0085, .0100, .0115,
4859 .0130, .0135, .0140, .0145, .0150, .0145, .0140, .0135,
4860 .0130, .0120, .0110, .0100, .0090, .0083, .0075, .0067,
4861 .0060, .0057, .0055, .0053, .0050, .0050, .0050, .0050,
4862 .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
4863 .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
4864 .0050, .0047, .0045, .0043, .0040, .0037, .0035, .0033,
4865 .0030, .0027, .0025, .0023
4866 };
4867
4868 /* Green of planetscope_0e */
4869 static const float sr2[236] = {
4870 .0050, .0053, .0055, .0057, .0060, .0055, .0050, .0045,
4871 .0040, .0043, .0045, .0047, .0050, .0060, .0070, .0080,
4872 .0090, .0163, .0235, .0307, .0380, .0752, .1125, .1497,
4873 .1870, .2047, .2225, .2403, .2580, .2880, .3180, .3480,
4874 .3780, .4163, .4545, .4928, .5310, .5670, .6030, .6390,
4875 .6750, .7127, .7505, .7883, .8260, .8530, .8800, .9070,
4876 .9340, .9475, .9610, .9745, .9880, .9910, .9940, .9970,
4877 1.0000, .9890, .9780, .9670, .9560, .9400, .9240, .9080,
4878 .8920, .8700, .8480, .8260, .8040, .7748, .7455, .7163,
4879 .6870, .6498, .6125, .5753, .5380, .4975, .4570, .4165,
4880 .3760, .3422, .3085, .2747, .2410, .2215, .2020, .1825,
4881 .1630, .1570, .1510, .1450, .1390, .1345, .1300, .1255,
4882 .1210, .1175, .1140, .1105, .1070, .1067, .1065, .1062,
4883 .1060, .1100, .1140, .1180, .1220, .1290, .1360, .1430,
4884 .1500, .1457, .1415, .1373, .1330, .1063, .0795, .0527,
4885 .0260, .0200, .0140, .0080, .0020, .0015, .0010, .0005,
4886 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4887 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4888 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4889 .0000, .0000, .0000, .0000, .0000, .0003, .0005, .0008,
4890 .0010, .0023, .0035, .0047, .0060, .0057, .0055, .0053,
4891 .0050, .0045, .0040, .0035, .0030, .0033, .0035, .0037,
4892 .0040, .0047, .0055, .0063, .0070, .0080, .0090, .0100,
4893 .0110, .0115, .0120, .0125, .0130, .0125, .0120, .0115,
4894 .0110, .0102, .0095, .0088, .0080, .0075, .0070, .0065,
4895 .0060, .0057, .0055, .0053, .0050, .0047, .0045, .0043,
4896 .0040, .0040, .0040, .0040, .0040, .0043, .0045, .0047,
4897 .0050, .0050, .0050, .0050, .0050, .0047, .0045, .0043,
4898 .0040, .0037, .0035, .0033, .0030, .0030, .0030, .0030,
4899 .0030, .0027, .0025, .0023
4900 };
4901
4902 /* Red of planetscope_0e */
4903 static const float sr3[236] = {
4904 .0040, .0040, .0040, .0040, .0040, .0033, .0025, .0017,
4905 .0010, .0013, .0015, .0018, .0020, .0020, .0020, .0020,
4906 .0020, .0035, .0050, .0065, .0080, .0128, .0175, .0222,
4907 .0270, .0275, .0280, .0285, .0290, .0295, .0300, .0305,
4908 .0310, .0307, .0305, .0302, .0300, .0292, .0285, .0278,
4909 .0270, .0283, .0295, .0307, .0320, .0360, .0400, .0440,
4910 .0480, .0515, .0550, .0585, .0620, .0570, .0520, .0470,
4911 .0420, .0370, .0320, .0270, .0220, .0222, .0225, .0227,
4912 .0230, .0338, .0445, .0553, .0660, .1455, .2250, .3045,
4913 .3840, .5040, .6240, .7440, .8640, .8930, .9220, .9510,
4914 .9800, .9850, .9900, .9950, 1.0000, .9965, .9930, .9895,
4915 .9860, .9840, .9820, .9800, .9780, .9695, .9610, .9525,
4916 .9440, .9355, .9270, .9185, .9100, .9025, .8950, .8875,
4917 .8800, .8682, .8565, .8448, .8330, .8237, .8145, .8053,
4918 .7960, .7348, .6735, .6123, .5510, .4353, .3195, .2037,
4919 .0880, .0678, .0475, .0272, .0070, .0055, .0040, .0025,
4920 .0010, .0008, .0005, .0003, .0000, .0000, .0000, .0000,
4921 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4922 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
4923 .0000, .0000, .0000, .0000, .0000, .0005, .0010, .0015,
4924 .0020, .0037, .0055, .0072, .0090, .0083, .0075, .0067,
4925 .0060, .0055, .0050, .0045, .0040, .0043, .0045, .0047,
4926 .0050, .0055, .0060, .0065, .0070, .0083, .0095, .0107,
4927 .0120, .0128, .0135, .0142, .0150, .0142, .0135, .0128,
4928 .0120, .0112, .0105, .0097, .0090, .0083, .0075, .0067,
4929 .0060, .0057, .0055, .0053, .0050, .0050, .0050, .0050,
4930 .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
4931 .0050, .0050, .0050, .0050, .0050, .0050, .0050, .0050,
4932 .0050, .0047, .0045, .0043, .0040, .0037, .0035, .0033,
4933 .0030, .0027, .0025, .0023
4934 };
4935
4936 /* NIR of planetscope_0e */
4937 static const float sr4[186] = {
4938 .0015, .0020, .0015, .0010, .0005, .0000, .0003, .0005,
4939 .0008, .0010, .0010, .0010, .0010, .0010, .0013, .0015,
4940 .0018, .0020, .0027, .0035, .0043, .0050, .0040, .0030,
4941 .0020, .0010, .0010, .0010, .0010, .0010, .0013, .0015,
4942 .0018, .0020, .0020, .0020, .0020, .0020, .0018, .0015,
4943 .0013, .0010, .0013, .0015, .0018, .0020, .0020, .0020,
4944 .0020, .0020, .0020, .0020, .0020, .0020, .0023, .0025,
4945 .0027, .0030, .0033, .0035, .0037, .0040, .0045, .0050,
4946 .0055, .0060, .0050, .0040, .0030, .0020, .0020, .0020,
4947 .0020, .0020, .0027, .0035, .0043, .0050, .0047, .0045,
4948 .0043, .0040, .0035, .0030, .0025, .0020, .0023, .0025,
4949 .0027, .0030, .0030, .0030, .0030, .0030, .0057, .0085,
4950 .0112, .0140, .0123, .0105, .0088, .0070, .0200, .0330,
4951 .0460, .0590, .0478, .0365, .0253, .0140, .0110, .0080,
4952 .0050, .0020, .0033, .0045, .0057, .0070, .0055, .0040,
4953 .0025, .0010, .0010, .0010, .0010, .0010, .0018, .0025,
4954 .0033, .0040, .0378, .0715, .1053, .1390, .3098, .4805,
4955 .6512, .8220, .8665, .9110, .9555, 1.0000, .9900, .9800,
4956 .9700, .9600, .9495, .9390, .9285, .9180, .9008, .8835,
4957 .8662, .8490, .8367, .8245, .8123, .8000, .7903, .7805,
4958 .7708, .7610, .7462, .7315, .7167, .7020, .6895, .6770,
4959 .6645, .6520, .6412, .6305, .6198, .6090, .5873, .5655,
4960 .5437, .5220, .4248, .3275, .2303, .1330, .1018, .0705,
4961 .0393, .0080
4962 };
4963
4964 static const float wli[4] = {0.4000, 0.4000, 0.4000, 0.4275};
4965 static const float wls[4] = {0.9900, 0.9900, 0.9900, 0.8925};
4966
4967 ffu.wlinf = (float)wli[iwa-1];
4968 ffu.wlsup = (float)wls[iwa-1];
4969
4970 int i;
4971 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
4972
4973 switch(iwa)
4974 {
4975 case 1: for(i = 0; i < 236; i++) ffu.s[60+i] = sr1[i];
4976 break;
4977 case 2: for(i = 0; i < 236; i++) ffu.s[60+i] = sr2[i];
4978 break;
4979 case 3: for(i = 0; i < 236; i++) ffu.s[60+i] = sr3[i];
4980 break;
4981 case 4: for(i = 0; i < 186; i++) ffu.s[71+i] = sr4[i];
4982 break;
4983 }
4984 }
4985
planetscope0f10(int iwa)4986 void IWave::planetscope0f10(int iwa)
4987 {
4988
4989 /* Blue of planetscope_0f_10 */
4990 static const float sr1[113] = {
4991 .0040, .0040, .0040, .0040, .0040, .0040, .0040, .0040,
4992 .0040, .0043, .0045, .0047, .0050, .0063, .0075, .0088,
4993 .0100, .1258, .2415, .3572, .4730, .5952, .7175, .8397,
4994 .9620, .9702, .9785, .9868, .9950, .9962, .9975, .9988,
4995 1.0000, .9855, .9710, .9565, .9420, .9137, .8855, .8572,
4996 .8290, .7997, .7705, .7412, .7120, .6713, .6305, .5897,
4997 .5490, .5060, .4630, .4200, .3770, .3540, .3310, .3080,
4998 .2850, .2675, .2500, .2325, .2150, .1975, .1800, .1625,
4999 .1450, .1327, .1205, .1082, .0960, .0912, .0865, .0818,
5000 .0770, .0740, .0710, .0680, .0650, .0628, .0605, .0583,
5001 .0560, .0545, .0530, .0515, .0500, .0498, .0495, .0493,
5002 .0490, .0500, .0510, .0520, .0530, .0560, .0590, .0620,
5003 .0650, .0698, .0745, .0793, .0840, .0897, .0955, .1013,
5004 .1070, .1110, .1150, .1190, .1230, .1080, .0930, .0780,
5005 .0630
5006 };
5007
5008 /* Green of planetscope_0f_10 */
5009 static const float sr2[113] = {
5010 .0040, .0040, .0040, .0040, .0040, .0040, .0040, .0040,
5011 .0040, .0040, .0040, .0040, .0040, .0043, .0045, .0047,
5012 .0050, .0288, .0525, .0762, .1000, .1260, .1520, .1780,
5013 .2040, .2145, .2250, .2355, .2460, .2765, .3070, .3375,
5014 .3680, .4045, .4410, .4775, .5140, .5495, .5850, .6205,
5015 .6560, .6955, .7350, .7745, .8140, .8450, .8760, .9070,
5016 .9380, .9517, .9655, .9792, .9930, .9948, .9965, .9982,
5017 1.0000, .9935, .9870, .9805, .9740, .9592, .9445, .9298,
5018 .9150, .8912, .8675, .8438, .8200, .7927, .7655, .7382,
5019 .7110, .6750, .6390, .6030, .5670, .5250, .4830, .4410,
5020 .3990, .3635, .3280, .2925, .2570, .2355, .2140, .1925,
5021 .1710, .1645, .1580, .1515, .1450, .1397, .1345, .1293,
5022 .1240, .1205, .1170, .1135, .1100, .1085, .1070, .1055,
5023 .1040, .1065, .1090, .1115, .1140, .1023, .0905, .0788,
5024 .0670
5025 };
5026
5027 /* Red of planetscope_0f_10 */
5028 static const float sr3[117] = {
5029 .0010, .0010, .0010, .0010, .0010, .0010, .0010, .0010,
5030 .0010, .0010, .0010, .0010, .0010, .0010, .0010, .0010,
5031 .0010, .0055, .0100, .0145, .0190, .0217, .0245, .0272,
5032 .0300, .0297, .0295, .0293, .0290, .0298, .0305, .0312,
5033 .0320, .0318, .0315, .0312, .0310, .0302, .0295, .0288,
5034 .0280, .0288, .0295, .0302, .0310, .0353, .0395, .0437,
5035 .0480, .0528, .0575, .0622, .0670, .0625, .0580, .0535,
5036 .0490, .0428, .0365, .0303, .0240, .0232, .0225, .0218,
5037 .0210, .0278, .0345, .0413, .0480, .1067, .1655, .2243,
5038 .2830, .4165, .5500, .6835, .8170, .8582, .8995, .9407,
5039 .9820, .9865, .9910, .9955, 1.0000, .9950, .9900, .9850,
5040 .9800, .9798, .9795, .9792, .9790, .9705, .9620, .9535,
5041 .9450, .9385, .9320, .9255, .9190, .9085, .8980, .8875,
5042 .8770, .8660, .8550, .8440, .8330, .7240, .6150, .5060,
5043 .3970, .2980, .1990, .1000, .0010
5044 };
5045
5046 /* NIR of planetscope_0f_10 */
5047 static const float sr4[174] = {
5048 .0015, .0020, .0020, .0020, .0020, .0020, .0018, .0015,
5049 .0013, .0010, .0008, .0005, .0003, .0000, .0000, .0000,
5050 .0000, .0000, .0000, .0000, .0000, .0000, .0003, .0005,
5051 .0008, .0010, .0013, .0015, .0018, .0020, .0018, .0015,
5052 .0013, .0010, .0010, .0010, .0010, .0010, .0013, .0015,
5053 .0018, .0020, .0020, .0020, .0020, .0020, .0020, .0020,
5054 .0020, .0020, .0018, .0015, .0013, .0010, .0008, .0005,
5055 .0003, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
5056 .0000, .0000, .0000, .0000, .0000, .0000, .0003, .0005,
5057 .0008, .0010, .0013, .0015, .0018, .0020, .0023, .0025,
5058 .0027, .0030, .0030, .0030, .0030, .0030, .0030, .0030,
5059 .0030, .0030, .0027, .0025, .0023, .0020, .0015, .0010,
5060 .0005, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
5061 .0000, .0000, .0000, .0000, .0000, .0000, .0000, .0000,
5062 .0000, .0000, .0003, .0005, .0008, .0010, .0025, .0040,
5063 .0055, .0070, .0457, .0845, .1232, .1620, .3700, .5780,
5064 .7860, .9940, .9955, .9970, .9985, 1.0000, .9810, .9620,
5065 .9430, .9240, .9103, .8965, .8828, .8690, .8552, .8415,
5066 .8277, .8140, .8002, .7865, .7728, .7590, .7470, .7350,
5067 .7230, .7110, .6972, .6835, .6698, .6560, .6430, .6300,
5068 .6170, .6040, .5922, .5805, .5688, .5570, .4775, .3980,
5069 .3185, .2390, .1802, .1215, .0628, .0040
5070 };
5071
5072 static const float wli[4] = {0.4000, 0.4000, 0.4000, 0.4475};
5073 static const float wls[4] = {0.6825, 0.6825, 0.6925, 0.8825};
5074
5075 ffu.wlinf = (float)wli[iwa-1];
5076 ffu.wlsup = (float)wls[iwa-1];
5077
5078 int i;
5079 for(i = 0; i < 1501; i++) ffu.s[i] = 0;
5080
5081 switch(iwa)
5082 {
5083 case 1: for(i = 0; i < 113; i++) ffu.s[60+i] = sr1[i];
5084 break;
5085 case 2: for(i = 0; i < 113; i++) ffu.s[60+i] = sr2[i];
5086 break;
5087 case 3: for(i = 0; i < 117; i++) ffu.s[60+i] = sr3[i];
5088 break;
5089 case 4: for(i = 0; i < 174; i++) ffu.s[79+i] = sr4[i];
5090 break;
5091 }
5092 }
5093
5094
5095 /* filter functions must be defined above */
5096
equivwl() const5097 double IWave::equivwl() const
5098 {
5099 double seb = 0;
5100 double wlwave = 0;
5101
5102 for(int i = iinf; i <= isup; i++)
5103 {
5104 double sbor = ffu.s[i];
5105 if(i == iinf || i == isup) sbor *= 0.5;
5106 double fwl = (double)(0.25 + i * step);
5107 double swl = solirr(fwl);
5108 double coef = sbor * step * swl;
5109 seb += coef;
5110 wlwave += fwl * coef;
5111 }
5112
5113 return wlwave/seb;
5114 }
5115
parse()5116 void IWave::parse()
5117 {
5118 iinf = 0;
5119 isup = 1500;
5120
5121 int i;
5122 for(i = 0; i <= isup; i++) ffu.s[i] = 1;
5123
5124 cin >> iwave;
5125 cin.ignore(numeric_limits<int>::max(),'\n');
5126
5127 if(iwave == 0 || iwave == -2)
5128 {
5129 cin >> ffu.wlinf;
5130 cin >> ffu.wlsup;
5131 cin.ignore(numeric_limits<int>::max(),'\n');
5132 }
5133 else if(iwave < 0) /* excludes -2 */
5134 {
5135 cin >> wl;
5136 cin.ignore(numeric_limits<int>::max(),'\n');
5137 ffu.wlinf = wl;
5138 ffu.wlsup = wl;
5139 }
5140 else
5141 {
5142 /* da big switch */
5143 if(iwave == 1)
5144 {
5145 cin >> ffu.wlinf;
5146 cin >> ffu.wlsup;
5147 cin.ignore(numeric_limits<int>::max(),'\n');
5148 /* moved rest further on */
5149 }
5150 else if(iwave == 2) meteo();
5151 else if(iwave == 3) goes_east();
5152 else if(iwave == 4) goes_west();
5153 else if(iwave <= 16) avhrr(iwave - 4);
5154 else if(iwave <= 24) hrv(iwave - 16);
5155 else if(iwave <= 30) tm(iwave - 24);
5156 else if(iwave <= 34) mss(iwave - 30);
5157 else if(iwave <= 41) mas(iwave - 34);
5158 else if(iwave <= 48) modis(iwave - 41);
5159 else if(iwave <= 52) avhrr(iwave - 36);
5160 else if(iwave <= 60) polder(iwave - 52);
5161 else if(iwave <= 67) etmplus(iwave - 60);
5162 else if(iwave <= 71) irs_1c_liss(iwave - 67);
5163 else if(iwave <= 80) aster(iwave - 71);
5164 else if(iwave <= 84) avnir(iwave - 80);
5165 else if(iwave <= 87) ikonos(iwave - 84);
5166 else if(iwave <= 92) rapideye(iwave - 87);
5167 else if(iwave <= 96) vgt1_spot4(iwave - 92);
5168 else if(iwave <= 100) vgt2_spot5(iwave - 96);
5169 else if(iwave <= 109) worldview2(iwave - 100);
5170 else if(iwave <= 114) quickbird2(iwave - 109);
5171 else if(iwave <= 123) landsat_8(iwave - 114);
5172 else if(iwave <= 128) geoeye1(iwave - 123);
5173 else if(iwave <= 133) spot6(iwave - 128);
5174 else if(iwave <= 138) spot7(iwave - 133);
5175 else if(iwave <= 143) pleiades1a(iwave - 138);
5176 else if(iwave <= 148) pleiades1b(iwave - 143);
5177 else if(iwave <= 165) worldview3(iwave - 148);
5178 else if(iwave <= 178) sentinel2a(iwave - 165);
5179 else if(iwave <= 191) sentinel2b(iwave - 178);
5180 else if(iwave <= 195) planetscope0c0d(iwave - 191);
5181 else if(iwave <= 199) planetscope0e(iwave - 195);
5182 else if(iwave <= 203) planetscope0f10(iwave - 199);
5183 else if(iwave <= 208) worldview4(iwave - 203);
5184 else G_warning(_("Unsupported iwave value: %d"), iwave);
5185
5186 if (iwave > 1) {
5187 int imax;
5188 double smax, sthreshold;
5189
5190 imax = -1;
5191 smax = 0;
5192 sthreshold = 0.01; /* low threshold for filter functions */
5193
5194 /* find maximum response */
5195 for(i = 0; i <= 1500; i++) {
5196 if (smax < ffu.s[i]) {
5197 smax = ffu.s[i];
5198 imax = i;
5199 }
5200 }
5201 if (smax < sthreshold)
5202 G_fatal_error("Invalid filter function");
5203
5204 /* set wlinf, wlsup */
5205 iinf = imax;
5206 while (iinf > 0 && ffu.s[iinf - 1] > sthreshold) {
5207 iinf--;
5208 }
5209 ffu.wlinf = iinf * 0.0025 + 0.25;
5210
5211 isup = imax;
5212 while (isup < 1500 && ffu.s[isup + 1] > sthreshold) {
5213 isup++;
5214 }
5215 ffu.wlsup = isup * 0.0025 + 0.25;
5216 }
5217 }
5218
5219 /* assuming that wlinf and wlsup are exact multiples of 2.5 nm */
5220 iinf = (int)((ffu.wlinf - 0.25f) / 0.0025f + 1.5f) - 1; /* remember indexing */
5221 isup = (int)((ffu.wlsup - 0.25f) / 0.0025f + 1.5f) - 1; /* " */
5222
5223 if(iwave == 1) /* moved here to avoid unnecessary gotos */
5224 {
5225 for(i = iinf; i <= isup; i++) cin >> ffu.s[i];
5226 cin.ignore(numeric_limits<int>::max(),'\n');
5227 }
5228 }
5229
5230 /* --- spectral condition ---- */
print()5231 void IWave::print()
5232 {
5233 /* The compiler will deduce the dimension from the initializer list. */
5234 static const string nsat[] = {
5235 string(" constant "), string(" user s "),
5236 string(" meteosat "), string(" goes east "), string(" goes west "),
5237 string(" avhrr 1 (noaa6) "), string(" avhrr 2 (noaa6) "),
5238 string(" avhrr 1 (noaa7) "), string(" avhrr 2 (noaa7) "),
5239 string(" avhrr 1 (noaa8) "), string(" avhrr 2 (noaa8) "),
5240 string(" avhrr 1 (noaa9) "), string(" avhrr 2 (noaa9) "),
5241 string(" avhrr 1 (noaa10)"), string(" avhrr 2 (noaa10)"),
5242 string(" avhrr 1 (noaa11)"), string(" avhrr 2 (noaa11)"),
5243 string(" hrv1 1 "), string(" hrv1 2 "), string(" hrv1 3 "),
5244 string(" hrv1 pan "),
5245 string(" hrv2 1 "), string(" hrv2 2 "), string(" hrv2 3 "),
5246 string(" hrv2 pan "),
5247 string(" tm 1 "), string(" tm 2 "), string(" tm 3 "),
5248 string(" tm 4 "), string(" tm 5 "), string(" tm 7 "),
5249 string(" mss 4 "), string(" mss 5 "),
5250 string(" mss 6 "), string(" mss 7 "),
5251 string(" mas 1 "), string(" mas 2 "), string(" mas 3 "),
5252 string(" mas 4 "), string(" mas 5 "), string(" mas 6 "),
5253 string(" mas 7 "), string(" modis 1 "), string(" modis 2 "),
5254 string(" modis 3 "), string(" modis 4 "), string(" modis 5 "),
5255 string(" modis 6 "), string(" modis 7 "),
5256 string(" avhrr 1 (noaa12)"), string(" avhrr 2 (noaa12)"),
5257 string(" avhrr 1 (noaa14)"), string(" avhrr 2 (noaa14)"),
5258 string(" polder 1 "), string(" polder 2 "),
5259 string(" polder 3 "), string(" polder 4 "), string(" polder 6 "),
5260 string(" polder 6 "), string(" polder 7 "), string(" polder 8 "),
5261 string(" etm+ 1 "), string(" etm+ 2 "), string(" etm+ 3 "),
5262 string(" etm+ 4 "), string(" etm+ 5 "), string(" etm+ 7 "),
5263 string(" etm+ 8 "),
5264 string(" liss 2 "), string(" liss 3 "), string(" liss 4 "),
5265 string(" liss 5 "),
5266 string(" aster 1 "), string(" aster 2 "), string(" aster 3N "),
5267 string(" aster 4 "), string(" aster 5 "), string(" aster 6 "),
5268 string(" aster 7 "), string(" aster 8 "), string(" aster 9 "),
5269 string(" avnir 1 "), string(" avnir 2 "), string(" avnir 3 "),
5270 string(" avnir 4 "),
5271 string(" ikonos green "), string(" ikonos red "), string(" ikonos NIR "),
5272 string(" rapideye blue "), string(" rapideye green "), string(" rapideye red "),
5273 string(" rapideye rededge"), string(" rapideye NIR "),
5274 string(" vgt1 spot4 0 "), string(" vgt1 spot4 2 "), string(" vgt1 spot4 3 "),
5275 string(" vgt1 spot4 MIR "),
5276 string(" vgt2 spot5 0 "), string(" vgt2 spot5 2 "), string(" vgt2 spot5 3 "),
5277 string(" vgt2 spot5 MIR "), string(" worldview 2 pan "), string(" worldview 2 coastal blue"),
5278 string(" worldview 2 blue "), string(" worldview 2 green"),
5279 string(" worldview 2 yellow"), string(" worldview 2 red"), string(" worldview 2 red edge"),
5280 string(" worldview 2 nir1"), string(" worldview 2 nir2"), string(" quickbird 2 pan"),
5281 string(" quickbird 2 blue"), string(" quickbird 2 green"), string(" quickbird 2 red"),
5282 string(" quickbird 2 nir"), string(" Landsat 8 Coastal Aerosol"), string(" Landsat 8 Blue"),
5283 string(" Landsat 8 Green"),string(" Landsat 8 Red"), string(" Landsat 8 Panchromatic"),
5284 string(" Landsat 8 NIR"),string(" Landsat 8 Cirrus"),string(" Landsat 8 SWIR1"),
5285 string(" Landsat 8 SWIR2"), string(" geoeye 1 pan"),
5286 string(" geoeye 1 blue"), string(" geoeye 1 green"), string(" geoeye 1 red"),
5287 string(" geoeye 1 nir"),
5288 string(" spot6 blue"), string(" spot6 green"), string(" spot6 red"), string(" spot6 nir"),
5289 string(" spot6 pan"),
5290 string(" spot7 blue"), string(" spot7 green"), string(" spot7 red"), string(" spot7 nir"),
5291 string(" spot7 pan"),
5292 string(" pleiades1a blue"), string(" pleiades1a green"), string(" pleiades1a red"), string(" pleiades1a nir"),
5293 string(" pleiades1a pan"),
5294 string(" pleiades1b blue"), string(" pleiades1b green"), string(" pleiades1b red"), string(" pleiades1b nir"),
5295 string(" pleiades1b pan"),
5296 string(" worldview3 pan"),
5297 string(" worldview3 coastal ms7"),
5298 string(" worldview3 blue ms4"), string(" worldview3 green ms3"), string(" worldview3 yellow ms6"), string(" worldview3 red ms2"), string(" worldview3 red"),
5299 string(" worldview3 nir1 ms1"), string(" worldview3 nir2 ms8"),
5300 string(" worldview3 swir1"), string(" worldview3 swir2"),
5301 string(" worldview3 swir3"), string(" worldview3 swir4"),
5302 string(" worldview3 swir5"), string(" worldview3 swir6"),
5303 string(" worldview3 swir7"), string(" worldview3 swir8"),
5304 string(" sentinel2a coastal b1"),
5305 string(" sentinel2a blue b2"), string(" sentinel2a green b3"), string(" sentinel2a red b4"), string(" sentinel2a red edge b5"),
5306 string(" sentinel2a red edge b6"), string(" sentinel2a red edge b7"),
5307 string(" sentinel2a nir b8"), string(" sentinel2a red edge b8A"),
5308 string(" sentinel2a water vapor b9"), string(" sentinel2a swir b10"),
5309 string(" sentinel2a swir b11"), string(" sentinel2a swir b12"),
5310 string(" sentinel2b coastal b1"),
5311 string(" sentinel2b blue b2"), string(" sentinel2b green b3"), string(" sentinel2b red b4"), string(" sentinel2b red edge b5"),
5312 string(" sentinel2b red edge b6"), string(" sentinel2b red edge b7"),
5313 string(" sentinel2b nir b8"), string(" sentinel2b red edge b8A"),
5314 string(" sentinel2b water vapor b9"), string(" sentinel2b swir b10"),
5315 string(" sentinel2b swir b11"), string(" sentinel2b swir b12"),
5316 string(" planetscope 0c 0d blue"), string(" planetscope 0c 0d green"), string(" planetscope 0c 0d red"), string(" planetscope 0c 0d nir"),
5317 string(" planetscope 0e blue"), string(" planetscope 0e green"), string(" planetscope 0e red"), string(" planetscope 0e nir"),
5318 string(" planetscope 0f 10 blue"), string(" planetscope 0f 10 green"), string(" planetscope 0f 10 red"), string(" planetscope 0f 10 nir"),
5319 string(" worldview 4 pan"), string(" worldview 4 blue "), string(" worldview 4 green"),
5320 string(" worldview 4 red"), string(" worldview 4 nir")
5321 };
5322
5323
5324 Output::Begin();
5325 Output::Repeat(22, ' ');
5326 Output::Print(" spectral condition ");
5327 Output::End();
5328
5329 Output::Begin();
5330 Output::Repeat(22, ' ');
5331 Output::Print(" ------------------ ");
5332 Output::End();
5333
5334 if(iwave == -2)
5335 {
5336 Output::Begin();
5337 Output::Repeat(10,' ');
5338 Output::Print(nsat[0]);
5339 Output::End();
5340
5341 Output::Begin();
5342 Output::Repeat(15,' ');
5343 Output::Print("value of filter function :");
5344 Output::End();
5345
5346 Output::Begin();
5347 Output::Repeat(15,' ');
5348 ostringstream s;
5349 s.setf(ios::fixed, ios::floatfield);
5350 s << setprecision(3);
5351 s << " wl inf=" << setw(9) << ffu.wlinf << " mic "
5352 << " wl sup=" << setw(9) << ffu.wlsup << " mic" << ends;
5353 Output::Print(s.str());
5354 Output::End();
5355 }
5356 else if(iwave == -1)
5357 {
5358 Output::Begin();
5359 Output::Repeat(12,' ');
5360 ostringstream s;
5361 s.setf(ios::fixed, ios::floatfield);
5362 s << setprecision(3);
5363 s << " monochromatic calculation at wl :" << setw(9) << ffu.wlsup << " micron" << ends;
5364 Output::Print(s.str());
5365 Output::End();
5366 }
5367 else if(iwave >= 0)
5368 {
5369 Output::Begin();
5370 Output::Repeat(10,' ');
5371 Output::Print(nsat[iwave]);
5372 Output::End();
5373
5374 Output::Begin();
5375 Output::Repeat(15,' ');
5376 Output::Print("value of filter function :");
5377 Output::End();
5378
5379 Output::Begin();
5380 Output::Repeat(15,' ');
5381 ostringstream s;
5382 s.setf(ios::fixed, ios::floatfield);
5383 s << setprecision(3);
5384 s << " wl inf=" << setw(9) << ffu.wlinf << " mic "
5385 << " wl sup=" << setw(9) << ffu.wlsup << " mic" << ends;
5386 Output::Print(s.str());
5387 Output::End();
5388 }
5389 }
5390
Parse()5391 IWave IWave::Parse()
5392 {
5393 IWave iwave;
5394 iwave.parse();
5395 return iwave;
5396 }
5397