Index: /trunk/src/pvo-utils.cc
===================================================================
--- /trunk/src/pvo-utils.cc	(revision 56)
+++ /trunk/src/pvo-utils.cc	(revision 57)
@@ -351,16 +351,22 @@
 		std::string ra2, std::string dec2)
   {
-    if((ra1==ra2)&&(dec1==dec2)) return 0.;
-    else{
-
-      double r1,d1,r2,d2;
-      r1 = dmsToDec(ra1) * 15. * M_PI / 180.;
-      d1 = dmsToDec(dec1) * M_PI / 180.;
-      r2 = dmsToDec(ra2) * 15. * M_PI / 180.;
-      d2 = dmsToDec(dec2) * M_PI / 180.;
-      long double angsep = cos(r1-r2)*cos(d1)*cos(d2) + sin(d1)*sin(d2);
-      
-      return acosl(angsep)*180./M_PI;
-    }
+    if((ra1==ra2)&&(dec1==dec2)) 
+      return 0.;
+    else
+      return angSep(dmsToDec(ra1)*15.,dmsToDec(dec1),
+		    dmsToDec(ra2)*15.,dmsToDec(dec2) );
+  }
+
+  double angSep(double ra1, double dec1, double ra2, double dec2)
+  {
+    double r1,d1,r2,d2;
+    r1 = ra1  * M_PI / 180.;
+    d1 = dec1 * M_PI / 180.;
+    r2 = ra2  * M_PI / 180.;
+    d2 = dec2 * M_PI / 180.;
+    long double angsep = cos(r1-r2)*cos(d1)*cos(d2) + sin(d1)*sin(d2);
+    
+    return acosl(angsep)*180./M_PI;
+    
   }
 
Index: /trunk/src/pvo-utils.hh
===================================================================
--- /trunk/src/pvo-utils.hh	(revision 56)
+++ /trunk/src/pvo-utils.hh	(revision 57)
@@ -60,4 +60,7 @@
 		std::string ra2, std::string dec2);
 
+  /** Find the angular separation of two sky positions.*/
+  double angSep(double ra1, double dec1, double ra2, double dec2);
+
   std::string getIAUName(double ra, double dec);  
   ///< Create an IAU-style formatted name, based on the equatorial position.
Index: /trunk/src/pvoconesearch.cc
===================================================================
--- /trunk/src/pvoconesearch.cc	(revision 56)
+++ /trunk/src/pvoconesearch.cc	(revision 57)
@@ -24,9 +24,11 @@
   1. Prints RA, DEC, DATE-OBS, BEAMSIZE, OFFSET for all FITS files that\n\
      lie within \"radius\" of the position given by ra, dec.\n\
-  2. Prints this help information.\n\
- The RA and DEC should be in the form hh:mm:ss.ss etc.\n\
- The beam size is also taken into account, so the effective search radius\n\
-  becomes (radius + 0.5*beamFWHM).\n\
- Note that if a keyword is not present, --- is printed.\n";
+     OFFSET is angular offset from query position.\n\
+  2. Prints this help information.\n\n\
+ The RA and DEC can be in the form hh:mm:ss.ss etc or in decimal degrees.\n\
+ The search radius is in degrees. The beam size is also taken into account,\n\
+  so the effective search radius becomes (radius + 0.5*beamFWHM).\n\
+ Note that if a keyword is not present, --- is printed.\n\
+ FITS files are assumed to have suffixes of .fits or .rf\n";
 
 int main(int argc, char * argv[])
@@ -36,7 +38,7 @@
 
   std::vector<std::string> namelist;
