Home > matutils > interf > map20cmSrcs.m

map20cmSrcs

PURPOSE ^

function cat=map20cmSrcs(ra,dec,catalog)

SYNOPSIS ^

function cat=map20cmSrcs(ra,dec,catalog)

DESCRIPTION ^

 function cat=map20cmSrcs(ra,dec,catalog)
 Use szaMatPtSrc to locate 20cm sources near pointing center
 Create a file to load into difmap to plot them. 

 RA and Dec in sexagesimal strings

 DPM 11/05/07

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function cat=map20cmSrcs(ra,dec,catalog)
0002 % function cat=map20cmSrcs(ra,dec,catalog)
0003 % Use szaMatPtSrc to locate 20cm sources near pointing center
0004 % Create a file to load into difmap to plot them.
0005 %
0006 % RA and Dec in sexagesimal strings
0007 %
0008 % DPM 11/05/07
0009 %
0010 
0011 catalog=lower(catalog);
0012 if ~(strcmp(catalog,'first') | strcmp(catalog,'nvss'))
0013   disp 'Must choose either nvss or first catalog'
0014   return
0015 end
0016 
0017 cat=szaMatPtSrc('/data/szadaq/catalogs',catalog,ra,dec,'00:10:00');
0018 Nsrc=length(cat.ra);
0019 disp(sprintf('########## Found %i sources ##########',Nsrc))
0020 
0021 catfile=[catalog,'.txt'];
0022 % color=0 (black) for NVSS, 2 (red) for FIRST
0023 ptColor=2*strcmp(catalog,'first');
0024 % vertical text offset is +0.5 for NVSS, -0.5 for FIRST
0025 vOff=0.5-strcmp(catalog,'first');
0026 if Nsrc
0027   [ras decs]=fracdeg2ast(15*cat.ra,cat.dec);
0028   fid=fopen(catfile,'w');
0029   for m=1:Nsrc
0030     flux=sprintf('%.1f',cat.int(m));
0031     fprintf(fid,'mark_radec %s, %s, circle_dot,%i,1,"%s",0,1,%.1f\n',...
0032     ras(m,:),decs(m,:),ptColor,flux,vOff);
0033   end
0034   fclose(fid);
0035 end
0036 
0037 return

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005