| 348 | |
| 349 | [[CollapsibleBegin(Projecting okc files into curve files for plotting particle positions over projections)]] |
| 350 | The awk line selects only odd numbered lines starting at 31 and prints out the 2nd and 3rd fields. This is for projecting along x. To project along y or z, just change {{{$2, $3}}} to {{{$3, $1}}} or {{{$1, $2}}} |
| 351 | Curve and okc files in a database always have to have 1 entry - which in the okc file is 0.0 0.0. The sed just switches these for -100,-100 so they don't appear in the window when projecting. |
| 352 | {{{ |
| 353 | for i in $(ls sinks_*.okc); do |
| 354 | echo "#yz" > $i.x.curve; |
| 355 | cat $i | awk 'NR%2==1 && NR > 30 {print $2, $3}' | sed 's/0.0000000000000000E+00 0.0000000000000000E+00/-100 -100/g' >> $i.x.curve; |
| 356 | done |
| 357 | }}} |
| 358 | Then open the .x.curve files in visit as Curve2D and plot the 'yz' data set (don't plot lines - just points) |
| 359 | [[CollapsibleEnd]] |