Date - 2002.11.22-26 Tester - J.E. Hibbard (CV) Platform: Merger Version: Weekly AIPS++ Version 1.8 Build 335 MODIFIED 2002.11.26 5:13:00 EST - FOUND FRAME RATE CONTROL ********************************************************* performance test of aips++ viewer ================================= I sent out an email last week that claimed that karma was 100* faster than aips++ viewer. Kumar challenged this. So will try to document any differences by choosing tasks I commonly employ for visualization. Ralph says to compare memory usage too - but have to account for the fact that karma may use X's memory. Tasks: ====== 1) A. display line data as raster, set transfer function B. movie 3x, stop C. look at spectra at various locations under cursor D. go to channel 43, zoom in, take spectra through peak emission, print out, save datafile E. Measure noise in line-free area 2) A. display optical data as raster, set logarithmic transfer function B. load in continuum image and contour in red on top of optical image C. show line data as blue contours on top of this, movie 3x, stop D. zoom into tail region, movie through relevant channels 3) A. display continuum as raster, set transfer function B. load (or activate) line map, go to each continuum source and look at spectra C. print spectra associated with brightest continuum source Test Data: ========== NGC 4038/9 HI+Optical data can be downloaded from ftp.cv.nrao.edu/NRAO-staff/jhibbard) 2136 N4038CD.CH0.fits Continuum map 1024x1024 16bit/pix 26924 N4038CD.subLMV.fits HI Line cube 275x275x91 32bit/pix 20480 N4038opt.fits Optical data 2311x2265 32bit/pix Testing procedure: ================== First went through each task in karma and viewer separately, writing down each operation to be performed into this file, identifying suitable places to document times, and making any notes. I then logged completely out and back in again, opening only 3 windows - a window for editing this file, a window for running glish/viewer or karma, and a window for typing in "date" or "top". After each specific task, the output from the date command was cut and pasted into this file. I ran through all tasks with karma, then repeated with viewer. Since I did this viewer test second, I compensated by waiting until after the karma test to have my morning coffee. Results: ********************************************************* Karma TASK1: ====== A. display line data as raster, set transfer function start time: 09:49:12 source karma_setenv kview Set1=>N4038CD.subLMV.fits Overlays=>Axis labels=>Display Axis labels, close Intensity=> Pseudocolor, set transfer function, close end time: 09:49:24 elapsed time: 0:12 B. movie 3x, stop start time: 09:49:36 View=>Movie=>Start Movie (movie 3 times), Stop Movie end time: 09:49:46 elapsed time: 0:10 C. look at spectra at various locations under cursor start time: 09:50:42 View=>Profile Mode=>line Profile Window: Overlays=>Axis labels: Display axis labels move cursor around line map end time: 09:50:57 elapsed time: 0:15 D. go to channel 43, zoom in, take spectra through peak emission, print out, save datafile start time: 09:51:50 Animation Control: current frame=43, Goto Frame draw box around southern emission with left mouse button go to peak press space bar Profile Window: Print, outputfile=karma1, save ps, close Profile Window: Save Profile, Filename=karma1.dat, ok end time: 09:52:13 elapsed time: 0:23 E. Measure noise in line-free area start time: 09:53:18 type "u" to unzoom drag out box with left button to zoom into line-free area type "s" end time: 09:53:24 elapsed time: 0:06 Memory usage: (tom,M) PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 20849 jhibbard 15 0 60472 59M 30172 S 0.0 12.1 0:07 kview 1285 root 5 -10 65020 41M 31588 S < 0.9 8.6 1352m X Total memory usage: 20.7% Total elapsed time: 1:06 TASK2: ====== A. display optical data as raster, set logarithmic transfer function start time: 09:56:11 Set2=> N4038opt.fits View Control: Display Mode: Set1=contour, Set2=image Profile Mode: None in kview: type "u" to unzoom Intensity=> Intensity Policy: Intensity Scale=>log(val-min), close Intensity=> Iscale for Dataset2: 99.9%, close Intensity=> Pseudocolor, Reverse, set transfer function to see tail, close end time: 09:56:41 elapsed time: 0:30 B. load in continuum image and contour in red on top of optical image start time: 09:58:59 Overlays=>contours=>continuum levels: 0.003:0.1*2 color red, thickness 2 end time: 09:59:18 elapsed time: 0:19 C. show line data as blue contours on top of this, movie 3x, stop start time: 09:59:56 View: Contour levels: -0.003 0.003:0.1*2 +ve colour=blue apply levels Animation control: current frame:0, goto frame start movie, let run 3*, stop movie end time: 10:01:07 elapsed time: 1:11 D. zoom into tail region, movie through relevant channels (don't time, since viewer can't do this) set box around southern tail with left button, use slidebar in animation control to identify channels with emission (ch20-55) (press middle button and slide back and forth - note how quick this happens!), enter these into Starting Frame, End Frame, Start movie Memory usage: 20849 jhibbard 15 0 129M 129M 30868 S 0.0 26.5 2:08 kview 1285 root 5 -10 65680 42M 32248 S < 0.3 8.7 1352m X Total memory usage: 35.2% Total elapsed time: 2:00 TASK3: ====== (I could do this in karma, but only if I contour channel 0 on top of line datacube. I prefer to see continuum as greyscale, so will use karma program kpvslice instead). A. display continuum as raster, set transfer function start time: 10:05:28 quit kview kpvslice Image=> N4038CD.CH0.fits Overlays=>Axis labels=>Display Axis Labels, close Intensity=>Iscale for Dataset=>99.9%, close end time: 10:05:46 elapsed time: 0:18 B. load (or activate) line map, go to each continuum source and look at spectra, plot spectra through brightest source start time: 10:07:11 New Cube=>N4038CD.subLMV.fits Slice Window: Z-profile Z-profile Window=>Overlays=>Axis labels, Paper colors, display axis labels, close in window, zoom in to region of source and nearest 3 continuum sources. Put cursor around each in turn. Put cursor on brightest source (SE), press spacebar to freeze spectra Z-profile Window: Print=>Output file=karma2, save .ps, close Z-profile Window: Save Profile=>Filename karma2.dat, ok end time: 10:07:44 elapsed time: 0:33 Memory usage: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 20882 jhibbard 15 0 38404 37M 3900 S 0.0 7.7 0:03 kpvslice 1285 root 5 -10 38744 16M 5312 S < 1.1 3.3 1352m X Total memory usage: 11.0% Total elapsed time: 0:51 ********************************************************* Aips++ Viewer TASK1: ====== A. display line data as raster, set transfer function start time: 10:18:53 source /aips++/weekly/aipsinit.csh viewer Data Manager: N4038CD.subLMV.fits=>Raster Image set transfer function using middle button end time: 10:19:28 elapsed time: 0:35 B. movie 3x, stop [** WHEN I INITIALLY DID THIS, I DIDN'T REALIZE THAT THE FRAME RATE WAS CONTROLLED BY A BUTTON UNDER THE VCR CONTROLS. SETTING THAT TO A HIGHER NUMBER SPEEDS THE MOVIE UP SIGNIFICANTLY. LATER TIMES INDICATE THIS CHANGE. WAIT - SOMETHING SCREWY. ISN'T POSSIBLE TO CYCLE THROUGH A 91 CHANNEL CUBE 3 TIMES AT 10 FRAMES/SEC IN 10SEC. COULD NOT REPEAT THAT NUMBER. I THINK THAT PERHAPS THE DISPLAY WAS STUCK ON 25 FPS, EVEN THOUGH I MOVED IT BACK T0 10. REDID FROM SCRATCH AT 25 FPS **] start time: 10:21:57=> 13:53:50 => 16:30:28 press > beneath VCR controls Frame rate=> 10?? => 25 press green up-arrow on VCR control, movie 3 times, press red square end time: 10:23:09=> 13:54:00 => 16:30:59 elapsed time: 1:12=> 0:10 => 0:31 C. look at spectra at various locations under cursor start time: 10:25:50 Tools=>Image Analysis=>Positions=>autoplot Display panel: click right button on bullseye PGPlotter: change GHZ on x-axis to km/s move cursor around line map with right button depressed end time: 10:26:10 elapsed time: 0:20 **NOTE: DELAY BETWEEN MOVING CURSOR WITH BUTTON DEPRESSED AND SEE RESULTING SPECTRA PLOTTED IS VERY NOTICEABLE; MUCH MORE SO THAN KARMA** D. go to channel 43, zoom in, take spectra through peak emission, print out, save datafile start time: 10:29:09 VCR Control: type 43, return draw box around southern emission with left mouse button, double click go to peak press right button PGPlotter: type viewer1.ps in space, press Print PGPlotter: type viewer1.dat in space, press Save date5:Mon Nov 25 15:17:15 EST 2002 end time: 10:29:37 elapsed time: 0:26 **NOTE!! THIS DOES NOT SAVE PLOT DATA AS ASCII FILE, BUT AS AN AIPS++ PLOT FILE!! I ASKED, BUT THERE IS NO EASY WAY TO CONVERT TO ASCII LISTING OF DATA. ENTERED AS ENHANCEMENT REQUEST AOCso04138. GM SENT WORK-AROUND GLISH, BUT WOULD PROBABLY TAKE TOO LONG AND AFFECT THE TIMING RESULTS, SO I HAVEN'T DONE THAT** E. Measure noise in line-free area start time: 10:31:18 unzoom Analysis: statistics drag out region with right button, double click end time: 10:31:28 elapsed time: 0:10 Memory usage: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 21004 jhibbard 15 0 26012 25M 2376 S 0.3 5.2 0:17 glish 21037 jhibbard 15 0 24552 23M 12312 S 0.0 4.9 0:27 glishtk 1285 root 5 -10 38296 15M 4288 S < 1.5 3.2 1352m X 21043 jhibbard 15 0 13208 12M 6628 S 0.0 2.6 0:01 app_image 21008 jhibbard 15 0 6548 6548 3444 S 0.3 1.3 0:03 glishtk 21028 jhibbard 15 0 5932 5932 5212 S 0.0 1.1 0:00 misc 21029 jhibbard 15 0 5400 5400 4876 S 0.0 1.0 0:00 quanta 21035 jhibbard 15 0 5364 5364 4868 S 0.0 1.0 0:00 measures Total memory usage: 20.3% Total elapsed time: TASK2: ====== A. display optical data as raster, set logarithmic transfer function start time: 10:37:43 Data Manager: N4038opt.fits => raster Data Manager: N4038CD.subLMV.fits => contour Display Panel: DisplayData=>Register=>Unregister all Display Panel: DisplayData=>Register=>Register line data contour Display Panel: DisplayData=>Register=>Register optical data raster Display Panel: DisplayData=>Adjust=> optical data raster **NOTE: NO OPTION FOR LOG, SO WILL USE HISTOGRAM AND SCALING POWER SUBMITTED ENHANCEMENT REQUEST AOCso04139 ** Adjustment: click on histogram box, +/-5sigma, dismiss Adjustment: colormap=Greyscale 2 Adjustment: Scaling power cycles=-2, return use middle mouse button to set transfer function Zoom into region of optical image end time: 10:38:58 elapsed time: 1:15 **NOTE: THIS IS INFURIATINGLY SLOW! THE DELAY BETWEEN CLICKING SOMEWHERE AND SEEING A CHANGE IN THE TRANSFER FUNCTION IS INCREDIBLY LONG - NOT INTERACTIVE AT ALL! TOOK ME >5MIN TO FIND A SUITABLE COMBINATION OF SCALE POWER AND WHERE TO CLICK FOR TRANSFER FUNCTION. I WOULD SAY THAT THIS IS EASILY A FACTOR OF 10 TIMES SLOWER THAN EITHER KARMA OR DS9. FOR THE TIMING TEST, I WILL REMEMBER TO SET SCALE POWER=-2 AND TO CLICK ABOUT A CROSS-WIDTH TO THE LEFT OF THE "J2000 RIGHT ASCENSION" LABEL, SO THIS DELAY WILL NOT FACTOR IN THE TIMING TESTS. SUBMITTED AS DEFECT AOCso04140 ** B. load in continuum image and contour in red on top of optical image start time: 10:43:21 Data Manager: N4038CD.CH0.fits => contour DisplayData=>Adjust: continuum Adjustment: Level type=abs Contour Levels [-1, 1, 2, 4, 8, 16, 32, 64, 128] Contour scale factor 0.003 line color: red end time: 10:44:09 elapsed time: 0:48 C. show line data as blue contours on top of this, movie 3x, stop [**NOTE: FIRST NUMBERS WERE BEFORE I DISCOVERED FRAME RATE ADJUSTER - THIS HAS BEEN SET TO 25 FPS. 2ND WERE IMPROPER TEST SENT PREMATURELY TO NAUG. LAST WAS A PROPER TOP-TO-BOTTOM TEST**] start time: 10:45:32=>14:04:38=> 16:50:12 DisplayData=>Adjust: line cube Adjustment: Level type=abs Contour Levels [-1, 1, 2, 4, 8, 16, 32] Contour scale factor 0.003 line color: blue (mark time: 16:50:43) Display Panel: green up button, let run 3*, red button end time: 10:47:20=>14:05:11 => 16:51:15 elapsed time: 1:48=>0:33 => 1:03 D. zoom into tail region, movie through relevant channels **NOTE: NO WAY TO LOOP BETWEEN SPECIFIC CHANNELS WITH VCR CONTROLS. ALSO NO SLIDEBAR. SUBMITTED ENHANCEMENT REQUEST AOCso04141 ** Memory usage: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 21037 jhibbard 15 0 43072 42M 12700 S 0.0 8.6 2:39 glishtk 21004 jhibbard 15 0 41296 40M 2404 S 0.0 8.2 0:44 glish 1285 root 5 -10 37728 15M 4296 S < 1.9 3.1 1353m X 21043 jhibbard 15 0 13296 12M 6680 S 0.0 2.6 0:02 app_image 21008 jhibbard 15 0 8352 8352 3456 S 0.0 1.6 0:06 glishtk 21028 jhibbard 15 0 5932 5932 5212 S 0.0 1.1 0:00 misc 21029 jhibbard 15 0 5400 5400 4876 S 0.0 1.0 0:00 quanta 21035 jhibbard 15 0 5364 5364 4868 S 0.0 1.0 0:00 measures Total memory usage: 27.2% Total elapsed time: 3:06 TASK3: ====== A. display continuum as raster, set transfer function start time: 10:50:07 Data Manager: N4038CD.CH0.fits=>Raster image Display Panel=>DisplayData=>Register=>unregister optical data Display Panel=>DisplayData=>Register=>unregister continuum contour Display Panel=>DisplayData=>Adjust=>continuum Adjustment: click on histogram, show +/- 5 sigma, colormap greyscale2, dismiss unzoom adjust transfer function end time: 10:50:57 elapsed time: 0:50 B. load (or activate) line map, go to each continuum source and look at spectra start time: 10:54:25 Image Analysis: Positions=>auto-plot in window, zoom in to region of source and nearest 3 continuum sources. click on bullseye with right button, and go to each of 3 continuum sources and right click on them, going to brightest source last PGPlotter: set x-axis to km/s PGPLotter: viewer2.ps, Print PGPLotter: viewer2.dat, Save end time: 10:54:55 elapsed time: 0:30 Memory usage: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 21037 jhibbard 15 0 70084 68M 12700 S 0.0 14.0 2:58 glishtk 21004 jhibbard 15 0 47256 46M 2404 S 0.0 9.4 1:01 glish 1285 root 5 -10 37924 15M 4296 S < 0.0 3.1 1353m X 21043 jhibbard 15 0 13508 13M 6716 S 0.0 2.7 0:03 app_image 21008 jhibbard 15 0 9664 9664 3456 S 0.0 1.9 0:09 glishtk 21028 jhibbard 15 0 5932 5932 5212 S 0.0 1.1 0:00 misc 21029 jhibbard 15 0 5400 5400 4876 S 0.0 1.0 0:00 quanta 21035 jhibbard 15 0 5364 5364 4868 S 0.0 1.0 0:00 measures Total memory usage: 34.2% Total elapsed time: 1:20 ****************************************************************** Results ======= Karma Viewer New Task1: cube greyscale, movie, specta min:sec min:sec Numbers A. load data, set xfer fcn 0:12 0:35 B. movie 3 times 0:10 0:31 C. get profiles around map 0:15 0:20 D. go to peak, output spectra 0:23 0:26 E. measure noise 0:06 0:10 Total 1:06 2:02 Memory usage 20.7% 20.3% Task2: line & continuum contours on optical A. load optical data, set xfer fcn 0:30 1:15 B. load continuum, contour 0:19 0:48 C. contour line data, movie 3times 1:11 1:03 Total 2:00 3:06 Memory usage 35.2% 27.2% Task3: spectra from continuum sources A. load continuum, set xfer fcn 0:18 0:50 B. take spectra at 3 continuum sources 0:33 0:30 Total 0:51 1:20 Memory usage 11.0% 34.2% Conclusions: ============ So viewer is nowhere near 100* slower than karma. Actually, it is quite competitive in terms of both speed and memory (now that I found the frame rate control). However, some aspects of it are painful slow, and because this is an interactive process, it makes it seem slower. The main remaining problem with the viewer is the speed of functions where moving the cursor results in some visible reaction. Notably, setting the transfer function and displaying spectra through the cube under the cursor. Both of these are many times slower than in karma (for line profiles, karma just redraws the data, while the viewer replots the entire frame, resulting in noticeable flashing). Another frustratingly slow aspect of the viewer is the time for the Adjust panel to appear. Functionally, the viewer provides many more tools than karma. Notably, more complete statistics (and the ability to plot them), options for changing what is plotted (eg, pixels or km/s), much more control over the appearance of plots. Key functionalities that are missing are the ability to use a slide bar to *QUICKLY* cycle through channels (either as contours or as raster), and the ability to quickly output plots or subsets of the displayed data in useful formats (ascii for plots; fits or other formats for subsets - the latter is particularly useful when looking at position-velocity plots, which I haven't played with here). Here is a summary of the various packages benefits, in increasing order of their importance to me: Karma benefits: - movie slidebar a big plus; nearly no noticeable delay between moving the slidebar and seeing the planes change. - adjusting transfer function is nearly instantaneous - profile plots change nearly instantaneously as cursor moves - can restrict movies to loop over specific planes, and adjust the time between frames - can easily save profiles as simple ascii files - reads many native formats (including AIPS, Miriad & Gipsy), and can save displays as ps, ppm, Miriad, Gipsy (useful, eg for position-velocity plots). - GUIs appear right away - simple and easy to understand annotation Viewer benefits: - nice hotbuttons - don't have to keep popping up windows like in karma. - much more sophisticated statistics, including plotting of noise - many options for plot scale units (eg, km/s, pixels, relative, etc) - much more control over plot attributes - probably lots of cool stuff with regions and glish records, but I haven't explored this much - I am evaluating them as stand-alone visualization tools. -john