ATV.PRO version history:
Version Release Changes from previous version
Minor fixes:
  • Recent changes to the coyote libraries caused ATV line plots to come out wrong, with missing axes and labels. Plot colors were changed to fix this. Now, line plots come out on a white background (following the coyote default).
  • Keyboard events in the main window such as "r" or "c" to bring up row or column windows are now not case-sensitive any more.
Bug fixes:
  • Recent updates to MacOS have made it absolutely necessary to issue the command "device, retain=2", or else ATV displays are painfully slow. Now, ATV auto-detects whether it's running on MacOS, and if so, then it issues this command. In the future, it may be fine to just always issue this command for any OS, but there could possibly be some systems where it's not wanted. (It is generally useful on linux as well but not absolutely necessary.)
  • Recent changes to the coyote library have caused ATV's photometry and image statistics routines to crash. The specific problem comes from a line in which reads
    • opixel = cgSnapshot(!D.X_Size-5, !D.Y_Size-5, 1, 1)
  • For situations where this line is called for very small window sizes, this generates a crash. Fixed this with a simple check to make sure we aren't calling cgcolor when the window size is too small. (However, there really should be better error checking within itself to make sure that this doesn't cause problems for small window sizes.)
Minor changes:
  • Replaced the "velocity" color map with the much better "SAURON" color map from Cappellari & Emsellem,
  • Added two new color maps, magma and viridis, from python's matplotlib. Thanks to the creators of these excellent color maps (Nathaniel J. Smith, Stefan van der Walt, Eric Firing) for making them available under a CC0 license.
  • Fixed auto-scaling of image cubes so that auto-scale parameters are based on the full data cube and not just on a single slice.
Minor fixes:
  • Commented out the routines that read in Keck LRIS mosaics. This prevents a (harmless) syntax error on compilation if you don't have the Keck routine installed.  If you need to read in LRIS mosaics, search for "lris" in the code and uncomment the appropriate blocks.
  • Minor changes to autoscaling for image cubes.
More small fixes:
  • WCS information in TNX format should now work
  • Fixed bug where color selection didn't work for compass overplots
  • Fixed bug where the imstats plot didn't show pixel coordinates
A few bug fixes and small changes:
  • fixed color map problems where atv didn't recognize the decomposed state properly
  • fixed some problems with plot window colors
  • fixed problems where circle and box regions didn't come out in the right location. (If you still have problems with this, make sure to update your idlastro and coyote libraries to the most current versions.)
  • added ability to read and assemble a multi-extension Keck LRIS image into a single array- this requires the routine from Keck Observatory
  • Added interactive control widget for cubehelix color map settings
  • Removed a couple of IDL built-in color maps from the menus (Rainbow, BGRY, Stern Special), since I don't really like them. If you want them back, they are just commented out in routine atv_startup so you can uncomment them to put them back in the menus.
Some major rewrites to incorporate the new idlastro library dependencies on the coyote library, and to start using IDL 8.0 list functionality, and a bunch of other changes:
  • Overplots are now stored in a list of structures rather than in an array of structures. This allows for an arbitrary number of overplots and eventually will allow for arbitrary insertion/deletion of new plot items in the list.
  • In the photometry window, added the RA/dec coordinate string of the photometric centroid, when available.
  • Added N/E weathervane to the pan image when WCS information is present
  • Added keyboard commands - and + (or =) to zoom out and in to an image
  • Fixed crashing problem for very skinny images by forcing pan image to have at least 2 pixels in each dimension
  • Fixed a bug where atv did not properly remember the photometric output file name (thanks to Andrew Steffl for this fix)
  • Added D. A. Green's cubehelix colormap- just as a single colormap for now, but will allow interactive control of cubehelix parameters later on
  • Removed the atv special and velocity2 color maps which weren't really very good
  • Completely modified the display and plotting routines to use the Fanning Coyote Graphics library. Now that the IDL Astronomy Users Library has included some dependence on the Coyote routines, this was really necessary, and turns out to be very beneficial for a lot of reasons.
  • Rearranged the basic layout of the widgets to optimize use of space on the screen, and added in the option to put the main control panel items on either the left or right side of the main tv window, rather than the default arrangement with the control panels on top. This is selectable by changing the value of state.panel_side in the routine atv_initcommon.  The basic idea and layout style for putting the control panel on the side instead of the top was taken from PhAst.
  • Removed some unneeded items from the state structure
  • Changed the default charsize in plots to be 1.5 for better readability
  • Fixed (I hope) a problem where headers were not properly being recognized for fpack-compressed .fz images
