Statistical button on Request Builder

I have some problems with the behavior of the GUI of the Request Builder:

When I insert some evalscript, the I click in the Statistical button in order to add some calculation (and I can configure this calculation perfectly), then I am seeing that the evalscript have changed to some default script that isnt my script that I had wrote before. For this reason I cant run scripts with the calculation feature.
Maybe I am doing something wrong! Can you help me?

Thank you! Regards!

FeR -

1 Like


The buttons on the top under Select API behave as a menu buttons - similarly as menus on more conventional webpages.
The evalscripts that achieve same thing can be very different between APIs, so we didn’t think it would be benefitial to remember the evalscripts when user selects a different API.

Hope that helps. Don’t hesitate to ask another question if you get stuck!


Hi Ziga:

Thank you for your response, now I understand the idea. But I want to ask again for a particular situtation.

My idea is to prepare a script that configures an image/s as an output (or multiple outputs) and in this same script configure and execute some calculations (histograms, statitistics). For this reason I need to change the view pushing these buttons (because in the Process view I can configure the output format file and in the Statistical view I can configure these calculations) and at that moment, I lose my first script and the request not match with my original idea (ROI, window time,etc).

In order to implement this idea, is this approach correct or I am doing something that is out of the straightforward way?

Could you give me some example similar to this idea?

Thank you for your support! Regards :+1:

FeR -


You can copy&paste the script and modify it so that it’s suitable for both Process API (for getting images) and Statistical API (for getting statistics). Although this is not always possible because Statistical API has some additional specifics (the strictest of them is that evaluatePixel() must also return dataMask).
In general we advise to use 2 evalscripts (one for Process API and one for Statistical API) to keep them simple.

Here is the documentation for Statistical API to help you decide if it’s possible to do everything in one evalscript in your case.

1 Like