Index: /trunk/Makefile
===================================================================
--- /trunk/Makefile	(revision 89)
+++ /trunk/Makefile	(revision 90)
@@ -103,6 +103,6 @@
 	$(CXX) -o pvosummary2.x $(BASE)/pvosummary-glob.o $(HEADER) $(BLOCK) $(PSRFITS) $(UTILS) $(LIBS)
 
-s70summary : $(BASE)/s70summary.o $(HEADER) $(BLOCK) $(UTILS)
-	$(CXX) -o s70summary.x $(BASE)/s70summary.o $(HEADER) $(BLOCK)  $(UTILS) $(LIBS)
+pvotapesummary : $(BASE)/pvotapesummary.o $(HEADER) $(BLOCK) $(UTILS)
+	$(CXX) -o pvotapesummary.x $(BASE)/pvotapesummary.o $(HEADER) $(BLOCK)  $(UTILS) $(LIBS)
 
 testNewPSRF : $(TEST)/testNewPsrfits.o $(HEADER) $(BLOCK) $(PSRFITS) $(UTILS)
Index: /trunk/Makefile.psr
===================================================================
--- /trunk/Makefile.psr	(revision 89)
+++ /trunk/Makefile.psr	(revision 90)
@@ -19,5 +19,5 @@
 # LDFLAGS := $(LDFLAGS) -lcfitsio -lm
 
-PROGRAMS = pvoconvert.C pvosummary.C s70summary.C pvoconesearch.C
+PROGRAMS = pvoconvert.C pvosummary.C pvotapesummary.C pvoconesearch.C
 
 pvoconvert.srcs = pvo-header.C  pvo-block.C  pvo-utils.C pvo-FITS.C  pvo-FITS-fileIO.C  
@@ -25,5 +25,5 @@
 pvosummary.srcs = pvo-header.C  pvo-block.C  pvo-utils.C pvo-FITS.C  pvo-FITS-fileIO.C  pvo-metadata.C
 
-s70summary.srcs = pvo-header.C  pvo-block.C  pvo-utils.C 
+pvotapesummary.srcs = pvo-header.C  pvo-block.C  pvo-utils.C 
 
 pvoconesearch.srcs = pvo-header.C  pvo-block.C  pvo-utils.C pvo-FITS.C  pvo-FITS-fileIO.C  pvo-metadata.C
Index: /trunk/docs/VOimplementation.tex
===================================================================
--- /trunk/docs/VOimplementation.tex	(revision 89)
+++ /trunk/docs/VOimplementation.tex	(revision 90)
@@ -109,18 +109,18 @@
 
 \newpage
-\section{Existing data: The ``Observations'' table}
-
-The list of the columns in the existing \textsc{observations}
+\section{Existing data: The ``observations'' table}
+
+The list of the columns in the existing \texttt{observations}
 mySQL table is given in the table in
 Appendix~\ref{app-obstable}. There is a second table,
-\textsc{observations2} that has different data in it -- it is not
+\texttt{observations2} that has different data in it -- it is not
 clear exactly what this data is or where it comes from (there is no
 reference to it in any of the files in the \texttt{htdocs} directory
 on \texttt{herschel}. Its setup (which is slightly different to
-\textsc{observations}) is also shown in Appendix~\ref{app-obstable}. 
+\texttt{observations}) is also shown in Appendix~\ref{app-obstable}. 
 
 \subsection{Positional information}
 
-Note that the sky positions for the files in the \textsc{observations}
+Note that the sky positions for the files in the \texttt{observations}
 table are broken up into hours/degrees, minutes and seconds
 columns. This presents a problem, as the declination information does
@@ -167,13 +167,13 @@
 -- version of mysql is <4.1 so cannot use CREATE ... LIKE ...
 CREATE TEMPORARY TABLE newobs
