RPFITS - ATNF data-recording format

The current version of RPFITS is 2.23 (as of 2011/03/29).

RPFITS is the data-recording format used since the mid-1980s within the Australia Telescope National Facility (ATNF).

RPFITS is used to record synthesis visibility data obtained from the Australia Telescope Compact Array (ATCA) at Narrabri, NSW. It is also used for single-dish spectral line data obtained from Parkes and Mopra, including Parkes multibeam data.

While RPFITS superficially resembles random group FITS it differs in the following important respects:

These differences make RPFITS incompatible with standard FITS software such as FITSIO and FTOOLS and, in particular, precludes the use of fv, a powerful GUI-based FITS browser/editor. However, a translator, rp2sdfits, is available that converts RPFITS single-dish data to SDFITS format that is based on standard FITS binary tables. rp2sdfits is available as part of the livedata/gridzilla package.

The Fortran library distributed here contains routines for reading and writing RPFITS files. A header file, RPFITS.h, is provided to facilitate usage by C and C++ applications. Also included is rpfhdr, a utility for viewing RPFITS headers (it also works for standard FITS), and rpfex for extracting selected scans from an RPFITS file.

In addition to the source code distribution kit, the following RPFITS binary distributions are available:

Note that each binary distribution kit contains a GNU makefile that supplies architecture-specific definitions for the template GNU makefile supplied with the source code kit.

Mac (i386) binaries are no longer provided as of version 2.22.
Mac (ppc) binaries are no longer provided as of version 2.18.
DEC alpha binaries are no longer provided as of version 2.5.
SunOS 4.1.3 binaries are no longer provided as of version 2.5.
SGI binaries are no longer provided as of version 2.2.

RPFITS version 2

Dates in the version 2 RPFITS header are in the new standard year-2000-compatible format which is not readable by the version 1 RPFITS reader. Version 1 dates are, however, backwards compatible with the version 2 reader.

Data has been written at the Australia Telescope Compact Array (ATCA) in the new format since 1998/10/06. Similarly for the Parkes telescope.

Changes in version 2.23

Version 2.23 (2011/03/29): Persuant to the previous two changes, rpfits_tables.f was modified to read and write SX (extended source) tables. These are a slightly modified form of SU tables that allow for 1000 or more sources. The older SU tables are still written if there are fewer than 1000 sources so this change is only significant for CABB data.

As this change entails an extension of the RPFITS format itself, the version number recorded in the RPFITS header has been incremented to 2.12.

Changes in version 2.22

Version 2.22 (2011/03/24): Persuant to the previous change, in RPFITSOUT, increased MAX_HEADER from 650 to 2240 to allow for the larger number of sources (mosaic pointings) and IFs. This change should not affect most users.

Changes in version 2.21

Version 2.21 (2010/12/08): Increased the maximum number of IFs handled, MAX_IF in rpfits.inc and RPFITS.h, from 16 to 48, and the maximum number of sources (mosaic pointings), MAX_SU, from 500 to 2048 for CABB. Also increased the maximum number of antennas, ANT_MAX, from 15 to 16.

Changes in version 2.20

Version 2.20 (2010/06/10): Added a -d option to rpfex to dissect the file - each of the selected scans is written to a separate output file.

The darwin_x86 architecture is now simply darwin (as darwin_ppc is no longer supported).

Changes in version 2.19

Version 2.19 (2008/10/27): Ensure that non-negative source RAs are written by RPFITSOUT and read by RPFITSIN. Such were written for ATCA mosaic data with pointing centres straddling RA = 0h, causing problems for Miriad task GPSCAL.

Changes in version 2.18

Version 2.18 (2008/09/11): Fortran STOP statements were removed from the "table"-reading routines used by RPFITSIN and replaced with an error return mechanism. The STOP statements caused livedata to crash on a corrupted input file.

Error message handling in RPFITSIN was generalized to provide control over what LUN to write to (default 6), or to disable output altogether. In either case the message is passed out via COMMON, refer to the prologue comments in rpferr.f. Application programs should now have much better control over message logging.

darwin_ppc binaries are no longer provided.

Changes in version 2.17

Version 2.17 (2007/07/16): When assigning a Fortran logical unit number, check whether it may already be in use by non-RPFITS code.

Changes in version 2.16

Version 2.16 (2007/01/30): RPFITS.h was modified for better conformance with C and C++ usage. There were no changes to the RPFITS library itself (being written in Fortran it does not use RPFITS.h).

In particular the declaration of subroutine arguments as global variables has been removed to avoid multiple definitions if RPFITS.h is included in two or more library modules. The MaxNChan and MaxNPol enums that were used to dimension the vis[] and weight[] arrays have also been removed - C and C++ code should allocate memory as required based on parameters read from the RPFITS header. These two changes will probably necessitate changes to C or C++ application code that uses RPFITS.h. A function prototype has also been added for RPFITSOUT together with a number of lesser changes.

