** Next:** Function: regenerate_cubic
** Up:** GRASP Routines: Template Bank
** Previous:** Structure: struct cubic_grid
** Contents**

##

Function: `generate_cubic`

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:

`grid:`
Input/Output. This structure contains the parameters for the
computation of the cubic fits. All of the fields except for ` grid.dm` and `grid.coef` must be set; those fields are the ones
that are computed.

`detectors_file:`
Input. The name of a data file containing detector site
information, such as detectors.dat. This is used to get a noise
file for computing the match function.

`outfile:`
Input. The name of the output file to which the coefficients and
related information will be written.

`logfile:`
Input. The name of a log file which tracks the progress of this
routine (since it can take several hours to generate a reasonable
grid).

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.

- Author:
Teviet Creighton, teviet@tapir.caltech.edu

** Next:** Function: regenerate_cubic
** Up:** GRASP Routines: Template Bank
** Previous:** Structure: struct cubic_grid
** Contents**
Bruce Allen
2000-11-19