Closed heptaflar closed 3 years ago
Meanwhile, I fixed a bug and found another potential improvement. I also tested essentially the same code on my branch of the S3TBX OLCI Atmospheric correction, where I needed an operator, which computes cloud buffer and cloud shadow only.
I also tested this code. Seems to work well,
The result is different to the master. There are now some more cloud_shadow pixels. Performance improvements is negligible. 2 seconds faster when running 1370 seconds overall.
While copying a lot of the OLCI cloud shadow code to my OLCI AC branch, I found many small (potential) optimisations and also cleaned up the code a bit. Not sure, however, if the optimisations have a measurable effect.
I reduced the number of calls to computationally relatively expensive trigonometric functions to 1/4, eleminated all calls to the also expensive pow() and avoided calls to tile.getSample() methods whenever possible. I further rearranged all loops to follow the 'first y then x principle'. Open for review.