;+ ; NAME fitsdispw.pro ; ; PURPOSE Display a FITS image. ; ; SYNTAX fitsdispw, fits_name, xdim_prev, ydim_prev, xb, yb ; fitsdispw, fits_name, xdim_prev, ydim_prev, xb, yb, /gif ; fitsdispw, fits_name, xdim_prev, ydim_prev, xb, yb, wmin=1.0 ; fitsdispw, fits_name, xdim_prev, ydim_prev, xb, yb, wmax=250.0 ; ; EXTERNAL ; PROCEDURES fits_annotatew.pro ; ; HISTORY Andrew L. Stanger HAO/NCAR 14 September 2001 ; 26 Sep 2001: wide format (no colorbar BELOW image). ;- PRO fitsdispw, fits_name, xdim_prev, ydim_prev, xb, yb, $ gif=gif, wmin=wmin, wmax=wmax ; xb = 160 ; X-axis border for annotation. ; yb = 0 ; Y-axis border for annotation. ftspos = STRPOS (fits_name, '.fts') basename = STRMID (fits_name, 0, ftspos) ; print, 'basename: ', basename img = readfits (fits_name, hdu) ;--- Extract information from header. xdim = fxpar (hdu, 'NAXIS1') ydim = fxpar (hdu, 'NAXIS2') ;--- "Erase" left annotation area. leftborder = BYTARR (xb, ydim + yb) leftborder [*, *] = 0 TV, leftborder ;--- Resize window if it has changed. if (xdim NE xdim_prev OR ydim NE ydim_prev) THEN $ window, xsize=xdim+xb, ys=ydim+yb ; print, 'xdim + xb: ', xdim + xb ; print, 'ydim + yb: ', ydim + yb xdim_prev = xdim ydim_prev = ydim ;--- Annotate image. fits_annotatew, hdu, xdim, ydim, xb, yb, wmin=wmin, wmax=wmax ;--- Get information from FITS header. orbit_id = fxpar (hdu, 'ORBIT-ID') image_id = fxpar (hdu, 'IMAGE-ID') telescop = fxpar (hdu, 'TELESCOP') instrume = fxpar (hdu, 'INSTRUME') dateobs = fxpar (hdu, 'DATE-OBS') timeobs = fxpar (hdu, 'TIME-OBS') type_obs = fxpar (hdu, 'TYPE-OBS') dataform = fxpar (hdu, 'DATAFORM') rsun = fxpar (hdu, 'RSUN') srsun = STRING (rsun, FORMAT='(F7.2)') bunit = fxpar (hdu, 'BUNIT') datamin = fxpar (hdu, 'DATAMIN') datamax = fxpar (hdu, 'DATAMAX') dispmin = fxpar (hdu, 'DISPMIN') dispmax = fxpar (hdu, 'DISPMAX') telescop = STRTRIM (telescop, 2) ; IF (telescop NE 'SPARTAN 201' AND instrume NE 'WLC') THEN $ ; BEGIN ; PRINT, 'TELESCOP: ', telescop, ' should be "SPARTAN 201".' ; PRINT, 'INSTRUME: ', instrume, ' should be "WLC".' ; RETURN ; END ;--- Display image. dmin = dispmin dmax = dispmax ; IF (KEYWORD_SET (wmin) OR wmin EQ 0.0) THEN dmin = wmin IF (KEYWORD_SET (wmin)) THEN dmin = wmin IF (KEYWORD_SET (wmax)) THEN dmax = wmax TV, BYTSCL (img, min=dmin, max=dmax, top=249), xb, yb RETURN END