Hi, Kirk-
That kind of syntax is the way to go, yes. But please note that if you have integers in your data set, then having:
3dcalc -a FILENAME -expr 'step(a-40)' -prefix NEWMASK
will actually only make a mask where the original values were *greater than* 40, and not include 40 itself. If you really want 40 and above for integers, I would write:
3dcalc -a FILENAME -expr 'step(a-39)' -prefix NEWMASK
For floating point numbers, the difference might not matter of including *exactly* 40.0000000 vs 40.0000001.
--pt