Interactive Viewer Testing

The primary test procedure:

  • Trigger every GUI control item (button, combobox, checkbox, radiobutton, etc.), with possible user controls (mouse-clicking, mouse-dragging and keyboard entry), in arbitrory order.
  • One should expect to see: no crash, no freeze.

The auxilliary test procedure:

  • One should test the viewer as described in CASA User Manual, CASA Cookbook or other viewer documentation. The following test steps should cover most of the viewer functionalities. This procdure can serve as a 'how to' for the beginers. However, this is not the manual for the sophisticated users.
  • This test need to be perfermed on both linux and mac osx
  • The testing data is in the casa repository under the directory DATA=[CASA]/data/regression/viewertest.
    • allSky.im --------------------------->a normal image data
    • complex.im ----------------------->an image of complex data type
    • ctb80-vsm.ms -------------------->a measurement set
    • m51.fits ---------------------------->an image in fits format
    • ngc6503.clean.image --------->a multi-channel image cube
    • ngc6503.clean.model --------->a multi-cbannel model cube
  • cd /home/my/casa/data
  • svn co https://svn.cv.nrao.edu/svn/casa-data/trunk/regression/viewertest
  • export DATA=/home/my/casa/data/viewertest
1. Start and Stop the Main Panel (Viewer Display Panel)
start viewer without argument
  • casaviewer &
  • The Main_Panel has menus and tool buttons
  • Click on the menu item 'Data', 'Display_panel', 'Tools', 'View'
  • Select menu 'View->Main_Toolbar', uncheck then check
  • Select menu 'View->Mouse_Toolbar', uncheck then check
stop viewer
  • mouse click on the top-right 'X' icon on main display panel
  • type ctl-c in the terminal window where casaviewer starts
  • ctl-c will not work inside casapy for the viewer task
  • menu 'Data->Quit_Viewer'
start viewer with argument (image name or ms name)
  • casaviewer $DATA/ctb80-vsm.ms
  • Quit Viewer
  • casaviewer $DATA/allSky.im
  • Quit Viewer
2. Start and Stop All the Sub-Panels (from the Main Panel)
Start Viewer
  • casaviewer $DATA/allSky.im
Open/Close 'Load Data' Widget
  • menu 'Data->Open'
  • icon 'Open Data' (the first icon, a file folder)
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Data Display Options' Widget
  • menu 'Data->Adjust'
  • click "Dismiss" button
  • icon 'Data Display Options' (the second icon, a wrench)
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Viewer Canvas Manager' Widget
  • menu 'Display_Panel->Panel_Options'
  • icon 'X' (the top-right corner of the widget)
  • icon 'Panel Display Options' (the six icon, a wrench with 'P')
  • icon 'X' (the top-right corner of the widget)

Open/Close 'Viewer Print Manager' Widget
  • menu 'Data->Print'
  • click "Dismiss" button
  • icon 'Print' (the nineth icon, a printer)
  • icon 'X' (the top-right corner of the widget)

Open/Close 'Animator' Widget (also called tapedeck)
  • menu 'View->animator' - uncheck/check
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Position Tracking' Widget
  • menu 'View->Position_Tracking' - uncheck/check
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Main Toolbar' Widget
  • menu 'View->Main_Toolbar' - uncheck/check
Open/Close 'Mouse Toolbar' Widget
  • menu 'View->Mouse_Toolbar' - uncheck/check
Open/Close 'Box in File' Widget
  • menu 'Tools->Box_in_File'
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Region in File' Widget
  • menu 'Tools->Region_in_File'
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Region in Image' Widget
  • menu 'Tools->Region_in_Image'
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Spectral Profile' Widget
  • menu 'Tools->Spectral_Profile'
  • icon 'X' (the top-right corner of the widget)
Open/Close 'Shape Manager' Widget
  • menu 'Tools->Shape_Manager'
  • click "Dismiss" button
  • menu 'Tools->Shape_Manager'
  • icon 'X' (the top-right corner of the widget)

