Guide to Madagascar programs |
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 6Rotating 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 4Rotating 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 5Rotating 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 2The transformation is shown schematically in Figure 2.
rotate
Figure 2. Schematic transformation of data with sfrotate. |
---|
Guide to Madagascar programs |