pro MAKE_IMAGE, ifn, odir=odir, ofn=ofn, is=is, ifr=ifr, cm=cm, min=min, max=max, $ thick=thick, title=title, wc=wc, invcols=invcols, noaxes=noaxes ;+ ; NAME: ; MAKE_IMAGE ; ; PURPOSE: ; Make eps and png image of a sky field showing its coordinates and orientation ; ; INPUTS: ; IFN : Input File Name ; ; KEYWORDS: ; odir=odir ; Output Directory (default is './') ; ofn=ofn ; Output File Name without extension (default is 'idl') ; is=is ; Image Size i.e. size of larger side of eps file in cm (default is 20) ; ifr=ifr ; Image Fraction i.e. fraction of image covered by plot (default is 0.7) ; cm=cm : Color Map (default is 0) ; min=min ; (default is min(arr)) ; max=max ; (default is max(arr)) ; thick=thick ; axis/annotations/symbols thickness (default is 3) ; title=title ; Image Title (default is '') ; wc=wc ; Wild Card value for "no data" points ; invcols=invcols ; inverts color map ; noaxes=noaxes ; doesn't plot axes (or rather plots them outside EPS BB) ; ; EXAMPLES: ; ifn='~/spitzer/swire/mips-ge/aal/mosaics_and_catalogues/70um_mosaics/mosaic_en2_70.fits.gz' ; make_image,ifn ; ; WRITTEN FILES: ; ODIR/OFN.eps/png (defaults to ./idl.eps/png) ; ; SEE ALSO: ; ASTROTV ; ; MODIFICATION HISTORY: ; 07 Jul 2007 Written by Mattia Vaccari on 070707!;-) ; ; 11 Jul 2007 Variously tweaked by Mattia Vaccari ;- if strlen(findfile(ifn)) eq 0 then begin $ print,'File ',ifn,' not found! Returning...' &$ return &$ endif arr=readfits(ifn,hdr) ; arr=readfits('../images/s_mips_1_s1_v0.30_sci.fits.gz',hdr) & help,arr aux=-9.9 if (size(wc))[1] ne 0 then arr[where(arr eq wc)]=aux if (where(finite(arr) eq 0))[0] ne -1 then arr[where(finite(arr) eq 0)]=aux if not(keyword_set(is)) then is=25. if not(keyword_set(ifr)) then ifr=0.7 if keyword_set(noaxes) then ifr=1.0 xs=n_elements(arr(*,0)) & ys=n_elements(arr(0,*)) xsize=ifr*xs/max([xs,ys]) & ysize=ifr*ys/max([xs,ys]) pos=[0.5-xsize/2,0.5-ysize/2,0.5+xsize/2,0.5+ysize/2] if not(keyword_set(odir)) then odir='./' if not(keyword_set(ofn)) then ofn='idl' if not(keyword_set(cm)) then cm=0 if not(keyword_set(title)) then title='' if not(keyword_set(thick)) then thick=3 if not(keyword_set(min)) then min=min(arr) else min=min>min(arr) if not(keyword_set(max)) then max=max(arr) else max=max