3. Load Data
  • Open 'Load Data' widget
  • Navigate to $DATA
  • Select ngc6503.clean.image
  • Click on 'Raster Image'
  • Overlay the contours by clicking on 'Contour Map'
  • Overlay the vectors by clicking on 'Vector Map'
  • Overlay the markers by clicking on 'Marker Map'
  • Close 'Load Data' widget
4. Register/Unregister Data
  • menu 'Data->Register->allSky.im'
  • icon '[Un]Register Data' (the third icon, 2 overlap rectangles) select 'allSky.im'
  • icon '[Un]Register Data' (the third icon, 2 overlap rectangles) select 'allSky.im'
  • menu 'Data->Register->allSky.im'
5. Close Data

  • menu 'Data->Close->Close allSky.im'
  • menu 'Data->Open...' select 'allSky.im' select 'Raster Image'
  • icon 'Close Data' (the fourth icon, a stop sign) select 'allSky.im'
  • icon 'Open Data' (the first icon, a file folder) select 'allSky.im' select 'Raster Image'

6. Adjust Display Options
  • Open 'Data Display Options' widget
  • Select the tab for the raster image
    • Select 'Basic_settings->Colormap'
    • Pull down the combobox and select 'Rainbow 3'
    • Select 'Axis Labels->Axis_Labels_and_animations'
    • Pull down the combobox and select True or False
    • Select 'Color Wedge->Display_Color_Wedge'
    • Pull down the combobox and select True or False
    • Select 'Axis_Label_Properties->Character_size'
    • Pull the slidebar left or right
    • Select 'Display_Axis>x_axis'
    • Pull down the combobox and select 'Declination'
    • Select 'Display_Axis>y_axis'
    • Pull down the combobox and select 'Right_Ascension'
  • Select the tab for the raster image
    • Select 'Basic_settings->Base_contour_levels'
    • Pull the slide bar left or right
  • Select the tab for the vector map
    • Select 'Basic_settings->Line_color'
    • Pull down the combobox and select 'cyan'
    • Select 'Basic_settings->x_increament'
    • Pull the slide bar left or right
  • Select the tab for the marker map
    • Select 'Basic_settings->y_increament'
    • Pull the slide bar left or right
  • Close 'Data Display Options' widget

7. Animation
  • Close all data
  • Load ngc6503.clean.image
  • Open 'Animator' widget
  • Play with tapedeck control buttons (step forward, step backward, fast forward, fast backward)
  • Load ngc6503.clean.model
  • Select radio button 'Blink'
  • Click on 'step forward' to blink 2 images
  • Reset radio button 'Normal'
8. Position Tracking
  • Open 'Position Tracking' widget
  • Move mouse over on the displayed image
  • Open 'Data Display Options' widget
  • Select 'Position Tracking' section and adjust the tracking behavor
  • Close 'Position Tracking' widget
9. Manage Canvas
  • Open 'Viewer Canvas Manager' widget
  • Select 'Number_of_Canvas->Number_of_panels_in_x'
  • Pull slide bar left or right
  • Select 'Number_of_Canvas->Number_of_panels_in_y'
  • Pull slide bar left or right
  • Select 'Margins' section
  • Set all margins to 0
  • Close 'Viewer Canvas Manager' widget
10. Save and Restore the Display State
  • menu 'Data->Save_Panel_State'
  • menu 'Display_Panel->Save_Panel_State'
  • icon 'Save Display Panel State to File', (the seventh icon, a flopy disk)
  • Save the state to a file 'ngc6503.clean.image.rstr'
  • Quit viewer (Close viewer main panel)
  • Restart viewer
  • menu 'Data->Restore_Panel_State'
  • menu 'Display_Panel->Restore_Panel_State'
  • icon 'Restore Display Panel State from File', (the eighth icon)
  • Open the saved state file 'ngc6503.clean.image.rstr'
  • Continue work on from the saved state
  • Quit Viewer
