The avf2ps utility creates a collection of color Encapsulated PostScript files from a collection of vector field files (e.g., .omf, .ovf), which can be embedded into larger PostScript documents or printed directly on a PostScript printer. Operation of the avf2ps command is modeled after the avf2ppm command and the print dialog box in mmDisp.
Launching
The avf2ps launch command is:
tclsh oommf.tcl avf2ps [standard options] [-config file] [-f] \ [-filter program] [-ipat pattern] [-opatexp regexp] [-opatsub sub] \ [-v level] [infile ...]where
(\.[^.]?[^.]?[^.]?$|$)
.eps
.
The file specification options, -ipat, -opatexp, and -opatsub, are interpreted in the same manner as for the avf2ppm application.
If you have command line PostScript processing ``filter'' programs, e.g., ghostscript, then you can use the -filter option to pipe the output of avf2ps through that filter before it is written to the output file specified by the -opat* expressions. If the processing changes the format of the file, (e.g., from PostScript to PDF), then you will likely want to specify a -opatsub different from the default.
Here is an example that processes all files with the .ovf extension, sending the output through ps2pdf (part of the ghostscript package) before saving the results in files with the extension .pdf:
tclsh oommf.tcl avf2ps -ipat *.ovf -opatsub .pdf -filter "ps2pdf - -"On Unix, either drop the -ipat flag, or use quotes to protect the input file specification string from expansion by the shell, as in -ipat '*.ovf'.
Configuration files
The details of the conversion process are specified by plain-text
configuration files, in the same format as the
mmDisp configuration file.
The arrays plot_config and print_config hold the configurable parameters. The default values for these arrays are read first from the main configuration file
oommf/app/mmdisp/scripts/avf2ps.configfollowed by the local customization file
oommf/app/mmdisp/scripts/local/avf2ps.configif it exists. Lastly, any files passed as -config options on the command line are input. Each of these parameters is interpreted as explained in the mmDisp documentation, except that avf2ps ignores the misc,defaultwindowwidth and misc,defaultwindowheight parameters, and the following additional parameters are available:
The default configuration file can be used as a starting point for user configuration files. You may also use configuration files produced by the File|Write config... command in mmDisp, although any of the above avf2ps-specific parameters that you wish to use will have to be added manually, using a plain text editor. You may omit any entries that you do not want to change from the default. You may ``layer'' configuration files by specifying multiple user configuration files on the command line. These are processed from left to right, with the last value set for each entry taking precedence.
array set plot_config { arrow,status 1 misc,background #FFFFFF arrow,antialias 1 misc,drawboundary 1 arrow,colormap Red-Black-Blue misc,boundarywidth 1 arrow,colorcount 100 misc,boundarycolor #000000 arrow,quantity z misc,boundarypos front arrow,colorphase 0 misc,matwidth 0 arrow,colorreverse 0 misc,matcolor blue arrow,autosample 1 misc,margin 10 arrow,subsample 10 misc,width 640 arrow,size 1 misc,height 480 arrow,viewscale 1 misc,crop 1 arrow,boundarywidth 0.0 misc,zoom 0 arrow,boundarycolor #000000 misc,rotation 0 arrow,outlinewidth 0.0 misc,datascale 0 arrow,outlinecolor #000000 misc,relcenterpt {0.5 0.5 0.5} pixel,status 1 viewaxis +z pixel,colormap Teal-White-Red viewaxis,xarrowspan {} pixel,colorcount 100 viewaxis,xpixelspan {} pixel,opaque 1 viewaxis,yarrowspan {} pixel,quantity x viewaxis,ypixelspan {} pixel,colorphase 0 viewaxis,zarrowspan {} pixel,colorreverse 0 viewaxis,zpixelspan {} pixel,autosample 1 pixel,subsample 0 pixel,size 1 } array set print_config { orient landscape tmargin 1.0 paper letter lmargin 1.0 hpos center pwidth 6.0 vpos center pheight 6.0 units in croptoview 1 }