;+ ; NAME: allskyplot ; PURPOSE: ; plot some points on the whole sky ; ; INPUTS: ; KEYWORDS: ; /usecolor read another column from the database and use this to set ; the color for each object. Use this for plotting survey ; completion status! ; color= use this specific color ; if both /usecolor and color= are set, then /usecolor takes ; priority. ; ; /overplot Just overplot the stars ; /ps plot to a postscript file ; /label Write the star names next to the stars as labels. ; declimit= Declination limit. Default = -30 (Lick) ; OUTPUTS: ; ; HISTORY: ; Began 2004-08-26 17:34:39 by Marshall Perrin ; 2005-07-11 /overplot option added. ; 2005-07-12 color handling improved ;- PRO allskyplot,filename,_extra=_extra,label=label,usecolors=usecolors,ps=ps,$ overplot=overplot,color=color,declimit=declimit,$ database=database ; NOTE: use /color to plot survey status from haebes.lst if ~(keyword_set(declimit)) then declimit=-30 if keyword_set(database) then begin common mysql, SQLhandle mysqlcheck,SQLhandle q = "select name,ra2000,dec2000 from sources where ra2000 != '' and dec2000 != '';" mysqlquery,SQLhandle,q,name,ra2000,dec2000 ra = ten_string(ra2000) dec = ten_string(dec2000) colorarr =intarr(n_elements(name))+!p.color thickarr = intarr(n_elements(name)) + 1 endif else begin if ~(keyword_set(usecolors)) then begin readcol,filename,name,rh,rm,rs,dd,dm,ds,format="(A,F,F,F,F,F,F)" if ~(keyword_set(color)) then $ colorarr =intarr(n_elements(name))+!p.color $ else colorarr = replicate(color,n_elements(name)) endif else begin readcol,filename,name,rh,rm,rs,dd,dm,ds,color1,color2,format="(A,F,F,F,F,F,F,F,F)" colorarr = intarr(n_elements(name)) + !p.color thickarr = intarr(n_elements(name)) + 1 if usecolors eq 1 then color =color1 else color=color2 wg = where(color ge 2) wr = where(color eq 1) ww = where(color eq 0) colorarr[wg] = getcolor('green') colorarr[wr] = getcolor('red') colorarr[ww] = getcolor('white') thickarr[wg] = 2 thickarr[wr] = 2 thickarr[ww] = 1 endelse ra = tenv(rh,rm,rs) dec = tenv(dd,dm,ds) endelse if ~(keyword_set(overplot)) then $ map_set,/mollweide,/horizon,/noborder ; plot constellations if ~(keyword_set(overplot)) then $ constellations,color=getcolor('blue') ; and the galactic plane galeql = findgen(360) galeqb = fltarr(360) glactc,galeqra,galeqdec,2000.0,galeql,galeqb,2 if ~(keyword_set(overplot)) then $ oplot,galeqra*15,galeqdec,color=getcolor('red') ; now plot the stars for i=0L,n_elements(name)-1 do begin oplot,[ra[i]*15],[dec[i]],psym=1,color=colorarr[i],thick=thickarr[i],symsize=thickarr[i] print,name[i] ;stop endfor ; and possibly label them if (keyword_set(label)) then begin for i=0L,n_elements(name)-1 do begin xyouts,ra[i]*15,dec[i],name[i],_extra=_extra,color=colorarr[i] ;print,name[i] endfor endif ; plot the negative Dec limit for LICK horiz_ra = findgen(360) horiz_dec = fltarr(360)+declimit if ~(keyword_set(overplot)) then $ oplot,horiz_ra,horiz_dec,color=getcolor('yellow') stop end