A few minor changes:
  • Added gaussian fits to line plots (vector mode, mouse button 2)
  • Added preliminary support for reading fpack-compressed .fz files
  • Added adjustable charsize for line plots
  • fixed bug in DSS lookups by RA/dec coordinate (thanks to Hal Weaver for this fix)
  • Added initial support for 3-d image stacks and integral-field spectrograph data cubes
  • changed DSS lookups to always use SIMBAD since NED output formatting changed and can't parse NED output
  • more checks to prevent crashing if cmps_form is invoked more than once
  • added missing /asinh keyword to the top-level routine
  • pan window image is no longer interpolated when the image size is small
Special 10th anniversary limited edition version! 
  • Improved aperture photometry with error calculation, and optional output file for photometry results
  • Quick-look spectral extractions added
  • Object name added to title bar when available in header
  • When /stretch is set, preserve the asinh beta parameter of the previous image
  • added 'e' keystroke to erase all overplots
  • Removed FIRST survey image lookups.  FIRST changed their image server to send out files with chunked transfer encoding, and can't read chunked data.  (Anyone want to volunteer to add chunked data support to
  • Added more error checking for unusual WCS types to prevent crashing
  • Simplified the WriteImage code and changed the menu structure
  • Added 2 new color maps and modified the ATV Special color map
  • Fixed crashing problems for some images with bad WCS header keywords
  • Fixed crashing problems for images with NaN values
  • More error checking in photometry routines to prevent crashes due to NaN values in photometry region
  • Fixed png output to use 24-bit color
  • Added MakeRGB routine
  • Various bugfixes to prevent crashing when reading in pathological images and to prevent crashing out of atv_activate mode if the atv window is killed
  • Better autoscaling for images that have large blank regions (like drizzled HST/ACS images)
  • Added FullView button, removed Done button
  • Added current image size to window title
Lots of new stuff:
  • Added options for default_autoscale and default_align
  • Added rotate/zoom menu
  • Added WriteImage menu with png, jpg, tiff image output options
  • Added PixelTable widget
  • Added image lookups for DSS, FIRST
  • Added new interactive lineplot window, plus new histogram plot mode
  • Added Vector mouse mode
  • Fixed the alignment of the min/max widgets
  • ATV now preserves the user's external color map and !p.multi
  • Changed fits reading to use fits_read instead of mrdfits, and removed call to fits_info- this solves some crashing problems with certain image formats
  • Changed atv_stretchct to make it possible to plot surface plots with a different color stretch
  • Better capability for reading wavelength scales of 2-d wavelength calibrated images
  • Added new region overplots, with lots of bug fixes relative to the original SMART implementation
  • Added asinh stretch with variable beta, made this the default mode
  • Added atv_activate mode
  • Added arrow overplots
  • Photometry changes: larger default centering box, and non-integer aperture radii are now allowed
  • Added quick and dirty background subtraction before centering (needs improvement)
  • Statistics window: bug fixes for better display of results
  • User can change mouse mode by hitting "m" with cursor in main window
  • New keyboard shortcuts: "!", "@", anad "#" (shift-1, shift-2, and shift-3) to set blink images 1, 2, 3
  • Improved plot display for radial profile plots
  • New and improved autoscaling based on sky mode and sky sigma
  • Removed calls to, in order to make atv work with idl vm
Just one bug fix:
  • Fixed crashing when reading in HST/STIS 2-d spectral images that list "WAVE" as the coordinate system type instead of the older "LAMBDA"
Minor bug fixes:
  • Use fits_read for fits extension input, to inherit header keywords from the primary header
  • Fixed reading of WCS info for SDSS images
  • Added additional filename suffixes to the list of filters for ReadFits menu, to read in *.fit, *.fit.gz, etc.
  • Fixed the display of the green box in the pan window for window edge problems
  • Fixed 1-pixel offset problem in overplots for postscript output of magnified images- thanks to Nathaniel Cunningham for this fix.
