Closed sfinkens closed 2 years ago
It makes total sense to remove code duplication, I'm in favour.
To make sure the bug doesn't reappear, maybe a test case for reflectance computation could be added at the same time?
Sorry, false alarm. As pointed out by @abhaydd the factor is applied only once, so there's no problem.
I'm opening a new issue regarding code duplication.
@sfinkens, I still think it makes sense to remove code duplication and use pyorbital here.
Recently a bug in pyorbital's sun-earth distance correction was fixed: https://github.com/pytroll/pyorbital/issues/97.
Pygac does not use pyorbital for this, but makes the same mistake:
https://github.com/pytroll/pygac/blob/05ba35e84caddbe96e5053b35d80abe20a091c01/pygac/utils.py#L89
I propose to use pyorbital for this.
@ninahakansson @abhaydd @kgkarl This would change the output (to the better).