11. Make a Hard Copy
  • Start viewer
  • Load 'ngc6503.clean.image'
  • Play with the adjustment (canvas, panel, fonts, size)
  • Open 'Viewer Print Manager' widget
  • Set 'output file' to 'ngc6503.savefile'
  • Select file type (PNG for example)
  • Click 'save' button to save the image
  • Open the saved file PGN file
  • Click 'print' button to open the 'printer control panel'
  • Set the printer name
  • Click 'Print' button then go to the printer room to pick up the copy
  • Quit viewer

12. Display Two Images Side by Side
  • Start viewer
  • Load 'ngc6503.clean.image'
  • Load 'ngc6503.clean.model'
  • menu 'Display_Panel->New_Panel'
  • register 'ngc6503.clean.image' in the new panel
  • unregister 'ngc6503.clean.image' in the old panel
  • paly with each panel
  • Close old panel (Quit Viewe)
13. Zoom and Unzoom with Predetermined Step Size
  • icon'Zoom in' (magnifying glass with +) steps into image center with 1/2 of the size
  • icon'Zoom out' (magnifying glass with -) steps out from image center with 2 times of size
  • icon'Zoom home' (magnifying glass with rectangle) steps out zoom stack
14. Mouse Tools
  • every mouse tool can be operated with any of the left, right, or center of the mouse buttons
  • clicking a tool icon with one of the mouse key will assign the tool to that mouse key
  • the key assignment indicator is in the three tiny box under each tool icon

  • icon 'Zooming', (the first mouse tool icon from left, magnifying glass with + in center)
    • assign 'Zooming' to a mouse key (e.g. left)
    • hold down the assigned key (left as above)
    • drag the mouse cursor over the region of intereset in the image
    • release the mouse key, a rectangle box with corner handler will show
    • hold down the assigned key over a handle to adjust the size of the box
    • double click inside the box to zoom into
    • repeat the steps to zoom in more steps
    • icon 'Zoom home' to restore to full size
  • icon'Panning', (the second mouse tool icon, a hand)
    • assign 'Panning' to a mouse key
    • hold down the assigned key and drag the mouse cursor over the image
    • release the mouse key
  • icon 'Colormap Fiddling Shift/Slope', (the third mouse tool icon, + whith outward arrows)
    • assign 'Colomap Fiddling Shift/Slope' to a mouse key
    • click the assigned key at various positions on image
    • hold down the assigned key and drag the mouse cursor over the image
    • release the mouse key
  • icon 'Colormap Fiddling Brightness/Contrast', (the third mouse tool icon, + whith outward arrows)
    • assign 'Colomap Fiddling Brightness/Contrast' to a mouse key
    • click the assigned key at various positions on image
    • hold down the assigned key and drag the mouse cursor over the image
    • release the mouse key
  • icon 'Colormap Fiddling Brightness/Contrast', (the third mouse tool icon, + whith outward arrows)
    • assign 'Colomap Fiddling Brightness/Contrast' to a mouse key
    • click the assigned key at various positions on image
    • hold down the assigned key and drag the mouse cursor over the image
    • release the mouse key
  • icon 'Positioning', (the fourth mouse tool icon, crosshair)
    • assign 'Positioning' to a mouse key
    • click the assigned key at various positions on image
    • hold down the assigned key and drag the mouse cursor over the image
    • release the mouse key
  • icon 'Rectangle Drawing', (the fourth mouse tool icon, a rectangle with 'R' inside)
    • assign 'Rectangle Drawing' to a mouse key
    • hold down the assigned key and drag the mouse cursor over the image
    • release the mouse key, a rectangle box with corner handler will show
    • hold down the assigned key over a handle to adjust the size of the box
    • double click inside the box to activate the rectangle (image stats print to the terminal)
    • release the mouse key
  • icon 'Polygon Drawing', (the fifth mouse tool icon, a Polygon with 'R' inside)
    • assign 'Polygon Drawing' to a mouse key
    • click the assigned key with mouse cursor at a position on the image
    • release the mouse key, a line segment will show
    • repeat to draw more line segments
    • click at the first mouse cursor position to close the polygon
    • hold down the assigned key over a handle to adjust the shape of the polygon
    • double click inside the polygon to activate the polygon (image stats print to the terminal)
    • release the mouse key
  • icon 'Polyline Drawing', (the last mouse tool icon, a Polyline)
    • assign 'Polyline Drawing' to a mouse key
    • click the assigned key with mouse cursor at a position on the image
    • release the mouse key, a line segment will show
    • repeat to draw more line segments
    • hold down the assigned key over a handle to adjust the shape of the polyline
    • double click to activate the polylinere
    • release the mouse key
  • Quit Viewer
