How to write complex algorithms in custom script?

Home > Frequently Asked Questions > How to write complex algorithms in custom script?

By employing the dynamically interpreted JavaScript language, and providing some specialized functions you can combine the bands of multispectral satellite data in unprecedented ways.

Here is an example how to tweak the image with a custom script in case of volcano eruption:

return [
B04*2.5 + Math.max(0,B12-0.1),
B03*2.5 + Math.max(0,B11-0.1),
B02*2.5];

Erupting vulcano

Etna volcano eruption, dated 16. 3. 2017. Image combined from true colour image, overlaid with SWIR bands 11 and 12. (view on Sentinel Playground)

You can find more examples and how to tweak the images for easier detection of Earth surface changes, clouds, snow, shadow, water etc. in our blog post.