-   SELECT *,
-        (raj_hour+raj_minute/60.+raj_second/3600.)*15 as raj,
-        CASE WHEN pulsar_name LIKE "%-%" 
-                  THEN -1.*(abs(decj_degree)+decj_minute/60.+decj_second/3600.)
-             WHEN (decj_degree<0.)
-                  THEN -1.*(abs(decj_degree)+decj_minute/60.+decj_second/3600.)
-             ELSE abs(decj_degree)+decj_minute/60.+decj_second/3600. 
-        END AS decj
-   FROM observations;
+  SELECT *,
+      (raj_hour+raj_minute/60.+raj_second/3600.)*15 as raj,
+      CASE WHEN pulsar_name LIKE "%-%" 
+               THEN -1.*(abs(decj_degree)+decj_minute/60.+decj_second/3600.)
+           WHEN (decj_degree<0.)
+               THEN -1.*(abs(decj_degree)+decj_minute/60.+decj_second/3600.)
+           ELSE abs(decj_degree)+decj_minute/60.+decj_second/3600. 
+      END AS decj
+  FROM observations;
   \end{verbatim}
 \end{quote}
@@ -315,5 +315,5 @@
 \newpage
 \appendix
-\section{``Observations'' table setup}
+\section{The ``observations'' table setup}
 \label{app-obstable}
 
@@ -355,5 +355,5 @@
  nbeam             & tinyint(3) unsigned & YES  &     & NULL         &\\
 \end{tabular}