15. Region in Image
  • Start Viewer
  • Load $DATA/ngc6503.clean.image
  • menu 'Tools->Region_in_Image'
  • On the Main_Panel
    • assign 'Polyline Drawing' to a mouse key
    • draw a polygon region on the image
    • double click inside the polygon region to activate
    • assign 'Rectangle Drawing' to a mouse key
    • draw a rectangle region on the image
    • double click inside the rectangle region to activate
  • On the 'Region in Image' Panel
    • enter channels editbox '70~80'
    • enter name editbox 'region_1'
    • click 'save' to save 2 regions into the image
  • Restart Viewer
  • Load $DATA/ngc6503.clean.image
  • menu 'Tools->Region_in_Image'
  • On the Main_Panel
    • display image of channel 60 with tapedeck control
  • On the 'Region in Image' Panel
    • pull down 'show/hide', uncheck then check 'region_1'
    • pull down the color select combobox and change the color
  • On the Main_Panel
    • play channel image movie to the end
    • click 'cleanup' to remove the displayed regions
  • Close 'Region in Image'

16. Box in File
  • run task boxit in casapy with
    default 'boxit'
    imagename = 'ngc6503.clean.image'
    regionfile = 'ngc6503-5mJy'
    threshold = '5mJy'
    maskname = ''
    chanrange = '20~50'
    polrange = ''
    minsize = 2
    diag = False
    boxstretch = 1
    overwrite = False
    async = False
  • Start Viewer
  • Load 'ngc6503.clean.image'
  • menu 'Tools->'Box_in_File'
  • On the 'Box in File' Panel
    • click 'Load' and open regionfile 'ngc6503-5mJy.box'
  • On the Main_Panel
    • play channel image movie end to end
  • Close 'Box in File' widget

17. Region in File
  • run ia and rg tool in casapy with
    imagename ='ngc6503.clean.image'
    ia.open(imagename)
    csys = ia.coordsys()
    blcs = ia.toworld([59.5,19.5], 's')
    trcs = ia.toworld([60.5,20.5], 's')
    ia.close()
    blc = blcs['string'][0:2]
    trc = trcs['string'][0:2]
    region = rg.wbox(blc=blc, trc=trc, csys=csys.torecord())
    rg.tofile('ngc6503.rgn', region)
  • Start Viewer
  • Load 'ngc6503.clean.image'
  • menu 'Tools->'Region_in_File'
  • On the 'Region in File' Panel
    • click 'Load' and open regionfile 'ngc6503.rgn'
  • On the Main_Panel
    • play channel image movie end to end
  • Close 'Region in File' widget

