function rd_dss, ra, dec, w, head, node=node ; round to nearest 15 arcmin, 1 minute of time if keyword_set(node) then begin ractr = round(ra * 12.d*60.d/!dpi) * !dpi/(12.d*60.d) decctr = round(dec * 180.d*4.d/!dpi) * !dpi/(180.d*4.d) endif else begin ractr = round(ra * 12.d*3600.d/!dpi) * !dpi/(12.d*3600) decctr = round(dec * 180.d*3600.d/!dpi) * !dpi/(180.d*3600.d) end rastr = rastrf(ractr,0) rah = strmid(rastr,0,2) ram = strmid(rastr,3,2) ras = strmid(rastr,6,2) decstr = decstrf(decctr,0) decd = strmid(decstr,0,3) decm = strmid(decstr,4,2) decs = strmid(decstr,7,2) wstr = string(ceil(w * 180.d*60.d/!dpi),form='(I2.2)') ; width in arcmin filename = string(rah+ram+ras,decd+decm+decs, wstr,$ form='("~/reference/skychart/dss/dss_",A6,"_",A7,"_",A2,".fits.gz")') print, 'rd_dss: ', filename if not isfile(filename) then begin print, 'rd_dss: accessing DSS to make ', filename s = 'curl "' s = s + 'archive.stsci.edu/cgi-bin/dss_search?v=poss2ukstu_red&' s = s + 'r='+rah+'+'+ram+'+'+ras+'&' s = s + 'd='+decd+'+'+decm+'+'+decs+'&' s = s + 'e=J2000&' s = s + 'h='+wstr+'&' s = s + 'w='+wstr+'&' s = s + 'f=fits&c=gz&fov=NONE&v3=' s = s + '" > ' + filename print, s spawn,s endif print, 'rd_dss: reading ', filename d = readfits(filename,head) return, d ; http://archive.stsci.edu/cgi-bin/dss_search?v=poss2ukstu_red&r=18+00+00&d=-20+00+00&e=J2000&h=60&w=60&f=fits&c=none&s=on&fov=NONE&v3= ; curl "archive.stsci.edu/cgi-bin/dss_search?v=poss2ukstu&r=17+28+55.013&d=-15+00+74.72&e=J2000&h=5&w=5&f=gif&c=none&fov=NONE&v3=" > dss.gif end