-\caption{Fields for the \textsc{observations} table in the mySQL
+\caption{Fields for the \texttt{observations} table in the mySQL
   database, as it stands at present.}
 \label{tab-obs}
@@ -366,35 +366,35 @@
  Field               & Type           & Null & Key & Default      & Extra \\
 \hline
- pulsar\_name        & varchar(16)    &      &     &              &       \\
- filename            & varchar(32)    &      &     &              &       \\
- raj\_hour           & int(2)         & YES  &     & 0            &       \\
- raj\_minute         & int(2)         & YES  &     & 0            &       \\
- raj\_second         & decimal(12,10) & YES  &     & 0.0000000000 &       \\
- decj\_degree        & int(2)         & YES  &     & 0            &       \\
- decj\_minute        & int(2)         & YES  &     & 0            &       \\
- decj\_second        & decimal(12,10) & YES  &     & 0.0000000000 &       \\
- dm                  & decimal(16,10) & YES  &     & NULL         &       \\
- period              & decimal(32,24) & YES  &     & NULL         &       \\
- bw                  & decimal(16,6)  & YES  &     & NULL         &       \\
- cal\_file\_loc      & varchar(128)   & YES  &     & NULL         &       \\
- cnfg                & varchar(128)   & YES  &     & NULL         &       \\
- data\_loc           & varchar(128)   &      &     &              &       \\
- data\_type          & varchar(16)    & YES  &     & NULL         &       \\
- freq                & decimal(32,16) & YES  &     & NULL         &       \\
- inst                & varchar(32)    & YES  &     & NULL         &       \\
- MJD                 & decimal(32,26) & YES  &     & NULL         &       \\
- npol                & int(6)         & YES  &     & NULL         &       \\
- nchan               & int(6)         & YES  &     & NULL         &       \\
- nbin                & int(6)         & YES  &     & NULL         &       \\
- nsub                & int(6)         & YES  &     & NULL         &       \\
- processing\_options & varchar(255)   & YES  &     & NULL         &       \\
- is\_calibrated      & tinyint(1)     & YES  &     & 0            &       \\
- rcvr                & varchar(16)    & YES  &     & NULL         &       \\
- site                & varchar(8)     & YES  &     & NULL         &       \\
- file\_size\_bytes   & int(32)        & YES  &     & NULL         &       \\
- length              & decimal(32,20) & YES  &     & NULL         &       \\
- obsrvr              & varchar(32)    & YES  &     & NULL         &       \\
+ pulsar\_name        & varchar(16)    &      &     &              &\\
+ filename            & varchar(32)    &      &     &              &\\
+ raj\_hour           & int(2)         & YES  &     & 0            &\\
+ raj\_minute         & int(2)         & YES  &     & 0            &\\
+ raj\_second         & decimal(12,10) & YES  &     & 0.0000000000 &\\
+ decj\_degree        & int(2)         & YES  &     & 0            &\\
+ decj\_minute        & int(2)         & YES  &     & 0            &\\
+ decj\_second        & decimal(12,10) & YES  &     & 0.0000000000 &\\
+ dm                  & decimal(16,10) & YES  &     & NULL         &\\
+ period              & decimal(32,24) & YES  &     & NULL         &\\
+ bw                  & decimal(16,6)  & YES  &     & NULL         &\\
+ cal\_file\_loc      & varchar(128)   & YES  &     & NULL         &\\
+ cnfg                & varchar(128)   & YES  &     & NULL         &\\
+ data\_loc           & varchar(128)   &      &     &              &\\
+ data\_type          & varchar(16)    & YES  &     & NULL         &\\
+ freq                & decimal(32,16) & YES  &     & NULL         &\\
+ inst                & varchar(32)    & YES  &     & NULL         &\\
+ MJD                 & decimal(32,26) & YES  &     & NULL         &\\
+ npol                & int(6)         & YES  &     & NULL         &\\
+ nchan               & int(6)         & YES  &     & NULL         &\\
+ nbin                & int(6)         & YES  &     & NULL         &\\
+ nsub                & int(6)         & YES  &     & NULL         &\\
+ processing\_options & varchar(255)   & YES  &     & NULL         &\\
+ is\_calibrated      & tinyint(1)     & YES  &     & 0            &\\
+ rcvr                & varchar(16)    & YES  &     & NULL         &\\
+ site                & varchar(8)     & YES  &     & NULL         &\\
+ file\_size\_bytes   & int(32)        & YES  &     & NULL         &\\
+ length              & decimal(32,20) & YES  &     & NULL         &\\
+ obsrvr              & varchar(32)    & YES  &     & NULL         &\\
 \end{tabular}
-\caption{Fields for the \textsc{observations2} table in the mySQL
+\caption{Fields for the \texttt{observations2} table in the mySQL
   database.}
 \label{tab-obs2}
Index: /trunk/install_to_psr.sh
===================================================================
--- /trunk/install_to_psr.sh	(revision 89)
+++ /trunk/install_to_psr.sh	(revision 90)
@@ -14,5 +14,5 @@
 cp src/pvoconvert.cc      $PSRDEST/pvoconvert.C
 cp src/pvosummary.cc      $PSRDEST/pvosummary.C
-cp src/s70summary.cc      $PSRDEST/s70summary.C
+cp src/pvotapesummary.cc  $PSRDEST/pvotapesummary.C
 cp src/pvoconesearch.cc   $PSRDEST/pvoconesearch.C
 cp src/pvo-header.cc      $PSRDEST/pvo-header.C
Index: /trunk/src/pvo-FITS-fileIO.cc
===================================================================
--- /trunk/src/pvo-FITS-fileIO.cc	(revision 89)
+++ /trunk/src/pvo-FITS-fileIO.cc	(revision 90)
@@ -454,5 +454,5 @@
       std::string stp_crd2 = deblank(block.getKeyword<std::string>(DEC));
 //       float scanlen        = block.Survey().getScanlen();
-      float scanlen        = block.getKeyword<float>(SCAN_LEN);
+//      float scanlen        = block.getKeyword<float>(SCAN_LEN);
       std::string fd_mode  = block.Survey().getFd_mode();
       float fa_req         = block.getKeyword<float>(FEED_ANGLE);
Index: /trunk/src/pvo-block.cc
===================================================================
--- /trunk/src/pvo-block.cc	(revision 89)
+++ /trunk/src/pvo-block.cc	(revision 90)
@@ -18,5 +18,5 @@
   {
 
-    DataBlock::DataBlock(SURVEY inputSurveyType)
+    DataBlock::DataBlock(Header::SURVEY inputSurveyType)
     {
       /**
Index: /trunk/src/pvo-utils.hh
===================================================================
--- /trunk/src/pvo-utils.hh	(revision 89)
+++ /trunk/src/pvo-utils.hh	(revision 90)
@@ -95,14 +95,17 @@
   --verbose\n";
 
-  /** Help text for s70summary -h */
-  const std::string s70summary_usage_text = 
+  /** Help text for pvotapesummary -h */
+  const std::string pvotapesummary_usage_text = 
 "Usage:\n\
-  1. s70summary \n\
-  2. s70summary -d <DIR>\n\
+  1. pvotapesummary [FILE]\n\
+  2. pvotapesummary -d <DIR>\n\
 ---------\n\
- s70summary  prints out some basic metadata for either all 70cm survey files in the\n\
-  current directory (example 1), or the specified directory (example 2).\n\
+ pvotapesummary  prints out some basic metadata for either all tape survey files\n\
+  in the current directory (example 1), or the specified directory (example 2).\n\
+ You can optionally specify individual files: the alternative is to examine each\n\
+  file in the directory.\n\
+ The metadata is taken just from the first block in the tape file.\n\
  The parameters printed out are:\n\
-   RA, DEC, OBSFREQ, SCANLEN, DATE-OBS, MOVE\n\
+   FILENAME, RA, DEC, OBSFREQ, SCANLEN, MOVE, DATE-OBS\n\
 ---------\n\
 ";
Index: /trunk/src/pvotapesummary.cc
===================================================================
--- /trunk/src/pvotapesummary.cc	(revision 90)
+++ /trunk/src/pvotapesummary.cc	(revision 90)
@@ -0,0 +1,159 @@
+#include <iostream>
+#include <fstream>
+#include <sstream>
+#include <iomanip>
+#include <string>
+#include <glob.h>
+#include <unistd.h>
+#include <getopt.h>
+#include "pvo-block.hh"
+#include "pvo-header.hh"
+#include "pvo-utils.hh"
+using namespace PVO;
+using namespace PVO::Header;
+using namespace PVO::Block;
+using std::string;
+
+int main(int argc, char * argv[])
+{
+  /** 
+   * S70Summary is a function to print out basic information for
+   * 70cm survey tape files
+   *
+   * This program is a command-line program that looks at existing
+   * survey files and returns a summary of their starting positions, 
+   * observation times and moving flags
+   *
+   * The format of usage is: <br> 
+   * <tt>> pvotapesummary </tt><br>
+   * to analyse all files in the current directory, or <br>
+   * <tt>> pvotapesummary -d DIR</tt><br>
+   * to analyse all files in directory DIR
+   * Entering<br>
+   * <tt>> pvotapesummary -h</tt><br>
+   * will give a help message, using PVO::pvotapesummary_usage_text.
+   *
+   * The output is a list of valid files, the central RA & DEC of the
+   * first block, the central observing frequency, the requested scan
+   * length, the time/date of observation, and the moving flag.
+   * 
+   */
+
+  int c;
+  unsigned int i;
+  glob_t globbuf;
+  std::vector<std::string> namelist;
+  std::string directory,filenames;
+  while (true) {
+    int option_index = 0;
+    static struct option long_options[] = {
+      {"help", 0, 0, 'h'},
+      {0, 0, 0, 0}
+    };
+
+    c = getopt_long (argc, argv, "hd:",
+		     long_options, &option_index);
+
+    if (c == -1) break;
+    
+    switch (c) {               
+    case 0:
+      // This is where we deal with -- options that don't have a
+      // single letter equivalent
+      break;
+    case 'h': // give help statement
+      std::cout << pvotapesummary_usage_text;
+      return 0;
+      break;
+    case 'd':
+      directory = optarg;
+      filenames = directory + "/*";
+      globbuf.gl_offs = 0;
+      glob(filenames.c_str(), GLOB_DOOFFS, NULL, &globbuf);
+      namelist.resize(globbuf.gl_pathc);
+      for(i=0;i<globbuf.gl_pathc+globbuf.gl_offs;i++) {
+	namelist[i] = globbuf.gl_pathv[i];
+      }
+      break;
+    case '?': // invalid option
+    case ':': // missing an argument
+      std::cout << pvotapesummary_usage_text;
+      return 1;
+      break;
+    default:
+      std::cerr << "ERROR: getopt returned character code " <<  c << "\n";
+      break;
+    }
+
+  }
+  
+  while (optind < argc) { 
+    // There are non-option arguments -- must be the files to look at
+     namelist.push_back(argv[optind++]);
+  }
+
+  std::vector<std::string> goodlist;
+  for(i=0; i<namelist.size(); i++)
+    if(idSurvey(namelist[i]) != DUD) goodlist.push_back(namelist[i]);
+  
+  int filenameSize = 8; // size of "FILENAME"
+  for(i=0;i<goodlist.size();i++) 
+    filenameSize = std::max(filenameSize,int(goodlist[i].size()));
+    
+  std::cout << std::setfill('-')  
+	    << std::setw(filenameSize+1+15+15+31+11+11+5) << "-";
+
+  std::cout << "\n" << std::setfill(' ') 
+	    << std::setw(filenameSize) << "FILENAME"  << " "
+	    << std::setw(14)           << "RAJ"       << " "
+	    << std::setw(14)           << "DECJ"      << " "
+	    << std::setw(10)           << "OBSFREQ"   << " "
+	    << std::setw(10)           << "SCANLEN"   << " "
+	    << std::setw(4)            << "MOVE"  << " "
+	    << std::setw(30)           << "DATE-OBS\n";
+     
+  std::cout << std::setw(filenameSize) << ""      << " "
+	    << std::setw(14)           << ""      << " "
+	    << std::setw(14)           << ""      << " "
+	    << std::setw(10)           << "[MHz]" << " "
+	    << std::setw(10)           << "[s]"   << " "
+	    << std::setw(4)            << ""      <<" "
+	    << std::setw(30)           << "\n";
+
+  std::cout<< std::setfill('-')  
+	   << std::setw(filenameSize+1+15+15+31+11+11+5) << "-";
+  std::cout<< "\n"<< std::setfill(' ') ;
+    
+  for(i=0;i<goodlist.size();i++){
+
+    std::ifstream fin;
+    fin.open(goodlist[i].c_str(), std::ios::binary);
+    DataBlock block(S70);
+    block.readBlock(fin);
+    std::string ra       = deblank(block.getKeyword<std::string>(RA));
+    std::string dec      = deblank(block.getKeyword<std::string>(DEC));
+    float scanlen        = block.getKeyword<float>(SCAN_LEN);
+    int move             = block.getKeyword<int>(MOVE);
+    std::string date_obs = 
+      makeDateObs(deblank(block.getKeyword<std::string>(DATE)),
+		  deblank(block.getKeyword<std::string>(UT))   );
+    double f0            = block.getKeyword<double>(FREQ_CHAN1);
+    double bw            = block.getKeyword<double>(CHANBW);
+    double nc            = block.getKeyword<double>(NCHAN);
+    float obsfreq        = f0 + ((nc-1)/2.) * bw;
+
+    std::cout.setf(std::ios::fixed);
+    std::cout << std::setw(filenameSize) << goodlist[i] << " "
+	      << std::setw(14)           << ra          << " "
+	      << std::setw(14)           << dec         << " "
+	      << std::setprecision(4)
+	      << std::setw(10)           << obsfreq     << " "
+	      << std::setw(10)           << scanlen     << " "
+	      << std::setw(4)            << move        << " " 
+	      << std::setw(30)           << date_obs    << "\n";
+
+    fin.close();
+  }
+
+}
+
Index: unk/src/s70summary.cc
===================================================================
--- /trunk/src/s70summary.cc	(revision 89)
+++ 	(revision )
@@ -1,157 +1,0 @@
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <iomanip>
-#include <string>
-#include <glob.h>
-#include <unistd.h>
-#include <getopt.h>
-#include "pvo-block.hh"
-#include "pvo-header.hh"
-#include "pvo-utils.hh"
-using namespace PVO;
-using namespace PVO::Header;
-using namespace PVO::Block;
-using std::string;
-
-int main(int argc, char * argv[])
-{
-  /** 
-   * S70Summary is a function to print out basic information for
-   * 70cm survey tape files
-   *
-   * This program is a command-line program that looks at existing
-   * survey files and returns a summary of their starting positions, 
-   * observation times and moving flags
-   *
-   * The format of usage is: <br> 
-   * <tt>> s70summary </tt><br>
-   * to analyse all files in the current directory, or <br>
-   * <tt>> s70summary -d DIR</tt><br>
-   * to analyse all files in directory DIR
-   * Entering<br>
-   * <tt>> s70summary -h</tt><br>
-   * will give a help message, using PVO::s70summary_usage_text.
-   *
-   * The output is a list of valid files, the central RA & DEC of the
-   * first block, the central observing frequency, the requested scan
-   * length, the time/date of observation, and the moving flag.
-   * 
-   */
-
-  int c;
-  std::string directory="";
-  while (true) {
-    int option_index = 0;
-    static struct option long_options[] = {
-      {"help", 0, 0, 'h'},
-      {0, 0, 0, 0}
-    };
-
-    c = getopt_long (argc, argv, "h",
-		     long_options, &option_index);
-
-    if (c == -1) break;
-    
-    switch (c) {               
-    case 0:
-      // This is where we deal with -- options that don't have a
-      // single letter equivalent
-      break;
-    case 'h': // give help statement
-      std::cout << s70summary_usage_text;
-      return 0;
-      break;
-    case '?': // invalid option
-    case ':': // missing an argument
-      std::cout << s70summary_usage_text;
-      return 1;
-      break;
-    default:
-      std::cerr << "ERROR: getopt returned character code " <<  c << "\n";
-      break;
-    }
-
-  }
-  if (optind < argc) { 
-    // There is a non-option argument -- must be the directory to look in
-      directory = argv[optind];
-      directory += "/";
-  }
-
-  std::vector<std::string> namelist;
-  std::string filenames = directory + "*";
-  unsigned int i;
-  glob_t globbuf;
-  globbuf.gl_offs = 0;
-  glob(filenames.c_str(), GLOB_DOOFFS, NULL, &globbuf);
-  namelist.resize(globbuf.gl_pathc);
-  for(i=0;i<globbuf.gl_pathc+globbuf.gl_offs;i++) {
-    namelist[i] = globbuf.gl_pathv[i];
-  }
-
-  std::vector<std::string> goodlist;
-  for(i=0; i<namelist.size(); i++)
-    if(idSurvey(namelist[i]) == S70) goodlist.push_back(namelist[i]);
-  
-  int filenameSize = 8; // size of "FILENAME"
-  for(i=0;i<goodlist.size();i++) 
-    filenameSize = std::max(filenameSize,int(goodlist[i].size()));
-    
-  std::cout << std::setfill('-')  
-	    << std::setw(filenameSize+1+15+15+31+11+11+5) << "-";
-
-  std::cout << "\n" << std::setfill(' ') 
-	    << std::setw(filenameSize) << "FILENAME"  << " "
-	    << std::setw(14)           << "RAJ"       << " "
-	    << std::setw(14)           << "DECJ"      << " "
-	    << std::setw(10)           << "OBSFREQ"   << " "
-	    << std::setw(10)           << "SCANLEN"   << " "
-	    << std::setw(4)            << "MOVE"  << " "
-	    << std::setw(30)           << "DATE-OBS\n";
-     
-  std::cout << std::setw(filenameSize) << ""      << " "
-	    << std::setw(14)           << ""      << " "
-	    << std::setw(14)           << ""      << " "
-	    << std::setw(10)           << "[MHz]" << " "
-	    << std::setw(10)           << "[s]"   << " "
-	    << std::setw(4)            << ""      <<" "
-	    << std::setw(30)           << "\n";
-
-  std::cout<< std::setfill('-')  
-	   << std::setw(filenameSize+1+15+15+31+11+11+5) << "-";
-  std::cout<< "\n"<< std::setfill(' ') ;
-    
-  for(i=0;i<goodlist.size();i++){
-
-    std::ifstream fin;
-    fin.open(goodlist[i].c_str(), std::ios::binary);
-    DataBlock block(S70);
-    block.readBlock(fin);
-    std::string ra       = deblank(block.getKeyword<std::string>(RA));
-    std::string dec      = deblank(block.getKeyword<std::string>(DEC));
-    float scanlen        = block.getKeyword<float>(SCAN_LEN);
-    int move             = block.getKeyword<int>(MOVE);
-    std::string date_obs = 
-      makeDateObs(deblank(block.getKeyword<std::string>(DATE)),
-		  deblank(block.getKeyword<std::string>(UT))   );
-    double f0            = block.getKeyword<double>(FREQ_CHAN1);
-    double bw            = block.getKeyword<double>(CHANBW);
-    double nc            = block.getKeyword<double>(NCHAN);
-    float obsfreq        = f0 + ((nc-1)/2.) * bw;
-
-	
-    std::cout << std::setw(filenameSize) << goodlist[i] << " "
-	      << std::setw(14)           << ra          << " "
-	      << std::setw(14)           << dec         << " "
-	      << std::setprecision(4)
-	      << std::setw(10)           << obsfreq     << " "
-	      << std::setw(10)           << scanlen     << " "
-	      << std::setw(4)            << move        << " " 
-	      << std::setw(30)           << date_obs    << "\n";
-
-    fin.close();
-  }
-
-}
-
