# CHART -- Toy finder chart program using an object name, a user-supplied # image, or a position spec to display a point on the sky and an overlay # of known NED objects. # # Sample Interesting Test Objects: # abell2235 (has QSOs), abell1689 (has G_Lens), abell2255 (has galaxies) procedure chart (object) string object { prompt = "Object to plot" } real size = 0.2 { prompt = "Size (degrees)" } string fields = "G_Lens,Xray,Radio,QSO"{ prompt = "Objects to mark" } bool grid = yes { prompt = "Overlay coordinate grid?" } begin real lra, ldec, lsz int count, siap, col string imname, pos, fstr, imroot, obj bool do_grid reset clobber = yes # Set the environment reset imclobber = yes reset stdimage = imt1024 obj = object # get a local variable of the param value lsz = size fstr = fields do_grid = grid imname = mktemp ("tmp$chart") // ".fits" # create temp filenames pos = mktemp ("tmp$chart") # Resolve the object to coordinates. # Get an image of the field if the user didn't supply one. # Get NED sources # Display the image. We're using DSS so we need to specify an image # extension, other SIAP services imroot = imname ; imname = imname // "[0]" display (imname, 1, fill+, >& "dev$null") # Select the RA,Dec from the output NED table. fields ("ned.txt","3,4", >& "pos_all") # Expand the list of object types we want to mark. print (fstr) | translit ("STDIN",",","\n",del-, > "fields") # Mark the Galaxies on the display. match (" G ","ned.txt") | fields("STDIN","3,4", >& "pos_all") wcsctran ("pos_all", "c1", imname, verb-, inwcs="world",outwcs="logical",units="n n") tvmark (frame=1,coords="c1",mark="plus", color=206, txsize=3) # Mark the rest of the requested objects on the display. list = "fields" while (fscan (list, s1) != EOF) { match (s1,"ned.txt") | fields("STDIN","3,4,5", >& "pos_w") wcsctran ("pos_w","pos_l", imname, "world","logical", verb-, units="n n") | \ tvmark (frame=1, coords="pos_l",mark="plus",color=204,txsize=3,lab+) } # Do coord grid overlay. if (do_grid) { wcslab (imname, 1, use-, fill+, overplot+, append+, labout-, dev="imdy") } # Clean up. if (access (pos)) delete (pos, verify-, >& "dev$null") if (access (imroot)) delete (imroot, verify-, >& "dev$null") end