pro ASTROTV, im, hd, outdir=outdir, prefix=prefix, title=title, minvalue=minvalue, maxvalue=maxvalue ; _extra=_extra ;+ ; NAME: ; ASTROTV ; ; PURPOSE: ; Produce RA-DEC labelled "X" (800x800 pixel^2), Full-Size "Grabbed" JPG and "EPS" ; (20x20 cm^2) plots of af image IM with an header HD, overplotting N-E arrows ; ; INPUTS: ; IM - Array containing some 2D image ; HD - FITS header of IM ; ; OUTPUTS: ; None ; ; KEYWORDS: ; OUTDIR - in - output directory (defaults to '.') ; PREFIX - in - filename prefix (defaults to 'idl') ; TITLE - in - plot title (passed to imcontour) ; MINVALUE - in - tvscale minvalue (passed to tvscale) ; MAXVALUE - in - tvscale maxvalue (passed to tvscale) ; ; EXAMPLES: ; im=readfits('~/spitzer/swire/mips-ge/aal/mosaics_and_catalogues/70um_mosaics/mosaic_en2_70.fits.gz',hdr) ; j0=where(finite(im) eq 0) & j1=where(finite(im) eq 1) & im[j0]=min(im[j1]) & astrotv,im,hdr ; ; WRITTEN FILES: ; PREFIX.jpg/eps (defaults to idl.jpg/eps) ; ; SEE ALSO: ; MAKE_IMAGE ; ; HISTORY: ; 16 Nov 2004 Written by Mattia Vaccari ; ; 19 Apr 2005 Call to SCREEN_GRAB added and expanded doc ; 15 Aug 2009 TITLE, MINVALUE and MAXVALUE keywords added ; 06 Dec 2009 OUTDIR keyword and on_error,2 added ;- on_error,2 if not(keyword_set(outdir)) then outdir='.' if not(keyword_set(prefix)) then prefix='idl' ; Create Plotting Window window,xsize=800,ysize=800 ; Determine actual size of plot (assuming that x & y pixel size is the same!) size=0.75 pos=[0.5-float((size(im))[1])/max((size(im))([1,2]))*size/2,$ 0.5-float((size(im))[2])/max((size(im))([1,2]))*size/2,$ 0.5+float((size(im))[1])/max((size(im))([1,2]))*size/2,$ 0.5+float((size(im))[2])/max((size(im))([1,2]))*size/2] ; Plot Astronomical Coordinates imcontour, im, hd, /nodata , pos=pos, title=title ; Plot Image tvscale, im, /overplot, pos=pos, maxvalue=maxvalue, minvalue=minvalue imcontour, im, hd, /nodata, /noerase , pos=pos ; Plot N-E Arrows arrows,hd,0.075,0.075,/normal,arrowlen=3.0 screen_grab,outdir+'/'+prefix+'.jpg',/jpg set_plot,'ps' device,filename=outdir+'/'+prefix+'.eps',xsize=20,ysize=20,xoffset=(21.-20)/2.,yoffset=(29.7-20)/2.,bits=8,/enc imcontour, im, hd, /nodata , pos = pos tvscale, im, /overplot, pos = pos imcontour, im, hd, /nodata, /noerase , pos = pos arrows,hd,0.1,0.1,/normal,arrowlen=3.0 device,/close & set_plot,'x' end