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 25 forks source link

Fix clock drift rounding error #82

Closed carloshorn closed 3 years ago

carloshorn commented 4 years ago

This PR closes #80.

carloshorn commented 4 years ago

Ohh... I did not create the branch from master.... so it also contains #81.

mraspaud commented 4 years ago

ok, we'll just have to be careful and merge them in the right order

carloshorn commented 4 years ago

I need to further understand the underlying code... It appears like the same offset adjustment is done again in Reader.compute_lonlat https://github.com/pytroll/pygac/blob/5c59f2be9437ad7bfc0005038f45f8416d10828d/pygac/reader.py#L485-L497 where in this case there is no rounding error. So the first get_offsets call is only used to get the index range. Then it is called again to do the actual shifting by the correct offset...

I will prepare a refactoring of the clock drift adjustment, so maybe #81 and #82 become obsolete. Could you tell me the difference between reader.time and reader.utcs? It appears to me like it is the same information, but stored in different data types. Storing it twice has the disadvantage of synchronization. Maybe one of them should become a property which does the type conversion.