According to the online manpage for freopen (cf. the COMPATIBILITY section), Darwin supports large files natively; it does not have freopen64 or fseeko64 but freopen and fseeko should suffice to read files >2GiB. rpfhdr and rpfex were modified accordingly and binaries are now supplied.

Changes in version 2.15

Version 2.15 (2006/10/26): replaced usage of the non-standard TIME and GMTIME Fortran intrinsics (which are not supported by gfortran) with a wrapper on the corresponding unix system C-library functions, time(2) and gmtime(3).

The darwin architecture has now been split into darwin_ppc and darwin_x86.

Changes in version 2.14

Version 2.14 (2006/08/01): rpfhdr and rpfex now support large files. Also added comments to the linux GNUmakefile indicating options to use for the gfortran compiler (no changes to the RPFITS library itself).

Changes in version 2.13

Version 2.13 (2006/07/11): Renamed the INDEX COMMON to IOSTAT to avoid a conflict with the intrinsic function of the same name; gfortran objected to this violation of the Fortran 77 standard. The distribution kit now also includes rpfex, a utility for extracting selected scans from an RPFITS file.

Version 2.13.1 (2006/07/17): Added support for building on Mac OS X systems (darwin architecture).

Changes in version 2.12

Version 2.12 (2006/07/07): The distribution kit now includes the rpfhdr utility (no changes to the RPFITS library itself).

Changes in version 2.11

Version 2.11 (2006/07/06): RPFITSIN now extracts the BUNIT and OBSTYPE keyvalues into new CHARACTER*16 variables of the same name in the NAMES COMMON, and RPFITSOUT now sets the BUNIT keyrecord to the value supplied via this COMMON.

Changes in version 2.10

Version 2.10 (2006/07/04): Changed the CARD mechanism in RPFITSIN so that only the first eight characters are tested and all blanks are significant (i.e. the "FITS" keyword). Previously 12 characters were tested with trailing blanks ignored, and the whole header keyrecord then replaced the particular CARD variable. However, since these 12 characters might have included a portion of the keyvalue the test was thereby changed.

Changes in version 2.9

Version 2.9 (2006/06/20): Increased the maximum number of IFs supported from 8 to 16 for the MOPS correlator.

Changes in version 2.8

Version 2.8 (2004/08/25): RPFITSIN checks for corrupted "data format" values stored as the eleventh random parameter.

Changes in version 2.7

Version 2.7 (2004/07/01) accounts for DATE-OBS in the form DD/MM/YYYY. This is only known to have happened once, at the ATCA on 18/11/1998 when the date format was changed from DD/MM/YY to YYYY-MM-DD. Also fixed a bug in decoding datsys from the DATE-OBS header keyrecord.

Changes in version 2.6

Version 2.6 (2004/06/10) increases the input file name length in RPFITSIN from 80 to 256 characters. It also includes RPFITS.h which defines global enums and structs for RPFITS usage in C and C++ code.

Changes in version 2.5

Version 2.5 (2003/11/03) fills SU_PRA(K) and SU_PDEC(K) in the DOUBLES COMMON.

Changes in version 2.4

Version 2.4 (2001/06/04) fixes the floating point conversion problem on linux systems similar to that of version 2.2 but arising in a different context. It sporadically affected the random parameters, in particular the MJD (UTC) was occasionally found to be in error by 0.5 day. The problem affected both RPFITSOUT and RPFITSIN.

Changes in version 2.3

Version 2.3 (2001/05/31) fixes a problem with logical unit number handling that restricted the number of files that could be processed to 100. This affected livedata which runs continuously at Parkes processing hundreds of RPFITS files in succession. However, it is unlikely to be of general concern.

Changes in version 2.2

Version 2.2 (2001/02/09) differs from 2.1 mainly in fixing a problem with RPFITSOUT on linux systems. The conversion from the native IEEE little-endian floating point to output VAX floating was found to introduce errors of order 2-17 in certain circumstances. Specifically, this occurred for values where the VAX floating representation happened to correspond to a "signalling NaN" when interpreted as an IEEE value. The signalling NaN was implicitly converted to a "quiet NaN" through floating point assignment by flipping one bit. The code was rewritten to avoid such assignments.

The problem manifested itself when integration times of 9.5s or 10.5s (instead of 10.0s) were computed as a result of subtracting two moderately large, closely separated UTs.

Version 2.1

Version 2.1 (2000/06/14) is the first versioned release of the RPFITS library.

RPFITS is maintained by Mark Calabretta
Last Modified: 2011/03/29