LIBSCAN(1) IFRSOFT LIBRARY LIBSCAN(1) NAME initScan, getNumScans, getScanOffset, getCurrentPosition, getScanRecords, gotoStart, gotoOffset, gotoScan, gotoScan- Record, skipRecords, getScanRecordOffset, gotoEnd - scan- record related functions for the GMRT LTAfile. SYNOPSIS #include int initScan(fp) FILE *fp; int getNumScans(void); long getScanOffset(scanNum) int *scanNum; long getCurrentPosition(void); int getScanRecords(scanNum) int *scanNum; void gotoStart(void); void gotoOffset(offset) long *offset; void gotoScan(scanNum) int *scanNum; void gotoScanRecord(scanNum, recNum) int *scanNum, *recNum; void skipRecords(recNum) int *recNum; long getScanRecordOffset(scanNum, recNum) int *scanNum, *recNum; void gotoEnd(void); DESCRIPTION These functions operate on the GMRT LTAfile for various operations on scans and records (timestamps). initScan() initializes the scan related information for the following calls. Argument to this call is the file pointer fp. This function returns the number of scans found in an LTAfile. This function is to be called in the program only once after calling the following functions BeginCL(argc, argv); beginheader(); NCRA Release Last change: 31 May 1995 1 LIBSCAN(1) IFRSOFT LIBRARY LIBSCAN(1) where the argument types are int argc; char *argv[]; getNumScans() returns the number of scans in an LTAfile. getScanOffset() returns the offset value of the given scan scanNum from the beginning of an LTAfile. scanNum starts from zero. getCurrentPosition() returns the current position (offset) of the file pointer in an LTAfile from the beginning of the file. getScanRecords() returns the number of records (timestamps) in a given scan scanNum. gotoStart() puts the file pointer at the beginning of the file. This call is equivalent to the call rewind(fp). gotoOffset() puts the file pointer at the offset location from the beginning of the file. gotoScan() puts the file pointer at the start of a given scan scanNum. gotoScanRecord() puts the file pointer at the start of a given record recNum of a given scan scanNum. skipRecords() skips recNum number of records (timestamps) from the current position of the file pointer. getScanRecordOffset() returns the offset value of a given record recNum of a given scan scanNum from the beginning of an LTAfile. scanNum and recNum start from zero. gotoEnd() puts the file pointer at the end of the file. SEE ALSO Note on BeginCL(), beginheader(). NOTES These functions will not work in a program which uses pipe. Any problems regarding this library can be directed to Shyam Khobragade. NCRA Release Last change: 31 May 1995 2