Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC81580262015031LGN00 fails on image processing(ValueError: Percentiles must be in the range [0,100]) #189

Open
pikacyu opened this issue May 31, 2016 · 1 comment

Comments

@pikacyu
Copy link

pikacyu commented May 31, 2016

LC81580262015031LGN00 fails on image processing.
Do you know the cause?

My environment
OS: CentOS 7
Landsat-util: 0.13.0

$ landsat process /var/tmp/LC81580262015031LGN00 --pansharpen --bands 432 -v
===> PanSharpened Image processing started for bands 4-3-2-8
===> Getting boundaries
===> Rescaling
band 4
band 3
band 2
===> Projecting
band 4
band 3
band 2
band 8
===> Calculating Pan Ratio
===> Calculating cloud and snow coverage from QA band
cloud/snow coverage: 137.08
===> Final Steps
Color correcting band 4
Time spent : 131.94 seconds
Traceback (most recent call last):
File "/home/pikacyu/install/landsat-util-0.13.0/bin/landsat", line 8, in
landsat.landsat.main()
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/landsat.py", line 491, in main
exit(_main(args))
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/landsat.py", line 306, in main
args.ndvigrey, bounds)
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/landsat.py", line 479, in process_image
return p.run()
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/decorators.py", line 11, in wrapped_f
return func(_args, *_kwargs)
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/image.py", line 481, in run
return self._write_to_file(new_bands, pan, *_rasterio_options)
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/decorators.py", line 11, in wrapped_f
return func(_args, *_kwargs)
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/image.py", line 500, in _write_to_file
band = self._color_correction(band, self.bands[i], 0, coverage)
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/image.py", line 278, in _color_correction
p_low, cloud_cut_low = self._percent_cut(band, low, 100 - (coverage * 3 / 4))
File "/home/pikacyu/install/landsat-util-0.13.0/landsat/image.py", line 288, in _percent_cut
return numpy.percentile(color[numpy.logical_and(color > 0, color < 65535)], (low, high))
File "/usr/lib64/python2.7/site-packages/numpy/lib/function_base.py", line 3268, in percentile
interpolation=interpolation)
File "/usr/lib64/python2.7/site-packages/numpy/lib/function_base.py", line 2997, in _ureduce
r = func(a, **kwargs)
File "/usr/lib64/python2.7/site-packages/numpy/lib/function_base.py", line 3292, in _percentile
raise ValueError("Percentiles must be in the range [0,100]")
ValueError: Percentiles must be in the range [0,100]

@scisco
Copy link
Contributor

scisco commented Jun 1, 2016

@pikacyu this should be fixed in the develop branch. I'll release it this week. You can also switch to the dev version if you need it earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants