Application Tips for ENVI 5 – Using FLAASH for atmospheric correction of airborne hyperspectral data

This is part of a series on tips for getting the most out of your geospatial applications. Check back regularly or follow HySpeed Computing to see the latest examples and demonstrations.

Objective: Utilize the FLAASH Atmospheric Correction tool in ENVI for correction of airborne hyperspectral data.

About FLAASH (from ENVI documentation): “FLAASH [Fast Line-of-sight Atmospheric Analysis of Hypercubes] is a first-principles atmospheric correction tool that corrects wavelengths in the visible through near-infrared and shortwave infrared regions, up to 3 µm. FLAASH works with most hyperspectral and multispectral sensors.”


RGB composite of AISA Eagle data for coastal region in southwest Puerto Rico

Scenario: This tip demonstrates the steps used to perform atmospheric correction using FLAASH for airborne data acquired in southwest Puerto Rico using an AISA Eagle VNIR II Hyperspectral Imaging Sensor. Data covers the spectral range 400-970 nm, with 128 spectral bands at ~5 nm spectral resolution, and with a 2 m ground sampling distance.

The Tip: Below are steps used to implement FLAASH for the example AISA data:

  • Note that the settings used below were selected to work best for this example, and different values may be more appropriate for your particular application. For more details on running FLAASH, please refer to the ENVI documentation, which includes an excellent step-by-step overview of using FLAASH, as well as a tutorial using AVIRIS data that demonstrates FLAASH.
  • Prior to starting FLAASH, the first step is to perform radiometric calibration and make sure the data is in the appropriate format, specifically: radiance data; BIL or BIP; floating point, long integer or integer; and units of uW/(cm^2 * sr * nm). This can be easily achieved using the “Radiometric Calibration” tool and selecting the option to “Apply FLAASH Settings”.
  • The “Radiometric Calibration” tool requires data file have gains and offsets for each band. Additionally, the tool expects input units of W/(m^2 * sr * um), so depending on the units of your data you may need to manually edit the gain and offset information in your header data. For instance, the uncorrected AISA data in our example has units of 1000*mW/(cm^2 * sr *um), which is equivalent to 100*W/(m^2 * sr * um). This means the gain for each band is 0.01 (i.e., 1/100) and the offset is 0.0.
  • If you suspect the gains and offsets are not correct for your data, then be sure to check the output data from FLAASH to confirm reflectance values fall within acceptable limits. For instance, if we incorrectly set the gain equal to 0.1 in our example the resulting reflectance values are substantially higher than feasible (e.g., greater than 100% reflectance for bright targets), and if we set the gain equal to 0.001 the reflectance values are substantially lower (e.g., producing negative values for most targets).
  • To start the “Radiometric Calibration” tool, select “Radiometric Correction > Radiometric Calibration” in the Toolbox and choose the appropriate input file. In the dialog window that appears, select “Apply FLAASH Settings”, assign an output filename, and then hit “Ok” to run the correction. Once the process is completed, your data is now ready for input to FLAASH.


  • To start FLAASH, select “Radiometric Correction > Atmospheric Correction Module > FLAASH Atmospheric Correction” from the Toolbox. This will launch the main dialog window for entering FLAASH parameters.
  • Begin by selecting the appropriate Input Radiance File (i.e., the output from the radiometric correction). At this point a dialog window will open for selecting the “Radiance Scale Factors”. If you used the “Radiometric Calibration” tool for preparing your data, as above, then simply select “Use single scale factor for all bands” and leave the “Single scale factor” equal to 1.0.


  • The next step is to assign a filename for the “Output Reflectance File” (the main output file), a directory for the “Output Directory for FLAASH Files” (the directory for all ancillary output files), and a name for the “Rootname for FLAASH Files” (used for naming the ancillary files).
  • Now enter all of the relevant sensor and scene specific information: date and time of acquisition, altitude of sensor, ground elevation, center latitude and longitude, and pixel size.
  • The next step is to select options for the atmospheric model, water retrieval, aerosol model, aerosol retrieval, visibility, spectral polishing and wavelength recalibration. Details for all of these options are provided in the FLAASH documentation. In our example, we use the Tropical atmospheric and Maritime aerosol models (both appropriate for coastal Puerto Rico), the 820 nm water absorption feature for water retrieval, no aerosol retrieval (this data doesn’t have the necessary wavelength bands to run these calculations), 40 km initial visibility, spectral polishing with a width of 3 bands, and no wavelength recalibration.


  • In the Advanced settings we leave most parameters set to the default values, with the exception of “Use Tiled Processing”, which we set to “No”. See FLAASH documentation for more details on these various parameters. Note here that the default units for the output data is surface reflectance scaled by 10000, but this can be changed if desired.


  • Before running FLAASH, you can “Save…” the input parameters to a file for use in future runs, or alternatively, in the “Advanced Settings” there is an option to “Automatically Save Template File”, which can also be used to save the input parameters to a file.
  • When you are ready, execute FLAASH by clicking “Apply”.
  • Note that errors will sometimes occur, causing FLAASH to cancel the correction process. This can result from incompatibilities between the selected processing options and certain data characteristics. For example, the above data produces an error when using image tiling, but runs fine when tiling is disabled; whereas tiling works perfectly well for other datasets. So if this happens, try adjusting the FLAASH settings and re-running the correction.
  • Once FLAASH has completed, be sure to examine your output data for acceptability, and ideally, if available, utilize measured field data to validate the atmospheric correction output.

