15 Feb 2017 05:58 AM |
|
I am attempting to use the FLAASH module on WV3 imagery but get an error saying 'Input image has more bands (8) than expected for the selected sensor (16)...'
I have already used the Radiometric Calibration module to convert the raw WV3 imagery, and selected the 'FLAASH options' button when doing so. I'm really stuck on interpreting the error message as FLAASH correctly identifies the imagery as WV3 and automatically fills in the fields, so any help would be much appreciated!
There's also the separate issue that I would ideally like to pansharpen the multispectral imagery using the panchromatic band, but FLAASH cannot correct the pan band. Is it acceptable to undertake pansharpening first and to then run FLAASH? I'm wary of doing this as sharpening will inevitably change the imagery.
|
|
|
|
MariM Veteran Member
Posts:2396  
15 Feb 2017 07:29 AM |
|
This is a known issue in FLAASH when detecting the sensor type. Try setting the sensor to Unknown, then manually set the sensor altitude. Next, in the Multispectral Parameters, set the filter function to the Worldview3.sli from the \ENVI5.x\classic\filt_func directory. Set the index to start at 9 (where the SWIR bands start). This should allow it to continue to run.
|
|
|
|
MariM Veteran Member
Posts:2396  
15 Feb 2017 07:38 AM |
|
With regards to using the single Pan band in FLAASH, single band files are not supported in FLAASH. You could possibly stack the pan band with the VNIR or SWIR bands but it would require you resample one of the data sets up or down. It may also require that you create a custom filter function depending on the bands that are stacked. I would not use ACM on the pan sharpened results if you want to retain the spectral integrity of the MS bands.
|
|
|
|
Deleted User New Member
Posts:  
15 Feb 2017 09:53 AM |
|
Thanks Mari for the quick reply, extremely helpful!
|
|
|
|
Deleted User New Member
Posts:  
21 Feb 2017 07:20 AM |
|
Sorry to bring this back up, but I've tried to follow your instructions this morning and now have different errors. There are three error messages popping up when I click 'Apply': -
'Illegal subscript range: CHANNEL_DATA'
Same as above
'Variable is undefined: VIZ'.
Any help would be greatly aprpeciated.
|
|
|
|
MariM Veteran Member
Posts:2396  
21 Feb 2017 07:35 AM |
|
Can you post the contents of template.txt that is created in the output directory specified in the flaash dialog?
|
|
|
|
Deleted User New Member
Posts:  
21 Feb 2017 07:53 AM |
|
;
;ENVI FLAASH PARAMETERS TEMPLATE (5.4)
;Written Tue Feb 21 14:20:56 2017
;
; Project Parameters
enviacc.prj.radiance_file = R:\NERC-STEED\WorldView\2016_radiometric_calibration\MS\16AUG14024806-M2AS_R1C1.dat
enviacc.prj.reflect_file = R:\NERC-STEED\WorldView\2016_corrected\16AUG14024806-M2AS_R1C1_FLAASH
enviacc.prj.filter_func_file = C:\Program Files\Harris\ENVI54\classic\filt_func\worldview3.sli
enviacc.prj.filter_func_file_index = 9
enviacc.prj.water_band_choice = 1.13
enviacc.prj.red_channel = 5
enviacc.prj.green_channel = 3
enviacc.prj.blue_channel = 1
enviacc.prj.water_abs_channel = 0
enviacc.prj.water_ref_channel = 0
enviacc.prj.kt_upper_channel = 0
enviacc.prj.kt_lower_channel = 5
enviacc.prj.kt_cutoff = 0.0800
enviacc.prj.kt_ratio = 0.5000
enviacc.prj.cirrus_channel = 0
enviacc.prj.water_retrieval = 0
enviacc.prj.user_stem_name = 16AUG14024806-M2AS_R1C1_FLAASH_
enviacc.prj.modtran_directory = R:\NERC-STEED\WorldView\2016_corrected\FLAASH_process_files\
;
; MODTRAN Parameters
enviacc.modtran.visvalue = 40.0000
enviacc.modtran.f_resolution = 15.0000
enviacc.modtran.day = 14
enviacc.modtran.month = 8
enviacc.modtran.year = 2016
enviacc.modtran.gmt = 2.8017
enviacc.modtran.latitude = 4.9752
enviacc.modtran.longitude = 117.7841
enviacc.modtran.sensor_altitude = 617.0000
enviacc.modtran.ground_elevation = 0.0000
enviacc.modtran.view_zenith_angle = 180.0000
enviacc.modtran.view_azimuth = 0.0000
enviacc.modtran.atmosphere_model = 1
enviacc.modtran.aerosol_model = 1
enviacc.modtran.multiscatter_model = 2
enviacc.modtran.disort_streams = 8
enviacc.modtran.co2mix = 390.0000
enviacc.modtran.water_column_multiplier = 1.0000
;
; Image Parameters
enviacc.img.nspatial = 4096
enviacc.img.nlines = 4096
enviacc.img.data_type = 4
enviacc.img.margin1 = 0
enviacc.img.margin2 = 0
enviacc.img.nskip = 0
enviacc.img.pixel_size = 1.2000
enviacc.img.sensor_name = UNKNOWN-MSI
;
; Analysis Parameters
enviacc.ana.aerosol_scaleht = 1.5000
enviacc.ana.use_adjacency = 1
enviacc.ana.output_scale = 10000.0000
enviacc.ana.output_diagnostic_files = 0
enviacc.ana.auto_save_template = 1
enviacc.ana.polishing_res = 0
enviacc.ana.aerosol_retrieval = 1
enviacc.ana.calc_wl_correction = 0
enviacc.ana.reuse_modtran_calcs = 0
enviacc.ana.use_square_slit_function = 0
enviacc.ana.convolution_method = fft
enviacc.ana.use_tiling = 1
enviacc.ana.tile_size = 100.0000
;
; GParameters Parameters
enviacc.gparameters.gfact = 0
enviacc.gparameters.gval = 0.0000
enviacc.gparameters.use_lr_method = 0
enviacc.gparameters.multikernel = 1
enviacc.gparameters.autoroi = auto
enviacc.gparameters.selarg = a
;
; Spectral Parameters
enviacc.spc.wavelength_units = nanometer
enviacc.spc.lambda = [
425.0000, 480.0000, 545.0000, 605.0000, 660.0000, 725.0000, 832.5000,
950.0000]
enviacc.spc.fwhm = [
50.000000, 60.000000, 70.000000, 40.000000, 60.000000, 40.000000, 125.000000,
180.000000]
enviacc.img.p_input_scale = [
1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000,
1.0000]
|
|
|
|
MariM Veteran Member
Posts:2396  
21 Feb 2017 08:19 AM |
|
I am sorry. I understood this error was only occurring with the SWIR bands of WV-3 but it appears it is also happening with the VNIR bands. In this case, do the same steps as before - set the sensor to Unknown and select the WV3.sli but set the index to be 1.
I will update the current bug report to reflect that this occurs with the VNIR bands as well as the SWIR.
|
|
|
|
Tharindu Abeysinghe New Member
Posts:6  
04 Jun 2018 09:05 PM |
|
Hi, following the instructions of this conversation, I applied FLAASH to my WorldView 3 image. I stacked panchromatic and VNIR bands, created a custom filter function with selecting only first 9 bands of WorldView 3 filter function in ENVI. When I run FLAASH with a radiometrically corrected subset of the image, ENVI throws following error Problem: The FLAASH program exited with the following error. ACC error: modrd5:reading archive file header IDL error: READU: End of file encountered. Unit:102, file C:\Users\tharina\AppData\Local\Temp\acc_modroot.fla ACC_MODRD5<( 9)> ACC_HYPER2<( 550)> ACC_ACC <(191)> ENVI_ACC_EVENT<(3193)> ENVI_FLAASH_PROCESS_MANAGER<(611)> IDLRTMAIN<(172)> $MAIN$<( 0)> Could you help me with this?
|
|
|
|
MariM Veteran Member
Posts:2396  
05 Jun 2018 05:41 AM |
|
Can you post your template.txt file and the bottom of the journal.txt in the output directory specified in your FLAASH dialog?
|
|
|
|
Tharindu Abeysinghe New Member
Posts:6  
05 Jun 2018 07:04 PM |
|
Template.txt file ; ;ENVI FLAASH PARAMETERS TEMPLATE (5.4) ;Written Mon Jun 04 22:29:41 2018 ; ; Project Parameters enviacc.prj.radiance_file = F:\WV3_Oct2017\Radiomeric calibrated\ms and pan\subset_radiance.dat enviacc.prj.reflect_file = F:\WV3_Oct2017\Radiomeric calibrated\ms and pan\Reflectance ms pan\mspan_reflect enviacc.prj.filter_func_file = C:\Program Files\Harris\ENVI54\resource\filterfuncs\worldview3.sli enviacc.prj.filter_func_file_index = 1 enviacc.prj.water_band_choice = 1.13 enviacc.prj.red_channel = 1 enviacc.prj.green_channel = 4 enviacc.prj.blue_channel = 2 enviacc.prj.water_abs_channel = 0 enviacc.prj.water_ref_channel = 0 enviacc.prj.kt_upper_channel = 0 enviacc.prj.kt_lower_channel = 6 enviacc.prj.kt_cutoff = 0.0800 enviacc.prj.kt_ratio = 0.5000 enviacc.prj.cirrus_channel = 0 enviacc.prj.water_retrieval = 0 enviacc.prj.user_stem_name = root3_ enviacc.prj.modtran_directory = C:\Users\tharina\AppData\Local\Temp\ ; ; MODTRAN Parameters enviacc.modtran.visvalue = 40.0000 enviacc.modtran.f_resolution = 5.0000 enviacc.modtran.day = 3 enviacc.modtran.month = 10 enviacc.modtran.year = 2017 enviacc.modtran.gmt = 17.0356 enviacc.modtran.latitude = 41.3747 enviacc.modtran.longitude = -82.5088 enviacc.modtran.sensor_altitude = 617.0000 enviacc.modtran.ground_elevation = 0.1750 enviacc.modtran.view_zenith_angle = 180.0000 enviacc.modtran.view_azimuth = 0.0000 enviacc.modtran.atmosphere_model = 6 enviacc.modtran.aerosol_model = 1 enviacc.modtran.multiscatter_model = 2 enviacc.modtran.disort_streams = 8 enviacc.modtran.co2mix = 390.0000 enviacc.modtran.water_column_multiplier = 1.0000 ; ; Image Parameters enviacc.img.nspatial = 5724 enviacc.img.nlines = 7207 enviacc.img.data_type = 4 enviacc.img.margin1 = 0 enviacc.img.margin2 = 0 enviacc.img.nskip = 0 enviacc.img.pixel_size = 0.3800 enviacc.img.sensor_name = UNKNOWN-MSI ; ; Analysis Parameters enviacc.ana.aerosol_scaleht = 1.5000 enviacc.ana.use_adjacency = 1 enviacc.ana.output_scale = 10000.0000 enviacc.ana.output_diagnostic_files = 0 enviacc.ana.auto_save_template = 1 enviacc.ana.polishing_res = 9 enviacc.ana.aerosol_retrieval = 0 enviacc.ana.calc_wl_correction = 0 enviacc.ana.reuse_modtran_calcs = 0 enviacc.ana.use_square_slit_function = 0 enviacc.ana.convolution_method = fft enviacc.ana.use_tiling = 1 enviacc.ana.tile_size = 100.0000 ; ; GParameters Parameters enviacc.gparameters.gfact = 0 enviacc.gparameters.gval = 0.0000 enviacc.gparameters.use_lr_method = 0 enviacc.gparameters.multikernel = 1 enviacc.gparameters.autoroi = auto enviacc.gparameters.selarg = a ; ; Spectral Parameters enviacc.spc.wavelength_units = nanometer enviacc.spc.lambda = [ 625.0000, 425.0000, 480.0000, 545.0000, 605.0000, 660.0000, 725.0000, 832.5000, 950.0000] enviacc.spc.fwhm = [ 350.000000, 50.000000, 60.000000, 70.000000, 40.000000, 60.000000, 40.000000, 125.000000, 180.000000] enviacc.img.p_input_scale = [ 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000] Bottom of the journal.txt file script command u ACC error... IDL error: -247 READU: End of file encountered. Unit: 102, File: C:\Users\tharina\AppData\Local\Temp\acc_modroot.fla in context: modrd5:reading archive file header calls: ACC_MODRD5 <( 9)> ACC_HYPER2 <( 550)> ACC_ACC <( 191)> ENVI_ACC_EVENT <(3193)> ENVI_FLAASH_PROCESS_MANAGER <( 611)> IDLRTMAIN <( 172)> $MAIN$ <( 0)> filter function band centers: 428.066 482.036 547.174 604.283 660.141 722.739 824.040 913.390 1209.06 1571.61 1661.10 1729.54 2163.69 2202.16 2259.32 2329.22 input image band centers: 625.000 425.000 480.000 545.000 605.000 660.000 725.000 832.500 950.000 filter function bands used: 3 0 1 2 3 4 5 6 7
|
|
|
|
MariM Veteran Member
Posts:2396  
06 Jun 2018 06:39 AM |
|
Is your F: drive an external drive? Can you set your input/output directories to be local to the machine or a different directory such as C:\temp? I do not see anything unusual with the input parameters.
|
|
|
|
Tharindu Abeysinghe New Member
Posts:6  
08 Jun 2018 12:47 PM |
|
Yes, F: is an external drive. I copied the image to C: drive and applied FLAASH, then ENVI showed "Illegal subscript range: CHANNEL_DATA" error. I tried to apply FLAASH with several changes in parameters using the same filter function. Finally, FLAASH worked when I set 0 for "index to first band" (without any other changes in other parameters). Before this, I was using 1 for "index for first band" according to your comment made on February 21, 2017 in this conversation. Is this method acceptable?
|
|
|
|
MariM Veteran Member
Posts:2396  
08 Jun 2018 02:02 PM |
|
Yes, I mentioned setting the index to 1 because most input data sets do not include the pan band since it is very wide and would have an influence across all of the VIS+NIR bands. So typically this index would be set to 1. Yes, in your case with the pan band set, you would want the index to be 0.
|
|
|
|
Tharindu Abeysinghe New Member
Posts:6  
08 Jun 2018 04:39 PM |
|
Thank you Mari.. After the FLAASH correction, there are negative reflectance values in the image (Coastal blue, Blue, Green and Yellow bands have negative values 93%, 73%, 24% and 22% respectively). Statistics of the image are as below. Band 1 is the panchromatic band and 2 to 9 are VNIR bands of the WV3 image. Basic Stats Min Max Mean StdDev Band 1 -286 9821 477.772319 374.781411 Band 2 -1141 8984 -316.461463 232.133533 Band 3 -836 9382 -38.632700 275.037179 Band 4 -708 9385 221.706157 320.390785 Band 5 -605 11852 281.537896 357.873412 Band 6 -467 10528 289.400370 408.127213 Band 7 -286 13301 943.698291 642.928935 Band 8 -375 10072 1686.346017 1127.403933 Band 9 -315 15676 1789.474521 1186.166019 I applied the equation ((b1 le 0)*0+(b1 ge 10000)*1+(b1 gt 0 and b1 lt 10000)*float(b1)/10000 ) to adjust the reflectance values into 0 to 1 range and to get rid of the negative values. After this step, the reflectance values are very low and the image looks less in contrast. Is it due to a problem with the FLAASH process?
|
|
|
|
MariM Veteran Member
Posts:2396  
11 Jun 2018 01:33 PM |
|
What were the statistics of the input radiance image? Did you use 'FLAASH Settings' when converting the data to radiance? If so, and the radiance values are reasonable (typically between 2-50), then you can try setting the Initial visibility to something like 100km. Then run FLAASH with that settings. It isn't unusual to have some negative pixels particularly in areas over water or shadow since there is very low radiance in these areas in the visible range and even less in the SWIR. If you consider you need to divide the image by 10000, these values are typically very small and near 0. They can often be masked and set to 0 for future processes. You can use the equation float(b1) \10000 in band math and map the variable to the input FLAASH file. These seems easier than what you are doing.
|
|
|
|
Tharindu Abeysinghe New Member
Posts:6  
14 Jun 2018 07:57 PM |
|
The statistics of the input radiance image are, Basic Stats Min Max Mean StdDev Band 1 0.961120 26.391708 2.833309 1.015458 Band 2 2.991291 20.796770 4.076282 0.469805 Band 3 2.133531 27.801804 3.654940 0.783579 Band 4 0.999680 26.667112 2.881813 0.904303 Band 5 0.220067 31.339691 2.244783 0.981045 Band 6 0.005725 27.494883 1.818403 1.095455 Band 7 0.261813 29.274279 2.915705 1.457303 Band 8 0.009788 19.946863 3.902039 2.268394 Band 9 0.007238 21.189205 2.766104 1.645388 I applied FLAASH settings in the radiometric calibration step. The negative reflectance values of the bands are in the water and shaded areas. I used the initial visibility range as 40Km in FLAASH. The image works well with float(b1)/10000 equation. Thank you for the helpful information...!
|
|
|
|
NICOLAS YOUNES New Member
Posts:1  
28 Jun 2019 12:27 AM |
|
Hi, I know this is an old topic, but Im having the same problem. Im using a WV3 image with 8 MS bands on ENVI 5.3 (64-bit). I have tried the following: 1) setting the 'sensor type' to Unknown and using the 'worldview3.sli' Filter Function file and setting WV3 as sensor type 2) Setting the 'Index of first band' to zero and one 3) All data are on the computer's HDD (no external hard drives) any help will be much appreciated. Below is the ouput file for with the FLAASH settings: ; ;ENVI FLAASH PARAMETERS TEMPLATE (5.3) ;Written Fri Jun 28 16:12:14 2019 ; ; Project Parameters enviacc.prj.radiance_file = G:\2 HPC backups\3. WorldView Images\DigitalGlobe Images\Subsets\15AUG_subset_radiom.dat enviacc.prj.reflect_file = G:\2 HPC backups\3. WorldView Images\DigitalGlobe Images\Subsets\15AUG_subset_atmos enviacc.prj.filter_func_file = C:\Program Files\Exelis\ENVI53\classic\filt_func\worldview3.sli enviacc.prj.filter_func_file_index = 0 enviacc.prj.water_band_choice = 1.13 enviacc.prj.red_channel = 5 enviacc.prj.green_channel = 3 enviacc.prj.blue_channel = 1 enviacc.prj.water_abs_channel = 0 enviacc.prj.water_ref_channel = 0 enviacc.prj.kt_upper_channel = 0 enviacc.prj.kt_lower_channel = 5 enviacc.prj.kt_cutoff = 0.0800 enviacc.prj.kt_ratio = 0.5000 enviacc.prj.cirrus_channel = 0 enviacc.prj.water_retrieval = 0 enviacc.prj.user_stem_name = flaash_ enviacc.prj.modtran_directory = C:\Users\jc265983\AppData\Local\Temp\ ; ; MODTRAN Parameters enviacc.modtran.visvalue = 40.0000 enviacc.modtran.f_resolution = 15.0000 enviacc.modtran.day = 31 enviacc.modtran.month = 8 enviacc.modtran.year = 2015 enviacc.modtran.gmt = 0.6617 enviacc.modtran.latitude = -16.8797 enviacc.modtran.longitude = 145.7617 enviacc.modtran.sensor_altitude = 770.0000 enviacc.modtran.ground_elevation = 0.0000 enviacc.modtran.view_zenith_angle = 180.0000 enviacc.modtran.view_azimuth = 0.0000 enviacc.modtran.atmosphere_model = 1 enviacc.modtran.aerosol_model = 1 enviacc.modtran.multiscatter_model = 2 enviacc.modtran.disort_streams = 8 enviacc.modtran.co2mix = 390.0000 enviacc.modtran.water_column_multiplier = 1.0000 ; ; Image Parameters enviacc.img.nspatial = 2778 enviacc.img.nlines = 3756 enviacc.img.data_type = 4 enviacc.img.margin1 = 0 enviacc.img.margin2 = 0 enviacc.img.nskip = 0 enviacc.img.pixel_size = 1.2000 enviacc.img.sensor_name = WorldView-3 ; ; Analysis Parameters enviacc.ana.aerosol_scaleht = 1.5000 enviacc.ana.use_adjacency = 1 enviacc.ana.output_scale = 10000.0000 enviacc.ana.output_diagnostic_files = 0 enviacc.ana.auto_save_template = 1 enviacc.ana.polishing_res = 9 enviacc.ana.aerosol_retrieval = 0 enviacc.ana.calc_wl_correction = 0 enviacc.ana.reuse_modtran_calcs = 0 enviacc.ana.use_square_slit_function = 0 enviacc.ana.convolution_method = fft enviacc.ana.use_tiling = 1 enviacc.ana.tile_size = 100.0000 ; ; GParameters Parameters enviacc.gparameters.gfact = 0 enviacc.gparameters.gval = 0.0000 enviacc.gparameters.use_lr_method = 0 enviacc.gparameters.multikernel = 1 enviacc.gparameters.autoroi = auto enviacc.gparameters.selarg = a ; ; Spectral Parameters enviacc.spc.wavelength_units = nanometer enviacc.spc.lambda = [ 425.0000, 480.0000, 545.0000, 605.0000, 660.0000, 725.0000, 832.5000, 950.0000] enviacc.spc.fwhm = [ 50.000000, 60.000000, 70.000000, 40.000000, 60.000000, 40.000000, 125.000000, 180.000000] enviacc.img.p_input_scale = [ 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000]
|
|
|
|
MariM Veteran Member
Posts:2396  
28 Jun 2019 05:24 AM |
|
Can you post your error from the journal.txt?
|
|
|
|