-  std::string RAcentre,DECcentre;
-  double radius;
-  unsigned int i;
+  std::string RAstring,DECstring;
+  double radius,RAcentre,DECcentre;
+  unsigned int i,numColon;
   switch(argc){
   case 4:
@@ -52,21 +54,29 @@
       namelist[globbuf1.gl_pathc+i] = globbuf2.gl_pathv[i];
 
-    RAcentre = argv[1];
-    DECcentre = argv[2];
-    radius = atof(argv[3]) / 60.;
+    RAstring = argv[1];
+    numColon=0;
+    for(i=0;i<RAstring.size();i++) if(RAstring[i]==':') numColon++;
+    if(numColon>0) RAcentre = dmsToDec(RAstring)*15.;
+    else RAcentre = atof(argv[1]);
+    DECstring = argv[2];
+    numColon=0;
+    for(i=0;i<DECstring.size();i++) if(DECstring[i]==':') numColon++;
+    if(numColon>0) DECcentre = dmsToDec(DECstring);
+    else DECcentre = atof(argv[2]);
+
+    radius = atof(argv[3]);
     
-    std::cout << "RA = " << RAcentre
-	      << ", DEC = " << DECcentre
-	      << ", radius = " << radius << " deg\n";
+    std::cout.setf(std::ios::fixed);
+    std::cout << std::setprecision(4)
+	      << "Searching with: RA = " << RAcentre
+	      << " deg, DEC = " << DECcentre
+	      << " deg, Radius = " << radius << " deg\n";
 
     break;
-  case 2:
-    //    if(strcmp(argv[1],"-h")==0){
+  default:
+    if(argc==2 && strcmp(argv[1],"-h")==0)
       std::cout << help_text;
-      return 0;
-      //    }
-    break;
-  default:
-    std::cerr << help_text;
+    else
+      std::cerr << help_text;
     return 0;
     break;
@@ -80,5 +90,5 @@
 	    << std::setw(maxsize+1+15+15+31+11+13) << "-"
 	    << "\n" << std::setfill(' ') 
-	    << std::setw(maxsize) << "FILE"      << ": "
+	    << std::setw(maxsize) << "FILENAME"  << ": "
 	    << std::setw(14)      << "RA"        << " "
 	    << std::setw(14)      << "DEC"       << " "
@@ -92,5 +102,6 @@
 	    << std::setw(10)      << "[arcmin]"  << " "
 	    << std::setw(12)      << "[arcmin]"  << "\n"
-	    << std::setfill('-')  << std::setw(maxsize+1+15+15+31+11+13) << "-"
+	    << std::setfill('-')  
+	    << std::setw(maxsize+1+15+15+31+11+13) << "-"
 	    << "\n"<< std::setfill(' ') ;
 
@@ -105,5 +116,4 @@
     
       std::string ra,dec,date;
-      //     std::string missing = "N/A";
       std::string missing = "---";
       if(fitsfile.getKeyword<std::string>("RA",ra)!=0) ra = missing;
@@ -113,18 +123,18 @@
       fitsfile.getKeyword<float>("BMAJ",bmaj);
       fitsfile.getKeyword<float>("BMIN",bmin);
-      beamradius = 0.5*(bmaj+bmin)/2.;
+      beamradius = 0.5*(bmaj+bmin)/2.; // half average FWHM, in deg
 
       if(ra!=missing && dec!=missing){
-	double angsep = angSep(ra,dec,RAcentre,DECcentre);
-// 	std::cerr << namelist[i] << " " << angsep<<"\n";
-	if(angsep < radius+beamradius){
+	double angsep = angSep(dmsToDec(ra)*15, dmsToDec(dec),
+			       RAcentre,        DECcentre     );
 
+	if(angsep < radius+beamradius)
 	  std::cout << std::setw(maxsize) << namelist[i] << ": "
 		    << std::setw(14)      << ra          << " "
 		    << std::setw(14)      << dec         << " "
 		    << std::setw(30)      << date        << " "
-		    << std::setw(10)      << beamradius*2.*60.<< " "
+		    << std::setw(10)      << beamradius*2.<< " "
 		    << std::setw(12)      << angsep*60.  << "\n";
-	}
+      
       }
     }
Index: /trunk/src/pvosummary.cc
===================================================================
--- /trunk/src/pvosummary.cc	(revision 56)
+++ /trunk/src/pvosummary.cc	(revision 57)
@@ -26,5 +26,6 @@
   2. Prints RA, DEC, DATE-OBS for all fits files in the current directory.\n\
   3. Prints this help information.\n\
- Note that if a keyword is not present, --- is printed.\n";
+ Note that if a keyword is not present, --- is printed.\n\
+ FITS files are assumed to have suffixes of .fits or .rf\n";
 
 int main(int argc, char * argv[])
@@ -68,9 +69,10 @@
   std::cout << std::setfill('-')  << std::setw(maxsize+1+15+15+31) << ""
 	    << "\n" << std::setfill(' ') 
-	    << std::setw(maxsize) << "FILE"      << ": "
+	    << std::setw(maxsize) << "FILENAME"  << ": "
 	    << std::setw(14)      << "RA"        << " "
 	    << std::setw(14)      << "DEC"       << " "
 	    << std::setw(30)      << "DATE-OBS"  << "\n"
-	    << std::setfill('-')  << std::setw(maxsize+1+15+15+31) << ""
+	    << std::setfill('-')  
+	    << std::setw(maxsize+1+15+15+31) << ""
 	    << "\n"<< std::setfill(' ') ;
 
@@ -85,5 +87,4 @@
     
       std::string ra,dec,date;
-      //     std::string missing = "N/A";
       std::string missing = "---";
       if(fitsfile.getKeyword<std::string>("RA",ra)!=0) ra = missing;
