Closed gillins closed 5 years ago
Original comment by Johan Mollevik (Bitbucket: [Johan Mollevik](https://bitbucket.org/Johan Mollevik), ).
I failed to sign in before reporting this but I will be watching this if you have any questions.
Original comment by Neil Flood (Bitbucket: neilflood, GitHub: neilflood).
Thanks Johan. I am aware of the problem - see https://bitbucket.org/chchrsc/python-fmask/pull-requests/8 for the current status on that. That pull request will be merged shortly, and the floating point issue fixed.
Original report by Anonymous.
Hi
I am experimenting with the test-parallax branch and was trying to process the data bundle S2A_MSIL1C_20171031T101141_N0206_R022_T34WDS_20171031T122112.SAFE using the commands
gdalbuildvrt -resolution user -tr 20 20 -separate allbands.vrt _B0[1-8].jp2 _B8A.jp2 _B09.jp2 _B1[0-2].jp2
fmask_sentinel2makeAnglesImage.py -i ../*.xml -o angles.img
fmask_sentinel2Stacked.py -a allbands.vrt -z angles.img -o cloud.img
I have managed to run the code on other tiles but on this one I received this error
S2A_MSIL1C_20171031T101141_N0206_R022_T34WDS_20171031T122112.SAFE/GRANULE/L1C_T34WDS_A012317_20171031T101142/IMG_DATA$ fmask_sentinel2Stacked.py -a allbands.vrt -z angles.img -o cloud.img Traceback (most recent call last): File "/usr/local/bin/fmask_sentinel2Stacked.py", line 152, in
mainRoutine()
File "/usr/local/bin/fmask_sentinel2Stacked.py", line 144, 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 269, in doPotentialCloudFirstPass
applier.apply(potentialCloudFirstPass, infiles, outfiles, otherargs, controls=controls)
File "/usr/local/lib/python2.7/dist-packages/rios/applier.py", line 675, in apply
userFunction(*params)
File "/usr/local/lib/python2.7/dist-packages/fmask/fmask.py", line 360, in potentialCloudFirstPass
(ratio8a8, ratio8a7, v8a8, v8a7, cdi) = calcCDI(ref, fmaskConfig, otherargs.refBands)
File "/usr/local/lib/python2.7/dist-packages/fmask/fmask.py", line 1314, in calcCDI
cdi = (v8a8 - v8a7) / (v8a8 + v8a7)
FloatingPointError: invalid value encountered in true_divide