Prototypes | |
void | project_onto_basis (gsl_vector *weight, gsl_matrix *RB, gsl_matrix *TS, gsl_matrix *projections, INT4 idx) |
Function to project the training set onto a given basis vector. More... | |
void | complex_project_onto_basis (gsl_vector *weight, gsl_matrix_complex *RB, gsl_matrix_complex *TS, gsl_matrix_complex *projections, INT4 idx) |
Function to project the complex training set onto a given basis vector. More... | |
REAL8 | weighted_dot_product (const gsl_vector *weight, gsl_vector *a, gsl_vector *b) |
The dot product of two real vectors scaled by a given weight factor. More... | |
gsl_complex | complex_weighted_dot_product (const gsl_vector *weight, gsl_vector_complex *a, gsl_vector_complex *b) |
The dot product of two complex vectors scaled by a given weight factor. More... | |
void | normalise (const gsl_vector *weight, gsl_vector *a) |
Normalise a real vector with a given weighting. More... | |
void | complex_normalise (const gsl_vector *weight, gsl_vector_complex *a) |
Normalise a complex vector with a given (real) weighting. More... | |
void | normalise_training_set (gsl_vector *weight, gsl_matrix *TS) |
Normalise the set of training waveforms. More... | |
void | complex_normalise_training_set (gsl_vector *weight, gsl_matrix_complex *TS) |
Normalise the set of complex training waveforms. More... | |
double | normalisation (const gsl_vector *weight, gsl_vector *a) |
Get normalisation constant for a real vector. More... | |
double | complex_normalisation (const gsl_vector *weight, gsl_vector_complex *a) |
Get normalisation constant for a complex vector. More... | |
void | modified_gs_complex (gsl_vector_complex *ru, gsl_vector_complex *ortho_basis, const gsl_matrix_complex *RB_space, const gsl_vector *wQuad, const int dim_RB) |
Modified Gram-Schmidt algorithm for complex data. More... | |
void | iterated_modified_gm_complex (gsl_vector_complex *ru, gsl_vector_complex *ortho_basis, const gsl_matrix_complex *RB_space, const gsl_vector *wQuad, const int dim_RB) |
Iterated modified Gram-Schmidt algorithm for complex data. More... | |
void | modified_gs (gsl_vector *ru, gsl_vector *ortho_basis, const gsl_matrix *RB_space, const gsl_vector *wQuad, const int dim_RB) |
Modified Gram-Schmidt algorithm for real data. More... | |
void | iterated_modified_gm (gsl_vector *ru, gsl_vector *ortho_basis, const gsl_matrix *RB_space, const gsl_vector *wQuad, const int dim_RB) |
Iterated modified Gram-Schmidt algorithm for real data. More... | |
REAL8Array * | B_matrix (gsl_matrix *V, gsl_matrix *RB) |
Get the interpolant of a reduced basis set. More... | |
COMPLEX16Array * | complex_B_matrix (gsl_matrix_complex *V, gsl_matrix_complex *RB) |
Get the interpolant of a complex reduced basis set. More... | |
int | complex_vector_maxabs_index (gsl_vector_complex *c) |
Get the index of the maximum absolute value for a complex vector. More... | |
REAL8 | LALInferenceGenerateREAL8OrthonormalBasis (REAL8Array **RBin, const REAL8Vector *delta, REAL8 tolerance, REAL8Array **TS, UINT4Vector **greedypoints) |
Create a orthonormal basis set from a training set of real waveforms. More... | |
REAL8 | LALInferenceGenerateCOMPLEX16OrthonormalBasis (COMPLEX16Array **RBin, const REAL8Vector *delta, REAL8 tolerance, COMPLEX16Array **TS, UINT4Vector **greedypoints) |
Create a orthonormal basis set from a training set of complex waveforms. More... | |
void | LALInferenceValidateREAL8OrthonormalBasis (REAL8Vector **projerr, const REAL8Vector *delta, const REAL8Array *RB, REAL8Array **testmodels) |
Validate the real reduced basis against another set of waveforms. More... | |
INT4 | LALInferenceTestREAL8OrthonormalBasis (const REAL8Vector *delta, REAL8 tolerance, const REAL8Array *RB, REAL8Array **testmodels) |
Test the reduced basis against another set of waveforms. More... | |
REAL8 | LALInferenceEnrichREAL8Basis (const REAL8Vector *delta, REAL8 tolerance, REAL8Array **RB, UINT4Vector **greedypoints, const REAL8Array *testmodels, REAL8Array **testmodelsnew) |
Expand the real training waveforms with ones from a set of new training waveforms. More... | |
void | LALInferenceValidateCOMPLEX16OrthonormalBasis (REAL8Vector **projerr, const REAL8Vector *delta, const COMPLEX16Array *RB, COMPLEX16Array **testmodels) |
Validate the complex reduced basis against another set of waveforms. More... | |
INT4 | LALInferenceTestCOMPLEX16OrthonormalBasis (const REAL8Vector *delta, REAL8 tolerance, const COMPLEX16Array *RB, COMPLEX16Array **testmodels) |
Test the reduced basis against another set of waveforms. More... | |
REAL8 | LALInferenceEnrichCOMPLEX16Basis (const REAL8Vector *delta, REAL8 tolerance, COMPLEX16Array **RB, UINT4Vector **greedypoints, const COMPLEX16Array *testmodels, COMPLEX16Array **testmodelsnew) |
Expand the complex training waveforms with ones from a set of new training waveforms. More... | |
LALInferenceREALROQInterpolant * | LALInferenceGenerateREALROQInterpolant (REAL8Array *RB) |
Create a real empirical interpolant from a set of orthonormal basis functions. More... | |
LALInferenceCOMPLEXROQInterpolant * | LALInferenceGenerateCOMPLEXROQInterpolant (COMPLEX16Array *RB) |
Create a complex empirical interpolant from a set of orthonormal basis functions. More... | |
REAL8Vector * | LALInferenceGenerateREAL8LinearWeights (REAL8Array *B, REAL8Vector *data, REAL8Vector *vars) |
Create the weights for the ROQ interpolant for the linear data and model dot product <d|h> More... | |
REAL8Vector * | LALInferenceGenerateQuadraticWeights (REAL8Array *B, REAL8Vector *vars) |
Create the weights for the ROQ interpolant for the model quadratic model term real(<h|h>). More... | |
COMPLEX16Vector * | LALInferenceGenerateCOMPLEX16LinearWeights (COMPLEX16Array *B, COMPLEX16Vector *data, REAL8Vector *vars) |
Create the weights for the ROQ interpolant for the complex data and model dot product <d|h> More... | |
REAL8 | LALInferenceROQREAL8DotProduct (REAL8Vector *weights, REAL8Vector *model) |
Calculate the dot product of two vectors using the ROQ iterpolant. More... | |
COMPLEX16 | LALInferenceROQCOMPLEX16DotProduct (COMPLEX16Vector *weights, COMPLEX16Vector *model) |
Calculate the dot product of two complex vectors using the ROQ iterpolant. More... | |
void | LALInferenceRemoveREALROQInterpolant (LALInferenceREALROQInterpolant *a) |
Free memory for a LALInferenceREALROQInterpolant . More... | |
void | LALInferenceRemoveCOMPLEXROQInterpolant (LALInferenceCOMPLEXROQInterpolant *a) |
Free memory for a LALInferenceCOMPLEXROQInterpolant . More... | |
Go to the source code of this file.
Macros | |
#define | omp ignore |
#define omp ignore |
Definition at line 26 of file LALInferenceGenerateROQ.c.
void project_onto_basis | ( | gsl_vector * | weight, |
gsl_matrix * | RB, | ||
gsl_matrix * | TS, | ||
gsl_matrix * | projections, | ||
INT4 | idx | ||
) |
Function to project the training set onto a given basis vector.
This is an internal function to be used by LALInferenceCreateREAL8OrthonormalBasis
[in] | weight | The normalisation weight(s) for the training set waveforms (e.g. time or frequency step(s) size) |
[in] | RB | The reduced basis set |
[in] | TS | The training set of waveforms |
[in] | projections | The set of projections (this is updated in this function) |
[in] | idx | The index of the reduced basis vector that the training set will project onto |
Definition at line 102 of file LALInferenceGenerateROQ.c.
void complex_project_onto_basis | ( | gsl_vector * | weight, |
gsl_matrix_complex * | RB, | ||
gsl_matrix_complex * | TS, | ||
gsl_matrix_complex * | projections, | ||
INT4 | idx | ||
) |
Function to project the complex training set onto a given basis vector.
This is an internal function to be used by LALInferenceCreateCOMPLEX16OrthonormalBasis
[in] | weight | The normalisation weight(s) for the training set waveforms (e.g. time or frequency step(s) size) |
[in] | RB | The reduced basis set |
[in] | TS | The training set of waveforms |
[in] | projections | The set of projections (this is updated in this function) |
[in] | idx | The index of the reduced basis vector that the training set will project onto |
Definition at line 142 of file LALInferenceGenerateROQ.c.
REAL8 weighted_dot_product | ( | const gsl_vector * | weight, |
gsl_vector * | a, | ||
gsl_vector * | b | ||
) |
The dot product of two real vectors scaled by a given weight factor.
[in] | weight | A (set of) scaling factor(s) for the dot product |
[in] | a | The first vector |
[in] | b | The second vector |
Definition at line 180 of file LALInferenceGenerateROQ.c.
gsl_complex complex_weighted_dot_product | ( | const gsl_vector * | weight, |
gsl_vector_complex * | a, | ||
gsl_vector_complex * | b | ||
) |
The dot product of two complex vectors scaled by a given weight factor.
The dot product is produced using the complex conjugate of the first vector.
[in] | weight | A real scaling factor for the dot product |
[in] | a | The first complex vector |
[in] | b | The second complex vector |
Definition at line 219 of file LALInferenceGenerateROQ.c.
void normalise | ( | const gsl_vector * | weight, |
gsl_vector * | a | ||
) |
Normalise a real vector with a given weighting.
[in] | weight | The weighting(s) in the normalisation (e.g. time of frequency step(s) between points) |
[in] | a | The vector to be normalise (this will be change by the function to return the normalised vector. |
Definition at line 259 of file LALInferenceGenerateROQ.c.
void complex_normalise | ( | const gsl_vector * | weight, |
gsl_vector_complex * | a | ||
) |
Normalise a complex vector with a given (real) weighting.
[in] | weight | The weighting(s) in the normalisation (e.g. time of frequency step(s) between points) |
[in] | a | The vector to be normalised (this will be change by the function to return the normalised vector). |
Definition at line 282 of file LALInferenceGenerateROQ.c.
void normalise_training_set | ( | gsl_vector * | weight, |
gsl_matrix * | TS | ||
) |
Normalise the set of training waveforms.
This function will normalise a set of training waveforms. This will be used within the LALInferenceCreateREAL8OrthonormalBasis
function.
[in] | weight | The e.g. time/frequency step in the waveforms used to normalise the waveforms |
[in] | TS | The training set to be normalised. |
Definition at line 357 of file LALInferenceGenerateROQ.c.
void complex_normalise_training_set | ( | gsl_vector * | weight, |
gsl_matrix_complex * | TS | ||
) |
Normalise the set of complex training waveforms.
This function will normalise a set of complex training waveforms. This will be used within the LALInferenceCreateCOMPLEX16OrthonormalBasis
function.
[in] | weight | The e.g. time/frequency step in the waveforms used to normalise the waveforms |
[in] | TS | The training set to be normalised. |
Definition at line 375 of file LALInferenceGenerateROQ.c.
double normalisation | ( | const gsl_vector * | weight, |
gsl_vector * | a | ||
) |
Get normalisation constant for a real vector.
[in] | weight | The weighting(s) in the normalisation (e.g. time of frequency step(s) between points) |
[in] | a | The vector to calculate the normalisation constant for |
Definition at line 306 of file LALInferenceGenerateROQ.c.
double complex_normalisation | ( | const gsl_vector * | weight, |
gsl_vector_complex * | a | ||
) |
Get normalisation constant for a complex vector.
[in] | weight | The weighting(s) in the normalisation (e.g. time of frequency step(s) between points) |
[in] | a | The vector to calculate the normalisation constant for |
Definition at line 331 of file LALInferenceGenerateROQ.c.
void modified_gs_complex | ( | gsl_vector_complex * | ru, |
gsl_vector_complex * | ortho_basis, | ||
const gsl_matrix_complex * | RB_space, | ||
const gsl_vector * | wQuad, | ||
const int | dim_RB | ||
) |
Modified Gram-Schmidt algorithm for complex data.
A modified Gram-Schmidt algorithm taken from the greedycpp code.
[out] | ru | A 1-by-(dim_RB + 1) complex vector returning a slice of the R matrix |
[out] | ortho_basis | A complex vector returning the orthogonal basis vector |
[in] | RB_space | A complex matrix containing the existing set of orthonormal basis vectors |
[in] | wQuad | A vector of weights for the inner products |
[in] | dim_RB | The number of elements in the current RB_space |
Definition at line 518 of file LALInferenceGenerateROQ.c.
void iterated_modified_gm_complex | ( | gsl_vector_complex * | ru, |
gsl_vector_complex * | ortho_basis, | ||
const gsl_matrix_complex * | RB_space, | ||
const gsl_vector * | wQuad, | ||
const int | dim_RB | ||
) |
Iterated modified Gram-Schmidt algorithm for complex data.
An iterated modified Gram-Schmidt algorithm taken from the greedycpp code. This uses the method given in [2]
[out] | ru | A complex 1-by-(dim_RB + 1) vector returning a slice of the R matrix |
[out] | ortho_basis | A complex vector returning the orthogonal basis vector |
[in] | RB_space | A complex matrix containing the existing set of orthonormal basis vectors |
[in] | wQuad | A vector of weights for the inner products |
[in] | dim_RB | The number of elements in the current RB_space |
Definition at line 609 of file LALInferenceGenerateROQ.c.
void modified_gs | ( | gsl_vector * | ru, |
gsl_vector * | ortho_basis, | ||
const gsl_matrix * | RB_space, | ||
const gsl_vector * | wQuad, | ||
const int | dim_RB | ||
) |
Modified Gram-Schmidt algorithm for real data.
A modified Gram-Schmidt algorithm taken from the greedycpp code.
[out] | ru | A 1-by-(dim_RB + 1) vector returning a slice of the R matrix |
[out] | ortho_basis | A vector returning the orthogonal basis vector |
[in] | RB_space | A matrix containing the existing set of orthonormal basis vectors |
[in] | wQuad | A vector of weights for the inner products |
[in] | dim_RB | The number of elements in the current RB_space |
Definition at line 564 of file LALInferenceGenerateROQ.c.
void iterated_modified_gm | ( | gsl_vector * | ru, |
gsl_vector * | ortho_basis, | ||
const gsl_matrix * | RB_space, | ||
const gsl_vector * | wQuad, | ||
const int | dim_RB | ||
) |
Iterated modified Gram-Schmidt algorithm for real data.
An iterated modified Gram-Schmidt algorithm taken from the greedycpp code. This uses the method given in [2]
[out] | ru | A 1-by-(dim_RB + 1) vector returning a slice of the R matrix |
[out] | ortho_basis | A vector returning the orthogonal basis vector |
[in] | RB_space | A matrix containing the existing set of orthonormal basis vectors |
[in] | wQuad | A vector of weights for the inner products |
[in] | dim_RB | The number of elements in the current RB_space |
Definition at line 677 of file LALInferenceGenerateROQ.c.
REAL8Array * B_matrix | ( | gsl_matrix * | V, |
gsl_matrix * | RB | ||
) |
Get the interpolant of a reduced basis set.
This is used internally by LALInferenceCreateREALROQInterpolant
when iteratively calculating the interpolation matrix.
[in] | V | The matrix containing the basis vector points at the current interpolation nodes |
[in] | RB | The set of basis vectors |
Definition at line 396 of file LALInferenceGenerateROQ.c.
COMPLEX16Array * complex_B_matrix | ( | gsl_matrix_complex * | V, |
gsl_matrix_complex * | RB | ||
) |
Get the interpolant of a complex reduced basis set.
This is used internally by LALInferenceCreateCOMPLEXROQInterpolant
when iteratively calculating the interpolation matrix.
[in] | V | The matrix containing the basis vector points at the current interpolation nodes |
[in] | RB | The set of basis vectors |
Definition at line 445 of file LALInferenceGenerateROQ.c.
int complex_vector_maxabs_index | ( | gsl_vector_complex * | c | ) |
Get the index of the maximum absolute value for a complex vector.
[in] | c | A complex vector |
Definition at line 489 of file LALInferenceGenerateROQ.c.
REAL8 LALInferenceGenerateREAL8OrthonormalBasis | ( | REAL8Array ** | RBin, |
const REAL8Vector * | delta, | ||
REAL8 | tolerance, | ||
REAL8Array ** | TS, | ||
UINT4Vector ** | greedypoints | ||
) |
Create a orthonormal basis set from a training set of real waveforms.
Given a gsl_matrix
containing a training set of real waveforms (where the waveforms are created at time or frequency steps seperated by delta
) an orthonormal basis will be generated using the greedy binning Algorithm 1 of [1] . The stopping criteria for the algorithm is controlled by the tolerance
value, which defined the maximum residual between the current basis set (at a given iteration) and the training set (and example tolerance is \(10^{-12}\)). In this function the training set will be normalised, so the input TS
will be modified.
If the RBin
value is NULL
then a new reduced basis will be formed from the given training set. However, if RBin
already contains a previously produced basis, then this basis will be enriched with bases if possible using the new training set. NOTE: when using small tolerances enriching the basis in this way can lead to numerical precision issues, so in general you should use LALInferenceEnrichREAL8Basis
for enrichment.
[out] | RBin | A REAL8Array to return the reduced basis. |
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | tolerance | The tolerance used as a stopping criteria for the basis generation. |
[in] | TS | A REAL8Array matrix containing the complex training set, where the number of waveforms in the training set is given by the rows and the waveform points by the columns. This will be modified by this function, as the training set will be normalised. |
[out] | greedypoints | A UINT4Vector to return the indices of the training set rows that have been used to form the reduced basis. |
REAL8
with the maximum projection error for the final reduced basis.Definition at line 762 of file LALInferenceGenerateROQ.c.
REAL8 LALInferenceGenerateCOMPLEX16OrthonormalBasis | ( | COMPLEX16Array ** | RBin, |
const REAL8Vector * | delta, | ||
REAL8 | tolerance, | ||
COMPLEX16Array ** | TS, | ||
UINT4Vector ** | greedypoints | ||
) |
Create a orthonormal basis set from a training set of complex waveforms.
Given a gsl_matrix
containing a training set TS
of complex waveforms (where the waveforms are created at time or frequency steps seperated by delta
) an orthonormal basis will be generated using the greedy binning Algorithm 1 of [1] . The stopping criteria for the algorithm is controlled by the tolerance
value, which is defined the maximum residual between the current basis set (at a given iteration) and the training set (and example tolerance is \(10^{-12}\)). In this function the training set will be normalised, so the input TS
will be modified.
If the RBin
value is NULL
then a new reduced basis will be formed from the given training set. However, if RBin
already contains a previously produced basis, then this basis will be enriched with bases if possible using the new training set. NOTE: when using small tolerances enriching the basis in this way can lead to numerical precision issues, so in general you should use LALInferenceEnrichCOMPLEX16Basis
for enrichment.
Note that in this function we have to cast the COMPLEX16
array as a double to use gsl_matrix_view_array
, which assume that the data is passed as a double array with memory laid out so that adjacent double memory blocks hold the corresponding real and imaginary parts.
[out] | RBin | A COMPLEX16Array to return the reduced basis. |
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | tolerance | The tolerance used as a stopping criteria for the basis generation. |
[in] | TS | A COMPLEX16Array matrix containing the complex training set, where the number of waveforms in the training set is given by the rows and the waveform points by the columns. This will be modified by this function, as the training set will be normalised. |
[out] | greedypoints | A UINT4Vector to return the indices of the training set rows that have been used to form the reduced basis. |
REAL8
with the maximum projection error for the final reduced basis.Definition at line 968 of file LALInferenceGenerateROQ.c.
void LALInferenceValidateREAL8OrthonormalBasis | ( | REAL8Vector ** | projerr, |
const REAL8Vector * | delta, | ||
const REAL8Array * | RB, | ||
REAL8Array ** | testmodels | ||
) |
Validate the real reduced basis against another set of waveforms.
This function projects a set of waveforms onto the reduced basis and checks that the residuals are within a given tolerance. It returns the projection errors.
Note that the projection error returned are the square of the residual errors, as is used as the criterion for adding new bases in the reduced basis generation function LALInferenceGenerateREAL8OrthonormalBasis
. This is different to the validation.cpp
code in greedycpp, which returns the square root of the value we return.
[out] | projerr | The projection errors for each test waveform. |
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | RB | The reduced basis set |
[in] | testmodels | The set of waveform models to project onto the basis (these will be changed by this function, as the waveforms will get normalised). |
Definition at line 1159 of file LALInferenceGenerateROQ.c.
INT4 LALInferenceTestREAL8OrthonormalBasis | ( | const REAL8Vector * | delta, |
REAL8 | tolerance, | ||
const REAL8Array * | RB, | ||
REAL8Array ** | testmodels | ||
) |
Test the reduced basis against another set of waveforms.
This function projects a set of waveforms onto the reduced basis and checks that the residuals are within a given tolerance
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | tolerance | The allowed (squared) residual tolerence for the test waveforms |
[in] | RB | The reduced basis set |
[in] | testmodels | The set of waveform models to project onto the basis |
XLAL_SUCCESS
if all test waveforms meet the toleranceDefinition at line 1240 of file LALInferenceGenerateROQ.c.
REAL8 LALInferenceEnrichREAL8Basis | ( | const REAL8Vector * | delta, |
REAL8 | tolerance, | ||
REAL8Array ** | RB, | ||
UINT4Vector ** | greedypoints, | ||
const REAL8Array * | testmodels, | ||
REAL8Array ** | testmodelsnew | ||
) |
Expand the real training waveforms with ones from a set of new training waveforms.
Expands an original set of training waveforms with waveforms from a new set a training waveforms if, when projected onto the reduced basis, those new waveforms are greater than the given tolerance. The reduced basis will then be recomputed using the expanded training set.
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | tolerance | The allowed residual tolerence for the test waveforms |
[in] | RB | The reduced basis set |
[in] | greedypoints | The rows in testmodels that formed the reduced basis |
[in] | testmodels | The set of waveform models used to produce the reduced basis (already normalised) |
[in] | testmodelsnew | A new set of waveforms to project onto the current reduced basis (these will be changed by this function, as the waveforms will get normalised when pass to LALInferenceValidateREAL8OrthonormalBasis , and editted to contain the new set of training waveforms from which the enriched basis was formed). |
Definition at line 1291 of file LALInferenceGenerateROQ.c.
void LALInferenceValidateCOMPLEX16OrthonormalBasis | ( | REAL8Vector ** | projerr, |
const REAL8Vector * | delta, | ||
const COMPLEX16Array * | RB, | ||
COMPLEX16Array ** | testmodels | ||
) |
Validate the complex reduced basis against another set of waveforms.
This function projects a set of waveforms onto the reduced basis and checks that the residuals are within a given tolerance. It returns the projection errors.
Note that the projection error returned are the square of the residual errors, as is used as the criterion for adding new bases in the reduced basis generation function LALInferenceGenerateCOMPLEX16OrthonormalBasis
. This is different to the validation.cpp
code in greedycpp, which returns the square root of the value we return.
[out] | projerr | The projection errors (square of the residual) for each test waveform. |
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | RB | The reduced basis set |
[in] | testmodels | The set of waveform models to project onto the basis (these will be changed by this function, as the waveforms will get normalised). |
Definition at line 1416 of file LALInferenceGenerateROQ.c.
INT4 LALInferenceTestCOMPLEX16OrthonormalBasis | ( | const REAL8Vector * | delta, |
REAL8 | tolerance, | ||
const COMPLEX16Array * | RB, | ||
COMPLEX16Array ** | testmodels | ||
) |
Test the reduced basis against another set of waveforms.
This function projects a set of waveforms onto the reduced basis and checks that the residuals are within a given tolerance
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | tolerance | The allowed residual (squared) tolerence for the test waveforms |
[in] | RB | The reduced basis set |
[in] | testmodels | The set of waveform models to project onto the basis |
XLAL_SUCCESS
if all test waveforms meet the toleranceDefinition at line 1508 of file LALInferenceGenerateROQ.c.
REAL8 LALInferenceEnrichCOMPLEX16Basis | ( | const REAL8Vector * | delta, |
REAL8 | tolerance, | ||
COMPLEX16Array ** | RB, | ||
UINT4Vector ** | greedypoints, | ||
const COMPLEX16Array * | testmodels, | ||
COMPLEX16Array ** | testmodelsnew | ||
) |
Expand the complex training waveforms with ones from a set of new training waveforms.
Expands an original set of training waveforms with waveforms from a new set a training waveforms if, when projected onto the reduced basis, those new waveforms are greater than the given tolerance. The reduced basis will then be recomputed using the expanded training set.
[in] | delta | The time/frequency step(s) in the training set used to normalise the models. This can be a vector containing just one value. |
[in] | tolerance | The allowed residual tolerence for the test waveforms |
[in] | RB | The reduced basis set |
[in] | greedypoints | The rows in testmodels that formed the reduced basis |
[in] | testmodels | The set of waveform models used to produce the reduced basis |
[in] | testmodelsnew | A new set of waveforms to project onto the current reduced basis (these will be changed by this function, as the waveforms will get normalised when pass to LALInferenceValidateCOMPLEX16OrthonormalBasis , and editted to contain the new set of training waveforms from which the enriched basis was formed) |
Definition at line 1560 of file LALInferenceGenerateROQ.c.
LALInferenceREALROQInterpolant * LALInferenceGenerateREALROQInterpolant | ( | REAL8Array * | RB | ) |
Create a real empirical interpolant from a set of orthonormal basis functions.
Given a real REAL8Array
containing a set of orthonormal basis functions generate an empirical intopolant, and set of interpolation points, using Algorithm 2 of [1] .
[in] | RB | The set of basis functions |
LALInferenceREALROQInterpolant
structure containing the interpolant and its nodes Definition at line 1679 of file LALInferenceGenerateROQ.c.
LALInferenceCOMPLEXROQInterpolant * LALInferenceGenerateCOMPLEXROQInterpolant | ( | COMPLEX16Array * | RB | ) |
Create a complex empirical interpolant from a set of orthonormal basis functions.
Given a complex gsl_matrix_complex
containing a set of orthonormal basis functions generate an empirical intopolant, and set of interpolation points, using Algorithm 2 of [1] .
[in] | RB | The set of basis functions |
LALInferenceCOMPLEXROQInterpolant
structure containing the interpolant and its nodes Definition at line 1771 of file LALInferenceGenerateROQ.c.
REAL8Vector * LALInferenceGenerateREAL8LinearWeights | ( | REAL8Array * | B, |
REAL8Vector * | data, | ||
REAL8Vector * | vars | ||
) |
Create the weights for the ROQ interpolant for the linear data and model dot product <d|h>
[in] | B | The interpolant matrix |
[in] | data | The real data vector |
[in] | vars | A vector of data noise variance values (or a single value) to weight the "weights" |
Definition at line 1860 of file LALInferenceGenerateROQ.c.
REAL8Vector * LALInferenceGenerateQuadraticWeights | ( | REAL8Array * | B, |
REAL8Vector * | vars | ||
) |
Create the weights for the ROQ interpolant for the model quadratic model term real(<h|h>).
[in] | B | The interpolant matrix |
[in] | vars | A vector of data noise variance values (or a single value) to weight the "weights" |
Definition at line 1899 of file LALInferenceGenerateROQ.c.
COMPLEX16Vector * LALInferenceGenerateCOMPLEX16LinearWeights | ( | COMPLEX16Array * | B, |
COMPLEX16Vector * | data, | ||
REAL8Vector * | vars | ||
) |
Create the weights for the ROQ interpolant for the complex data and model dot product <d|h>
[in] | B | The interpolant matrix |
[in] | data | The complex data vector |
[in] | vars | A vector of data noise variance values (or a single value) to weight the "weights" |
Definition at line 1936 of file LALInferenceGenerateROQ.c.
REAL8 LALInferenceROQREAL8DotProduct | ( | REAL8Vector * | weights, |
REAL8Vector * | model | ||
) |
Calculate the dot product of two vectors using the ROQ iterpolant.
This function calculates the dot product of two real vectors using the ROQ interpolant. This required the interpolant weights computed with LALInferenceCreateREAL8DataModelWeights
and the waveform model defined at the interpolation node.
[in] | weights | The ROQ interpolation weights |
[in] | model | The waveform model (or quadratic model) defined at the interpolation points |
weights
and model
Definition at line 1982 of file LALInferenceGenerateROQ.c.
COMPLEX16 LALInferenceROQCOMPLEX16DotProduct | ( | COMPLEX16Vector * | weights, |
COMPLEX16Vector * | model | ||
) |
Calculate the dot product of two complex vectors using the ROQ iterpolant.
This function calculates the dot product of two complex vectors using the ROQ interpolant. This required the interpolant weights computed with LALInferenceCreateCOMPLEX16DataModelWeights
and the waveform model defined at the interolation node.
[in] | weights | The ROQ interpolation weights |
[in] | model | The waveform model defined at the interpolation points |
Definition at line 2005 of file LALInferenceGenerateROQ.c.
void LALInferenceRemoveREALROQInterpolant | ( | LALInferenceREALROQInterpolant * | a | ) |
Free memory for a LALInferenceREALROQInterpolant
.
[in] | a | A pointer to a LALInferenceREALROQInterpolant |
Definition at line 2022 of file LALInferenceGenerateROQ.c.
void LALInferenceRemoveCOMPLEXROQInterpolant | ( | LALInferenceCOMPLEXROQInterpolant * | a | ) |
Free memory for a LALInferenceCOMPLEXROQInterpolant
.
[in] | a | A pointer to a LALInferenceCOMPLEXROQInterpolant |
Definition at line 2036 of file LALInferenceGenerateROQ.c.