pytroll / pygac

A python package to read and calibrate NOAA and Metop AVHRR GAC and LAC data
https://pygac.readthedocs.org/
GNU General Public License v3.0
20 stars 27 forks source link

Correct coefficients #67

Closed carloshorn closed 4 years ago

carloshorn commented 4 years ago

This PR should correct all typos mentioned in #66 and also correct the the intercept coefficient mentioned in #57.

Therefore, it should close #57 and close #66.

Since the coefficients are currently coming from PATMOS-x, should I add the script to convert these tar balls to PyGAC json files to the repository?

sfinkens commented 4 years ago

Sounds good!

sfinkens commented 4 years ago

@carloshorn So this is ready to merge? @ninahakansson FYI, this PR will slightly change the calibrated data

carloshorn commented 4 years ago

@carloshorn So this is ready to merge?

Please note that the script requires python 3 (e.g. yield from is not valid in python 2), while PyGAC also works with python 2. If this is okay, it is ready to merge.

sfinkens commented 4 years ago

I think that's fine, it's just a tool. But could you please raise an exception if someone tries to call it with python 2?

carloshorn commented 4 years ago

The example yield from already raises a SyntaxError using python 2. I could replace the first line with #/usr/bin/env/ python3, but I don't know if this has any side effects when running the setup.py.

sfinkens commented 4 years ago

What about something more verbose for an unexperienced user? RuntimeError: This tool is Python 3 only or something like that?

carloshorn commented 4 years ago

Yes, that would be nice, but unfortunately, the syntax error is thrown while the python interpreter reads the script. I don't get to the point where I could implement it. Of cause, I could rewrite this line with for item in items: yield item, but I fear that something else pops up next and this will just be the first round of ugly python 2 backward compatibility rewriting....

sfinkens commented 4 years ago

Oh sorry, now I see the problem. My bad! Then it's fine of course.