pro showquick, file, equalize = equalize ;+ ; Purpose: ; Display MAS 50 channel intermediate format quicklook images created by ; readtape5.f in a scrolling window. The GPS time code is displayed ; at 2 minute intervals to the right of the image data. A narrow ; bar is displayed to the right of the image whenever the aircraft ; roll exceeds 3 degrees. ; ; Usage: ; SHOWQUICK, FILE ; ; Input: ; FILE Name of quicklook image to read (e.g. '970202.ch02') ; ; Optional Keywords: ; /EQUALIZE If set, equalize the image histogram ; (image is scaled into 0-255 range). ; ; Revised: ; 07-FEB-1997 Liam Gumley, CIMSS/SSEC ; (liam.gumley@ssec.wisc.edu) ; ; Examples: ; ;; Display band 2 with histogram equalization ; showquick, '970202.ch02', /equalize ;- ;- read image file openr, lun, file, /get_lun info = fstat( lun ) nx = 25L + 179L ny = long( info.size ) / ( nx * 2L ) image = intarr( nx, ny, /nozero ) readu, lun, image free_lun, lun ;- extract time, and video data in correct orientation ;- (note that blackbody correction is applied to bands 1-25 in readtape5) hr = image( 9, * ) mn = image( 10, * ) sc = image( 11, * ) / 10 roll = image( 20, * ) / 100.0 band = image( 15, 0 ) bb1c = image( 18, * ) image = temporary( image( 25: 203, * ) ) if band ge 26 then $ image = temporary( image ) - rebin( bb1c, 179, ny, /sample ) image = rotate( rotate( temporary( image ), 7 ), 2 ) bb1c = 0B ;- enhance image if not keyword_set( equalize ) then begin image = bytscl( temporary( image ), top = ( !d.n_colors - 1 ) < 255 ) endif else begin minv = min( image, max = maxv ) image = hist_equal( temporary( image ), minv = minv, maxv = maxv ) endelse ;- display scaled image in scrolling window device, get_screen_size = sz base = widget_base( title = strcompress( 'MAS Quicklook ' + file ) ) draw = widget_draw( base, xs = nx + 125, ys = ny + 200, $ x_sc = nx + 125, y_sc = ( ny + 200 ) < ( sz( 1 ) - 100 ), $ /scroll, retain = 2 ) widget_control, base, /realize tv, image, 0, 100 image = 0B ;- plot MAS time tick marks at 2 minute intervals loc = where( ( mn mod 2 eq 0 ) and ( sc eq 0 or sc eq 1 ), count ) if count ge 1 then begin loc = loc( uniq( mn( loc ) ) ) usersym, [ 0, 2.0 ], [ 0, 0 ] plots, 179, loc + 100, /device, psym = 8 endif ;- plot MAS time labels at 2 minute intervals if count ge 1 then begin charsize = !p.charsize if charsize lt 0.01 then charsize = 1.0 fmt = '( i2.2 )' label = string( hr( loc ), format = fmt ) + ':' + $ string( mn( loc ), format = fmt ) xyouts, 179 + 20, loc + 100, label, /device, charsize = 1.5 * charsize endif hr = 0B mn = 0B sc = 0B ;- plot small ticks wherever roll exceeds 3.0 degrees absolute loc = where( abs( roll ) gt 3.0, count ) if count ge 1 then begin usersym, [ 0, 0.5 ], [ 0, 0 ] plots, 179 + 5, loc + 100, /device, psym = 8 endif roll = 0B print, 'Times are UTC from GPS' print, 'White bar to right indicates roll > 3 degrees' end