void generate_cubic(struct cubic_grid grid, char *detectors_file, const char *outfile, const char *logfile);This routine computes the coefficients of the cubic fit to the match function on a mesh in parameter space, and writes the results to an ASCII textfile, suitable for reading by the routine read_cubic() (section ).
The arguments are:
The output file is an ASCII textfile containing the fields of the structure grid. Each field except the coef field is printed on a separate line of the output file. The coef data is written as lines of 10 floating point numbers; each line represents the 10 coefficients coef[i][j][0..9] for a given i,j. The lines are ordered by increasing j from 0 to i for each i from 0 to grid.n-1. Integers are printed exactly; floats are printed in 10-digit precision exponential notation.
One should also note that this routine can take quite a long time to run: on a 100 MHz pentium it typically takes 10 to 15 minutes per point in the grid. This is the reason for creating the log file to track the routine's progress.