Changes between Version 23 and Version 24 of FrequentQuestions/LinuxFu


Ignore:
Timestamp:
06/21/12 10:50:19 (12 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • FrequentQuestions/LinuxFu

    v23 v24  
    346346
    347347[[CollapsibleEnd]]
     348
     349[[CollapsibleBegin(Projecting okc files into curve files for plotting particle positions over projections)]]
     350The 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}}}
     351Curve 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{{{
     353for 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;
     356done
     357}}}
     358Then open the .x.curve files in visit as Curve2D and plot the 'yz' data set (don't plot lines - just points)
     359[[CollapsibleEnd]]