next up previous [pdf]

Next: sfrtoc: Convert real data Up: Main programs Previous: sfrm: Remove RSF files

sfrotate: Rotate a portion of one or more axes in the data hypercube.

sfrotate < in.rsf > out.rsf verb=n memsize=sf_memsize() rot#=(0,0,...)

int memsize=sf_memsize() Max amount of RAM (in Mb) to be used
int rot#=(0,0,...) length of #-th axis that is moved to the end
bool verb=n [y/n] Verbosity flag

sfrotate modifies the input dataset by splitting it into parts and putting the parts back in a different order. Here is a quick example.

bash$ sfmath n1=5 d1=1 n2=3 d2=1 output=x1+x2 > test.rsf
bash$ < test.rsf sfdisfil
   0:             0            1            2            3            4
   5:             1            2            3            4            5
  10:             2            3            4            5            6
Rotating the first axis by putting the last two columns in front:
bash$ < test.rsf sfrotate rot1=2 | sfdisfil
   0:             3            4            0            1            2
   5:             4            5            1            2            3
  10:             5            6            2            3            4
Rotating the second axis by putting the last row in front:
bash$ < test.rsf sfrotate rot2=1 | sfdisfil
   0:             2            3            4            5            6
   5:             0            1            2            3            4
  10:             1            2            3            4            5
Rotating both the first and the second axis:
bash$ < test.rsf sfrotate rot1=3 rot2=1 | sfdisfil
   0:             4            5            6            2            3
   5:             2            3            4            0            1
  10:             3            4            5            1            2
The transformation is shown schematically in Figure 2.

rotate
rotate
Figure 2.
Schematic transformation of data with sfrotate.
[pdf] [png] [xfig]


next up previous [pdf]

Next: sfrtoc: Convert real data Up: Main programs Previous: sfrm: Remove RSF files

2012-07-19