Overview
The Raster Calculator in VRIFY Explore applies a mathematical expression to one or more rasters and saves the result as a new raster. Expressions can use arithmetic, comparisons, logic, and functions such as min, max, and if.
Use it to prepare a raster before a data augmentation module, or to combine and adjust module outputs afterward.
It works with any raster. It is most often used with geochemistry data, such as rock chemistry gridded maps (from the Gridded Maps module or your own interpolation, such as soil samples), and with radiometric data.
You can use the Raster Calculator to:
Calculate ratios. Ratios can reveal geological patterns that individual rasters cannot. For example, a radiometric survey gives you separate rasters for potassium (K), equivalent thorium (eTh), and equivalent uranium (eU). Ratios between them, such as K/eTh or eU/eTh, can tell you more about the geology than any single element. Ratios also work well with Gridded Maps built from geochemistry data.
Combine rasters. Add rasters together to enhance coverage. This helps when different datasets express the same structure in different parts of your Area of Interest (AOI). For example, you could add two Lineament Density rasters from different input datasets to create one raster that covers your whole AOI.
Average rasters. Average several versions of the same raster. Areas where all rasters agree will be enhanced relative to where only some agree.
Clip, threshold, or transform values. Cap extreme values with
minormax, keep only values above a threshold withif, or log-transform skewed data withlog10orln. For example,if(raster_1 > 100, raster_1, 0)keeps values above 100 and sets everything else to 0.
Step by Step Instructions
Add a Select Rasters Step
Add a Select Rasters input data step to the canvas.
Select Your Rasters
Open the Select Rasters step and select the rasters you want to use.
Click Apply selection.
Add the Raster Calculator Step
Under Transform, add a Raster Calculator step to the canvas.
Connect it to the Select Rasters step. You can also connect it to any step with raster outputs, such as a data augmentation module.
Build Your Calculation
Under Input rasters, click a raster to insert its variable name (for example,
raster_1) into the Expression field.Click an operator button to add arithmetic (+ − × ÷ ^), a comparison (> ≥ < ≤ = ≠), or logic (and, or, not). You can also type operators directly. Use
*,/, and^when typing. You can also type**for powers,==for equals, and!=or<>for not equals.To add a function, click its button under Functions. The function is inserted with the cursor between the parentheses, ready for its values. If text is selected in the field, the function wraps it.
Open Function reference to see each function's syntax, a description, and an example. Click an example to insert it.
If the expression has a problem, a message appears under the field explaining how to fix it, and the problem character is highlighted.
Expressions are limited to 2,000 characters.
Run the Calculation
Click Run calculation. The button stays disabled until a raster is connected, the expression is valid, and the expression has changed since the last run. To run an unchanged expression again, click Re-run on the step.
Review the Output
The output is named Raster calculator result by default, but you can edit before saving.
Save or Export the Output
If you are satisfied with the result, select the output and click Apply selection. Then choose how to keep it:
Click Export and choose All Rasters or Selected Rasters to download to your computer. Export does not depend on Apply selection.
To save to DORA, add a Terminal step from the Add Step sidebar on the left and connect it downstream of the Raster Calculator step. It saves only the outputs you selected with Apply selection:
Save to Asset: Click Save Rasters. All users in your organization can use the raster in an experiment.
Save as Draft: Click Save Rasters. The raster goes to your Draft Data folder, and only you can access it.
Available Raster Calculator Functions
Group | Functions | Example |
Min, max & conditional |
|
|
Math |
|
|
Rounding |
|
|
Trigonometry (radians) |
|
|
min and max take two or more values. if takes three: the condition, the value where it is true, and the value where it is false. All other functions take one value. Function names are not case-sensitive.
Additional Notes
The Raster Calculator aligns all input rasters to the finest resolution among them before it runs the calculation.
Nodata pixels (areas with no data, such as outside your survey coverage) stay nodata in the result.
minandmaxignore nodata inputs, andifignores nodata in the value it does not pick.Some functions turn invalid inputs into nodata.
sqrtdoes this for negative values,lnandlog10for zero and negative values, andasinandacosfor values outside −1 to 1.Comparisons and logic return 1 where the condition is true and 0 where it is false.
Learn More
Still Have Questions?
Reach out to your dedicated DORA contact or email support@vrify.com for more information.
