Top Up Prev Next Bottom Contents Index Search

2.11 Preparing Lab Reports

2.11.1 Signal Plots

Choose the signals that you wish to plot carefully. Do not print plots of signals that bear no information. Combine plots that you wish to compare, and avoid combining plots that are incomparable (for example, signals that have different units). To combine plots, note the following icon at the upper right corner of the "Signal Sinks" palette in the SDF domain:

Look inside to see:

These icons permit you to break out a block with a generic "multi-input" into some specific number of identifiable inputs. To use them, place a dot on a terminal with a double arrow icon, place the cursor over the desired icon in the above palette (the one with the appropriate number of inputs), and type "c". Thus, for example, the SDF XMgraph block can be set up to accept four inputs signals as follows:

These icons are examples of "higher-order functions" in Ptolemy, explained in a later chapter.

2.11.2 Printing Schematics

Schematics should be printed using the "print-facet" command (control-P). You must first save the facet. Do this by moving the mouse to the facet and press the "S" key to save.You get the following dialog box:

There are a number of options. If you have a postscript printer, you can print directly to the printer. If you have the program ps2epsi in your path (part of the ghostscript distribution, available on the software warehouse), then you can print to an encapsulated postscript file, which can then be imported into many word processors. The figures in this document were created this way, by importing epsi or postscript into FrameMaker. If you have neither a postscript printer nor ps2epsi, you can use an X window dump. The program xwd will create a file that may be importable into various programs (such as drawing programs). If you must use xwd, you should start pigi (or ptiny) with the -bw option to get a white background.

You should show on your schematics any parameter values that differ from the defaults. For lab reports, it may be easiest to just write on your printout, annotating it with comments and parameter values. Alternatively, you can enter text directly onto the schematic using the "edit-Label" command (place a point and type "E"). Below is an example of a well-annotated schematic:

More information about labeling is given below.

2.11.3 Importing a PostScript image

For example, to include a PostScript file in a TeX document, include the command

\include{psfig} in the TeX file and use the commands

\begin{figure} \centerline{ \psfig{,width=4in,height=2in}} \caption{Ptolemy Schematic} \end{figure} to display the PostScript as a figure within a document.

You can also include a PostScript file in a FrameMaker document. Encapsulated postscript can be imported directly. Alternatively, an ordinary postscript file can be included. First, create a disconnected text column using the graphics tools. Then, put in the text box a #include line. For example, the text box might contain the following line:

#include /users/ptolemy/doc/users_man/figures/ Unfortunately, the file must be specified using an absolute path, unless you always start FrameMaker from the same directory. With the cursor in the newly created text column, issue the command "Flow" in the "Format" menu, and select "PostScript code." When you print the document, you will get the following graphic:

The graphic will be anchored at the lower left of the text column you created.

It is possible, instead of using the #include line as above, to directly import the PostScript file into FrameMaker. However, this makes the text document very large, and the FrameMaker process appears to grow in size uncontrollably. Unfortunately, as of this writing, it does not appear possible to convert these PostScript files to encapsulated PostScript, which would have the advantage of displaying a semblance of the image.

2.11.4 Importing an Image as a X bitmap (XBM)

FrameMaker and some other text processing systems can import and print ordinary color X window dumps. To have these displayed in color on the screen, the following lines may need to appear in your X resources file:

Maker.colorImages: True Maker.colorDocs: True One can use various programs, such as the FrameMaker 3.1 utility fmcolor and the Poskanzer Bitmap (PBM) tools to reduce a color window dump to a black and white window dump. This will save space and avoid any dithered imitations of color. However, since fmcolor applies a threshold based on color intensity to the image, some foreground colors may get mapped to white instead of black. To prevent this, use the -cp (cp stands for color printer) command line option when starting pigi, as in

pigi -cp Then color window dumps can be converted to black and white window dumps using the following FrameMaker 3.1 command:

fmcolor -i 90 filein fileout A useful hint when using such a document editor is to turn off the labels in pigi before capturing the image, and then to use the document editor itself to annotate the image. The fonts then will be printer fonts rather than screen fonts. To turn off the labels, execute the vem command "layer-display" under the vem "Options" menu.

Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.