Index: /trunk/cgitesting/hello.cgi
===================================================================
--- /trunk/cgitesting/hello.cgi	(revision 95)
+++ /trunk/cgitesting/hello.cgi	(revision 95)
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+print 'Content-Type: text/html'
+print
+
+../pvoconesearch..x 16:16:00 -55:15:00 1
+
+print """<html>
+<head>
+  <title>Hello Web</title>
+</head>
+<body bgcolor="#FFFFFF">
+<h1>Hello Web!</h1>
+</body>
+</html>"""
Index: /trunk/cgitesting/hello2.cgi
===================================================================
--- /trunk/cgitesting/hello2.cgi	(revision 95)
+++ /trunk/cgitesting/hello2.cgi	(revision 95)
@@ -0,0 +1,14 @@
+#!/usr/bin/sh
+echo 'Content-Type: text/html'
+echo
+
+$PVO/pvoconesearch.x 16:16:00 -55:15:00 1
+
+echo """<html>
+<head>
+  <title>Hello Web</title>
+</head>
+<body bgcolor="#FFFFFF">
+<h1>Hello Web!</h1>
+</body>
+</html>"""
Index: /trunk/docs/byte_examination
===================================================================
--- /trunk/docs/byte_examination	(revision 95)
+++ /trunk/docs/byte_examination	(revision 95)
@@ -0,0 +1,89 @@
+This first bit is from the original data file:
+$PTTAPES/PT0278/PT0278_029
+
+
+
+00000000  50 4d 44 31 2e 30 2e 31  2e 31 50 54 30 32 37 38  |PMD1.0.1.1PT0278|
+00000010  20 20 32 39 20 20 20 20  20 20 20 31 30 36 31 32  |  29       10612|
+00000020  32 32 20 20 20 20 20 35  34 30 39 31 20 31 35 3a  |22     54091 15:|
+00000030  30 33 3a 33 39 2e 30 30  30 30 20 20 20 30 37 3a  |03:39.0000   07:|
+00000040  30 30 3a 34 39 2e 37 31  20 35 20 30 34 3a 33 37  |00:49.71 5 04:37|
+00000050  3a 31 35 2e 36 39 36 30  20 20 2d 34 37 3a 31 35  |:15.6960  -47:15|
+00000060  3a 30 38 2e 30 31 30 20  20 20 20 32 35 33 2e 33  |:08.010    253.3|
+00000070  39 34 20 2d 34 31 2e 39  36 34 20 20 20 30 2e 30  |94 -41.964   0.0|
+00000080  30 30 20 20 20 32 34 30  2e 30 20 20 20 20 20 20  |00   240.0      |
+00000090  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
+*
+000000c0  20 20 20 20 20 20 20 20  20 20 20 31 2d 33 2e 30  |           1-3.0|
+000000d0  30 30 30 30 2d 30 2e 32  35 30 30 30 20 31 39 32  |0000-0.25000 192|
+000000e0  20 20 20 30 20 20 31 38  30 34 2e 35 30 30 30 30  |   0  1804.50000|
+000000f0  20 20 20 37 31 31 2e 38  37 35 30 30 20 30 2e 32  |   711.87500 0.2|
+00000100  35 30 30 30 30 30 30 30  20 30 2e 32 35 30 30 30  |50000000 0.25000|
+00000110  30 30 30 30 20 20 20 31  20 20 20 31 20 20 20 20  |0000   1   1    |
+00000120  32 30 34 38 20 30 2e 35  31 32 30 30 20 31 33 33  |2048 0.51200 133|
+00000130  20 31 35 3a 30 33 3a 34  32 2e 31 37 32 33 20 20  | 15:03:42.1723  |
+00000140  20 30 37 3a 30 30 3a 35  34 2e 37 33 20 30 34 3a  | 07:00:54.73 04:|
+00000150  33 37 3a 31 35 2e 36 39  36 30 20 20 2d 34 37 3a  |37:15.6960  -47:|
+00000160  31 35 3a 30 38 2e 30 31  30 20 20 20 20 32 35 33  |15:08.010    253|
+00000170  2e 33 39 34 20 2d 34 31  2e 39 36 34 20 20 33 30  |.394 -41.964  30|
+00000180  2e 35 32 37 20 32 33 31  2e 35 32 37 20 20 20 20  |.527 231.527    |
+00000190  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
+*
+000001f0  20 20 20 20 20 30 2e 30  30 30 30 30 20 30 2e 30  |     0.00000 0.0|
+00000200  30 30 30 30 20 20 20 31  20 20 20 31 4a 30 34 33  |0000   1   1J043|
+00000210  37 2d 34 37 31 35 20 20  20 20 20 20 48 4f 48 5f  |7-4715      HOH_|
+00000220  35 37 36 20 50 41 74 69  6d 65 20 20 20 31 20 31  |576 PAtime   1 1|
+00000230  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
+00000240  30 30 20 20 31 2e 38 38  20 20 20 20 50 41 52 4b  |00  1.88    PARK|
+00000250  45 53 20 20 20 20 20 20  20 37 35 2e 32 35 20 20  |ES       75.25  |
+00000260  20 20 20 20 20 20 20 20  20 38 20 20 20 20 20 20  |         8      |
+00000270  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
+00000280  5a 78 73 9c c1 71 9a 8b  ff c9 cf fc ef ef df 7b  |Zxs..q.........{|
+00000290  ff ff fe df bd 45 df fe  f3 8c 30 65 99 83 6c 84  |.....E....0e..l.|
+000002a0  c7 4b 5e d8 c7 fb e8 7f  f3 ff fe bf 0b e6 33 f9  |.K^...........3.|
+000002b0  c8 b8 f1 81 b7 d7 99 00  77 0c f7 f8 09 23 d2 7f  |........w....#..|
+000002c0  1b 83 ff ff 04 e7 cd b3  80 fa fe 80 d1 90 d6 87  |................|
+000002d0  38 e0 8b ed 78 71 6f 56  be ef 61 f8 ef fe ff 97  |8...xqoV..a.....|
+000002e0  1f d0 e4 c9 07 f8 21 05  fa 08 63 ef 54 5f 5c 64  |......!...c.T_\d|
+000002f0  b3 84 b6 b8 f3 eb 1f c8  c0 8e cb 64 c0 a9 22 a3  |...........d..".|
+00000300  60 3e e9 f9 1b 01 ba 4e  41 53 10 e3 fb ee ff fd  |`>.....NAS......|
+00000310  a8 2c 91 0c 12 48 42 00  74 0a 8b fe 6e 84 bb 78  |.,...HB.t...n..x|
+
+
+
+
+
+
+
+
+
+
+
+
+
+This next bit is from the converted FITS file:
+PM_061222_150342_01.fits
+
+It starts near the beginning of the subint binary table.
+
+000127c0  44 e1 33 00 44 e1 32 80  44 e1 32 00 44 e1 31 80  |D.3.D.2.D.2.D.1.|
+000127d0  44 e1 31 00 44 e1 30 80  3f 80 00 00 3f 80 00 00  |D.1.D.0.?...?...|
+000127e0  3f 80 00 00 3f 80 00 00  3f 80 00 00 3f 80 00 00  |?...?...?...?...|
+*
+00012ad0  3f 80 00 00 3f 80 00 00  00 00 00 00 00 00 00 00  |?...?...........|
+00012ae0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
+*
+00012dd0  00 00 00 00 00 00 00 00  3f 80 00 00 3f 80 00 00  |........?...?...|
+00012de0  3f 80 00 00 3f 80 00 00  3f 80 00 00 3f 80 00 00  |?...?...?...?...|
+*
+000130d0  3f 80 00 00 3f 80 00 00  5a 78 73 9c c1 71 9a 8b  |?...?...Zxs..q..|
+000130e0  ff c9 cf fc ef ef df 7b  ff ff fe df bd 45 df fe  |.......{.....E..|
+000130f0  f3 8c 30 65 99 83 6c 84  c7 4b 5e d8 c7 fb e8 7f  |..0e..l..K^.....|
+00013100  f3 ff fe bf 0b e6 33 f9  c8 b8 f1 81 b7 d7 99 00  |......3.........|
+00013120  80 fa fe 80 d1 90 d6 87  38 e0 8b ed 78 71 6f 56  |........8...xqoV|
+00013130  be ef 61 f8 ef fe ff 97  1f d0 e4 c9 07 f8 21 05  |..a...........!.|
+00013140  fa 08 63 ef 54 5f 5c 64  b3 84 b6 b8 f3 eb 1f c8  |..c.T_\d........|
+00013150  c0 8e cb 64 c0 a9 22 a3  60 3e e9 f9 1b 01 ba 4e  |...d..".`>.....N|
+00013160  41 53 10 e3 fb ee ff fd  a8 2c 91 0c 12 48 42 00  |AS.......,...HB.|
+00013170  74 0a 8b fe 6e 84 bb 78  ae d4 f1 98 dc e6 ee df  |t...n..x........|
+00013180  83 ae 5c 13 f1 63 ad 85  f1 4a db fc d1 07 59 2e  |..\..c...J....Y.|
Index: /trunk/docs/fakedata_2bit_t11.txt
===================================================================
--- /trunk/docs/fakedata_2bit_t11.txt	(revision 95)
+++ /trunk/docs/fakedata_2bit_t11.txt	(revision 95)
@@ -0,0 +1,1 @@
+0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1
Index: /trunk/new-htdocs/test.php
===================================================================
--- /trunk/new-htdocs/test.php	(revision 95)
+++ /trunk/new-htdocs/test.php	(revision 95)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<body>
+
+<?php
+//exec("psrcat -nohead -nonumber -c \"PSRJ\" -boundary \"1 04:37:00 -47:15:00 1.\"",$output_array);
+// echo exec("ssh tycho -x psrcat -nohead -nonumber -c \"PSRJ\" -boundary \"1 04:37:00 -47:15:00 1.\"",$output_array);
+// echo "$output_array\n";
+echo exec("psrcat -nohead -nonumber -c \"PSRJ\" -boundary \"1 04:37:00 -47:15:00 1.\"");
+
+for ($i = 0; $i < count($output_array); $i++) {
+  echo "$output_array[$i]\n";
+  //  list($output_psrname) = preg_split("/[\s]+/", $output_array[$i]);
+  //  echo "$output_array[$i],$output_psrname \n";
+}
+?>
+</body>
+</html>
Index: /trunk/src/OLDpvosummary
===================================================================
--- /trunk/src/OLDpvosummary	(revision 95)
+++ /trunk/src/OLDpvosummary	(revision 95)
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+#foreach fname (`ls *.fits`)
+#    echo pvovap $fname
+#    pvovap $fname
+#end
+DIR=/u/whi550/bin
+
+if [ $# == 0 ]; then
+    for fname in `ls *.fits 2> /dev/null`; do
+	${DIR}/pvosummary.x $fname 2> /dev/null
+    done
+    for fname in `ls *.rf 2> /dev/null`; do
+	${DIR}/pvosummary.x $fname 2> /dev/null
+    done
+elif [ $1 == "-h" ]; then
+    echo Usage: 
+    echo 1. pvosummary [FILE] 
+    echo 2. pvosummary
+    echo ---------
+    echo 1. Prints RA, DEC, DATE-OBS for single FITS file.
+    echo 2. Prints RA, DEC, DATE-OBS for all fits files in the current directory.
+    echo Note that if a keyword is not present, --- is printed.
+else
+    ${DIR}/pvosummary.x $1 2> /dev/null
+fi
Index: /trunk/templates/primary_header_example.txt
===================================================================
--- /trunk/templates/primary_header_example.txt	(revision 95)
+++ /trunk/templates/primary_header_example.txt	(revision 95)
@@ -0,0 +1,59 @@
+SIMPLE  =                    T / file does conform to FITS standard
+BITPIX  =                    8 / number of bits per data pixel
+NAXIS   =                    0 / number of data axes
+EXTEND  =                    T / FITS dataset may contain extensions
+COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
+COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
+COMMENT   FITS (Flexible Image Transport System) format defined in Astronomy and
+COMMENT   Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.
+COMMENT   Contact the NASA Science Office of Standards and Technology for the
+COMMENT   FITS Definition document #100 and other FITS information.
+HDRVER  = '2.8b            '   / Header version
+DATE    = '2007-02-09T06:14:12' / File creation date (YYYY-MM-DDThh:mm:ss UTC)
+OBSERVER= '                '   / Observer name(s)
+PROJID  = '        '           / Project name
+TELESCOP= '        '           / Telescope name
+ANT_X   =           -4554231.5 / [m] Antenna ITRF X-coordinate (D)
+ANT_Y   =            2816759.1 / [m] Antenna ITRF Y-coordinate (D)
+ANT_Z   =           -3454036.3 / [m] Antenna ITRF Z-coordinate (D)
+FRONTEND= '70cm_Cavity_Disk'   / Rx and feed ID
+FD_POLN = 'LIN     '           / LIN or CIRC
+FD_HAND =                    1 / +/- 1. +1 is LIN:A=X,B=Y, CIRC:A=L,B=R (I)
+FD_SANG =                   0. / [deg] FA of E vect for equal sig in A&B (E)
+FD_XYPH =                   0. / [deg] Phase of A^* B for injected cal (E)
+BACKEND = 'FB_1BIT '           / Backend ID
+BECONFIG= '        '           / Backend configuration file name
+BE_PHASE=                    0 / 0/+1/-1 BE cross-phase:0 unknown,+/-1 std/rev
+BE_DCC  =                    0 / 0/1 BE downconversion conjugation corrected
+TCYCLE  =                   0. / [s] On-line cycle time (D)
+NRCVR   =                    1 / Number of receiver channels (I)
+OBS_MODE= 'SEARCH  '           / (PSR, CAL, SEARCH)
+SRC_NAME= '        '           / Source or scan ID
+COORD_MD= 'J2000   '           / Coordinate mode (J2000, Gal, Ecliptic, etc.)
+STT_CRD1= '16:16:19.2699'      / Start coord 1 (hh:mm:ss.sss or ddd.ddd)
+STT_CRD2= '-55:15:00.000'      / Start coord 2 (-dd:mm:ss.sss or -dd.ddd)
+TRK_MODE= 'TRACK   '           / Track mode (TRACK, SCANGC, SCANLAT)
+STP_CRD1= '16:16:19.2699'      / Stop coord 1 (hh:mm:ss.sss or ddd.ddd)
+STP_CRD2= '-55:15:00.000'      / Stop coord 2 (-dd:mm:ss.sss or -dd.ddd)
+SCANLEN =                 152. / [s] Requested scan length (E)
+FD_MODE = 'FIXED   '           / Feed track mode - FA, CPA, SPA, TPA
+FA_REQ  =                   0. / [deg] Feed/Posn angle requested (E)
+CAL_MODE= 'OFF     '           / Cal mode (OFF, SYNC, EXT1, EXT2)
+CAL_FREQ=                   0. / [Hz] Cal modulation frequency (E)
+CAL_DCYC=                   0. / Cal duty cycle (E)
+CAL_PHS =                   0. / Cal phase (wrt start time) (E)
+STT_DATE= '1991-09-20'         / Start UT date (YYYY-MM-DD)
+STT_TIME= '06:46:18.001000'    / Start UT (hh:mm:ss)
+STT_IMJD=                48519 / Start MJD (UTC days) (J - long integer)
+STT_SMJD=                24378 / [s] Start time (sec past UTC 00h) (J)
+STT_OFFS=                   0. / [s] Start time offset (D)
+STT_LST =              59643.4 / [s] Start LST (D)
+OBSFREQ =                 436. / [MHz] Observing frequency
+RA      = '16:16:19.2699'      / Right Ascension
+DEC     = '-55:15:00.000'      / Declination
+DATE-OBS= '1991-09-20T06:46:18' / Date of observation (YY-MM-DDThh:mm:ss UTC)
+EQUINOX =                2000. / Equinox
+BMAJ    =                 0.75 / [deg] Beam major axis length
+BMIN    =                 0.75 / [deg] Beam minor axis length
+BPA     =                   0. / [deg] Beam position angle
+END
Index: /trunk/templates/psrheader_20070116.fits
===================================================================
--- /trunk/templates/psrheader_20070116.fits	(revision 95)
+++ /trunk/templates/psrheader_20070116.fits	(revision 95)
@@ -0,0 +1,804 @@
+SIMPLE  =                    T / file does conform to FITS standard
+BITPIX  =                    8 / number of bits per data pixel
+NAXIS   =                    0 / number of data axes
+EXTEND  =                    T / FITS dataset may contain extensions
+COMMENT   FITS (Flexible Image Transport System) format defined in Astronomy and
+COMMENT   Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.
+COMMENT   Contact the NASA Science Office of Standards and Technology for the
+COMMENT   FITS Definition document #100 and other FITS information.
+COMMENT
+HDRVER  = '2.7             '   / Header version 
+DATE    = '                '   / File creation date (YYYY-MM-DDThh:mm:ss UTC)
+OBSERVER= '                '   / Observer name(s)
+PROJID  = '                '   / Project name
+TELESCOP= '                '   / Telescope name
+ANT_X   = *                    / [m] Antenna ITRF X-coordinate (D)
+ANT_Y   = *                    / [m] Antenna ITRF Y-coordinate (D)
+ANT_Z   = *                    / [m] Antenna ITRF Z-coordinate (D)
+FRONTEND= '                '   / Rx and feed ID
+FD_POLN = '                '   / LIN or CIRC
+FD_HAND = *                    / +/- 1. +1 is LIN:A=X,B=Y, CIRC:A=L,B=R (I)
+FD_SANG = *                    / [deg] FA of E vect for equal sig in A&B (E)
+FD_XYPH = *                    / [deg] Phase of A^* B for injected cal (E)
+BACKEND = '                '   / Backend ID
+BECONFIG= '                '   / Backend configuration file name
+BE_PHASE= *                    / 0/+1/-1 BE cross-phase:0 unknown,+/-1 std/rev
+BE_DCC  = *                    / 0/1 BE downconversion conjugation corrected
+TCYCLE  = *                    / [s] On-line cycle time (D)
+NRCVR   = *                    / Number of receiver channels (I)
+OBS_MODE= '                '   / (PSR, CAL, SEARCH)
+SRC_NAME= '                '   / Source or scan ID 
+COORD_MD= '                '   / Coordinate mode (J2000, Gal, Ecliptic, etc.)
+STT_CRD1= '                '   / Start coord 1 (hh:mm:ss.sss or ddd.ddd)
+STT_CRD2= '                '   / Start coord 2 (-dd:mm:ss.sss or -dd.ddd) 
+TRK_MODE= '                '   / Track mode (TRACK, SCANGC, SCANLAT)
+STP_CRD1= '                '   / Stop coord 1 (hh:mm:ss.sss or ddd.ddd)
+STP_CRD2= '                '   / Stop coord 2 (-dd:mm:ss.sss or -dd.ddd) 
+SCANLEN = *                    / [s] Requested scan length (E)
+FD_MODE = '                '   / Feed track mode - FA, CPA, SPA, TPA
+FA_REQ  = *                    / [deg] Feed/Posn angle requested (E)
+CAL_MODE= '                '   / Cal mode (OFF, SYNC, EXT1, EXT2)
+CAL_FREQ= *                    / [Hz] Cal modulation frequency (E)
+CAL_DCYC= *                    / Cal duty cycle (E)
+CAL_PHS = *                    / Cal phase (wrt start time) (E)
+STT_DATE= '                '   / Start UT date (YYYY-MM-DD)
+STT_TIME= '                '   / Start UT (hh:mm:ss)
+STT_IMJD= *                    / Start MJD (UTC days) (J - long integer)
+STT_SMJD= *                    / [s] Start time (sec past UTC 00h) (J)
+STT_OFFS= *                    / [s] Start time offset (D)   
+STT_LST = *                    / [s] Start LST (D)
+END
+#
+###############################################################################
+#
+# Processing History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Processing history *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   21 / number of fields per row
+#
+EXTNAME = HISTORY             / name of this binary table extension
+#
+TTYPE#  = DATE_PRO            / Processing date and time (UTC)
+TFORM#  = 24A                 / 24-char string
+TTYPE#  = PROC_CMD            / Processing program and command
+TFORM#  = 80A                 / 80_char string
+TTYPE#  = SCALE               / Units (FluxDen/RefFlux/Jansky)
+TFORM#  = 8A                  / 8-char string
+TTYPE#  = POL_TYPE            / Polarisation identifier
+TFORM#  = 8A                  / 8-char string
+TTYPE#  = NPOL                / Number of polarisations
+TFORM#  = 1I                  / Integer
+TTYPE#  = NBIN                / Nr of bins per product (0 for SEARCH mode)
+TFORM#  = 1I                  / Integer
+TTYPE#  = NBIN_PRD            / Nr of bins per period
+TFORM#  = 1I                  / Integer
+TTYPE#  = TBIN                / Time per bin or sample
+TUNIT#  = s                   / units of field
+TFORM#  = 1D                  / Double
+TTYPE#  = CTR_FREQ            / Band centre frequency
+TUNIT#  = MHz                 / units of field
+TFORM#  = 1D                  / Double
+TTYPE#  = NCHAN               / Number of frequency channels
+TFORM#  = 1I                  / Integer
+TTYPE#  = CHAN_BW             / Channel bandwidth
+TFORM#  = 1D                  / Double
+TUNIT#  = MHz                 / units of field
+TTYPE#  = PAR_CORR            / Parallactic angle correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = FA_CORR             / Feed angle correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = RM_CORR             / RM correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = DEDISP              / Data dedispersed
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = DDS_MTHD            / Dedispersion method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = SC_MTHD             / Scattered power correction method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = CAL_MTHD            / Calibration method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = CAL_FILE            / Name of gain calibration file
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = RFI_MTHD            / RFI excision method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = IFR_MTHD            / Ionospheric Faraday rotation correction method
+TFORM#  = 32A                 / 32-char string
+END
+#
+###############################################################################
+#
+# Digitiser Counts Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Digitiser counts *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / Width of table in bytes
+NAXIS2  =                    * / Number of rows in table
+PCOUNT  =                    0 / Size of special data area
+GCOUNT  =                    1 / One data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+DIG_MODE= '                '   / Digitiser mode
+DYN_LEVT= *                    / Timescale for dynamic leveling
+NDIGR   = *                    / Number of digitised channels (I)
+NLEV    = *                    / Number of digitiser levels
+NPTHIST = *                    / Number of points in histogram (I)
+DIGLEV  = '                '   / Digitiser level-setting mode (AUTO, FIX)
+EXTNAME = DIG_CNTS             / Name of this binary table extension
+#
+TTYPE#  = DAT_OFFS             / Data offset for each histogram
+TFORM#  = E                    / NDIGR floats
+TTYPE#  = DAT_SCL              / Data scale factor for each histogram
+TFORM#  = E                    / NDIGR floats
+TTYPE#  = DATA                 / Digitiser count data
+TDIM#   = (*,*)                / Data table dimensions (NPTHIST,NDIGR)         
+TFORM#  = I                    / NPTHIST*NDIGR integers
+END
+#
+###############################################################################
+#
+# Original Bandpass Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Original bandpasses *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / number of fields per row
+#
+NCH_ORIG= *                    / Number of channels in original bandpass
+BP_NPOL = *                    / Number of polarizations in bandpass
+EXTNAME = BANDPASS             / name of this binary table extension
+#
+TTYPE#  = DAT_OFFS             / Data offset for each bandpass
+TFORM#  = E                    / BP_NPOL floats
+TTYPE#  = DAT_SCL              / Data scale factor: Val=Data*DAT_SCL + DAT_OFFS
+TFORM#  = E                    / BP_NPOL floats
+TTYPE#  = DATA                 / Bandpass for autocorrelations
+TDIM#   = (*,*)                / Data table dimensions = (NCH_ORIG,BP_NPOL)
+TUNIT#  = Jy                   / Bandpass amplitude units
+TFORM#  = I                    / NCH_ORIG*BP_NPOL integers
+END
+#
+###############################################################################
+#
+# Coherent Dedispersion Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Coherent Dedispersion Parameters *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table (NCHAN)
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / number of fields per row
+#
+NFFT    =                    * / Size of forward FFT 
+EXTNAME = COHDDISP             / name of this binary table extension
+#
+TTYPE#  = NOVERLAP             / Number of overlap points for each sub-band
+TFORM#  = 1I                   / Integer
+TTYPE#  = NCHIRP               / Number of points in chirp function
+TFORM#  = 1I                   / Integer
+TTYPE#  = ACBANDPASS           / Bandpass for autocorrelations
+TUNIT#  = Jy                   / Bandpass amplitude units
+TFORM#  = E                    / NCHIRP floats
+END
+#
+###############################################################################
+#
+# Ephemeris History Binary Table Extension
+#
+###############################################################################
+#
+# Note: This table has entries which should be sufficient for real-time folding 
+# of pulsar data. Additional parameters can be added to the table in off-line 
+# processing if necessary. Examples are: additional pulse frequency derivatives 
+# (Fn), additional DM derivatives (DMn), additional planets (T0_n, PB_n, A1_n, 
+# OM_n, ECC_n), additional glitches (GLEP_n, GLPH_n, GLF0_n, GLF1_n, GLF0D_n)
+# and additional FITWAVE coefficients (WAVES_n, WAVEC_n).
+#
+XTENSION= BINTABLE             / ***** Pulsar ephemeris history *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                  104 / number of fields per row
+#
+EXTNAME = PSREPHEM             / name of this binary table extension
+#
+TTYPE#  = DATE_PRO             / Processing date and time (UTC)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = PROC_CMD             / Processing program and command
+TFORM#  = 80A                  / 80-char string
+TTYPE#  = EPHVER               / Version ID for ephemeris data
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = PSR_NAME             / Pulsar Jname
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = RAJ                  / RA (J2000) (hh:mm:ss.ssssssss)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = DECJ                 / Dec (J2000) (hh:mm:ss.ssssssss)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = PMRA                 / Proper motion in RA
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PMDEC                / Proper motion in DEC
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = ELONG                / [deg] Ecliptic longitude
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = ELAT                 / Ecliptic latitude
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = PMELONG              / Proper motion in ecliptic longitude 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PMELAT               / Proper motion in ecliptic latitude 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PX                   / Parallax
+TFORM#  = 1D                   / Double
+TUNIT#  = mas                  / Units of field
+TTYPE#  = POSEPOCH             / Epoch at which the position is measured (MJD)
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = IF0                  / Integer mHz barycentric spin freq
+TFORM#  = 1J                   / Long integer
+TUNIT#  = mHz                  / Units of field
+TTYPE#  = FF0                  / Fractional mHz barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = mHz                  / Units of field
+TTYPE#  = F1                   / Time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-2)              / Units of field
+TTYPE#  = F2                   / 2nd time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-3)              / Units of field
+TTYPE#  = F3                   / 3rd time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-4)              / Units of field
+TTYPE#  = PEPOCH               / Epoch of period/frequency determination
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = DM                   / Dispersion measure
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc          / Units of field
+TTYPE#  = DM1                  / Time deriv of dispersion measure
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc/yr       / Units of field
+TTYPE#  = RM                   / Rotation measure
+TFORM#  = 1D                   / Double
+TUNIT#  = rad m**(-2)          / Units of field
+TTYPE#  = BINARY               / Binary model
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = T0                   / Epoch of periastron 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = PB                   / Binary period of pulsar 
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = A1                   / Projected semi-major axis of orbit
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = OM                   / Longitude of periastron
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = OMDOT                / [deg/yr]Periastron advance 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg/yr               / Units of field
+TTYPE#  = ECC                  / Eccentricity
+TFORM#  = 1D                   / Double
+TTYPE#  = PBDOT                / First time deriv of binary period
+TFORM#  = 1D                   / Double
+TTYPE#  = GAMMA                / Post-Keplerian "gamma" term
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = SINI                 / Sine of inclination angle
+TFORM#  = 1D                   / Double
+TTYPE#  = M2                   / Companion mass 
+TFORM#  = 1D                   / Double
+TUNIT#  = Msun                 / Units of field
+TTYPE#  = T0_2                 / Epoch of periastron [2nd orbit] 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = PB_2                 / Binary period of pulsar [2nd orbit]
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = A1_2                 / asin(i) of 2nd orbit
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = OM_2                 / [deg] Longitude of periastron [2nd orbit]
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = ECC_2                / Eccentricity [2nd orbit]
+TFORM#  = 1D                   / Double
+TTYPE#  = DTHETA               / Relativistic deformation of the orbit
+TFORM#  = 1D                   / Double
+TTYPE#  = A1DOT                / Rate of change of asin(i) 
+TFORM#  = 1D                   / Double
+TTYPE#  = ECCDOT               / Rate of change of eccentricity 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = TASC                 / Epoch of ascending node
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = EPS1                 / ECC sin(OM) (ELL1 binary model)
+TFORM#  = 1D                   / Double
+TTYPE#  = EPS2                 / ECC cos(OM) (ELL1 binary model)
+TFORM#  = 1D                   / Double
+TTYPE#  = EPS1DOT              / Time derivative of EPS1
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = EPS2DOT              / Time derivative of EPS2
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = OM2DOT               / Second time derivative of omega 
+TFORM#  = 1D                   / Double
+TUNIT#  = rad s**(-2)          / Units of field
+TTYPE#  = XOMDOT               / Omega-dot minus GR prediction 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg/yr               / Units of field
+TTYPE#  = XPBDOT               / Pbdot minus GR prediction 
+TFORM#  = 1D                   / Double
+TTYPE#  = MTOT                 / [M_sun] Total system mass 
+TFORM#  = 1D                   / Double
+TUNIT#  = Msun                 / Units of field
+TTYPE#  = DR                   / Relativistic deformation of the orbit
+TFORM#  = 1D                   / Double
+TTYPE#  = X2DOT                / Second time derivative of x=a1 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = PMRV                 / Radial proper motion 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = START                / Epoch of start of fit
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = FINISH               / Epoch of end of fit
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = TRES                 / RMS timing residual
+TFORM#  = 1D                   / Double
+TUNIT#  = mus                  / Units of field
+TTYPE#  = NTOA                 / Number of TOAs in timing fit
+TFORM#  = 1I                   / Integer
+TNULL#  = 1                    / Null value used by fits_write_col_null
+TTYPE#  = CLK                  / Terrestrial time standard
+TFORM#  = 12A                  / 12-char string
+TTYPE#  = EPHEM                / Solar system ephemeris
+TFORM#  = 12A                  / 12-char string
+TTYPE#  = TZRIMJD              / Reference TOA (Integer part)
+TFORM#  = 1J                   / Long Integer
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = TZRFMJD              / Reference TOA (Fractional part)
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = TZRFRQ               / Frequency of reference TOA
+TFORM#  = 1D                   / Double
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = TZRSITE              / Observatory code of reference TOA
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = GLEP_1               / Epoch [Tempo Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = GLPH_1               / Phase increment [Tempo Glitch 1]
+TFORM#  = 1D                   / Double
+TTYPE#  = GLF0_1               / Permanent pulse freq increment [Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+TTYPE#  = GLF1_1               / Permanent freq deriv incr. [Glitch 1] 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-2)              / Units of field
+TTYPE#  = GLF0D_1              / Spin freq increment [Decaying Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+#
+# New parameters for TEMPO2, ignored for EPHVER < 5
+#
+TTYPE#  = ECLOBL               / Ecliptic obliquity 
+TFORM#  = 1D                   / Double
+TUNIT#  = arcsec               / Units of field
+TTYPE#  = IPM                  / Correct for interplanetary dispersion 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = TEMPO1               / Tempo1 emulation mode 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = DILATEFREQ           / Correct obs frequency for time dilation 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = NO_SS_SHAPIRO        / Turn of all solar system Shapiro delays
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = PLANET_SHAPIRO       / Account for planetary Shapiro delays 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = CORRECT_TROPO        / Correct for tropospheric delays 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = UNITS                / Units for SSB timescale (SI, TDB) 
+TFORM#  = 4A                   / String
+TNULL#  = SI                   / Default = SI
+TTYPE#  = NE1AU                / Solar electron density scale @1AU
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc          / Units of field
+TTYPE#  = TIMEEPH              / Time ephemeris code to use (IF99, fb90)
+TFORM#  = 6A                   / String
+TNULL#  = IF99                 / Default = IF99
+TTYPE#  = T2CMETHOD            / Polar Motion/Prec/Nut code (IAU2000B, TEMPO)
+TFORM#  = 9A                   / String
+TNULL#  = IAU2000B             / Default = IAU2000B
+TTYPE#  = DMFACTOR             / DM/Dispersion Constant 
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc s**(-3)  / Units of field
+TTYPE#  = DMEPOCH              / Epoch for DM 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = FDDC                 / Scale of freq-dependent delay 
+TFORM#  = 1D                   / Double
+TUNIT#  = s MHz**(-FDDI)       / Units of field
+TTYPE#  = FDDI                 / Spectral index of freq-dependent delay
+TFORM#  = 1D                   / Double
+TTYPE#  = MSS                  / Use Wex 1988 "MSS" in T2 binary model 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = BINIT                / Iterate to invert binary timing formula
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = SHAPMAX              / -ln(1-sini) Shapiro delay parameter
+TFORM#  = 1D                   / Double
+TTYPE#  = KOM                  / Position angle of ascending node 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = KIN                  / Inclination of orbit, for Kopeikin terms
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = KMPRA                / PMRA for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMDEC               / PMDEC for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMELONG             / PMELONG for Kopeikin term
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMELAT              / PMELAT for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = RV                   / Radial velocity 
+TFORM#  = 1D                   / Double
+TUNIT#  = km/s                 / Units of field
+TTYPE#  = RVS                  / Radial velocity for Shklovskii-dot term
+TFORM#  = 1D                   / Double
+TUNIT#  = km/s                 / Units of field
+TTYPE#  = VT                   / Transverse velocity for Doppler term
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = RACC                 / Radial acceleration 
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = PMACC                / Accel parallel to proper motion 
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = D_SHK                / Distance for Shklovskii term 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = D_AOP                / Distance for annual-orbital parallax 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = D_OP                 / Distance for orbital parallax 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = WAVE_FREQ            / Fundamental FITWAVE frequency
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+TTYPE#  = WAVES_1              / FITWAVE sine component amplitude
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = WAVEC_1              / FITWAVE cosine component amplitude
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+END
+#
+###############################################################################
+#
+# TEMPO1 Polyco History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Polyco history *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   13 / Number of fields per row
+#
+EXTNAME = POLYCO               / name of this binary table extension
+#
+TTYPE#  = DATE_PRO             / Processing date and time (UTC)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = POLYVER              / Polyco version ID
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = NSPAN                / Span of polyco in min
+TFORM#  = 1I                   / Integer
+TTYPE#  = NCOEF                / Nr of coefficients (<=15)
+TFORM#  = 1I                   / Integer
+TTYPE#  = NPBLK                / Nr of blocks (rows) for this polyco
+TFORM#  = 1I                   / Integer
+TTYPE#  = NSITE                / Observatory code
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = REF_FREQ             / Reference frequency for phase
+TFORM#  = 1D                   / Double
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = PRED_PHS             / Predicted pulse phase at obs start
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_MJD              / Reference MJD
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_PHS              / Reference phase
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_F0               / Zero-order pulsar frequency
+TUNIT#  = Hz                   / Units of field
+TFORM#  = 1D                   / Double
+TTYPE#  = LGFITERR             / Log_10 of polynomial fit rms error in periods
+TFORM#  = 1D                   / Double
+TTYPE#  = COEFF                / Polyco coefficients
+TFORM#  = 15D                  / NCOEF doubles
+END
+#
+###############################################################################
+#
+# TEMPO2 Predictor History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Tempo2 Predictor history *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    1 / Number of fields per row
+#
+EXTNAME = T2PREDICT            / name of this binary table extension
+#
+TTYPE#  = PREDICT              / Whole text file is stored verbatim
+TFORM#  = A 
+END
+#
+###############################################################################
+#
+# Flux Calibration Data Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Flux Calibration Data *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    6 / Number of fields per row
+#
+EXTNAME = FLUX_CAL             / name of this binary table extension
+CAL_MTHD=                      / Flux cal method
+SCALFILE=                      / Cal file(s) used to derive flux-cal data
+NCHAN   =                    * / Nr of frequency channels (I)
+NRCVR   =                    * / Number of receiver channels (I)
+EPOCH   =                      / [MJD] Epoch of calibration obs
+#
+TTYPE#  = DAT_FREQ             / Centre frequency for each channel
+TFORM#  = E                    / NCHAN floats
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = S_SYS                / System equiv. flux density for each rcvr chan.
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_SYSERR             / Est. error of system equiv. flux density
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_CAL                / Calibrator flux density for each rcvr channel
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_CALERR             / Estimated error of calibrator flux density
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy      
+END
+#
+###############################################################################
+#
+# Artificial Calibrator Stokes Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Artificial Calibrator Stokes Data *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+EXTNAME = CAL_POLN             / name of this binary table extension
+NCHAN   =                    * / Nr of channels in flux cal file
+#
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = DATA                 / Stokes (Q,U,V) of calibrator rel. to Cal I
+TFORM#  = E                    / 3*NCHAN floats
+TTYPE#  = DATAERR              / Estimated error of Stokes (Q,U,V)
+TFORM#  = E                    / 3*NCHAN floats
+END
+#
+###############################################################################
+#
+# Feed Cross-Coupling Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Feed Cross-Coupling parameters *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+EXTNAME = FEEDPAR              / Name of this binary table extension
+CAL_MTHD= '                  ' / Cross-coupling method
+NCPAR   =                    * / Number of coupling parameters
+NCHAN   =                    * / Nr of channels in Feed coupling data
+EPOCH   = '                  ' / [MJD] Epoch of calibration obs
+#
+TTYPE#  = DAT_FREQ             / [MHz] Centre frequency for each channel
+TFORM#  = E                    / NCHAN floats
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = DATA                 / Cross-coupling data
+TDIM#   = (*,*)                / Dimensions (NCHAN,NCPAR)
+TFORM#  = E                    / NCHAN*NCPAR floats
+TTYPE#  = DATAERR              / Estimated error of cross-coupling data
+TDIM#   = (*,*)                / Dimensions (NCHAN,NCPAR)
+TFORM#  = E                    / NCHAN*NCPAR floats
+END
+#
+###############################################################################
+#
+# Subintegration data Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Subintegration data  *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes 
+NAXIS2  =                    * / Number of rows in table (NSUBINT)
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   19 / Number of fields per row
+# 
+INT_TYPE= '                  ' / Time axis (TIME, BINPHSPERI, BINLNGASC, etc)
+INT_UNIT= '                  ' / Unit of time axis (SEC, PHS (0-1), DEG) 
+TSAMP   =                    * / [s] Sample interval for SEARCH-mode data 
+NBIN    =                    * / Nr of bins (1 for SEARCH-mode data)
+NCH_FILE=                    * / Number of channels/sub-bands in this file
+NCH_STRT=                    * / Start channel/sub-band number (0 to NCHAN-1)
+NPOL    =                    * / Nr of polarisations in table
+NSBLK   =                    * / Samples/row (each NPOL*NCH_FILE, SEARCH mode) 
+#
+EXTNAME = SUBINT               / name of this binary table extension
+#
+TTYPE#  = ISUBINT              / Subint number
+TFORM#  = 1J                   / Long integer
+TTYPE#  = INDEXVAL             / Optionally used if INT_TYPE != TIME
+TFORM#  = 1D                   / Double
+TTYPE#  = TSUBINT              / Length of subintegration
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = OFFS_SUB             / Offset from Start of subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = LST_SUB              / LST at subint centre 
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = RA_SUB               / RA (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DEC_SUB              / [turns] Dec (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLON_SUB             / [deg] Gal longitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLAT_SUB             / [deg] Gal latitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = FD_ANG               / [deg] Feed angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = POS_ANG              / [deg] Position angle of feed at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = PAR_ANG              / [deg] Parallactic angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_AZ               / [deg] Telescope azimuth at subint centre
+TFORM#  = 1E                   / Float 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_ZEN              / [deg] Telescope zenith angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_FREQ             / [MHz] Centre frequency for each channel
+TFORM#  = E                    / NCH_FILE floats
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCH_FILE floats
+TTYPE#  = DAT_OFFS             / Data offset for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DAT_SCL              / Data scale factor for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DATA                 / Subint data table
+TDIM#   = (*,*,*,*)            / Dimensions (NBIN,NCH_FILE,NPOL,NSBLK)
+TFORM#  = I                    / NBIN*NCH_FILE*NPOL*NSBLK int, byte or nX 
+TUNIT#  = Jy                   / Units of subint data
+END
+#
+###############################################################################
+#
+# Digitiser Statistics Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Digitiser statistics *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / Width of table in bytes
+NAXIS2  =                    * / Number of rows in table (NSUBINT)
+PCOUNT  =                    0 / Size of special data area
+GCOUNT  =                    1 / One data group (required keyword)
+TFIELDS =                    1 / Number of fields per row
+#
+DIG_MODE= '                '   / Digitiser mode
+NDIGR   = *                    / Number of digitised channels (I)
+NPAR    = *                    / Number of digitiser parameters
+NCYCSUB = *                    / Number of correlator cycles per subint
+DIGLEV  = '                '   / Digitiser level-setting mode (AUTO, FIX)
+EXTNAME = DIG_STAT             / Name of this binary table extension
+#
+TTYPE#  = ATTEN                / Attenuator settings
+TFORM#  = E                    / NDIGR floats
+TUNIT#  = db                   / Units of field
+TTYPE#  = DATA                 / Digitiser statistics
+TDIM#   = (*,*,*)              / Data table dimensions (NPAR,NDIGR,NCYCSUB)
+TFORM#  = E                    / NPAR*NDIGR*NCYCSUB floats
+END
Index: /trunk/templates/psrheader_20070209.fits
===================================================================
--- /trunk/templates/psrheader_20070209.fits	(revision 95)
+++ /trunk/templates/psrheader_20070209.fits	(revision 95)
@@ -0,0 +1,805 @@
+SIMPLE  =                    T / file does conform to FITS standard
+BITPIX  =                    8 / number of bits per data pixel
+NAXIS   =                    0 / number of data axes
+EXTEND  =                    T / FITS dataset may contain extensions
+COMMENT   FITS (Flexible Image Transport System) format defined in Astronomy and
+COMMENT   Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.
+COMMENT   Contact the NASA Science Office of Standards and Technology for the
+COMMENT   FITS Definition document #100 and other FITS information.
+COMMENT
+HDRVER  = '2.8b            '   / Header version 
+DATE    = '                '   / File creation date (YYYY-MM-DDThh:mm:ss UTC)
+OBSERVER= '                '   / Observer name(s)
+PROJID  = '                '   / Project name
+TELESCOP= '                '   / Telescope name
+ANT_X   = *                    / [m] Antenna ITRF X-coordinate (D)
+ANT_Y   = *                    / [m] Antenna ITRF Y-coordinate (D)
+ANT_Z   = *                    / [m] Antenna ITRF Z-coordinate (D)
+FRONTEND= '                '   / Rx and feed ID
+FD_POLN = '                '   / LIN or CIRC
+FD_HAND = *                    / +/- 1. +1 is LIN:A=X,B=Y, CIRC:A=L,B=R (I)
+FD_SANG = *                    / [deg] FA of E vect for equal sig in A&B (E)
+FD_XYPH = *                    / [deg] Phase of A^* B for injected cal (E)
+BACKEND = '                '   / Backend ID
+BECONFIG= '                '   / Backend configuration file name
+BE_PHASE= *                    / 0/+1/-1 BE cross-phase:0 unknown,+/-1 std/rev
+BE_DCC  = *                    / 0/1 BE downconversion conjugation corrected
+TCYCLE  = *                    / [s] On-line cycle time (D)
+NRCVR   = *                    / Number of receiver channels (I)
+OBS_MODE= '                '   / (PSR, CAL, SEARCH)
+SRC_NAME= '                '   / Source or scan ID 
+COORD_MD= '                '   / Coordinate mode (J2000, Gal, Ecliptic, etc.)
+STT_CRD1= '                '   / Start coord 1 (hh:mm:ss.sss or ddd.ddd)
+STT_CRD2= '                '   / Start coord 2 (-dd:mm:ss.sss or -dd.ddd) 
+TRK_MODE= '                '   / Track mode (TRACK, SCANGC, SCANLAT)
+STP_CRD1= '                '   / Stop coord 1 (hh:mm:ss.sss or ddd.ddd)
+STP_CRD2= '                '   / Stop coord 2 (-dd:mm:ss.sss or -dd.ddd) 
+SCANLEN = *                    / [s] Requested scan length (E)
+FD_MODE = '                '   / Feed track mode - FA, CPA, SPA, TPA
+FA_REQ  = *                    / [deg] Feed/Posn angle requested (E)
+CAL_MODE= '                '   / Cal mode (OFF, SYNC, EXT1, EXT2)
+CAL_FREQ= *                    / [Hz] Cal modulation frequency (E)
+CAL_DCYC= *                    / Cal duty cycle (E)
+CAL_PHS = *                    / Cal phase (wrt start time) (E)
+STT_DATE= '                '   / Start UT date (YYYY-MM-DD)
+STT_TIME= '                '   / Start UT (hh:mm:ss)
+STT_IMJD= *                    / Start MJD (UTC days) (J - long integer)
+STT_SMJD= *                    / [s] Start time (sec past UTC 00h) (J)
+STT_OFFS= *                    / [s] Start time offset (D)   
+STT_LST = *                    / [s] Start LST (D)
+END
+#
+###############################################################################
+#
+# Processing History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Processing history *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   21 / number of fields per row
+#
+EXTNAME = HISTORY             / name of this binary table extension
+#
+TTYPE#  = DATE_PRO            / Processing date and time (UTC)
+TFORM#  = 24A                 / 24-char string
+TTYPE#  = PROC_CMD            / Processing program and command
+TFORM#  = 80A                 / 80_char string
+TTYPE#  = SCALE               / Units (FluxDen/RefFlux/Jansky)
+TFORM#  = 8A                  / 8-char string
+TTYPE#  = POL_TYPE            / Polarisation identifier
+TFORM#  = 8A                  / 8-char string
+TTYPE#  = NPOL                / Number of polarisations
+TFORM#  = 1I                  / Integer
+TTYPE#  = NBIN                / Nr of bins per product (0 for SEARCH mode)
+TFORM#  = 1I                  / Integer
+TTYPE#  = NBIN_PRD            / Nr of bins per period
+TFORM#  = 1I                  / Integer
+TTYPE#  = TBIN                / Time per bin or sample
+TUNIT#  = s                   / units of field
+TFORM#  = 1D                  / Double
+TTYPE#  = CTR_FREQ            / Band centre frequency
+TUNIT#  = MHz                 / units of field
+TFORM#  = 1D                  / Double
+TTYPE#  = NCHAN               / Number of frequency channels
+TFORM#  = 1I                  / Integer
+TTYPE#  = CHAN_BW             / Channel bandwidth
+TFORM#  = 1D                  / Double
+TUNIT#  = MHz                 / units of field
+TTYPE#  = PAR_CORR            / Parallactic angle correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = FA_CORR             / Feed angle correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = RM_CORR             / RM correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = DEDISP              / Data dedispersed
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = DDS_MTHD            / Dedispersion method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = SC_MTHD             / Scattered power correction method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = CAL_MTHD            / Calibration method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = CAL_FILE            / Name of gain calibration file
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = RFI_MTHD            / RFI excision method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = IFR_MTHD            / Ionospheric Faraday rotation correction method
+TFORM#  = 32A                 / 32-char string
+END
+#
+###############################################################################
+#
+# Digitiser Counts Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Digitiser counts *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / Width of table in bytes
+NAXIS2  =                    * / Number of rows in table
+PCOUNT  =                    0 / Size of special data area
+GCOUNT  =                    1 / One data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+DIG_MODE= '                '   / Digitiser mode
+DYN_LEVT= *                    / Timescale for dynamic leveling
+NDIGR   = *                    / Number of digitised channels (I)
+NLEV    = *                    / Number of digitiser levels
+NPTHIST = *                    / Number of points in histogram (I)
+DIGLEV  = '                '   / Digitiser level-setting mode (AUTO, FIX)
+EXTNAME = DIG_CNTS             / Name of this binary table extension
+#
+TTYPE#  = DAT_OFFS             / Data offset for each histogram
+TFORM#  = E                    / NDIGR floats
+TTYPE#  = DAT_SCL              / Data scale factor for each histogram
+TFORM#  = E                    / NDIGR floats
+TTYPE#  = DATA                 / Digitiser count data
+TDIM#   = (*,*)                / Data table dimensions (NPTHIST,NDIGR)         
+TFORM#  = I                    / NPTHIST*NDIGR integers
+END
+#
+###############################################################################
+#
+# Original Bandpass Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Original bandpasses *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / number of fields per row
+#
+NCH_ORIG= *                    / Number of channels in original bandpass
+BP_NPOL = *                    / Number of polarizations in bandpass
+EXTNAME = BANDPASS             / name of this binary table extension
+#
+TTYPE#  = DAT_OFFS             / Data offset for each bandpass
+TFORM#  = E                    / BP_NPOL floats
+TTYPE#  = DAT_SCL              / Data scale factor: Val=Data*DAT_SCL + DAT_OFFS
+TFORM#  = E                    / BP_NPOL floats
+TTYPE#  = DATA                 / Bandpass for autocorrelations
+TDIM#   = (*,*)                / Data table dimensions = (NCH_ORIG,BP_NPOL)
+TUNIT#  = Jy                   / Bandpass amplitude units
+TFORM#  = I                    / NCH_ORIG*BP_NPOL integers
+END
+#
+###############################################################################
+#
+# Coherent Dedispersion Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Coherent Dedispersion Parameters *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table (NCHAN)
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / number of fields per row
+#
+NFFT    =                    * / Size of forward FFT 
+EXTNAME = COHDDISP             / name of this binary table extension
+#
+TTYPE#  = NOVERLAP             / Number of overlap points for each sub-band
+TFORM#  = 1I                   / Integer
+TTYPE#  = NCHIRP               / Number of points in chirp function
+TFORM#  = 1I                   / Integer
+TTYPE#  = ACBANDPASS           / Bandpass for autocorrelations
+TUNIT#  = Jy                   / Bandpass amplitude units
+TFORM#  = E                    / NCHIRP floats
+END
+#
+###############################################################################
+#
+# Ephemeris History Binary Table Extension
+#
+###############################################################################
+#
+# Note: This table has entries which should be sufficient for real-time folding 
+# of pulsar data. Additional parameters can be added to the table in off-line 
+# processing if necessary. Examples are: additional pulse frequency derivatives 
+# (Fn), additional DM derivatives (DMn), additional planets (T0_n, PB_n, A1_n, 
+# OM_n, ECC_n), additional glitches (GLEP_n, GLPH_n, GLF0_n, GLF1_n, GLF0D_n)
+# and additional FITWAVE coefficients (WAVES_n, WAVEC_n).
+#
+XTENSION= BINTABLE             / ***** Pulsar ephemeris history *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                  104 / number of fields per row
+#
+EXTNAME = PSREPHEM             / name of this binary table extension
+#
+TTYPE#  = DATE_PRO             / Processing date and time (UTC)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = PROC_CMD             / Processing program and command
+TFORM#  = 80A                  / 80-char string
+TTYPE#  = EPHVER               / Version ID for ephemeris data
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = PSR_NAME             / Pulsar Jname
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = RAJ                  / RA (J2000) (hh:mm:ss.ssssssss)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = DECJ                 / Dec (J2000) (hh:mm:ss.ssssssss)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = PMRA                 / Proper motion in RA
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PMDEC                / Proper motion in DEC
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = ELONG                / [deg] Ecliptic longitude
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = ELAT                 / Ecliptic latitude
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = PMELONG              / Proper motion in ecliptic longitude 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PMELAT               / Proper motion in ecliptic latitude 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PX                   / Parallax
+TFORM#  = 1D                   / Double
+TUNIT#  = mas                  / Units of field
+TTYPE#  = POSEPOCH             / Epoch at which the position is measured (MJD)
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = IF0                  / Integer mHz barycentric spin freq
+TFORM#  = 1J                   / Long integer
+TUNIT#  = mHz                  / Units of field
+TTYPE#  = FF0                  / Fractional mHz barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = mHz                  / Units of field
+TTYPE#  = F1                   / Time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-2)              / Units of field
+TTYPE#  = F2                   / 2nd time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-3)              / Units of field
+TTYPE#  = F3                   / 3rd time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-4)              / Units of field
+TTYPE#  = PEPOCH               / Epoch of period/frequency determination
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = DM                   / Dispersion measure
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc          / Units of field
+TTYPE#  = DM1                  / Time deriv of dispersion measure
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc/yr       / Units of field
+TTYPE#  = RM                   / Rotation measure
+TFORM#  = 1D                   / Double
+TUNIT#  = rad m**(-2)          / Units of field
+TTYPE#  = BINARY               / Binary model
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = T0                   / Epoch of periastron 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = PB                   / Binary period of pulsar 
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = A1                   / Projected semi-major axis of orbit
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = OM                   / Longitude of periastron
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = OMDOT                / [deg/yr]Periastron advance 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg/yr               / Units of field
+TTYPE#  = ECC                  / Eccentricity
+TFORM#  = 1D                   / Double
+TTYPE#  = PBDOT                / First time deriv of binary period
+TFORM#  = 1D                   / Double
+TTYPE#  = GAMMA                / Post-Keplerian "gamma" term
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = SINI                 / Sine of inclination angle
+TFORM#  = 1D                   / Double
+TTYPE#  = M2                   / Companion mass 
+TFORM#  = 1D                   / Double
+TUNIT#  = Msun                 / Units of field
+TTYPE#  = T0_2                 / Epoch of periastron [2nd orbit] 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = PB_2                 / Binary period of pulsar [2nd orbit]
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = A1_2                 / asin(i) of 2nd orbit
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = OM_2                 / [deg] Longitude of periastron [2nd orbit]
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = ECC_2                / Eccentricity [2nd orbit]
+TFORM#  = 1D                   / Double
+TTYPE#  = DTHETA               / Relativistic deformation of the orbit
+TFORM#  = 1D                   / Double
+TTYPE#  = A1DOT                / Rate of change of asin(i) 
+TFORM#  = 1D                   / Double
+TTYPE#  = ECCDOT               / Rate of change of eccentricity 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = TASC                 / Epoch of ascending node
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = EPS1                 / ECC sin(OM) (ELL1 binary model)
+TFORM#  = 1D                   / Double
+TTYPE#  = EPS2                 / ECC cos(OM) (ELL1 binary model)
+TFORM#  = 1D                   / Double
+TTYPE#  = EPS1DOT              / Time derivative of EPS1
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = EPS2DOT              / Time derivative of EPS2
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = OM2DOT               / Second time derivative of omega 
+TFORM#  = 1D                   / Double
+TUNIT#  = rad s**(-2)          / Units of field
+TTYPE#  = XOMDOT               / Omega-dot minus GR prediction 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg/yr               / Units of field
+TTYPE#  = XPBDOT               / Pbdot minus GR prediction 
+TFORM#  = 1D                   / Double
+TTYPE#  = MTOT                 / [M_sun] Total system mass 
+TFORM#  = 1D                   / Double
+TUNIT#  = Msun                 / Units of field
+TTYPE#  = DR                   / Relativistic deformation of the orbit
+TFORM#  = 1D                   / Double
+TTYPE#  = X2DOT                / Second time derivative of x=a1 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = PMRV                 / Radial proper motion 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = START                / Epoch of start of fit
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = FINISH               / Epoch of end of fit
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = TRES                 / RMS timing residual
+TFORM#  = 1D                   / Double
+TUNIT#  = mus                  / Units of field
+TTYPE#  = NTOA                 / Number of TOAs in timing fit
+TFORM#  = 1I                   / Integer
+TNULL#  = 1                    / Null value used by fits_write_col_null
+TTYPE#  = CLK                  / Terrestrial time standard
+TFORM#  = 12A                  / 12-char string
+TTYPE#  = EPHEM                / Solar system ephemeris
+TFORM#  = 12A                  / 12-char string
+TTYPE#  = TZRIMJD              / Reference TOA (Integer part)
+TFORM#  = 1J                   / Long Integer
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = TZRFMJD              / Reference TOA (Fractional part)
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = TZRFRQ               / Frequency of reference TOA
+TFORM#  = 1D                   / Double
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = TZRSITE              / Observatory code of reference TOA
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = GLEP_1               / Epoch [Tempo Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = GLPH_1               / Phase increment [Tempo Glitch 1]
+TFORM#  = 1D                   / Double
+TTYPE#  = GLF0_1               / Permanent pulse freq increment [Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+TTYPE#  = GLF1_1               / Permanent freq deriv incr. [Glitch 1] 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-2)              / Units of field
+TTYPE#  = GLF0D_1              / Spin freq increment [Decaying Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+#
+# New parameters for TEMPO2, ignored for EPHVER < 5
+#
+TTYPE#  = ECLOBL               / Ecliptic obliquity 
+TFORM#  = 1D                   / Double
+TUNIT#  = arcsec               / Units of field
+TTYPE#  = IPM                  / Correct for interplanetary dispersion 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = TEMPO1               / Tempo1 emulation mode 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = DILATEFREQ           / Correct obs frequency for time dilation 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = NO_SS_SHAPIRO        / Turn off all solar system Shapiro delays
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = PLANET_SHAPIRO       / Account for planetary Shapiro delays 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = CORRECT_TROPO        / Correct for tropospheric delays 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = UNITS                / Units for SSB timescale (SI, TDB) 
+TFORM#  = 4A                   / String
+TNULL#  = SI                   / Default = SI
+TTYPE#  = NE1AU                / Solar electron density scale @1AU
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc          / Units of field
+TTYPE#  = TIMEEPH              / Time ephemeris code to use (IF99, fb90)
+TFORM#  = 6A                   / String
+TNULL#  = IF99                 / Default = IF99
+TTYPE#  = T2CMETHOD            / Polar Motion/Prec/Nut code (IAU2000B, TEMPO)
+TFORM#  = 9A                   / String
+TNULL#  = IAU2000B             / Default = IAU2000B
+TTYPE#  = DMFACTOR             / DM/Dispersion Constant 
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc s**(-3)  / Units of field
+TTYPE#  = DMEPOCH              / Epoch for DM 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = FDDC                 / Scale of freq-dependent delay 
+TFORM#  = 1D                   / Double
+TUNIT#  = s MHz**(-FDDI)       / Units of field
+TTYPE#  = FDDI                 / Spectral index of freq-dependent delay
+TFORM#  = 1D                   / Double
+TTYPE#  = MSS                  / Use Wex 1988 "MSS" in T2 binary model 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = BINIT                / Iterate to invert binary timing formula
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = SHAPMAX              / -ln(1-sini) Shapiro delay parameter
+TFORM#  = 1D                   / Double
+TTYPE#  = KOM                  / Position angle of ascending node 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = KIN                  / Inclination of orbit, for Kopeikin terms
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = KMPRA                / PMRA for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMDEC               / PMDEC for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMELONG             / PMELONG for Kopeikin term
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMELAT              / PMELAT for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = RV                   / Radial velocity 
+TFORM#  = 1D                   / Double
+TUNIT#  = km/s                 / Units of field
+TTYPE#  = RVS                  / Radial velocity for Shklovskii-dot term
+TFORM#  = 1D                   / Double
+TUNIT#  = km/s                 / Units of field
+TTYPE#  = VT                   / Transverse velocity for Doppler term
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = RACC                 / Radial acceleration 
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = PMACC                / Accel parallel to proper motion 
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = D_SHK                / Distance for Shklovskii term 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = D_AOP                / Distance for annual-orbital parallax 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = D_OP                 / Distance for orbital parallax 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = WAVE_FREQ            / Fundamental FITWAVE frequency
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+TTYPE#  = WAVES_1              / FITWAVE sine component amplitude
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = WAVEC_1              / FITWAVE cosine component amplitude
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+END
+#
+###############################################################################
+#
+# TEMPO1 Polyco History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Polyco history *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   13 / Number of fields per row
+#
+EXTNAME = POLYCO               / name of this binary table extension
+#
+TTYPE#  = DATE_PRO             / Processing date and time (UTC)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = POLYVER              / Polyco version ID
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = NSPAN                / Span of polyco in min
+TFORM#  = 1I                   / Integer
+TTYPE#  = NCOEF                / Nr of coefficients (<=15)
+TFORM#  = 1I                   / Integer
+TTYPE#  = NPBLK                / Nr of blocks (rows) for this polyco
+TFORM#  = 1I                   / Integer
+TTYPE#  = NSITE                / Observatory code
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = REF_FREQ             / Reference frequency for phase
+TFORM#  = 1D                   / Double
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = PRED_PHS             / Predicted pulse phase at obs start
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_MJD              / Reference MJD
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_PHS              / Reference phase
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_F0               / Zero-order pulsar frequency
+TUNIT#  = Hz                   / Units of field
+TFORM#  = 1D                   / Double
+TTYPE#  = LGFITERR             / Log_10 of polynomial fit rms error in periods
+TFORM#  = 1D                   / Double
+TTYPE#  = COEFF                / Polyco coefficients
+TFORM#  = 15D                  / NCOEF doubles
+END
+#
+###############################################################################
+#
+# TEMPO2 Predictor History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Tempo2 Predictor history *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    1 / Number of fields per row
+#
+EXTNAME = T2PREDICT            / name of this binary table extension
+#
+TTYPE#  = PREDICT              / Whole text file is stored verbatim
+TFORM#  = A 
+END
+#
+###############################################################################
+#
+# Flux Calibration Data Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Flux Calibration Data *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    6 / Number of fields per row
+#
+EXTNAME = FLUX_CAL             / name of this binary table extension
+CAL_MTHD=                      / Flux cal method
+SCALFILE=                      / Cal file(s) used to derive flux-cal data
+NCHAN   =                    * / Nr of frequency channels (I)
+NRCVR   =                    * / Number of receiver channels (I)
+EPOCH   =                      / [MJD] Epoch of calibration obs
+#
+TTYPE#  = DAT_FREQ             / Centre frequency for each channel
+TFORM#  = E                    / NCHAN floats
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = S_SYS                / System equiv. flux density for each rcvr chan.
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_SYSERR             / Est. error of system equiv. flux density
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_CAL                / Calibrator flux density for each rcvr channel
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_CALERR             / Estimated error of calibrator flux density
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy      
+END
+#
+###############################################################################
+#
+# Artificial Calibrator Stokes Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Artificial Calibrator Stokes Data *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+EXTNAME = CAL_POLN             / name of this binary table extension
+NCHAN   =                    * / Nr of channels in flux cal file
+#
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = DATA                 / Stokes (Q,U,V) of calibrator rel. to Cal I
+TFORM#  = E                    / 3*NCHAN floats
+TTYPE#  = DATAERR              / Estimated error of Stokes (Q,U,V)
+TFORM#  = E                    / 3*NCHAN floats
+END
+#
+###############################################################################
+#
+# Feed Cross-Coupling Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Feed Cross-Coupling parameters *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+EXTNAME = FEEDPAR              / Name of this binary table extension
+CAL_MTHD= '                  ' / Cross-coupling method
+NCPAR   =                    * / Number of coupling parameters
+NCHAN   =                    * / Nr of channels in Feed coupling data
+EPOCH   = '                  ' / [MJD] Epoch of calibration obs
+#
+TTYPE#  = DAT_FREQ             / [MHz] Centre frequency for each channel
+TFORM#  = E                    / NCHAN floats
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = DATA                 / Cross-coupling data
+TDIM#   = (*,*)                / Dimensions (NCHAN,NCPAR)
+TFORM#  = E                    / NCHAN*NCPAR floats
+TTYPE#  = DATAERR              / Estimated error of cross-coupling data
+TDIM#   = (*,*)                / Dimensions (NCHAN,NCPAR)
+TFORM#  = E                    / NCHAN*NCPAR floats
+END
+#
+###############################################################################
+#
+# Subintegration data Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Subintegration data  *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes 
+NAXIS2  =                    * / Number of rows in table (NSUBINT)
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   19 / Number of fields per row
+# 
+INT_TYPE= '                  ' / Time axis (TIME, BINPHSPERI, BINLNGASC, etc)
+INT_UNIT= '                  ' / Unit of time axis (SEC, PHS (0-1), DEG) 
+TSAMP   =                    * / [s] Sample interval for SEARCH-mode data 
+NBIN    =                    * / Nr of bins (1 for SEARCH-mode data)
+NBITS   =                    * / Nr of bits per datum (for 'X' data, else 1)
+NCH_FILE=                    * / Number of channels/sub-bands in this file
+NCH_STRT=                    * / Start channel/sub-band number (0 to NCHAN-1)
+NPOL    =                    * / Nr of polarisations in table
+NSBLK   =                    * / Samples/row (each NPOL*NCH_FILE, SEARCH mode) 
+#
+EXTNAME = SUBINT               / name of this binary table extension
+#
+TTYPE#  = ISUBINT              / Subint number
+TFORM#  = 1J                   / Long integer
+TTYPE#  = INDEXVAL             / Optionally used if INT_TYPE != TIME
+TFORM#  = 1D                   / Double
+TTYPE#  = TSUBINT              / Length of subintegration
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = OFFS_SUB             / Offset from Start of subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = LST_SUB              / LST at subint centre 
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = RA_SUB               / RA (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DEC_SUB              / Dec (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLON_SUB             / [deg] Gal longitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLAT_SUB             / [deg] Gal latitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = FD_ANG               / [deg] Feed angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = POS_ANG              / [deg] Position angle of feed at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = PAR_ANG              / [deg] Parallactic angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_AZ               / [deg] Telescope azimuth at subint centre
+TFORM#  = 1E                   / Float 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_ZEN              / [deg] Telescope zenith angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_FREQ             / [MHz] Centre frequency for each channel
+TFORM#  = E                    / NCH_FILE floats
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCH_FILE floats
+TTYPE#  = DAT_OFFS             / Data offset for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DAT_SCL              / Data scale factor for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DATA                 / Subint data table
+TDIM#   = (*,*,*,*)            / Dimensions (NBITS or NBIN,NCH_FILE,NPOL,NSBLK)
+TFORM#  = I                    / NBIN*NCH_FILE*NPOL*NSBLK int, byte or bit (X) 
+TUNIT#  = Jy                   / Units of subint data
+END
+#
+###############################################################################
+#
+# Digitiser Statistics Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Digitiser statistics *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / Width of table in bytes
+NAXIS2  =                    * / Number of rows in table (NSUBINT)
+PCOUNT  =                    0 / Size of special data area
+GCOUNT  =                    1 / One data group (required keyword)
+TFIELDS =                    1 / Number of fields per row
+#
+DIG_MODE= '                '   / Digitiser mode
+NDIGR   = *                    / Number of digitised channels (I)
+NPAR    = *                    / Number of digitiser parameters
+NCYCSUB = *                    / Number of correlator cycles per subint
+DIGLEV  = '                '   / Digitiser level-setting mode (AUTO, FIX)
+EXTNAME = DIG_STAT             / Name of this binary table extension
+#
+TTYPE#  = ATTEN                / Attenuator settings
+TFORM#  = E                    / NDIGR floats
+TUNIT#  = db                   / Units of field
+TTYPE#  = DATA                 / Digitiser statistics
+TDIM#   = (*,*,*)              / Data table dimensions (NPAR,NDIGR,NCYCSUB)
+TFORM#  = E                    / NPAR*NDIGR*NCYCSUB floats
+END
Index: /trunk/templates/psrheader_20070213.fits
===================================================================
--- /trunk/templates/psrheader_20070213.fits	(revision 95)
+++ /trunk/templates/psrheader_20070213.fits	(revision 95)
@@ -0,0 +1,805 @@
+SIMPLE  =                    T / file does conform to FITS standard
+BITPIX  =                    8 / number of bits per data pixel
+NAXIS   =                    0 / number of data axes
+EXTEND  =                    T / FITS dataset may contain extensions
+COMMENT   FITS (Flexible Image Transport System) format defined in Astronomy and
+COMMENT   Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.
+COMMENT   Contact the NASA Science Office of Standards and Technology for the
+COMMENT   FITS Definition document #100 and other FITS information.
+COMMENT
+HDRVER  = '2.8             '   / Header version 
+DATE    = '                '   / File creation date (YYYY-MM-DDThh:mm:ss UTC)
+OBSERVER= '                '   / Observer name(s)
+PROJID  = '                '   / Project name
+TELESCOP= '                '   / Telescope name
+ANT_X   = *                    / [m] Antenna ITRF X-coordinate (D)
+ANT_Y   = *                    / [m] Antenna ITRF Y-coordinate (D)
+ANT_Z   = *                    / [m] Antenna ITRF Z-coordinate (D)
+FRONTEND= '                '   / Rx and feed ID
+FD_POLN = '                '   / LIN or CIRC
+FD_HAND = *                    / +/- 1. +1 is LIN:A=X,B=Y, CIRC:A=L,B=R (I)
+FD_SANG = *                    / [deg] FA of E vect for equal sig in A&B (E)
+FD_XYPH = *                    / [deg] Phase of A^* B for injected cal (E)
+BACKEND = '                '   / Backend ID
+BECONFIG= '                '   / Backend configuration file name
+BE_PHASE= *                    / 0/+1/-1 BE cross-phase:0 unknown,+/-1 std/rev
+BE_DCC  = *                    / 0/1 BE downconversion conjugation corrected
+TCYCLE  = *                    / [s] On-line cycle time (D)
+NRCVR   = *                    / Number of receiver channels (I)
+OBS_MODE= '                '   / (PSR, CAL, SEARCH)
+SRC_NAME= '                '   / Source or scan ID 
+COORD_MD= '                '   / Coordinate mode (J2000, Gal, Ecliptic, etc.)
+STT_CRD1= '                '   / Start coord 1 (hh:mm:ss.sss or ddd.ddd)
+STT_CRD2= '                '   / Start coord 2 (-dd:mm:ss.sss or -dd.ddd) 
+TRK_MODE= '                '   / Track mode (TRACK, SCANGC, SCANLAT)
+STP_CRD1= '                '   / Stop coord 1 (hh:mm:ss.sss or ddd.ddd)
+STP_CRD2= '                '   / Stop coord 2 (-dd:mm:ss.sss or -dd.ddd) 
+SCANLEN = *                    / [s] Requested scan length (E)
+FD_MODE = '                '   / Feed track mode - FA, CPA, SPA, TPA
+FA_REQ  = *                    / [deg] Feed/Posn angle requested (E)
+CAL_MODE= '                '   / Cal mode (OFF, SYNC, EXT1, EXT2)
+CAL_FREQ= *                    / [Hz] Cal modulation frequency (E)
+CAL_DCYC= *                    / Cal duty cycle (E)
+CAL_PHS = *                    / Cal phase (wrt start time) (E)
+STT_DATE= '                '   / Start UT date (YYYY-MM-DD)
+STT_TIME= '                '   / Start UT (hh:mm:ss)
+STT_IMJD= *                    / Start MJD (UTC days) (J - long integer)
+STT_SMJD= *                    / [s] Start time (sec past UTC 00h) (J)
+STT_OFFS= *                    / [s] Start time offset (D)   
+STT_LST = *                    / [s] Start LST (D)
+END
+#
+###############################################################################
+#
+# Processing History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Processing history *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   21 / number of fields per row
+#
+EXTNAME = HISTORY             / name of this binary table extension
+#
+TTYPE#  = DATE_PRO            / Processing date and time (UTC)
+TFORM#  = 24A                 / 24-char string
+TTYPE#  = PROC_CMD            / Processing program and command
+TFORM#  = 80A                 / 80_char string
+TTYPE#  = SCALE               / Units (FluxDen/RefFlux/Jansky)
+TFORM#  = 8A                  / 8-char string
+TTYPE#  = POL_TYPE            / Polarisation identifier
+TFORM#  = 8A                  / 8-char string
+TTYPE#  = NPOL                / Number of polarisations
+TFORM#  = 1I                  / Integer
+TTYPE#  = NBIN                / Nr of bins per product (0 for SEARCH mode)
+TFORM#  = 1I                  / Integer
+TTYPE#  = NBIN_PRD            / Nr of bins per period
+TFORM#  = 1I                  / Integer
+TTYPE#  = TBIN                / Time per bin or sample
+TUNIT#  = s                   / units of field
+TFORM#  = 1D                  / Double
+TTYPE#  = CTR_FREQ            / Band centre frequency
+TUNIT#  = MHz                 / units of field
+TFORM#  = 1D                  / Double
+TTYPE#  = NCHAN               / Number of frequency channels
+TFORM#  = 1I                  / Integer
+TTYPE#  = CHAN_BW             / Channel bandwidth
+TFORM#  = 1D                  / Double
+TUNIT#  = MHz                 / units of field
+TTYPE#  = PAR_CORR            / Parallactic angle correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = FA_CORR             / Feed angle correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = RM_CORR             / RM correction applied
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = DEDISP              / Data dedispersed
+TFORM#  = 1I                  / Integer flag 
+TTYPE#  = DDS_MTHD            / Dedispersion method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = SC_MTHD             / Scattered power correction method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = CAL_MTHD            / Calibration method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = CAL_FILE            / Name of gain calibration file
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = RFI_MTHD            / RFI excision method
+TFORM#  = 32A                 / 32-char string
+TTYPE#  = IFR_MTHD            / Ionospheric Faraday rotation correction method
+TFORM#  = 32A                 / 32-char string
+END
+#
+###############################################################################
+#
+# Digitiser Counts Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Digitiser counts *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / Width of table in bytes
+NAXIS2  =                    * / Number of rows in table
+PCOUNT  =                    0 / Size of special data area
+GCOUNT  =                    1 / One data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+DIG_MODE= '                '   / Digitiser mode
+DYN_LEVT= *                    / Timescale for dynamic leveling
+NDIGR   = *                    / Number of digitised channels (I)
+NLEV    = *                    / Number of digitiser levels
+NPTHIST = *                    / Number of points in histogram (I)
+DIGLEV  = '                '   / Digitiser level-setting mode (AUTO, FIX)
+EXTNAME = DIG_CNTS             / Name of this binary table extension
+#
+TTYPE#  = DAT_OFFS             / Data offset for each histogram
+TFORM#  = E                    / NDIGR floats
+TTYPE#  = DAT_SCL              / Data scale factor for each histogram
+TFORM#  = E                    / NDIGR floats
+TTYPE#  = DATA                 / Digitiser count data
+TDIM#   = (*,*)                / Data table dimensions (NPTHIST,NDIGR)         
+TFORM#  = I                    / NPTHIST*NDIGR integers
+END
+#
+###############################################################################
+#
+# Original Bandpass Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Original bandpasses *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / number of fields per row
+#
+NCH_ORIG= *                    / Number of channels in original bandpass
+BP_NPOL = *                    / Number of polarizations in bandpass
+EXTNAME = BANDPASS             / name of this binary table extension
+#
+TTYPE#  = DAT_OFFS             / Data offset for each bandpass
+TFORM#  = E                    / BP_NPOL floats
+TTYPE#  = DAT_SCL              / Data scale factor: Val=Data*DAT_SCL + DAT_OFFS
+TFORM#  = E                    / BP_NPOL floats
+TTYPE#  = DATA                 / Bandpass for autocorrelations
+TDIM#   = (*,*)                / Data table dimensions = (NCH_ORIG,BP_NPOL)
+TUNIT#  = Jy                   / Bandpass amplitude units
+TFORM#  = I                    / NCH_ORIG*BP_NPOL integers
+END
+#
+###############################################################################
+#
+# Coherent Dedispersion Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Coherent Dedispersion Parameters *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table (NCHAN)
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / number of fields per row
+#
+NFFT    =                    * / Size of forward FFT 
+EXTNAME = COHDDISP             / name of this binary table extension
+#
+TTYPE#  = NOVERLAP             / Number of overlap points for each sub-band
+TFORM#  = 1I                   / Integer
+TTYPE#  = NCHIRP               / Number of points in chirp function
+TFORM#  = 1I                   / Integer
+TTYPE#  = ACBANDPASS           / Bandpass for autocorrelations
+TUNIT#  = Jy                   / Bandpass amplitude units
+TFORM#  = E                    / NCHIRP floats
+END
+#
+###############################################################################
+#
+# Ephemeris History Binary Table Extension
+#
+###############################################################################
+#
+# Note: This table has entries which should be sufficient for real-time folding 
+# of pulsar data. Additional parameters can be added to the table in off-line 
+# processing if necessary. Examples are: additional pulse frequency derivatives 
+# (Fn), additional DM derivatives (DMn), additional planets (T0_n, PB_n, A1_n, 
+# OM_n, ECC_n), additional glitches (GLEP_n, GLPH_n, GLF0_n, GLF1_n, GLF0D_n)
+# and additional FITWAVE coefficients (WAVES_n, WAVEC_n).
+#
+XTENSION= BINTABLE             / ***** Pulsar ephemeris history *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                  104 / number of fields per row
+#
+EXTNAME = PSREPHEM             / name of this binary table extension
+#
+TTYPE#  = DATE_PRO             / Processing date and time (UTC)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = PROC_CMD             / Processing program and command
+TFORM#  = 80A                  / 80-char string
+TTYPE#  = EPHVER               / Version ID for ephemeris data
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = PSR_NAME             / Pulsar Jname
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = RAJ                  / RA (J2000) (hh:mm:ss.ssssssss)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = DECJ                 / Dec (J2000) (hh:mm:ss.ssssssss)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = PMRA                 / Proper motion in RA
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PMDEC                / Proper motion in DEC
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = ELONG                / [deg] Ecliptic longitude
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = ELAT                 / Ecliptic latitude
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = PMELONG              / Proper motion in ecliptic longitude 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PMELAT               / Proper motion in ecliptic latitude 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = PX                   / Parallax
+TFORM#  = 1D                   / Double
+TUNIT#  = mas                  / Units of field
+TTYPE#  = POSEPOCH             / Epoch at which the position is measured (MJD)
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = IF0                  / Integer mHz barycentric spin freq
+TFORM#  = 1J                   / Long integer
+TUNIT#  = mHz                  / Units of field
+TTYPE#  = FF0                  / Fractional mHz barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = mHz                  / Units of field
+TTYPE#  = F1                   / Time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-2)              / Units of field
+TTYPE#  = F2                   / 2nd time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-3)              / Units of field
+TTYPE#  = F3                   / 3rd time deriv of barycentric spin freq
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-4)              / Units of field
+TTYPE#  = PEPOCH               / Epoch of period/frequency determination
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = DM                   / Dispersion measure
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc          / Units of field
+TTYPE#  = DM1                  / Time deriv of dispersion measure
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc/yr       / Units of field
+TTYPE#  = RM                   / Rotation measure
+TFORM#  = 1D                   / Double
+TUNIT#  = rad m**(-2)          / Units of field
+TTYPE#  = BINARY               / Binary model
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = T0                   / Epoch of periastron 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = PB                   / Binary period of pulsar 
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = A1                   / Projected semi-major axis of orbit
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = OM                   / Longitude of periastron
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = OMDOT                / [deg/yr]Periastron advance 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg/yr               / Units of field
+TTYPE#  = ECC                  / Eccentricity
+TFORM#  = 1D                   / Double
+TTYPE#  = PBDOT                / First time deriv of binary period
+TFORM#  = 1D                   / Double
+TTYPE#  = GAMMA                / Post-Keplerian "gamma" term
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = SINI                 / Sine of inclination angle
+TFORM#  = 1D                   / Double
+TTYPE#  = M2                   / Companion mass 
+TFORM#  = 1D                   / Double
+TUNIT#  = Msun                 / Units of field
+TTYPE#  = T0_2                 / Epoch of periastron [2nd orbit] 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = PB_2                 / Binary period of pulsar [2nd orbit]
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = A1_2                 / asin(i) of 2nd orbit
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = OM_2                 / [deg] Longitude of periastron [2nd orbit]
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = ECC_2                / Eccentricity [2nd orbit]
+TFORM#  = 1D                   / Double
+TTYPE#  = DTHETA               / Relativistic deformation of the orbit
+TFORM#  = 1D                   / Double
+TTYPE#  = A1DOT                / Rate of change of asin(i) 
+TFORM#  = 1D                   / Double
+TTYPE#  = ECCDOT               / Rate of change of eccentricity 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = TASC                 / Epoch of ascending node
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = EPS1                 / ECC sin(OM) (ELL1 binary model)
+TFORM#  = 1D                   / Double
+TTYPE#  = EPS2                 / ECC cos(OM) (ELL1 binary model)
+TFORM#  = 1D                   / Double
+TTYPE#  = EPS1DOT              / Time derivative of EPS1
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = EPS2DOT              / Time derivative of EPS2
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = OM2DOT               / Second time derivative of omega 
+TFORM#  = 1D                   / Double
+TUNIT#  = rad s**(-2)          / Units of field
+TTYPE#  = XOMDOT               / Omega-dot minus GR prediction 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg/yr               / Units of field
+TTYPE#  = XPBDOT               / Pbdot minus GR prediction 
+TFORM#  = 1D                   / Double
+TTYPE#  = MTOT                 / [M_sun] Total system mass 
+TFORM#  = 1D                   / Double
+TUNIT#  = Msun                 / Units of field
+TTYPE#  = DR                   / Relativistic deformation of the orbit
+TFORM#  = 1D                   / Double
+TTYPE#  = X2DOT                / Second time derivative of x=a1 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-1)              / Units of field
+TTYPE#  = PMRV                 / Radial proper motion 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = START                / Epoch of start of fit
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = FINISH               / Epoch of end of fit
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = TRES                 / RMS timing residual
+TFORM#  = 1D                   / Double
+TUNIT#  = mus                  / Units of field
+TTYPE#  = NTOA                 / Number of TOAs in timing fit
+TFORM#  = 1I                   / Integer
+TNULL#  = 1                    / Null value used by fits_write_col_null
+TTYPE#  = CLK                  / Terrestrial time standard
+TFORM#  = 12A                  / 12-char string
+TTYPE#  = EPHEM                / Solar system ephemeris
+TFORM#  = 12A                  / 12-char string
+TTYPE#  = TZRIMJD              / Reference TOA (Integer part)
+TFORM#  = 1J                   / Long Integer
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = TZRFMJD              / Reference TOA (Fractional part)
+TFORM#  = 1D                   / Double
+TUNIT#  = d                    / Units of field
+TTYPE#  = TZRFRQ               / Frequency of reference TOA
+TFORM#  = 1D                   / Double
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = TZRSITE              / Observatory code of reference TOA
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = GLEP_1               / Epoch [Tempo Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = GLPH_1               / Phase increment [Tempo Glitch 1]
+TFORM#  = 1D                   / Double
+TTYPE#  = GLF0_1               / Permanent pulse freq increment [Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+TTYPE#  = GLF1_1               / Permanent freq deriv incr. [Glitch 1] 
+TFORM#  = 1D                   / Double
+TUNIT#  = s**(-2)              / Units of field
+TTYPE#  = GLF0D_1              / Spin freq increment [Decaying Glitch 1]
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+#
+# New parameters for TEMPO2, ignored for EPHVER < 5
+#
+TTYPE#  = ECLOBL               / Ecliptic obliquity 
+TFORM#  = 1D                   / Double
+TUNIT#  = arcsec               / Units of field
+TTYPE#  = IPM                  / Correct for interplanetary dispersion 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = TEMPO1               / Tempo1 emulation mode 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = DILATEFREQ           / Correct obs frequency for time dilation 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = NO_SS_SHAPIRO        / Turn off all solar system Shapiro delays
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = PLANET_SHAPIRO       / Account for planetary Shapiro delays 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = CORRECT_TROPO        / Correct for tropospheric delays 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = UNITS                / Units for SSB timescale (SI, TDB) 
+TFORM#  = 4A                   / String
+TNULL#  = SI                   / Default = SI
+TTYPE#  = NE1AU                / Solar electron density scale @1AU
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc          / Units of field
+TTYPE#  = TIMEEPH              / Time ephemeris code to use (IF99, fb90)
+TFORM#  = 6A                   / String
+TNULL#  = IF99                 / Default = IF99
+TTYPE#  = T2CMETHOD            / Polar Motion/Prec/Nut code (IAU2000B, TEMPO)
+TFORM#  = 9A                   / String
+TNULL#  = IAU2000B             / Default = IAU2000B
+TTYPE#  = DMFACTOR             / DM/Dispersion Constant 
+TFORM#  = 1D                   / Double
+TUNIT#  = cm**(-3) pc s**(-3)  / Units of field
+TTYPE#  = DMEPOCH              / Epoch for DM 
+TFORM#  = 1D                   / Double
+TUNIT#  = MJD                  / Units of field
+TTYPE#  = FDDC                 / Scale of freq-dependent delay 
+TFORM#  = 1D                   / Double
+TUNIT#  = s MHz**(-FDDI)       / Units of field
+TTYPE#  = FDDI                 / Spectral index of freq-dependent delay
+TFORM#  = 1D                   / Double
+TTYPE#  = MSS                  / Use Wex 1988 "MSS" in T2 binary model 
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 0                    / Default = False
+TTYPE#  = BINIT                / Iterate to invert binary timing formula
+TFORM#  = 1I                   / Integer flag
+TNULL#  = 1                    / Default = True
+TTYPE#  = SHAPMAX              / -ln(1-sini) Shapiro delay parameter
+TFORM#  = 1D                   / Double
+TTYPE#  = KOM                  / Position angle of ascending node 
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = KIN                  / Inclination of orbit, for Kopeikin terms
+TFORM#  = 1D                   / Double
+TUNIT#  = deg                  / Units of field
+TTYPE#  = KMPRA                / PMRA for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMDEC               / PMDEC for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMELONG             / PMELONG for Kopeikin term
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = KPMELAT              / PMELAT for Kopeikin term 
+TFORM#  = 1D                   / Double
+TUNIT#  = mas/yr               / Units of field
+TTYPE#  = RV                   / Radial velocity 
+TFORM#  = 1D                   / Double
+TUNIT#  = km/s                 / Units of field
+TTYPE#  = RVS                  / Radial velocity for Shklovskii-dot term
+TFORM#  = 1D                   / Double
+TUNIT#  = km/s                 / Units of field
+TTYPE#  = VT                   / Transverse velocity for Doppler term
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = RACC                 / Radial acceleration 
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = PMACC                / Accel parallel to proper motion 
+TFORM#  = 1D                   / Double
+TUNIT#  = m s**(-2)            / Units of field
+TTYPE#  = D_SHK                / Distance for Shklovskii term 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = D_AOP                / Distance for annual-orbital parallax 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = D_OP                 / Distance for orbital parallax 
+TFORM#  = 1D                   / Double
+TUNIT#  = kpc                  / Units of field
+TTYPE#  = WAVE_FREQ            / Fundamental FITWAVE frequency
+TFORM#  = 1D                   / Double
+TUNIT#  = Hz                   / Units of field
+TTYPE#  = WAVES_1              / FITWAVE sine component amplitude
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+TTYPE#  = WAVEC_1              / FITWAVE cosine component amplitude
+TFORM#  = 1D                   / Double
+TUNIT#  = s                    / Units of field
+END
+#
+###############################################################################
+#
+# TEMPO1 Polyco History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Polyco history *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   13 / Number of fields per row
+#
+EXTNAME = POLYCO               / name of this binary table extension
+#
+TTYPE#  = DATE_PRO             / Processing date and time (UTC)
+TFORM#  = 24A                  / 24-char string
+TTYPE#  = POLYVER              / Polyco version ID
+TFORM#  = 16A                  / 16-char string
+TTYPE#  = NSPAN                / Span of polyco in min
+TFORM#  = 1I                   / Integer
+TTYPE#  = NCOEF                / Nr of coefficients (<=15)
+TFORM#  = 1I                   / Integer
+TTYPE#  = NPBLK                / Nr of blocks (rows) for this polyco
+TFORM#  = 1I                   / Integer
+TTYPE#  = NSITE                / Observatory code
+TFORM#  = 8A                   / 8-char string
+TTYPE#  = REF_FREQ             / Reference frequency for phase
+TFORM#  = 1D                   / Double
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = PRED_PHS             / Predicted pulse phase at obs start
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_MJD              / Reference MJD
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_PHS              / Reference phase
+TFORM#  = 1D                   / Double
+TTYPE#  = REF_F0               / Zero-order pulsar frequency
+TUNIT#  = Hz                   / Units of field
+TFORM#  = 1D                   / Double
+TTYPE#  = LGFITERR             / Log_10 of polynomial fit rms error in periods
+TFORM#  = 1D                   / Double
+TTYPE#  = COEFF                / Polyco coefficients
+TFORM#  = 15D                  / NCOEF doubles
+END
+#
+###############################################################################
+#
+# TEMPO2 Predictor History Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Tempo2 Predictor history *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    1 / Number of fields per row
+#
+EXTNAME = T2PREDICT            / name of this binary table extension
+#
+TTYPE#  = PREDICT              / Whole text file is stored verbatim
+TFORM#  = A 
+END
+#
+###############################################################################
+#
+# Flux Calibration Data Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Flux Calibration Data *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    6 / Number of fields per row
+#
+EXTNAME = FLUX_CAL             / name of this binary table extension
+CAL_MTHD=                      / Flux cal method
+SCALFILE=                      / Cal file(s) used to derive flux-cal data
+NCHAN   =                    * / Nr of frequency channels (I)
+NRCVR   =                    * / Number of receiver channels (I)
+EPOCH   =                      / [MJD] Epoch of calibration obs
+#
+TTYPE#  = DAT_FREQ             / Centre frequency for each channel
+TFORM#  = E                    / NCHAN floats
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = S_SYS                / System equiv. flux density for each rcvr chan.
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_SYSERR             / Est. error of system equiv. flux density
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_CAL                / Calibrator flux density for each rcvr channel
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy        
+TTYPE#  = S_CALERR             / Estimated error of calibrator flux density
+TDIM#   = (*,*)                / Dimensions (NCHAN,NRCVR)
+TFORM#  = E                    / NCHAN*NRCVR floats
+TUNIT#  = Jy      
+END
+#
+###############################################################################
+#
+# Artificial Calibrator Stokes Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Artificial Calibrator Stokes Data *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+EXTNAME = CAL_POLN             / name of this binary table extension
+NCHAN   =                    * / Nr of channels in flux cal file
+#
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = DATA                 / Stokes (Q,U,V) of calibrator rel. to Cal I
+TFORM#  = E                    / 3*NCHAN floats
+TTYPE#  = DATAERR              / Estimated error of Stokes (Q,U,V)
+TFORM#  = E                    / 3*NCHAN floats
+END
+#
+###############################################################################
+#
+# Feed Cross-Coupling Parameters Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Feed Cross-Coupling parameters *****
+BITPIX  =                    8 / N/A 
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes
+NAXIS2  =                    * / number of rows in table
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                    3 / Number of fields per row
+#
+EXTNAME = FEEDPAR              / Name of this binary table extension
+CAL_MTHD= '                  ' / Cross-coupling method
+NCPAR   =                    * / Number of coupling parameters
+NCHAN   =                    * / Nr of channels in Feed coupling data
+EPOCH   = '                  ' / [MJD] Epoch of calibration obs
+#
+TTYPE#  = DAT_FREQ             / [MHz] Centre frequency for each channel
+TFORM#  = E                    / NCHAN floats
+TUNIT#  = MHz                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCHAN floats
+TTYPE#  = DATA                 / Cross-coupling data
+TDIM#   = (*,*)                / Dimensions (NCHAN,NCPAR)
+TFORM#  = E                    / NCHAN*NCPAR floats
+TTYPE#  = DATAERR              / Estimated error of cross-coupling data
+TDIM#   = (*,*)                / Dimensions (NCHAN,NCPAR)
+TFORM#  = E                    / NCHAN*NCPAR floats
+END
+#
+###############################################################################
+#
+# Subintegration data Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Subintegration data  *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes 
+NAXIS2  =                    * / Number of rows in table (NSUBINT)
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   19 / Number of fields per row
+# 
+INT_TYPE= '                  ' / Time axis (TIME, BINPHSPERI, BINLNGASC, etc)
+INT_UNIT= '                  ' / Unit of time axis (SEC, PHS (0-1), DEG) 
+TSAMP   =                    * / [s] Sample interval for SEARCH-mode data 
+NBIN    =                    * / Nr of bins (PSR/CAL mode; else 1)
+NBITS   =                    * / Nr of bits/datum (SEARCH mode 'X' data, else 1)
+NCH_FILE=                    * / Number of channels/sub-bands in this file
+NCH_STRT=                    * / Start channel/sub-band number (0 to NCHAN-1)
+NPOL    =                    * / Nr of polarisations in table
+NSBLK   =                    * / Samples/row (SEARCH mode, else 1) 
+#
+EXTNAME = SUBINT               / name of this binary table extension
+#
+TTYPE#  = ISUBINT              / Subint number
+TFORM#  = 1J                   / Long integer
+TTYPE#  = INDEXVAL             / Optionally used if INT_TYPE != TIME
+TFORM#  = 1D                   / Double
+TTYPE#  = TSUBINT              / Length of subintegration
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = OFFS_SUB             / Offset from Start of subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = LST_SUB              / LST at subint centre 
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = RA_SUB               / RA (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DEC_SUB              / Dec (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLON_SUB             / [deg] Gal longitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLAT_SUB             / [deg] Gal latitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = FD_ANG               / [deg] Feed angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = POS_ANG              / [deg] Position angle of feed at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = PAR_ANG              / [deg] Parallactic angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_AZ               / [deg] Telescope azimuth at subint centre
+TFORM#  = 1E                   / Float 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_ZEN              / [deg] Telescope zenith angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_FREQ             / [MHz] Centre frequency for each channel
+TFORM#  = E                    / NCH_FILE floats
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCH_FILE floats
+TTYPE#  = DAT_OFFS             / Data offset for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DAT_SCL              / Data scale factor for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DATA                 / Subint data table
+TDIM#   = (*,*,*,*)            / Dimensions (NBITS or NBIN,NCH_FILE,NPOL,NSBLK)
+TFORM#  = I                    / NBIN*NCH_FILE*NPOL*NSBLK int, byte(B) or bit(X) 
+TUNIT#  = Jy                   / Units of subint data
+END
+#
+###############################################################################
+#
+# Digitiser Statistics Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Digitiser statistics *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / Width of table in bytes
+NAXIS2  =                    * / Number of rows in table (NSUBINT)
+PCOUNT  =                    0 / Size of special data area
+GCOUNT  =                    1 / One data group (required keyword)
+TFIELDS =                    1 / Number of fields per row
+#
+DIG_MODE= '                '   / Digitiser mode
+NDIGR   = *                    / Number of digitised channels (I)
+NPAR    = *                    / Number of digitiser parameters
+NCYCSUB = *                    / Number of correlator cycles per subint
+DIGLEV  = '                '   / Digitiser level-setting mode (AUTO, FIX)
+EXTNAME = DIG_STAT             / Name of this binary table extension
+#
+TTYPE#  = ATTEN                / Attenuator settings
+TFORM#  = E                    / NDIGR floats
+TUNIT#  = db                   / Units of field
+TTYPE#  = DATA                 / Digitiser statistics
+TDIM#   = (*,*,*)              / Data table dimensions (NPAR,NDIGR,NCYCSUB)
+TFORM#  = E                    / NPAR*NDIGR*NCYCSUB floats
+END
Index: /trunk/templates/subint_extension_20070209.txt
===================================================================
--- /trunk/templates/subint_extension_20070209.txt	(revision 95)
+++ /trunk/templates/subint_extension_20070209.txt	(revision 95)
@@ -0,0 +1,81 @@
+###############################################################################
+#
+# Subintegration data Binary Table Extension
+#
+###############################################################################
+#
+XTENSION= BINTABLE             / ***** Subintegration data  *****
+BITPIX  =                    8 / N/A
+NAXIS   =                    2 / 2-dimensional binary table
+NAXIS1  =                    * / width of table in bytes 
+NAXIS2  =                    * / Number of rows in table (NSUBINT)
+PCOUNT  =                    0 / size of special data area
+GCOUNT  =                    1 / one data group (required keyword)
+TFIELDS =                   19 / Number of fields per row
+# 
+INT_TYPE= '                  ' / Time axis (TIME, BINPHSPERI, BINLNGASC, etc)
+INT_UNIT= '                  ' / Unit of time axis (SEC, PHS (0-1), DEG) 
+TSAMP   =                    * / [s] Sample interval for SEARCH-mode data 
+NBIN    =                    * / Nr of bins (1 for SEARCH-mode data)
+NBITS   =                    * / Nr of bits per datum (for 'X' data, else 1)
+NCH_FILE=                    * / Number of channels/sub-bands in this file
+NCH_STRT=                    * / Start channel/sub-band number (0 to NCHAN-1)
+NPOL    =                    * / Nr of polarisations in table
+NSBLK   =                    * / Samples/row (each NPOL*NCH_FILE, SEARCH mode) 
+#
+EXTNAME = SUBINT               / name of this binary table extension
+#
+TTYPE#  = ISUBINT              / Subint number
+TFORM#  = 1J                   / Long integer
+TTYPE#  = INDEXVAL             / Optionally used if INT_TYPE != TIME
+TFORM#  = 1D                   / Double
+TTYPE#  = TSUBINT              / Length of subintegration
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = OFFS_SUB             / Offset from Start of subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = LST_SUB              / LST at subint centre 
+TFORM#  = 1D                   / Double 
+TUNIT#  = s                    / Units of field
+TTYPE#  = RA_SUB               / RA (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DEC_SUB              / Dec (J2000) at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLON_SUB             / [deg] Gal longitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = GLAT_SUB             / [deg] Gal latitude at subint centre
+TFORM#  = 1D                   / Double 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = FD_ANG               / [deg] Feed angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = POS_ANG              / [deg] Position angle of feed at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = PAR_ANG              / [deg] Parallactic angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_AZ               / [deg] Telescope azimuth at subint centre
+TFORM#  = 1E                   / Float 
+TUNIT#  = deg                  / Units of field
+TTYPE#  = TEL_ZEN              / [deg] Telescope zenith angle at subint centre
+TFORM#  = 1E                   / Float
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_FREQ             / [MHz] Centre frequency for each channel
+TFORM#  = E                    / NCH_FILE floats
+TUNIT#  = deg                  / Units of field
+TTYPE#  = DAT_WTS              / Weights for each channel
+TFORM#  = E                    / NCH_FILE floats
+TTYPE#  = DAT_OFFS             / Data offset for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DAT_SCL              / Data scale factor for each channel
+TFORM#  = E                    / NCH_FILE*NPOL floats
+TTYPE#  = DATA                 / Subint data table
+TDIM#   = (*,*,*,*)            / Dimensions (NBITS or NBIN,NCH_FILE,NPOL,NSBLK)
+TFORM#  = I                    / NBIN*NCH_FILE*NPOL*NSBLK int, byte or bit (X) 
+TUNIT#  = Jy                   / Units of subint data
+END
