next up previous [pdf]

Next: sfmath: Mathematical operations on Up: Main programs Previous: sfinterleave: Combine several datasets

sfmask: Create a mask.

sfmask < in.rsf > out.rsf min= max= min= max=
Mask is an integer data with ones and zeros. 
Ones correspond to input values between min and max.

The output can be used with sfheaderwindow.

int max= maximum header value
int min= minimum header value

sfmask creates an integer output of ones and zeros comparing the values of the input data to specified min= and max= parameters. It is useful for sfheaderwindow and in many other applications. Here is a quick example:

bash$ sfmath n1=10 output="sin(x1)" > sin.rsf
bash$ < sin.rsf sfdisfil
   0:             0       0.8415       0.9093       0.1411      -0.7568
   5:       -0.9589      -0.2794        0.657       0.9894       0.4121
bash$ < sin.rsf sfmask min=-0.5 max=0.5 | sfdisfil
   0:    1    0    0    1    0    0    1    0    0    1


next up previous [pdf]

Next: sfmath: Mathematical operations on Up: Main programs Previous: sfinterleave: Combine several datasets

2012-07-19