Boolean masks are often used to 'filter' the values of arrays, based on some logical criteria (e.g. negative or positive values). Using a mask is a two-step process:
Starting with this TOOL object newDwellings[dt,t]
the mask is created with this code
maskPositive[dt,t] = boolge (newDwellings[dt,t], 0)
and applied
newDwellingsPos[dt,t] = newDwellings[dt,t] * maskPositive[dt,t]
to produce
Note that the mask can be easily inverted by subtracting it from one
maskNegative[dt,t] = 1 - maskPositive[dt,t]
examplebooleanmask.t is the self-contained TOOL script for this example.