From here on, ATV requires IDL 6.0 or greater.  This allows ATV to take advantage of some new IDL features such as having draw widgets that are sensitive to keyboard events.
  • Changed handler for keyboard events to use new IDL 6.0 draw widget functionality- this should solve crashes under Windows XP that occurred with the previous keyboard event handler.
  • User can now navigate around the main draw window using arrow keys.
  • ATV now assumes equinox = J2000 for images that have WCS info but no equinox or epoch listed.  This was necessary for HST ACS images which don't give the equinox in the fits extension headers.  A warning message is issued when this happens.  (NOTE: in the next release, this will be fixed in a better way by using fits_read instead of mrdfits.   The fits_read routine properly handles inheritance of header cards from the fits primary header.  Thanks to Wayne Landsman for this tip.)
  • Replaced calls to obsolete routine "rstrpos" with "strpos". 
One fix:
  • Fixed bug that could cause crashes when writing postscript files.
Minor fixes:
  • Fixed bug that caused crashes when user requests a scalebar but the header doesn't contain WCS info.
  • Improved top-level resizing routines to work better overall.   This helps a lot for GNOME 2 with the metacity window manager, or other window managers that dynamically resize window content while the window frame is being resized.
  • Removed /floating from child widgets, to work better with metacity window manager.
  • Increased size of location bar to accommodate images with >10,000 pixels on a side.  (Added 6/24).
1.3 11/28/2000 New features added by Doug Finkbeiner:
  • Added restretch button and routines for restretching image.
  • Minor fixes to speed up reading in new images.
  • New routine to handle brightness/contrast calculation in atv_stretchct.
  • Added /stretch, /align, and /header keywords.
  • Added option for RA/Dec in degrees.
Other changes by AJB:
  • Removed reset_color button in favor of restretch button.
  • Improved routine for log-scaling: now it's faster and preserves the image's dynamic range better.
  • Minor fixes to speed up autoscaling a bit.
  • Added atv_message routine to simplify handling of error messages.
  • Fixed bug in fits reader for 2MASS extended source images.
1.2 8/17/2000 Some minor improvements and bug fixes:
  • Added information to atv title bar to give extension number for fits extension files
  • Made autoscaling a bit faster and less memory-intensive by sampling every 100th pixel for big images
  • Better error checking on invalid WCS types
  • Added green-white color table
  • Removed subroutine atv_cleartext, which didn't do anything useful
  • Changed the way keyboard focus is deallocated.  Now, when cursor leaves the main draw widget, make the text widget insensitive.  When setting keyboard focus to the text widget, make the widget sensitive.  This fixes the problem where ATV didn't work properly with the KDE desktop.
  • Added variable state.box_color, so that the box in the pan window could have a different color in the future.
  • Fixed photometry bug where badpix was defined wrong.  (Thanks to Mike Liu for solving this problem.)
  • Implemented blocking mode.  (See the instructions for details.)
  • Added an explicit call to device, decomposed=0 for 24-bit mode
  • If photometry is set to "no sky subtraction", then don't plot the sky annuli in the photometry plots. 
  • More error checking to prevent crashes for very small images
  • New images are read directly into the main_image variable, to save time and memory.
  • Don't check for NaN values when reading in a new image any more.  NaN values are handled better by including the /nan keyword to the bytscl function. This saves a bit of time when reading in a new image.
