$Id: ifr_doc,v 1.3 1995/07/18 10:44:49 sanjay Exp $ ********************************************************************** LIST OF FUNCTIONS AVAILABLE UNDER "glib.c" ( General Library ) -------------------------------------------------------------- void *getmem(int n, char *name) : Does an malloc(n) and checks for errors. If an error occurs it gives message qualified by the char string "name". void getist_(char date[], int ist[]) : Read IST from the "date" string. void gethms_(int *tstart, float hms[]) : Convert the time "tstart" to Hour, monutes and seconds void fLoadAntTab(char *FileName, struct AntCoord *Tab, int n) : Load the Antenna Table from the File "Filaneme" into Tab. n is the number of antennae to be loaded. void LoadAntTab(struct AntCoord *Tab, int n) : Load the Antenna Table from the GLOBAL Header into Tab n is the number of antennae to be loaded. void CopyAntTab(struct AntCoord *OldTab, struct AntCoord *NewTab, int n) : Copy Table from one into another structure "OldTab" to "NewTab" void ReplaceAntTab(struct AntCoord *Tab, int n) : Replace the Antenna Table in the header by the new table "Tab" void UpdateAntTab(char *FName, struct AntCoord *Tab, char *Tflag, int n) : Reads a new antenna table from a file (FName) and modifies the antenna table in the header according to the flag Tflag Tflag="New" ==> Replace the old table by the new one in the header. On exit, Tab has the new table Tflag="Add" ==> Add the new table to the old table in the header. On exit, Tab=NewTab Tflag="Delta"==> Replace the old table by the new table in the header. On exit, Tab=NewTab - OldTab On exit, the caller can directly use the Tab to apply to the and the data will then reflect the operation defined by Tflag IMPORTANT: For Tflag="New", to truely reflect the action, the OldTab has to be "unapplied" before NewTab can be applied void GetUVWa(const struct AntCoord *xyz, struct Coord3D *uvw, const float HA, const float Dec) : Gets the UVW from the given antenna based XYZ. void warning(char *progname, char *msg) : Flash a warning message for the programme. void linreg(float *x, float *y, int n, float *slope, float *intercept) : Linear regression for the least square fit for {x,y}. void getnorm1(float *x, float *y, int n, float slope, float intercept,...) : Get the first norm. void mklist(char *key, IListType **First, int *n) : Makes a singly linked list from a list of values associated with key "key". void ngetdelay(struct fftmac *corr) : Gets the fixed delay from the struct corr. void averageupdate_(int *c1, int *c2, int *navg) : Updates the header for intented averaging later. Only channel averaging is handled. void average(char *data,int *c1, int *c2, int *navg) : Actually does the channel averaging (from C1 to C2 with an increnet of navg). void rangecheck(int r1, int r2, int n, int *n1,int *n2, int *n3) : Checks ranges for.... int month(char *m) : Returns an integer between 1-12 for the month no. int getnchan_() : Get the number of channels available, reading from the GLOBAL Header. int getnbase_() : Get the number of baselines available, reading from the GLOBAL Header. int getchanlist_(int *c) : Get the list of available Channels into the array "c". int getbaselist_(int *c) : Get the list of available baselines into the array "c". int gettimestamp_(char *data) : Read the timestamp from the data record "data". int getnfft_() : Get the no. of fft channels. int getfftmac(struct AntCoord *Tab, struct fftmac *corr) : Loads the mapping between FFT and MAC. It also loads the table of fixed delay, RF freq., side band, and polarization of the FFT pipe lines. int getdelay(float *delayset) : An obsolate version of ngetdelay. int mkrecl_(int *nb, int *nc) : Returns the records the lenght given the no. of baselines and channels. int lparse(char *input,char *identifier,int *iarr) : Parse a line stored into the string "input". float MicroSec(int *Delay, float *Clock) : Convert the hex delays "Delay" into microseconds. ********************************************************************** LIST OF FUNCTIONS AVAILABLE UNDER "hlib.c" : (LTA Handling Library) ------------------------------------------------------------------- void beginheader_(char *, char *) : Begin reading GLOBAL Header to initialize all Kewords and their corresponding values. The first argument is the name of the input file and the second argument is the name of the output file. void fbeginheader_() : A function callable from FORTRAN. This does the job of beginheader_() above. THIS MUST BE CALLED AFTER A CALL TO BeginCL() (or fBeginCL() for FORTRAN). int skipscans_(int *n) : Skip "n" scans in a LTA file. int ggetival_(char *Key, int *i) : Get an integer value associated with the keyword "Key" from the GLOBAL Header into the variable "i". int ggetfval_(char *Key, float *i) : Get a floating point value associated with the keyword "Key" from the GLOBAL Header into the variable "i". int ggetdval_(char *Key, double *i) : Get a double precession value associated with the keyword "Key" from the GLOBAL Header into the variable "i". int ggetsval_(char *Key, char *i) : Get a character value associated with the keyword "Key" from the GLOBAL Header into the variable "i". int gputival_(char *Key, int *i) : Assign an integer value "i" for the keyword "Key" in the GLOBAL Header. int gputfval_(char *Key, float *i) : Assign a float value "i" for the keyword "Key" in the GLOBAL Header. int gputdval_(char *Key, double *i) : Assign a double-precission value "i" for the keyword "Key" in the GLOBAL Header. int gputsval_(char *Key, char *i) : Assign a string value "i" for the keyword "Key" in the GLOBAL Header. int gputhistory_(char *str) : Write the history into the memory, not into the file. int sgetival_(char *Key, int *i) : Get an integer value associated with the keyword "Key" from the SCAN Header into the variable "i". int sgetfval_(char *Key, float *i) : Get an float value associated with the keyword "Key" from the SCAN Header into the variable "i". int sgetdval_(char *Key, double *i) : Get a double-precision value associated with the keyword "Key" from the SCAN Header into the variable "i". int sgetsval_(char *Key, char *i) : Get a string value associated with the keyword "Key" from the SCAN Header into the variable "i". int sputival_(char *Key, int *i) : Assign an integer value "i" for the keyword "Key" in the SCAN Header. int sputfval_(char *Key, float *i) : Assign a float value "i" for the keyword "Key" in the SCAN Header. int sputdval_(char *Key, double *i) : Assign a double-precision value "i" for the keyword "Key" in the SCAN Header. int sputsval_(char *Key, char *i) : Assign a string value "i" for the keyword "Key" in the SCAN Header. int sputhistory_(char *str) : Append the history of modifications to the SCAN Header. int wt_data_(char *data) : Write a data record of length equal to the recordlength as given in the GLOBAL Header. int rd_data_(char *data) : Read a data record of length equal to the recordlength as given in the GLOBAL Header. void gprintheader_(void) : Pring the GLOBAL Header "ASCII Text". void gdelheadrec_(int *n) : Delete the nth. entry in the global header. void gwriteheader_() : Write the global header on to the output stream. void sprintheader_(void) : Write the SCAN header on the stdout. void swriteheader_() : Write the SCAN header on to the output stream. void sdelheadrec_(int *n) : Delete the nth. entry in the current SCAN header. void ieee_compress_(void *cmplx, void *comp, int *ncmplx) : Compression algo. void ieee_uncompress_(void *comp, void *cmplx, int *ncmplx) : De-compression algo. ---------------------------------------------------------------------- sanjay/upreti 22:04:1995 PM. SanjayB July 18 1995 ----------------------------------------------------------------------