Ludovic Legros New Member
Posts:29  
10 Jan 2018 08:36 AM |
|
Hi, I'm trying to use the FLAASH module to perform radiometric correction to my data. But I face several problems.: - I can't load .IMD or .TIL file to provide scale factors informations (absCalFactor = xxx ; effectiveBandwidth = xxx;) to FLAASH module, - I have a warning message concerning the azimuth and zenith angles (Zenith angle is greater than calculated horizon angle.). Thanks,
|
|
|
|
MariM Veteran Member
Posts:2396  
10 Jan 2018 09:54 AM |
|
Do you get an error selecting the .TIL to open in ENVI? What version of ENVI do you run? ENVI should automatically extract all the metadata necessary to perform radiometric correction if you open using the .TIL. Then you would use Radiometric Calibration to convert the data to Radiance using 'FLAASH Settings' prior to input to FLAASH. The zenith and azimuth angles can sometimes be difficult to interpret how to enter. The documentation describes the acceptable range of values but the values have to be reasonable for the time of day also: http://www.harrisgeospati...Options.html#Select3
|
|
|
|
Ludovic Legros New Member
Posts:29  
10 Jan 2018 10:20 AM |
|
I run a 5.4 trial version of ENVI. Actually with "Open External File > WorldView > Mosaic Tiled WV Product" I can open the .TIL. After that, I suppose I have to convert the file into BIL or BIP to use it in FLAASH, right ? Do I need to do something else before using FLAASH ?
|
|
|
|
MariM Veteran Member
Posts:2396  
10 Jan 2018 12:07 PM |
|
You will need to use Radiometric Correction with 'FLAASH Settings'. This will convert the data to the expected units for FLAASH as well as the correct interleave. When you import this result to FLAASH, you can use a Scale Factor of 1.0 for all bands.
|
|
|
|
Ludovic Legros New Member
Posts:29  
10 Jan 2018 12:16 PM |
|
OK, I will try that ! I let you know if it worked. Thanks
|
|
|
|
Ludovic Legros New Member
Posts:29  
10 Jan 2018 12:22 PM |
|
I tried and I have this error message: --------------------------- ENVI Error --------------------------- Problem: The FLAASH program exited with the following errors: ACC error: convert7 IDL error: End of input record encountered on file unit: 0. ACC_CONVERT7 <( 9)> ACC_HYPER2 <( 784)> ACC_ACC <( 191)> ENVI_ACC_EVENT <(3184)> ENVI_FLAASH_PROCESS_MANAGER <( 274)> IDLRTMAIN <( 172)> $MAIN$ <( 0)> ---------------------------
|
|
|
|
MariM Veteran Member
Posts:2396  
10 Jan 2018 12:31 PM |
|
Can you post your template.txt that is produced in the output directory specified in the FLAASH dialog?
|
|
|
|
Ludovic Legros New Member
Posts:29  
12 Jan 2018 07:24 AM |
|
; ;ENVI FLAASH PARAMETERS TEMPLATE (5.4.1) ;Written Wed Jan 10 10:32:06 2018 ; ; Project Parameters enviacc.prj.radiance_file = G:\LL_WORKSPACE\OTR-SI381_GoldSpot_Peru\02_Rasters\1_Image_de_base\Essai_FLAASH\SWIR_057064006030_01_P002_SWR_BIL enviacc.prj.reflect_file = C:\Users\lleg\AppData\Local\Temp\ enviacc.prj.filter_func_file_index = 0 enviacc.prj.water_band_choice = 1.13 enviacc.prj.red_channel = 0 enviacc.prj.green_channel = 0 enviacc.prj.blue_channel = 0 enviacc.prj.water_abs_channel = 0 enviacc.prj.water_ref_channel = 0 enviacc.prj.kt_upper_channel = 0 enviacc.prj.kt_lower_channel = 0 enviacc.prj.kt_cutoff = 0.0800 enviacc.prj.kt_ratio = 0.5000 enviacc.prj.cirrus_channel = 0 enviacc.prj.water_retrieval = 0 enviacc.prj.modtran_directory = C:\Users\lleg\AppData\Local\Temp\ ; ; MODTRAN Parameters enviacc.modtran.visvalue = 40.0000 enviacc.modtran.f_resolution = 5.0000 enviacc.modtran.day = 1 enviacc.modtran.month = 1 enviacc.modtran.year = 2000 enviacc.modtran.gmt = 0.0000 enviacc.modtran.latitude = -14.9895 enviacc.modtran.longitude = -72.3389 enviacc.modtran.sensor_altitude = 0.0000 enviacc.modtran.ground_elevation = 0.0000 enviacc.modtran.view_zenith_angle = 8.2000 enviacc.modtran.view_azimuth = 103.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 = 1317 enviacc.img.nlines = 2055 enviacc.img.data_type = 12 enviacc.img.margin1 = 0 enviacc.img.margin2 = 0 enviacc.img.nskip = 0 enviacc.img.pixel_size = 7.5000 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 = 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 = [ 1209.1000, 1571.6000, 1661.1000, 1729.5000, 2163.7000, 2202.2000, 2259.3000, 2329.2000] enviacc.spc.fwhm = [ -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000] enviacc.img.p_input_scale = [ 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000]
|
|
|
|
Ludovic Legros New Member
Posts:29  
15 Jan 2018 08:48 AM |
|
Eveytime I run FLAASH (with ASTER or WV-3 images) I have the same error message. Here's the template.txt: ; ;ENVI FLAASH PARAMETERS TEMPLATE (5.4.1) ;Written Fri Jan 12 12:29:24 2018 ; ; Project Parameters enviacc.prj.radiance_file = G:\LL_WORKSPACE\OTR-SI411_GoldSpot_Arizona\02_Rasters\01_Images_base\ASTER\HDF\FLAASH\AST_L1T_00309122003181427_20150430202806_8211_RadCorr.dat enviacc.prj.reflect_file = G:\LL_WORKSPACE\OTR-SI411_GoldSpot_Arizona\02_Rasters\01_Images_base\ASTER\HDF\FLAASH\AST_L1T_00309122003181427_20150430202806_8211_fin enviacc.prj.filter_func_file = G:\ENVI_5.4.1_Trial\ENVI54\classic\filt_func\aster.sli enviacc.prj.filter_func_file_index = 0 enviacc.prj.water_band_choice = 1.13 enviacc.prj.red_channel = 2 enviacc.prj.green_channel = 1 enviacc.prj.blue_channel = 0 enviacc.prj.water_abs_channel = 0 enviacc.prj.water_ref_channel = 0 enviacc.prj.kt_upper_channel = 5 enviacc.prj.kt_lower_channel = 2 enviacc.prj.kt_cutoff = 0.0800 enviacc.prj.kt_ratio = 0.5000 enviacc.prj.cirrus_channel = 0 enviacc.prj.water_retrieval = 0 enviacc.prj.modtran_directory = C:\Users\lleg\AppData\Local\Temp\ ; ; MODTRAN Parameters enviacc.modtran.visvalue = 40.0000 enviacc.modtran.f_resolution = 15.0000 enviacc.modtran.day = 12 enviacc.modtran.month = 9 enviacc.modtran.year = 2003 enviacc.modtran.gmt = 18.2406 enviacc.modtran.latitude = 33.6121 enviacc.modtran.longitude = -110.7300 enviacc.modtran.sensor_altitude = 705.0000 enviacc.modtran.ground_elevation = 1.5000 enviacc.modtran.view_zenith_angle = 180.0000 enviacc.modtran.view_azimuth = 0.0000 enviacc.modtran.atmosphere_model = 2 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 = 5634 enviacc.img.nlines = 4998 enviacc.img.data_type = 4 enviacc.img.margin1 = 0 enviacc.img.margin2 = 0 enviacc.img.nskip = 0 enviacc.img.pixel_size = 15.0000 enviacc.img.sensor_name = ASTER ; ; 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 = micron enviacc.spc.lambda = [ 0.5560, 0.6610, 0.8070, 1.6560, 2.1670, 2.2090, 2.2620, 2.3360, 2.4000, 8.2910, 8.6340, 9.0750, 10.6570, 11.3180] enviacc.spc.fwhm = [ 0.080000, 0.060000, 0.100000, 0.100000, 0.040000, 0.040000, 0.050000, 0.070000, 0.070000, 0.350000, 0.350000, 0.350000, 0.700000, 0.700000] enviacc.img.p_input_scale = [ 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000]
|
|
|
|
MariM Veteran Member
Posts:2396  
15 Jan 2018 09:30 AM |
|
In your first template, you have these values: enviacc.modtran.ground_elevation = 0.0000 enviacc.modtran.view_zenith_angle = 8.2000 The zenith must be a value between 90-180 degrees with 180 as nadir. With the second template, the wavelengths look weird: 0.5560, 0.6610, 0.8070, 1.6560, 2.1670, 2.2090, 2.2620, 2.3360, 2.4000, 8.2910, 8.6340, 9.0750, 10.6570, 11.3180 Worldview-3 data does not go up to the TIR wavelengths. FLAASH can only correct data from 400-2400nm (.0.4.-2.4um). ENVI should read the wavelengths automatically so I don't know why they may have been changed.
|
|
|
|
Ludovic Legros New Member
Posts:29  
15 Jan 2018 10:19 AM |
|
I finally succedeed to run FLAASH. (The second template concern an ASTER image) But I have strange wavelength for WorldView-3 SWIR: B1: 0.425 B2: 0.48 B3: 0.545 B4: 0.605 B5: 0.66 B6: 0.725 B7: 0.8325 B8: 0.95 The bands should be between 1.1209 and 2.3292.
|
|
|
|
MariM Veteran Member
Posts:2396  
15 Jan 2018 10:26 AM |
|
That makes sense for ASTER. Just process the Thermal bands with the Thermal Atmospheric correction tool. You can process the VNIR-SWIR bands (stacked) in FLAASH. The wavelengths above are definitely for the VNIR WV-3 bands. How does the data look? I wonder if the TIL or something was mixed up?
|
|
|
|
Ludovic Legros New Member
Posts:29  
16 Jan 2018 07:45 AM |
|
When I open the .TIL file provided by Digital Globe in ENVI I get 8 bands with the same wavelength as my previous message. BUT it is supposed to be SWIR data. Do you think that ENVI misread the data and interpret my data as VNIR instead of SWIR ? I got two folders from Digital Globe. One MUL and the other SWR.
|
|
|
|
MariM Veteran Member
Posts:2396  
16 Jan 2018 10:01 AM |
|
I have data from DG with both MS and SWIR data and they open with the correct wavelengths in ENVI 5.4.1 for me. What does the .IMD file in the directory show for band ID and names? For SWIR, it should show bandId = "All-S" and then: BAND_S1 BAND_S2...etc
|
|
|
|
Ludovic Legros New Member
Posts:29  
16 Jan 2018 10:05 AM |
|
This is the first part of the .IMD file for the SWIR data: version = "28.3"; generationTime = 2017-10-23T17:24:48.000000Z; productOrderId = "057064006030_01_P002"; productCatalogId = "20300103067D0B00"; imageDescriptor = "ORStandard2A"; bandId = "All-S"; panSharpenAlgorithm = "None"; numRows = 2055; numColumns = 1317; productLevel = "LV2A"; productType = "Standard"; numberOfLooks = 1; radiometricLevel = "Corrected"; radiometricEnhancement = "Off"; bitsPerPixel = 16; compressionType = "None"; BEGIN_GROUP = BAND_S1 ULLon = -72.38553062; ULLat = -14.92054657; ULHAE = 4883.66; URLon = -72.29385656; URLat = -14.91948015; URHAE = 4883.66; LRLon = -72.29210632; LRLat = -15.05860407; LRHAE = 4883.66; LLLon = -72.38383950; LLLat = -15.05968090; LLHAE = 4883.66; absCalFactor = 3.533070e-04; effectiveBandwidth = 3.300000e-02; TDILevel = 16; END_GROUP = BAND_S1 And for MUL: version = "28.3"; generationTime = 2017-10-27T10:54:22.000000Z; productOrderId = "057064006040_01_P001"; productCatalogId = "A01001030994B600"; childCatalogId = "203001030994B700"; imageDescriptor = "ORStandard2A"; bandId = "MS1"; panSharpenAlgorithm = "None"; numRows = 7706; numColumns = 5948; productLevel = "LV2A"; productType = "Standard"; numberOfLooks = 1; radiometricLevel = "Corrected"; radiometricEnhancement = "Off"; bitsPerPixel = 16; compressionType = "None"; BEGIN_GROUP = BAND_B ULLon = -72.38555662; ULLat = -14.92050848; ULHAE = 4907.70; URLon = -72.27508428; URLat = -14.91921885; URHAE = 4907.70; LRLon = -72.27332137; LRLat = -15.05838576; LRHAE = 4907.70; LLLon = -72.38386498; LLLat = -15.05968796; LLHAE = 4907.70; absCalFactor = 1.771990e-02; effectiveBandwidth = 5.400000e-02; TDILevel = 14; END_GROUP = BAND_B
|
|
|
|
MariM Veteran Member
Posts:2396  
16 Jan 2018 11:31 AM |
|
Looks alright to me with the only difference in the version. Yours shows 28.3 while mine is 27.6. I suppose there could be some changes in the format affecting this. I would like to have access to the data for testing.
|
|
|
|
Ludovic Legros New Member
Posts:29  
16 Jan 2018 11:51 AM |
|
How can I send you the data ? (171Mo) Finally, I modified the wavelength in the metadata and succeeded to run FLAASH with the correct parameters. But to perform an aerosol retrieval, I need 2 specific bands (1 VNIR at 660nm and a SWIR at 2100nm). I tried to use the layer stacking tool to combine the SWIR and VNIR .dat files I have (after radiometric calibration) and then convert the file to BIL. But it doesn't work (see warning and error messages below). Probably because azimuth and zenith are not the same for the two sensors (VNIR and SWIR)... So does it means that I can't do the aerosol retrieval or is there another way to do it ? The warning message: --------------------------- ENVI Warning --------------------------- Problems were found with the following lines of the FLAASH parameters input file: C:\Users\lleg\AppData\Local\Temp\tile_template.txt enviacc.spc.fwhm = [ --------------------------- OK --------------------------- ---------------------------------------------------------------------------------------- And the error message: --------------------------- ENVI Error --------------------------- Problem: The FLAASH program exited with the following errors: ACC error: modrd5:reading archive file header IDL error: READU: End of file encountered. Unit: 102, File: C:\Users\lleg\AppData\Local\Temp\acc_modroot.fla ACC_MODRD5 <( 9)> ACC_KTAEROSOL <( 170)> ACC_HYPER2 <( 597)> ACC_ACC <( 191)> ENVI_ACC_EVENT <(3184)> ENVI_FLAASH_PROCESS_MANAGER <( 459)> IDLRTMAIN <( 172)> $MAIN$ <( 0)> --------------------------- OK ---------------------------
|
|
|
|
Ludovic Legros New Member
Posts:29  
22 Jan 2018 09:12 AM |
|
I tried to combine VNIR and SWIR data to perform FLAASH (and take the mean value for zenith and azimuth), but I got this message: --------------------------- ENVI Warning --------------------------- Problems were found with the following lines of the FLAASH parameters input file: G:\LL_WORKSPACE\OTR-SI381_GoldSpot_Peru\02_Rasters\1_Image_de_base\Essai_FLAASH\FLAASH_VNIR-SWIR\FLAASH_FILES\tile_template.txt enviacc.spc.fwhm = [ --------------------------- OK --------------------------- It seems that there is a problem with FWHM values: fwhm = { 60.000000, 70.000000, 60.000000, 125.000000, 30000.000000, 40000.000000, 40000.000000, 40000.000000, 40000.000000, 40000.000000, 50000.000000, 70000.000000} Here is the template.txt file: ; ;ENVI FLAASH PARAMETERS TEMPLATE (5.4.1) ;Written Mon Jan 22 10:49:51 2018 ; ; Project Parameters enviacc.prj.radiance_file = G:\LL_WORKSPACE\OTR-SI381_GoldSpot_Peru\02_Rasters\1_Image_de_base\Essai_FLAASH\CalRadio\GoldSpot_Peru_VNIR_SWIR_RadCal_BIL enviacc.prj.reflect_file = G:\LL_WORKSPACE\OTR-SI381_GoldSpot_Peru\02_Rasters\1_Image_de_base\Essai_FLAASH\FLAASH_VNIR-SWIR\GoldSpot_Peru_VNIR_SWIR_FLAASH enviacc.prj.filter_func_file = G:\ENVI_5.4.1_Trial\ENVI54\classic\filt_func\worldview3.sli enviacc.prj.filter_func_file_index = 1 enviacc.prj.water_band_choice = 1.13 enviacc.prj.red_channel = 3 enviacc.prj.green_channel = 2 enviacc.prj.blue_channel = 1 enviacc.prj.water_abs_channel = 0 enviacc.prj.water_ref_channel = 0 enviacc.prj.kt_upper_channel = 9 enviacc.prj.kt_lower_channel = 3 enviacc.prj.kt_cutoff = 0.0800 enviacc.prj.kt_ratio = 0.5000 enviacc.prj.cirrus_channel = 0 enviacc.prj.water_retrieval = 0 enviacc.prj.modtran_directory = G:\LL_WORKSPACE\OTR-SI381_GoldSpot_Peru\02_Rasters\1_Image_de_base\Essai_FLAASH\FLAASH_VNIR-SWIR\FLAASH_FILES\ ; ; MODTRAN Parameters enviacc.modtran.visvalue = 40.0000 enviacc.modtran.f_resolution = 15.0000 enviacc.modtran.day = 21 enviacc.modtran.month = 10 enviacc.modtran.year = 2017 enviacc.modtran.gmt = 15.4833 enviacc.modtran.latitude = -14.9896 enviacc.modtran.longitude = -72.3388 enviacc.modtran.sensor_altitude = 617.0000 enviacc.modtran.ground_elevation = 4.8530 enviacc.modtran.view_zenith_angle = 169.9000 enviacc.modtran.view_azimuth = 129.0000 enviacc.modtran.atmosphere_model = 2 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 = 5035 enviacc.img.nlines = 7769 enviacc.img.data_type = 4 enviacc.img.margin1 = 0 enviacc.img.margin2 = 0 enviacc.img.nskip = 0 enviacc.img.pixel_size = 2.0000 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 = 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 = [ 480.0000, 545.0000, 660.0000, 832.5000, 1209.1000, 1571.6000, 1661.1000, 1729.5000, 2163.7002, 2202.2000, 2259.3000, 2329.2000] enviacc.spc.fwhm = [ 60.000000, 70.000000, 60.000000, 125.000000, **********, **********, **********, **********, **********, **********, **********, **********] enviacc.img.p_input_scale = [ 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000] Thank you.
|
|
|
|
MariM Veteran Member
Posts:2396  
22 Jan 2018 10:23 AM |
|
Yes, I agree that your FWHM don't look correct. What does it show in the original VNIR and SWIR files when you view the spectral information using View Metadata? Are they the same after you process the files using Radiometric Calibration? After Layer Stacking? I was able to Layer Stack first, then Radiometric calibration. The resulting FWHM in my header file are: fwhm = { 0.080000, 0.060000, 0.100000, 0.100000, 0.040000, 0.040000, 0.050000, 0.070000, 0.070000}
|
|
|
|
MariM Veteran Member
Posts:2396  
22 Jan 2018 10:24 AM |
|
Also your template shows you are using the WV-3 sensor and filter function? enviacc.img.sensor_name = WorldView-3 enviacc.prj.filter_func_file = G:\ENVI_5.4.1_Trial\ENVI54\classic\filt_func\worldview3.sli
|
|
|
|