18. Spectral Profile
  • Start Viewer
  • Load 'ngc6503.clean.image'
  • menu 'Tools->'Spectral_Profile'
  • On the Main_Panel
    • assigning 'Positioning' to a mouse key
    • press the assigned key and drag the crosshair
  • Load 'ngc6503.clean.model'
  • unregister then register 'ngc6503.clean.model' to bring it to top
  • menu 'Tools->'Spectral_Profile'
  • On the Main_Panel
    • assigning 'Polygon Drawing' or 'Rectangle Drawing' to a mouse key
    • draw a region on the image
    • put mouse cursor inside the region
    • press the assigned key and drag the region
  • On the 'Spectral Profile' widget
    • unchekc 'Overlay'
  • On the Main_Panel
    • put mouse cursor inside the region
    • press the assigned key and drag the region
  • On the 'Spectral Profile' widget
    • chekc 'Overlay'
  • On the Main_Panel
    • put mouse cursor inside the region
    • press the assigned key and drag the region
  • On the 'Spectral Profile' widget
    • chekc/uncheck 'Relative'
  • On the Main_Panel
    • put mouse cursor inside the region
    • press the assigned key and drag the region
  • On the 'Spectral Profile' widget
    • click 'save', save the profile to an image file 'ngc6503_prof.png'
    • click 'write', save the prifile line data to an ascii file 'ngc6503_prof.txt'
  • In a terminal window
    (casapictureviewer & casaplotter are not exported in the OSX or linux binary distributions)
    • casapictureviewer ngc6503_prof.png
    • vim ngc6503_prof.txt
    • casaplotter ngc6503_prof.txt
    • open saved output file
    • check to make sure the output files have something in them
  • Quit Viewer

19. Shape Manager
  • Start Viewer
  • Load 'ngc6503.clean.image'
  • menu 'Tools->'Shape_Manager'
  • On the 'Region Shape Manager' widget
    • click 'New' to open 'New Region Shape' widget
  • On the 'New Region Shape' widget
    • pull down the shape combobox
    • select 'ellipse'
    • set system PIXEL
    • set (center_x, center_y) to (219, 109)
    • set (x_radius, y_radius) to (10, 10)
    • click create
  • On the 'Region Shape Manager' widget
    • click 'Save' to save the shape to 'ngc6503_shape.ds9'
  • Quit Viewer
  • Start Viewer
  • Load 'ngc6503.clean.image'
  • menu 'Tools->'Shape_Manager'
  • On the 'Region Shape Manager' widget
    • click 'Load' to load the shape in 'ngc6503_shape.ds9'
  • Quit Viewer

20. Flagging Data
  • Start Viewer
  • Load 'ctb80-vsm.ms'
  • open 'Data Display Options' widget
    • select 'Flagging_Options'
    • set new edit to 'Flag'
    • set desired flag extension 'Flag/Unflag All'
  • On the 'Main_Panel'
    • assigning 'Rectangle Drawing' to a mouse key
    • press the assigned key and drag the rectangle region
    • double-click inside the rectangle region to activate
  • On 'Data Display Options' widget
    • click 'Save Edits' button
  • Quit Viewer
  • Start Viewer
  • Load 'ctb80-vsm.ms' - watch for the flagged data
  • Quit Viewer

Additional tests suggested by Laura Chomiuk which may be implemented in the future


6. Adjust Display Options: (This is UV data specific! Not sure if all the 
same options apply to images).
---In 'Data Display Options->Basic Settings':
         - change the 'Data minimum' both by sliding the slide bar and by 
typing a number into the box.
         - change the 'Data maximum' both by sliding the slide bar and by 
typing a number into the box.
---In 'Data Display Options->Display Axes':
         - Select 'Display_Axes>Animation axis', then pull down the 
combobox and select something different.
         - Change the correlation displayed.
         - Change the spectral window displayed.
         - Chage baseline sort.
---In 'Data Display Options->MS and Visibility Selection':
         - Change the 'Visibility Type'
         - Change the 'Visibility Component'
         - Change the Field IDs selected.

7. Animation
--Remove the 'Animator' widget from the viewer and move it to the desktop.

14. Mouse Tools:
--Make sure that pressing ESC makes the various regions (rectangle, 
polygon, polyline) disappear.

20. Flagging:
--Also make sure that unflagging works by setting a rectangle region over 
part of the recently flagged data and unflagging it.

Stopping Viewer
--------------
Check to make sure when you quit viewer that it has actually quit and 
isn't running a zombie process in the background.

This topic: Software > WebHome > LegacyCASA > ObtainingCASA > CasaIndex > CasaTestInteractive > CasaViewerTest
Topic revision: 2010-10-11, DarrellSchiebel
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback