%!PS-Adobe-2.0 EPSF-2.0 %%Title: Robson Constrast Sensitivity Chart for Kodak Dye Sub with 8.5x12" paper %%Creator: Izumi Ohzawa, Ph.D. izumi@pinoko.berkeley.edu %%CreationDate: Wed Oct 2 15:23:29 PDT 1996 %%Pages: 0 0 %%BoundingBox: 0 0 612 792 %%Orientation: Portrait %%EndComments % Use the following bounding box for 35mm slide size for the line above % %%BoundingBox: 0 0 528 792 % Use the following bounding box for Letter size for the line above % %%BoundingBox: 0 0 612 792 % Use the following bounding box for A4 size for the line above % %%BoundingBox: 0 0 595 841 % ========================================================================================== % Copyright 1996, Izumi Ohzawa. % You may freely distribute and modify this PostScript program for any % purpose as long as this copyright notice and the following references % are retained in the distribution. % References: % [1] Campbell, F. W. and Robson, J. G. (1968) Application of Fourier analysis to the % visibility of gratings. Journal of Physiology (London) 197: 551-566. % % [2] Ratliff, F. (1965) "Mach Bands: Quantitative studies on neural networks in the % retina." Holden-Day, San Francisco, CA. (see Fig. 4.12, p. 156). % % [3] Cornsweet, T. N. (1970) "Visual Perception" Harcourt Brace Jovanovich Publishers, % Orlando, FL. (see Fig. 12.21, p. 343) % % [4] Julesz, B.(1980) Spatial-frequency channels in one-, two-, and three-dimensional % vision: variations on an auditory theme by Bekesy. In: "Visual coding and % adaptability" Edited by Harris, C. S., Lawrence Erlbaum Associates, Inc. % Hillsdale, NJ. pp. 263-316. (see Fig. 6, p. 271). % [5] Pelli, D. G. (1987) Programming in PostScript: imaging on paper from a methematical % description. Byte 12: 185-202. % ========================================================================================== % Usage Notes: % % [0] On a Kodak DS 8650 PS dye sublimation printer, it takes 5 minutes of computing time % before the printing mechanism starts moving. % % [1] This PostScript file is intended to be imaged on a continuous-tone output devices, % e.g., on computer displays of systems that run DPS (Display PostScript), Ghostscript, % and dye sublimation printers. Don't try to print to a typical laser printer, % or you will be disappointed. Dithered 600 dpi in printers like HP Laser Jet % just isn't enough. Linotype phototypesetter may work in a high DPI mode. % % [2] You will need a level-2 PostScript interpreter. % % [3] Although this is an EPS (Encapsulated PostScript) file, it may be sent to a % level-2 PostScript printer directly (i.e., it may safely be renamed to *.ps). % The file may also be imported into other documents % using a wordprocessor or a DTP application. Because most PC and Mac apps are % incapable of interpreting PostScript programs, this file will be displayed only as % a rectangle, often with some of the header information (e.g.,the %%Title line). % However, such document will print fine as long as you print it to a PostScript % printer. If your app complains that this is not a valid EPS file, blame the % app developer. % If you must have WYSIWYG, use a real computer or bit-map files created % from this file. TIFF, GIF, JPEG versions should be available from: % http://totoro.berkeley.edu/teaching/AA_teaching_aids.html % % [4] The image data are entirely generated by this PostScript program within the printer. % Therefore, there may be a long delay before anything is printed. % % [5] To do: The "image" operator for level-2 PostScript can take 12-bit sample values % to specify lower contrast values. If there actually are graphics systems and % printers that can physically render 12-bit gray scales, it should be extended. % The current version uses 8-bit per sample image, therefore the default lowest % contrast of 0.5% cannot really be generated. % % Note to self: EPS -> WetPaint: conv to 8-bit gray, remove alpha, save as LZW tiff. % ToyViewer: (opt. rotate -90), save as interlaced GIF. % ========================================================================================== % Configurable Parameters % ========================================================================================== % ##### DPI (dot per inch) value. Modify below to suit your printer/display device. % /DPI 72 def % Dots per inch (NS/OS maps 1 point to a pixel) /DPI 300 def % For Kodak 86x0 PS and Tektronix Phaser 440, 480X dye sub printers % /DPI 100 def % For Kodak 86x0 PS and Tektronix Phaser 440, 480X dye sub printers % ##### Spatial frequency Range definitions /NcycLow 1 def % lowest freq in # of cycles per paper length (fractional values OK) /NcycHigh 144 def % highest freq in # of cycles per paper length (fractional values OK) % I don't understand. NcycHigh should be higher.... % You may use a higher NcycHigh for printing to a dye sub. printer or if you generate % a higher-resolution bitmap. % ##### Contrast range definitions /CT_low 0.003 def % lowest contrast = 0.3% /CT_lowcut 0.0045 def % force contrast below this to 0 /CT_high 1.0 def % highest contrast = 100% /NCTsteps 200 def % number of contrast steps % Standard length unit definitions /inch { 72.0 mul } bind def % for obstinate Americans /cm { 28.3464567 mul } bind def % centimeter for all others % ##### Paper/Display/Film dimension definitions % Enable one of the following sizes, use the appropriate %%BoundingBox % in the top header block. % Letter size -- %%BoundingBox: 0 0 612 792 /Xsize { 8.5 inch } bind def % width /Ysize { 11 inch } bind def % height % A4 -- %%BoundingBox: 0 0 595 841 % /Xsize { 21 cm } bind def % width % /Ysize { 29.7 cm } bind def % height % 35mm Slide size -- %%BoundingBox: 0 0 528 792 % /Xsize { 7.3333 inch } bind def % width % /Ysize { 11 inch } bind def % height % ========================================================================================== % No user serviceable part below this line. % ========================================================================================== /Xstripwidth Xsize NCTsteps div def % length of grating bars /numlines DPI Ysize 72 div mul cvi def % render chirp sinwave using this many lines /DataString numlines string def % Multiplying factor per step for sweeping contrast. % /CTbump 1.0544119 def % 1.0544119 = (1/0.005)^(1/100), for 100 steps /CTbump CT_high CT_low div 1 NCTsteps div exp def % Increase spatial frequency by this factor for each point. /SFbump NcycHigh NcycLow div 1 numlines div exp def %%EndProlog % %%%%%% Execution begins here %%%%%% /Contrast CT_low def % initialize contrast to the lowest value % ===== Enable only for Kodak dye sub with 8.5x12 inch paper (for letter size print area). 0.3 0.5 inch translate % move up 0.5 inch for Kodak 8650 with 8.5 x 12 inch paper NCTsteps { /Contrast Contrast CTbump mul def % increase contrast by a constant factor Contrast dup CT_lowcut lt % 8-bit linear can't make it anyway, so { pop 0.0 }if /CTused exch def % cheat and set CT below CT_lowcut to 0 /currentSF NcycLow numlines div def % intialize to base lowest SF % Fill DataString with swept-frequency sine wave data 0 1 numlines 1 sub { DataString exch dup % string index index currentSF dup SFbump mul % string index index currentSF newSF /currentSF exch def % string index index currentSF mul % string index (index*currentSF) 360 mul sin % string index sin(index*currentSF*360) 127.4 mul % string index 127*sin(index*currentSF*360) CTused mul 128 add cvi % string index 128+ Contrast*127*sin(index*currentSF*360) put % store value in DataString at index } for gsave Xstripwidth Ysize scale % map unit image to this size rect 1 numlines 8 [1 0 0 numlines 0 0] { DataString } image % this lays down bitmap grestore Xstripwidth 0 translate % move over to next strip position } repeat showpage % is allowed in EPSF %%Trailer