Removing bad scans from ATM lines

  • Replace the azatm section of your script (for lines containing bad scan lines) with the two azatm commands below and run the script.
    • azatm -v -eds -1 -sNO -NOCAL -v -tc 0 -i atm/${ATM_PREFIX}${ATM_FILE_NO}.* -h ${LEV1_HDF} \
    • azatm -v -bbtt 5 3 0.02 1 -bbf 7 7 -sNO -h ${LEV1_HDF} -cal ${CALIBRATION_FILE} \
  • Convert each raw ATM hdf file containing bad scan lines into bil files with headers by running azexhdf -h <hdf_filename.hdf> -Be <bil_filename.bil> (note: you may wish to place the bil files into their own directory as if they are in the same dir as the hdf files, envi gets confused when opening the hdfs and displays garbage).
  • Once the bil files have been created, run -f <filename> -t <pixel_threshold> -m <multiple> -b <bands>. (can only be run on 32bit machines at the moment).

-f file to scan
-t number of pixels which have to be bad for a line to be considered bad (good starting point ~120)
-m if a pixel in the current line is -m times larger or smaller than a pixel in previous the line it is considered bad (good starting point ~3)

This will read all the bands in the bil file and returns all the bad scan lines it finds (and writes these into a txt file with the same name as the bil file for easy copy and paste into the scripts). The bad scans are high values and 'slipped scans'. All zero value scans (and most of the slipped scans) should be removed automatically by the az* software.

  • Copy the bad scan line numbers from the txt files into the corresponding scripts after the -eds option. The lines numbers entered into the scripts will be marked as bad in the hdfs after running the scripts. These will still be visible when viewing the hdfs but will not be present in the level 3 GeoTIFFs.
  • Rerun the processing and manually view the lev1/lev3, looking out for slipped scans (line starts late and is offset) or white streaks. Find the line number of these in ENVI using the cursor location (subtract 1 from the Y value as azatm counts from 0 and ENVI counts from 1) and add these line numbers to the -eds part of the azatm command, then rerun and repeat.
Last modified 10 years ago Last modified on Sep 3, 2008 6:23:19 PM