TABLE OF CONTENTS
- Step 1: Snap the Calculator block into place
- Step 2: Select your variables
- Step 3: Build your expression
The Calculator block is in the Toolbox under ANALYSE->CALCULATE.
This is a very powerful block that allows you to enter your own algorithmic expression and apply it to any of the available bands.
To use the Calculator, follow these steps:
Step 1: Snap the Calculator block into place
- The Calculator block can be placed before or after a Collate Images in Time block.
- If it is before, it will execute the arithmetic expression on each image collected, and then it will collate the results. If after, it will apply the expression to the combined image.
- Here is an example workflow with a calculator block in place:
Step 2: Select your variables
- Click on the edit icon (the pen) to open the dialogue box.
- The following window will appear:
- The first thing you need to do is define your variables.
- Click on ADD NEW VARIABLE + .
- A row will appear with drop-down menus for each column.
- Select from the available datasets in the drop-down.
- To include datasets not made within this workflow, use the Re-use This Saved Dataset block to make it available in this drop-down list for this workflow.
- If you add a second calculator block within a worklow, you will see any bands that you have saved in previous calculator blocks.
- You have the choice of using All Dates or just selected dates.
- If you toggle All Dates on and off, you can deselect everything (but you must select at least one date).
- At the bottom of the list you will see the option to Transform the data, aggregating all the dates into one composite (with a further option to select the averaging method).
- All the available bands will be shown.
- If you toggle All Properties on and off, you can deselect everything (but you must select at least one band).
- At the bottom of the list you will see the option to Transform the data, aggregating all the bands into one band (with a further option to select the averaging method).
- Choose the name of the band so you can refer to it in the arithmetic expression. Simple names are best.
- This is the name you need to use in the expression (see Step 3 below).
- The dustbin icon will delete the row.
- The + button adds the variable to the expression window below.
Step 3: Build your expression
- Create your arithmetic (band math) expression within the box.
- You can type the NAME of the variables you chose above, or you can use the + button to add them to the box.
- You can click on the operator buttons to add them to the expression or you can just type them.
- The Check Expression button will check to ensure your syntax is correct (e.g. the right number of open and closed brackets).
- When you click SAVE the expression will be checked automatically and inform you if it is invalid.
- Finally, give the output a name, and select whether this is to be a band (available within the workflow) or a new dataset (which can be seen in other workflows as well).
- Click SAVE.
Was this article helpful?
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
We appreciate your effort and will try to fix the article