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

RuntimeWarning: invalid value encountered in rint #5

Closed gillins closed 7 years ago

gillins commented 7 years ago

Original report by Malyuk Maksim (Bitbucket: Malyuk_M, ).


Hi all!

When I run fmask_sentinel2makeAnglesImage I have "RuntimeWarning: invalid value encountered in rint" error: Fmask_error.jpg

But I've worked with Fmask for Python 1 mounth ago, and everything was ok.

gillins commented 7 years ago

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


Could you attach the .xml file, so that we can do a test and try to find out what is happening? Only the granule xml file which you give in the command shown will be necessary, I think.

gillins commented 7 years ago

Original comment by Malyuk Maksim (Bitbucket: Malyuk_M, ).


I'm sorry

I've thought this probles with Fmask or Numpy or my hand. I attached xml file

gillins commented 7 years ago

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


Hi,

Thanks for the file.

My colleague and I have checked into this, and it only happens on Windows, with a particular version of Python/numpy. It seems to be just a warning message, and the output is still OK. It comes from the handling of null pixels in the angles, which are for areas outside the real data area, off the edge of the satellite track. The results are not affected. We will look at a neat way to suppress this message without causing other problems, but it is OK for you to ignore it, and just use the results anyway.

Let me know if you are happy with this. Thank you for letting us know about it. Neil

gillins commented 7 years ago

Original comment by Sam Gillingham (Bitbucket: gillins, GitHub: gillins).


A small thing, but I'd recommend installing python-fmask into a Conda environment and activating it as per the instructions (http://pythonfmask.org/en/latest/#downloads). Doing this will mean that the GDAL_DATA environment variable (used for coordinate calculations) will be set properly.

Sam.

gillins commented 7 years ago

Original comment by Malyuk Maksim (Bitbucket: Malyuk_M, ).


Thank all for help! Issue was solved after Sams recommendation!

Maksim.

gillins commented 7 years ago

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


Seems like all is well now, so closing this issue.