1.1 6/14/2000 Lots of new stuff:
  • Reset-color button now resets the entire color table, including the bottom 8 entries.
  • atv_shutdown now uses the delvarx routine to dispose of internal variables.
  • In imexam mode, button 2 now does a recenter on the current cursor position.
  • Fixed atv_setheader so that astrometry routines won't crash on a 2-d wavelength calibrated spectral image.
  • Added state.wcstype and subroutine atv_wavestring, to track wavelength in 2-d spectral images.  WCS bar displays wavelength at cursor position.  (so far tested only for HST STIS images.) 
  • Added routine for reading 2MASS JHK data cube.
  • WFPC2 reader put into separate subroutine.
  • Routines for reading simple and extension fits images put into separate subroutines.
  • The top entry in the color table is now always set to white.
  • Improved error checking, to prevent mrdfits from choking on a fits binary table.
  • Removed the widget base around the photzoom window, to save a bit of space.
  • Default centering box size set to 5 instead of 7.
  • New variable state.graphicsdevice remembers the screen device.
  • Better error checking to prevent crashes if ! has been changed to postscript or other device.
  • Better error checking in atv_shutdown; checks !
  • Photometry routine now plots a red line at the sky level.
  • ATV keeps track of screen bit depth in state.bitdepth.
  • New support for 24-bit color: when color is being stretched, continuously redisplay the image in 24-bit mode.  8-bit mode is unchanged.
  • Removed unnecessary calls to atv_drawbox.
  • Created routine atv_displaymain to tv the main image.
  • Created /fast option for atv_refresh, to do a quick refresh without recalculating display image or updating overplots.  Used when stretching color table in 24-bit mode.
  • The unblink image is now defined only when needed (i.e. when the user starts blinking), rather than each time the image is redisplayed.  This makes panning and zooming much faster.  (There's a slight delay when you first start to blink, as the unblink image is being read from the tv device.)
  • Created state.newrefresh to keep track of whether image has been redisplayed, so that blink routine will know whether it needs to grab a new unblink image.
  • Fixed atv_writetiff to work for 24-bit color.
  • Can now set centerbox size to 0 to prevent recentering.
  • Photometry settings dialog gives choice of sky algorithms, and choice of counts or magnitudes, and lets user set magnitude zeropoint.
  • In 24-bit color, blinking uses true-color images defined using tvrd().
  • For small screen sizes, set display window and photometry radplot window to be small enough to fit on screen.
  • Improved appearance of frame around postscript output.
  • Modified postscript output to take advantage of scalable pixels.  Now, ps output has the full resolution of the original image, rather than the resolution of the screen display image.  This makes postscript files much smaller for images that are zoomed in, but much bigger for images that are zoomed out.
1.0b10 5/12/2000 Bug fixes and minor improvements:
  • ATV main routine now calls atv_readfits to read in new fits images when a filename is passed to atv from the IDL command line.   As a result, it's now possible to pass ATV the filename of a fits extension file or a WFPC2 4-panel CCD image from the IDL command line.  Previously this would work only for simple 2-d fits images.
  • Pixels with value NaN are now converted to zero when a new image is read in.   Previously, NaN values would prevent an image from being scaled properly, so it wouldn't display at all.
  • Better error checking for images and arrays when reading in a new image.
  • Aperture photometry now done with idlastro daophot library routine APER.
  • Fixed problems with keyboard focus in zoom, blink, and imexam modes.
  • Fixed problem where photometry routine wasn't centering properly for some values of the centering box size. 
  • New default startup image, in case you were bored with the old one.
  • New keyboard command "q".  (guess what this does?)
  • Fixed bug in scaling of color maps for postscript and tiff output.
  • Default positions for compass and scale bar now set to always fall within the displayed portion of the image.
  • Scale bar routine fixed to allow for non-integer lengths.
  • Fixed positioning of numerical label over scale bar (again)
  • Photometry routine fixed to show correct locations for aperture and sky annuli around the object in the little display window.
  • Fixed problem where coordinate output was formatted wrong for declinations between 0 and -1 degree.  (Fixed by D.F.)
1.0b9 4/14/2000
  • Fixed bug where pan image could have zero size, for very small images.
  • Added code to read in HST/WFPC2 800x800x4 arrays, and give user choice of CCD to display or mosaic, using idlastro routine wfpc2_read.
  • Doug Finkbeiner added subroutine atv_wcsstring to convert native image coordinates to other coordinate systems, and changed ImageInfo menu to give choice of different systems.
1.0b8 2/3/2000 Minor fixes:
  • Added a call to the IDL "empty" comand in atv_resetwindow, to flush buffered graphics output.  Removed the subroutine atv_setsamewindow, which was formerly used for this same purpose.
  • Changed calls to obsolete stdev routine to newer stddev.
  • Changed default color to red for overplots made with via the labels menu.
  • Fixed the positioning of the numerical label above the scale bar in atv_arcbar.
1.0b7 1/7/2000 Several bug fixes and a few new features:
  • Fixed problem that caused ATV to crash when blinking rapidly with mouse moving in and out of main window.
  • Added routines atv_resetwindow, atv_getwindow, atv_setwindow, atv_setsamewindow, in order to have ATV remember the user's current active IDL graphics window outside of ATV. 
  • Current graphics window is now always set to the user's external window, except when atv is drawing something.
  • Added state.default_autoscale to allow autoscaling of image by default.
  • Added /noshow keyword to each instance of the xregistered command, to prevent unwanted windows being brought to front.
  • Fixed ReadFits dialog box to allow reading of fits primary image for images which have extensions.
  • Fixed size of green box in pan window.
  • Set dialog boxes to remember current working directory via state.current_dir.
  • Added cleanup = 'atv_shutdown' keyword to xmanager, to ensure that atv_shutdown is called even if atv is killed by the window manager.   Side effect: if ATV is killed from within IDL, then atv_shutdown is called twice, but this doesn't really matter.
  • Added code to enable astrometry in GSSS images.
  • Added /fscale keyword to mrdfits, to properly scale integer images.
  • Fixed the thing where the WCS coordinates from a previous image wouldn't disappear if the new image had no WCS info in its header.
  • Added routine atv_arcbar to properly draw scale bars in zoomed images.
1.0b6 10/18/99 New features added:
  • ATV now keeps track of the image header if there is one.
  • If there's coordinate system information in the header, ATV will display the RA and dec of the cursor position.
  • Image header can be viewed in a separate window.
  • Compass and scale bar can be overplotted if there's coordinate information in the header.
  • ATV can now store 3 blink images.
  • New ImExam mouse mode for photometry and image statistics.
  • Photometry window plots a zoomed view of the photometry region, labeling the aperture and sky radii.
  • Photometry window can plot a radial profile and measure FWHM.
  • Image statistics window added.
  • Better centering for photometry routine.
  • In Color mode, mouse button 2 or 3 will recenter the image on the current cursor position.
  • Color inversion now works better: it preserves the colors in the color table and flips their ordering, rather than using "inverse" colors.
  • ATV now calls to set postscript output parameters.
  • ATV can now read fits extension files.  If a file has multiple extensions, a dialog box pops up asking which extension to read in.
Internal improvements: 
  • New subroutines for handling image header, title, and coordinate system info.
  • Added subroutine atv_initcommon to hold common block definitions.
  • Routine atv_shutdown fixed to only shut down only if atv already exists.
  • Routine atv_resize doesn't take any arguments; it reads in the new window size with widget_control.
  • Overplotting routines have been completely rewritten for better efficiency.  Now each overplot is kept as a heap variable structure, referenced by a pointer.  Extra keywords handled with _extra mechanism. 
  • Re-ordered subroutines for better organization.
  • Changed pan window box motion to use draw_motion_events.
  • Made box in pan window green always, rather than inverse color.
  • Redrawing of pan window uses device copy from a pixmap window.
  • Changed state.mouse to state.coord.
  • Split event loop into several routines for easier handling and for selecting event handlers with widget_control.
  • Eliminated state.mode in favor of setting event handlers with widget_control.
  • Eliminated 5 pixel padding around the scaled_image, and updated tracking routines to properly detect image border.
  • Changed state.slidermax to state.maxbright.
1.0b5.1 9/16/99 Two bug fixes:
  • Fixed problem that caused high-valued pixels to appear black sometimes, especially on 24-bit color systems.
  • Fixed problem with color maps in tiff output images.
1.0b5 8/24/99 Major changes to the routines that control color tables and color stretch, plus other minor modifications:
  • Made the crosshair in the tracking image green
  • Changed mouse mode selector to a droplist
  • Added color mode for changing brightness and contrast
  • Removed brightness and contrast sliders
  • Completely changed brightness/contrast algorigthm.  The variables r_vector, g_vector, and b_vector now simply hold the current color table for the draw window (minus the 8 reserved colors).  Contrast now functions like a real contrast control, not like a gamma control as it was previously.  The new stuff is all in the routine atv_stretchct.  It's kind of a brute-force algorithm, and not very elegant, but it works fine.
  • Added Stern Special color table.
  • Fixed the bug where the unblink image wasn't set properly.  (Moved the line which defines unblink_image from atv_refresh to atv_getdisplay.)
  • Made the min and max text boxes big enough to hold scientific notation.
  • Simplified the overall widget base hierarchy.
  • Lowered the maximum numbers of text and contour plot overlays to 500 and 10, respectively, to conserve memory.
  • Snazzy new startup image.
  • Title bar now shows the image name if it's a fits file: this is done in subroutine atv_settitle.
  • Added color bar at the bottom of atv window to show the color table.
  • Added SYMSIZE keyword to ATVPLOT command (DJS).
1.0b4 8/2/1999 Changes by David Schlegel:
  • Subroutines atv_icolor, atv_plot1plot, atv_plot1text, atv_plot1contour, atv_plotwindow, atv_plotall, atvplot, atvxyouts, atvcontour, and atverase added.
  • Common block atv_pdata added to store plot overlay information.
  • Routine atv_getdisplay calls atv_plotall to overlay plots on the main draw window.
  • The lowest 8 colors of the colormap are now reserved for plot overlays.
  • All references to !d.table_size now refer to (!d.tablesize - 8), to account for the reserved colors.
Changes by AJB:
  • Modified atv_getdisplay so that the display image is exactly the same size as the draw viewport.
  • Fixed atv_autoscale so that if the autoscale-max value is positive but (image median - 2 sigma) is negative, then the min value is set to zero.  This was done incorrectly in 1.0b3.
  • The main event loop was cleaned up for events in the pull-down menu.
  • Pull-down menu "Labels" added as a widget-based front end for atvxyouts, atvcontour, and atverase.
  • Fixed row, column, surface, and contour plots to always plot white on a black background.
  • Routine atv_getstats now calls atverase to erase plot annotations when a new image is read in.
  • Modified main atv routine to recognize fits filenames on the idl command line.
  • In atv_refresh, added a widget_control command to clear events in the main draw window, to prevent consequences of rapid-fire mouse clicks.
  • SetBlink now sets blink_image = tvrd(), so that plot overlays are included in the blink image.
  • Routine atv_refresh sets unblink_image = tvrd().  When mouse button is released in blink mode, unblink_image is displayed (without the need to redraw plot overlays). 
  • Routine atv_writeps modified to redraw the image and overlays directly to encapsulated postscript, rather than doing a screen capture with tvrd().
  • Routine atv_writetiff now does a screen capture with tvrd(), in order to include plot overlays and text labels in the output image.
  • Routine atv_shutdown calls atverase and sets atv_pdata elements to zero.
1.0b3 6/9/1999 Mostly internal improvements.  Several repeated tasks put into separate subroutines.  Tiff and encapsulated postscript output added.
  • Added atv_cleartext subroutine
  • Changed atv_set_minmax to atv_get_minmax (reads user input to min and max boxes)
  • Added atv_set_minmax subroutine to update min and max boxes
  • Added atv_getoffset subroutine
  • Added atv_cleartext subroutine
  • Added atv_displayall subroutine
  • Modified atv_autoscale so that if the autoscale-max value is positive but (image median - 2 sigma) is negative, then the min value is set to zero.
  • Removed some redundant variable initializations, and moved the state variable initialization into atv_startup
  • Added atv_writeps and atv_writetiff subroutines
  • Moved the different types of line plots to separate subroutines
  • Moved the top-level widget destroyer into atv_shutdown.  Now atv_shutdown can be called from the command line to kill atv, even if atv has crashed.
  • Added a standard IDL descriptive comment header
  • Added hourglass cursor for routines which take noticeable amounts of time.
1.0b2 6/4/1999 Mostly minor changes and bug fixes:
  • Cleaned up photometry routine to remove unused features
  • Moved zoom in/out code to a separate subroutine
  • Moved fits reader to a separate subroutine
  • Removed hard filter (*.fits) from fits reader dialog
  • Program now keeps track of zoom level as an integer, with zoom_factor = 2^(zoom_level)
  • Fixed bug where atv would crash if user tries to blink but 'SetBlink' has not already been set
1.0b1 12/17/1998 Aaron's first IDL widget program

Back to the main ATV page.