ubarsc / python-fmask

A set of command line utilities and Python modules that implement the ‘fmask’ algorithm
https://www.pythonfmask.org
GNU General Public License v3.0
75 stars 21 forks source link

Expected 2 bands in Thermal file. Found 1 bands #25

Closed gillins closed 5 years ago

gillins commented 5 years ago

Original report by Anonymous.


Hi! Sorry for being a bother...using 0.5.2 version of python-fmask on Ubuntu 14.04 i keep getting the same error:

Traceback (most recent call last): File "/usr/local/bin/fmask_usgsLandsatStacked.py", line 146, in mainRoutine() File "/usr/local/bin/fmask_usgsLandsatStacked.py", line 143, in mainRoutine fmask.doFmask(fmaskFilenames, fmaskConfig) File "/usr/local/lib/python2.7/dist-packages/fmask/fmask.py", line 143, in doFmask fmaskFilenames, fmaskConfig, missingThermal) File "/usr/local/lib/python2.7/dist-packages/fmask/fmask.py", line 295, in doPotentialCloudFirstPass raise fmaskerrors.FmaskFileError(msg) fmask.fmaskerrors.FmaskFileError: Expected 2 bands in Thermal file. Found 1 bands

I tried using python-fmask on scenes LE71920282015005SG100, LE71920282000252FUI00 and LC81920282015285LGN00

gillins commented 5 years ago

Original comment by Neil Flood (Bitbucket: neilflood, GitHub: neilflood).


Thank you for bringing this to our attention. No bother, we appreciate the feedback.

The checks for correct number of bands were only recently added (https://bitbucket.org/chchrsc/python-fmask/commits/29cd035ed33fd1712a32f12378cc34f058c15250) and it looks like the test is simply wrong for the Landsat-7 case. We will correct this and organise a bug-fix release.

I cannot reproduce the problem for the Landsat-8 case, though.

Could you provide a listing of all the Landsat files present for this case? And also the command(s) you are using?

The example traceback you sent says "expected 2 bands, found 1". Which scene was this for?

many thanks Neil

gillins commented 5 years ago

Original comment by Nicola Case (Bitbucket: nc1292, ).


Ok, i just made another try with LC81920282015285LGN00 after having deleted and re extracted the whole scene from the tar archive, and this time all went well. My fault, probably i have manually messed up the scene.

The example traceback was surely from a Landsat 7 scene, but i am not sure which one.

Thanks to you for your timeliness and for this useful package!

Nicola

gillins commented 5 years ago

Original comment by Neil Flood (Bitbucket: neilflood, GitHub: neilflood).


OK, thanks for checking that.

I will get onto the Landsat-7 case. Give me a couple of days.

Neil

gillins commented 5 years ago

Original comment by Neil Flood (Bitbucket: neilflood, GitHub: neilflood).


OK, I have just done a release version 0.5.3, which fixes this problem.

Please let us know if there is still an issue.

Neil

gillins commented 5 years ago

Original comment by Nicola Case (Bitbucket: nc1292, ).


Thank you! Now all works properly!

Thank you for your work and timeliness!

Nicola