;+ ; NAME: ; oc_getstar_2mass_test ; ; PURPOSE: (one line) ; Test the 2MASS reader routines and make several plots of found stars ; ; DESCRIPTION: ; This routine performs simple a test using the 2MASS reader ; routine oc_search_pos_single_2mass(). ; ; 1) A bullseye-style plot is made showing the number of stars within ; several search radii. ; ; CATEGORY: ; Star catalogs ; ; CALLING SEQUENCE: ; oc_getstar_2mass_test ; ; INPUTS: ; None ; ; OPTIONAL INPUT PARAMETERS: ; None ; ; KEYWORD INPUT PARAMETERS: ; None ; ; KEYWORD OUTPUT PARAMETERS: ; None ; ; OUTPUTS: ; Makes plots to screen and prints diagnostic messages. ; ; COMMON BLOCKS: ; None ; ; SIDE EFFECTS: ; None ; ; RESTRICTIONS: ; None ; ; EXAMPLE: ; oc_getstar_2mass_test ; ; MODIFICATION HISTORY: ; Written 30-May-2006 by Henry Throop, SwRI ;- pro oc_getstar_2mass_test ; HBT 23-May-2006 d2r = 2*!dpi / 360d r2d = 1/d2r d2as = 60d*60d ra = 225*d2r dec = 1*d2r radii = [0.7d, 0.5d, 0.2d, 0.1d]*d2r ; radii = [0.3d, 0.2d, 0.1d, 0.05d]*d2r sym_plus = 1 sym_point = 3 color_blue = 3 color_red = 1 color_yellow = 5 color_green = 2 sym = sym_point j = 0 colors radius = radii[j++] ids = oc_search_pos_single_2mass(ra, dec, radius, nstar) stars = oc_getstar_2mass(ids) colors plot, stars.ra*r2d, stars.dec*r2d, $ xrange=[ra-radius/cos(dec), ra+radius/cos(dec)]*r2d, $ yrange=[dec-radius, dec+radius]*r2d, $ psym=3, $ title = '2MASS', /iso oplot, stars.ra*r2d, stars.dec*r2d, psym=sym, color=color_red tvellipse, radius*r2d, radius/cos(dec)*r2d, ra*r2d, dec*r2d, 90, /data radius = radii[j++] ids = oc_search_pos_single_2mass(ra, dec, radius, nstar) stars = oc_getstar_2mass(ids) oplot, stars.ra*r2d, stars.dec*r2d, psym=sym, color=color_blue tvellipse, radius*r2d, radius/cos(dec)*r2d, ra*r2d, dec*r2d, 90, /data radius = radii[j++] ids = oc_search_pos_single_2mass(ra, dec, radius, nstar) stars = oc_getstar_2mass(ids) oplot, stars.ra*r2d, stars.dec*r2d, psym=sym, color=color_green tvellipse, radius*r2d, radius/cos(dec)*r2d, ra*r2d, dec*r2d, 90, /data radius = radii[j++] ids = oc_search_pos_single_2mass(ra, dec, radius, nstar) stars = oc_getstar_2mass(ids) oplot, stars.ra*r2d, stars.dec*r2d, psym=sym, color=color_yellow tvellipse, radius*r2d, radius/cos(dec)*r2d, ra*r2d, dec*r2d, 90, /data stop end ;;;;;;;;;; pro test2 ; Test the 2MASS coordinate -> ID transformation system ; Prints the 2MASS ID's for which oc_convertid_pos_2mass returns ; improper results. See notes in that routine, and for 30-May-2006. common units ra = 0.0d * d2r dec = 1d * d2r radius = 1d * d2r ids = oc_search_pos_single_2mass(ra, dec, radius, nstar) stars = oc_getstar_2mass(ids) ids_2 = oc_convertid_pos_2mass(stars.ra, stars.dec, /TRU) print, ' # HBT_ID 2MASS_ID RA Dec' for i = 0, nstar-1 do begin if ids_2[i] ne ids[i] then begin $ print, i, ids_2[i], ids[i] , $ radtohms_str(stars[i].ra, char='_'), $ radtodms_str(stars[i].dec, char='_'), $ format = '(I5, X, A20, X, A20, X, A15, X, A15)' end end stop end