![]() |
![]() |
![]() |
![]() | Madagascar tutorial | ![]() |
![]() |
You can skip this section if you are already familiar with Madagascar.
If these are your first experience, let us start with simple steps.
bash$ mkdir first bash$ cd first
bash$ sfmath n1=501 d1=0.004 output=1.5+x1 > vel.rsf
bash$ file vel.rsfto verify that vel.rsf is a ASCII text file. Examine the contents of the file by running
bash$ cat vel.rsfFind a string starting with in=. It should point to the location of the binary file containing the actual data.
bash$ sfin vel.rsfVerify that the reported binary file size in bytes corresponds to the number of elements multiplied by the size of one element (4 bytes for a single-precision floating-point number).
bash$ < vel.rsf sfdisfil | moreWhat is the minimum and maximum value?
bash$ < vel.rsf sfattrNote that you can run any of the Madagascar programs (sfmath, sfin, sfdisfil, sfattr) on the command line without parameters to display their brief documentation. For examine, run
bash$ sfattrto figure out what parameter to give to this program to display only the maximum value of the input data.
bash$ < vel.rsf sfgraph wanttitle=n \ label1=Time unit1=s label2=Velocity unit2=km/s | sfpen
bash$ sfgraphwithout parameters to figure out which parameter transposes the axes. Generate a new graph.
bash$ gedit SConstruct &Your first SConstruct may contain the following lines:
bash$ scons -nQNote that you can save the output of this command in a Shell script. Running processing flows with SCons scripts rather than Shell scripts is, however, a more powerful method, as we shall see next.
bash$ sconsto build the targets specified in SConstruct: files vel.rsf and vel.vpl. The second file is a figure in Vplot binary format. You can display it on the screen by running
bash$ sfpen vel.vpl
bash$ sconsagain to rebuild the targets.
bash$ sconsand observe that now SCons does not rebuild all the targets but only the target (vel.vpl file) affected by the parameter change. This behavior makes SCons particularly convenient for working with complex workflows and conducting experiments, which require parameter modifications.
![]() |
![]() |
![]() |
![]() | Madagascar tutorial | ![]() |
![]() |