Acknowledgement: Data was collected for the University of Puerto Rico at Mayaguez by the Galileo Group Inc. in 2013 for a NASA EPSCoR sponsored research project on the biodiversity of coastal and terrestrial ecosystems.


16 thoughts on “Application Tips for ENVI 5 – Using FLAASH for atmospheric correction of airborne hyperspectral data

  1. While running the FLAASH module for the HICO dataset (87 bands), I encountered the following error:

    ACC error: h2oinv: h2oinv
    IDL error:
    Unable to allocate memory: to make array.
    Not enough space….

    Please provide suggestions on how to solve this error.

    • Padma – This appears to be an issue with system resources, specifically the available memory on your computer. Try running the correction using a smaller tile size, which can be changed within the advanced settings (e.g., reduce from 100MB to 50MB). Alternatively, you could also try running the correction without the water retrieval. If the error persists, then your best course of action is to contact the support team at Exelis VIS to help resolve the problem.

  2. Hi,could you please suggest Application Tips for ENVI 5.1 – without the use of FLAASH or QUAC for atmospheric correction of airborne hyperspectral data?

    • Thanks for the question. There are indeed a number of alternatives to using FLAASH and QUAC. In fact, ENVI already includes a set of atmospheric correction options in their standard software (i.e., at no extra cost), such as Dark Subtraction, Empirical Line Correction, and Flat Field Calibration. However, since these are ‘first-order’ approximations, there are certain tradeoffs associated with using these algorithms dependent on the particular atmospheric conditions and accuracy needed for a given application. For example, if your analysis only requires values of relative reflectance within a scene, then these alternatives may be sufficient for your needs. If higher accuracy is needed, then you will likely need to utilize a more sophisticated correction option. Beyond FLAASH and QUAC (and beyond ENVI) this includes software such as ACORN, ATCOR and Tafkaa, as well as other custom modules described in the remote sensing literature.

  3. I am trying to do FLAASH for Hyperion GeoTiff images. I have input the data as shown in the other link from your blog. After this, what are the steps to be followed to perform FLAASH?
    1) do I have to do the division by 40 and 80 for VNIR and SWIR bands? Or do I directly do the radiometric calibration?
    2) In the USGS website, it states that GeoTiff format is radiometrically and geometrically calibrated. What does this mean?
    Kindly reply at the earliest.

    • Thank you for the questions.
      1) FLAASH expects input data to have units of uW/(cm^2 * sr * nm), while Hyperion data is distributed in units of W/(m^2 * sr * um). To obtain the proper units you need to apply the appropriate gain factors (40 and 80 for the VNIR and SWIR, respectively) as well as include a factor of 10 to convert the units. This equates to dividing the VNIR bands (1-70) by 400 and dividing the SWIR bands (71-242) by 800. This can be done either beforehand using the ENVI Radiometric Calibration tool or within FLAASH itself using an array of scale factors in an ASCII file.
      2) Radiometric calibration compensates for variations in detector sensitivity and is used to convert the raw digital numbers recorded by the sensor into at-sensor radiance values. Geometric calibration compensates for known systematic sensor distortions (e.g., skew, perspective, scan velocity, etc.) as well as topographic variations. Geometric calibration is also used to transform raw sensor measurements into a systematic grid of pixels. Hyperion is distributed using the following processing levels: L1R includes radiometric corrections only; L1Gst includes radiometric corrections and systematic geometric corrections using spacecraft ephemeris data and a 90-m DEM for topographic accuracy; and L1T includes radiometric correction and systematic geometric corrections that incorporate the use of ground control points in addition to the 90-m DEM for topographic accuracy.

  4. Hello,
    I am using FLAASH to correct a hyperspectral image (400-700nm) atmospherically, which doesn’t have bands for water vapor retrieval. However, the FlAASH program exits with error saying ‘water numerator and denominator channels not found for .82 band.’ even though I selected ‘No’ for water retrieval option. In such case, as far as I know, the column water vapor amount is determined by the user-selected atmospheric model.
    Please correct if I missed anything here.
    ACC error: autochan:
    IDL error:
    ACC_AUTOCHAN:Water numerator and denominator channels not found for .82 band.


    Thank you,


    • Matt – Unfortunately, we are seeing the same error when running FLAASH on a 400-700nm hyperspectral image, even when testing a number of different options, including using earlier versions of ENVI as well as launching ENVI in both 32-bit and 64-bit. With that said, you are correct that according to the documentation FLAASH should still be able to run using ‘No’ for the water retrieval option. Sounds like you have a question for technical support at Exelis VIS. Let us know what you find out so that we can pass along the information to other users. Thanks.

      • Thanks for your comment. I did share the my question on Exelis forum as well, yet not have an effective solution. I will pass along the info as long as it is good enough.

  5. Dear sir,
    When I do radiometric calibration, I encountered a problem,its simply struck on, up to I done all step properly, I was using L1 G data set.

    • One of the most common causes for issues with the radiometric calibration tool is missing or incorrect gain and offset values. If these values are correct, and the issue persists, then please provide some additional information on the type of data you are working with, and we can try to be of further assistance. Thank you.

  6. Hello everyone, I am working on ASTER L1T data and would like to do FLAASH correction but I dont know what value should be used for scale factor. I have tryied with 1 and 10 which is normally for ASTER L1B data. please help me…

    • FLAASH expects input data to have units of uW/(cm^2 * sr * nm), while ASTER L1T and L1B are both distributed in units of W/(m^2 * sr * um). So your assumption of using a scale factor = 10 is correct. However, I’m assuming that even when using this value you are still having issues with the output. If so, please provide some additional information and we, or someone from the community, can try to be of further assistance. Thank you.

    • Are you referring to the radiometric calibration step, which is needed before running FLAASH, or are you seeing this error when running FLAASH itself to derive surface reflectance? Note that FLAASH has very specific requirements for input file format and these should be adhered to carefully. One of the easiest method for doing so is to open Landsat 8 data using the provided metadata file (i.e., _MTL.txt) and then utilizing the “Apply FLAASH Settings” in ENVI’s Radiometric Calibration tool to generate the necessary input file for FLAASH. If you’re still having issues, try running the process on a subset of the imagery to see if the error is isolated to certain bad pixels. Otherwise, please provide some additional information and we, or someone from the community, can try to be of further assistance. Thank you.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s