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
21 stars 27 forks source link

Invert bit position in quality flags #91

Closed carloshorn closed 3 years ago

carloshorn commented 3 years ago

This PR corrects the quality flags which leads to differences in the masked scanlines as presented in #90.

mraspaud commented 3 years ago

Ouch. I think this means this code isn't tested properly?

carloshorn commented 3 years ago

Yes, I will add a more realistic test that really fills 32 bit big endian integers as expected from the files and get the corrupt mask for them.

carloshorn commented 3 years ago

Just noticed another thing: https://github.com/pytroll/pygac/blob/817a82ebc4e29989b8b68d5b57364f56da046907/pygac/klm_reader.py#L755-L760 This can be fixed by redefining the alias: https://github.com/pytroll/pygac/blob/28a97a414cc569021829bd0ae194898067de1077/pygac/klm_reader.py#L85-L93 like this CH_3_CONTAMINATION = CH_3B_RS | CH_3B_RS_ANOMALY