Closed gillins closed 5 years ago
Original comment by Sam Gillingham (Bitbucket: gillins, GitHub: gillins).
Are you using Landsat 8? You should have 7 bands (the cirrus - band 9 - should be the last). See fmask.py
line 264.
The wildcard in the documentation (LC8*_B[1-7,9].TIF
- although I have a feeling this isn't quite right for the most recent data - should be LC08...
) does include Band 9.
We will add a check that the correct number of bands are present in the input file for the next release. We are also working on adding the ability to generate all the required files within fmask_usgsLandsatStacked.py
itself which may make life easier.
Sam.
Original report by Anonymous.
Hi,
I am trying to run python-fmask, I can do all the steps but when I try to run the last one:
fmask_usgsLandsatStacked.py -t thermal.img -a toa.img -m _MTL.txt -z angles.img -s saturationmask.img -o cloud.img*
I get this error:
Traceback (most recent call last): File "/home/diego/anaconda3/envs/fmask/bin/fmask_usgsLandsatStacked.py", line 146, in
mainRoutine()
File "/home/diego/anaconda3/envs/fmask/bin/fmask_usgsLandsatStacked.py", line 143, in mainRoutine
fmask.doFmask(fmaskFilenames, fmaskConfig)
File "/home/diego/anaconda3/envs/fmask/lib/python3.6/site-packages/fmask/fmask.py", line 143, in doFmask
fmaskFilenames, fmaskConfig, missingThermal)
File "/home/diego/anaconda3/envs/fmask/lib/python3.6/site-packages/fmask/fmask.py", line 273, in doPotentialCloudFirstPass
applier.apply(potentialCloudFirstPass, infiles, outfiles, otherargs, controls=controls)
File "/home/diego/anaconda3/envs/fmask/lib/python3.6/site-packages/rios/applier.py", line 675, in apply
userFunction( params)
File "/home/diego/anaconda3/envs/fmask/lib/python3.6/site-packages/fmask/fmask.py", line 312, in potentialCloudFirstPass
refNullmask = (inputs.toaref[otherargs.bandsForRefNull] == otherargs.refNull).any(axis=0)
**IndexError: index 6 is out of bounds for axis 0 with size 6***
All the intermediate products has been well generated, so I can't figure out where is the error.
I'd appreciate your help. Anyway, thanks for this tool.