MSSunpackr

MSSunpacker automatically assesses image quality, decompress, resamples, stacks, reprojects, and fixes image edge error. It locates the targz folder in the user-provided scene directory path and for each compressed image file creates a new temporary folder where compressed images are decompressed to. It reviews the image metadata to determine if an image is L1G or L1T processed. If the image is only processed to L1G, all files associated with the image are deleted and a record is made in the scene sub-folder images_deleted. If an image is L1T, then a 4-band raster stack file is created from the 4 individual MSS band files. Pixels with values of 0 or 1 in any band are then set to background (value 0); if a pixel is background in one band all corresponding pixels in the other bands are set to background as well. This procedure cleans bad data apparent along the edge of images when overlapping scenes are mosaiced. Images that are composed of greater than 75% of these bad pixels are deleted along with all associated files and recorded as a note in the images_deleted folder. An estimate of the percent cloud cover is made by finding the proportion of pixels in the MSS green band greater than 130. This value along with the scene georegistration RMSE are recorded in a diagnostic file that accompanies the image file.