-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change in masked scanlines #90
Comments
IMO, the right side looks better... |
Here few more examples, I received from Karl-Göran (CM-SAF). They are related to the following L1b files: NSS.GHRR.NN.D08211.S1251.E1437.B1644445.GC @carloshorn Would it be please possible for you to take a look these scenes? The differences in quality flags are puzzling. |
Yes, I could investigate which PR introduced the change. Could you tell me which version/commit was used to create the "old" images? |
I think the difference between masking and not masking is not the issue here. (That caused some problems too, but as data is flagged in qual_flags this is OK!) Instead it is that even in the case (left) where a lot of data are masked there are still broken data present. So I think it is a new feature that CMSAF wants: Can pygac find and flag additional lines as potentially containing broken data? |
Here is a very simple formula I use in trollcast to check how corrupt a LAC scanline is, in case is helps: qual -= np.sum(abs(np.diff(line['image_data'][:, 4].astype(np.int16))) > 200) It's just checking for then number of unnatural jumps in pixel values within the scanline. |
@ninahakansson, anomaly detection is a serious business. It depends on the level of sophistication how much time it would require to implement it. Furthermore, it would increase the processing time, so I would switch it off as default. |
@carloshorn thats is a good point. Specially if the EUMETSAT GAC FDR data is already processed. In that case anomaly detection in pygac would not help CMSAF with their final processing |
Looking at the bigger picture, noise detection/removal is certainly useful for more data than just AVHRR GAC, so I wouldn't tie such an algorithm to pygac. I think adding a new field flagging for suspicious data to the fdr files would be a great addition though. So somewhere in between we need the noise detection, so it could be either in satpy (or a satpy plugin) or in pygac-fdr. |
No doubt, the problem is that there are still pixels with quality issues! |
Just want to say that the last example in the list is probably quite OK. It is just an example of a large contrast in brightness temperatures that actually may appear naturally (sharp temperature contrast between ocean and Galapagos islands. These kind of very warm targets can also be caused by corrupt pixels and then they might be difficult to separate from true very warm targets. |
I just want to give you some more background information to why this issue was raised. The thing is that we have a few algorithms used to create the CM SAF CLARA data record that are based on statistical methods. One such method is the probabilistic cloud detection method (denoted CMa-prob) based on Bayesian discrimination theory. Such a method needs to be trained with real data. This was done earlier for the CLARA-A2 data record (in principle based on data from the old pygac versions). But now, in preparation for CLARA-A3, the method has been trained with data from the latest pygac version. Since the masking of data has now been removed (as exemplified by images) the contribution to the statistics from corrupt data increased considerably in the latest training sessions. This was how this story was raised. So the main problem is that problematic AVHRR data is not always accompanied with quality flags which means that methods based on statistical training is vulnerable to such data. This vulnerability increased a lot with the introduction of the latest pygac version (without the masking of data which we had before). |
The old version was pygac-1.2.0.dist-info (if I have understood it correctly). |
Thanks @kgkarl!
@mraspaud, this was also my intention. I would vote for a general noise handling plugin in satpy. As a simple use-case, think about someone who just wants a picture, not necessarily in the scientific context, without noise or missing lines. It would be nice to have a noise removal and maybe also an inpainting library attached to satpy, which as a by-product would provide some level of noise detection. |
@kgkarl KG, Thanks for chipping in and explaining the background. |
While refactoring the creation of the corrupt mask, I introduced a bug. |
Closing this as it has been fixed and merged in #91 |
The CLARA team noticed that the masking of scanlines in pygac has changed since an earlier version. I suspect this didn't happen on purpose. In the PR history I only found a refactoring (#72) that shouldn't have changed the behaviour.
@carloshorn @abhaydd IIUC you have already started discussing this. If that is indeed a bug, could you please continue your discussion here? Then we have a proper record of it.
Left: Older version. Right: Current version
The text was updated successfully, but these errors were encountered: