developmentseed / landsat-util

A utility to search, download and process Landsat 8 satellite imagery
Creative Commons Zero v1.0 Universal
689 stars 147 forks source link

Issues working with band 10 and 11 #185

Closed planemad closed 8 years ago

planemad commented 8 years ago

When trying to process imagery with bands 10 or 11, I get this error

Traceback (most recent call last):
  File "/Users/arun/virtualenv/gis/bin/landsat", line 8, in <module>
    landsat.landsat.__main__()
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/landsat.py", line 491, in __main__
    exit(*main(args))
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/landsat.py", line 416, in main
    args.ndvigrey, bounds=bounds)
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/landsat.py", line 479, in process_image
    return p.run()
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/decorators.py", line 11, in wrapped_f
    return func(*args, **kwargs)
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/image.py", line 427, in run
    return self._write_to_file(new_bands, **rasterio_options)
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/decorators.py", line 11, in wrapped_f
    return func(*args, **kwargs)
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/image.py", line 264, in _write_to_file
    band = self._color_correction(band, self.bands[i], 0, coverage)
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/image.py", line 278, in _color_correction
    p_low, cloud_cut_low = self._percent_cut(band, low, 100 - (coverage * 3 / 4))
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/landsat/image.py", line 288, in _percent_cut
    return numpy.percentile(color[numpy.logical_and(color > 0, color < 65535)], (low, high))
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3268, in percentile
    interpolation=interpolation)
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/numpy/lib/function_base.py", line 2997, in _ureduce
    r = func(a, **kwargs)
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3385, in _percentile
    x1 = take(ap, indices_below, axis=axis) * weights_below
  File "/Users/arun/virtualenv/gis/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 124, in take
    return take(indices, axis, out, mode)
IndexError: cannot do a non-empty take from an empty axes.

Even the tiffs for the scene seem a little odd, they are pure black with all pixels 0 and footprint different from the other bands.

screenshot 2016-05-06 02 02 45

Band 10 (black) and 7 for the same scene

This was the command landsat download --process LC81460392016062LGN00 -b 10117

Hitting the same issue with other scenes in the area when trying to process b10 or b11. All other bands seem ok.

drewbo commented 8 years ago

@planemad There are some ongoing issues with bands 10 and 11 processing although I'm not caught up enough to know the current status from USGS. There might be some relevant info here: http://landsat.usgs.gov/about_Landsat_Updates.php Not sure if this is the cause but could be related

planemad commented 8 years ago

Thanks @drewbo that explains it

From http://landsat.usgs.gov/mission_headlines2016.php

On Monday, April 25, 2016, from 11 am to 3 pm CT, a system release will be implemented to restore the ability to produce valid* Landsat 8 thermal data for all scenes from this date forward. PLEASE NOTE: From 12 pm to 1 pm, no Landsat data downloads will be available.

After this release is complete and validated, plans will be made to begin reprocessing Landsat 8 OLI/TIRS scenes acquired from January 1 to March 31, along with data acquired during April, to create nominal Level-1 products containing valid TIRS data. This data will become available in May.

*All newly processed TIRS data will use “Preliminary” estimated scene select mirror (SSM) position information. (Please refer to the April 12, 2016 Headline below for more details.)

AlmuHS commented 8 years ago

I have a similar problem with execute process command. https://bpaste.net/show/4c07c5dfc14a I'm using Gentoo, and I have installed landsat-util from pip install.

I have other version installed from sources, with the same problem