next up previous contents
Next: Function: Clean_Up_Memory() Up: GRASP Routines: Waveforms from Previous: Function: Get_Fmax()   Contents

Function: ReadData()

0 int ReadData(char *filenameP, char *filenameAlm, float **v, int *number_of_points)
This function reads in all the required data and calculates $v(t)$. Using this function is probably the easiest method to ensure that the data is read into memory correctly. This routine can allocate all the necessary memory automatically.
filenameP: Input. The filename of the data file for the function $P(v)$. You must set the environment variable GRASP_PARAMETERS to the directory where the data files are stored (normally the parameter directory of your GRASP installation, for example /usr/local/GRASP/parameters). If filename == NULL the default file will be read.
filenameAlm: Input. The filename of the data file for the function $A_{lm}(v)$. See comments for filenameP.
v: Input. The array v[0..number_of_points-1] will contain all the read in values of v. If v==NULL memory is allocated.
number_of_points: Input/Output. If not set to zero, at most *number_of_points data points will be read. If you allocate memory yourself this variable must contain the maximal number of points that can be saved. On exit this variable will contain the actual number of points read into memory.

Return value: Output. Returns $0$ if there was no error, and an error code otherwise. These codes are described in Section [*].

Author: Serge Droz, droz@physics.uoguelph.ca
Comments: None.


next up previous contents
Next: Function: Clean_Up_Memory() Up: GRASP Routines: Waveforms from Previous: Function: Get_Fmax()   Contents
Bruce Allen 2000-11-19