Changes between Version 2 and Version 3 of other/gmt
- Timestamp:
- 10/22/09 14:15:05 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
other/gmt
v2 v3 1 Using the GMT imaging software for 2D plots 1 === Using the GMT imaging software for 2D plots === 2 2 3 3 Graphical output from PEPC can be created using the postprocessor slicer, … … 8 8 9 9 The particle data is assumed to be in the form of the PEPC dump file: 10 10 {{{ 11 11 x, y, z, px, py, pz, q, m, Ex, Ey, Ez, potential, owner, plabel 12 }}} 12 13 13 14 The postprocessor program slicer.f90 is in the tools directory. To (re)compile it, use: 14 15 {{{ 15 16 > make clean 16 17 > make slicer 17 18 }}} 18 19 The input files read by this program from the run directory are: 19 20 {{{ 20 21 grid_defs.in 21 22 dumps/parts_info.TTTTTT 22 23 timestamps 23 24 }}} 24 25 where TTTTTT is the snapshot timestep. This should be entered in the timestamps file, 25 26 which may contain a snapshot series. If timestamps is empty, a new one will be generated by … … 32 33 so care should be taken not to alter the order or integer/float representation of the numbers. 33 34 The variable names in front of the equals sign can be changed, however. 34 35 {{{ 35 36 n= 1000000 # particles to process 36 37 ngx= 200 # grid points in x … … 105 106 106 107 iskip3d=1 108 }}} 109 The slicer program can be used on its own to generate gridded data: these subsequently appear in a subdirectory TTTTTT corresponding to the to parts_info.TTTTTT. 107 110 108 The slicer program can be used on its own to generate gridded data 109 - these subsequently appear in a subdirectory TTTTTT corresponding to the to parts_info.TTTTTT. 111 Tips:[[BR]] 112 1. Make sure the grid lengths (ie: xmax-xmin etc.) are easily divisible by the number of mesh points (ngx).[[BR]] 113 2. Use a coarse grid to start with (eg 100x100x50) and refine later.[[BR]] 114 3. For quick previews, reduce the number of particles read in.[[BR]] 110 115 111 Tips:112 113 1. Make sure the grid lengths (ie: xmax-xmin etc.) are easily divisible by the number of mesh points (ngx).114 2. Use a coarse grid to start with (eg 100x100x50) and refine later.115 3. For quick previews, reduce the number of particles read in.116 116 117 117 For convenience, a number of scripts are made available which combine the slicer output 118 119 120 118 with command-line graphics tools from the GMT (Generic Mapping Tools) package. 119 The latter is assumed to be installed locally under $HOME/gmt, with the appropriate environment 120 (GMTHOME) and path variables set. If not, it is freely available from 121 121 122 http://gmt.soest.hawaii.edu/ 122 [http://gmt.soest.hawaii.edu/] 123 123 124 124 The postprocessing scripts are located in pepc/bin and have the form: 125 125 {{{ 126 126 make_density 127 127 make_snaps 128 128 }}} 129 129 etc. Calling a script without parameters will usually result in a help message, for example: 130 130 {{{ 131 131 > make_snaps 132 132 Call parameters: run# runpp/nopp plot/noplot 133 133 > 134 134 }}} 135 135 First, the script checks whether the particle data have already been merged from 136 136 the 'pe' directories. If so, there will be a large file in dumps/parts_dump.TTTTTT … … 141 141 142 142 The make_snaps script will produce snapshots for the whole sequence given in the timestamps 143 144 143 file, eg: suppose the timestamps file contains: 144 {{{ 145 145 000100 146 146 000200 147 147 000300 148 148 }}} 149 149 Then: 150 150 {{{ 151 151 > make_snaps disc1 runpp plot 152 152 }}} 153 153 will perform the postprocessing and produce plots at timesteps 100, 200 and 300. 154 155 156 157 158 154 The first parameter is an arbitary run label which will get stamped on the corner of the 155 plots together with the date for identification purposes. Use the runpp option the first 156 time you generate grid data, or if you change any parameters in the grid_defs.in file. 157 Otherwise, nopp will use the available data and jump straight to the graphics tools. 158 The noplot option can be used to suppress postscript image generation (postprocess only). 159 159 160 160 161 161 The plots are in high-quality postscript format and are placed in subdirectory pepc/plots/. 162 163 164 165 162 A compressed tar file images.tar.gz containing all plots is also generated by the script. 163 Fine-tuning of the plots can be done by editing the scripts - make_snaps, etc. 164 This will require some knowledge of the GMT package, which is comprehensively documented 165 in GMT_Docs.pdf and GMT_Tutorial.pdf from the distribution.