template_bank_generator_HM.TemplateBank.closest_coeff#
Back to Class page
Summary#
Return the values of the coefficients in coeff_grid that most closely match some input coefficients. Similar to rounding to the grid spacing, but accounts for offset and the grid needn’t be uniform or rectangular, e.g. if nonphysical templates have been removed.
Signature#
def closest_coeff(coeffs, coeff_grid)
Name |
Type |
Default |
Description |
|---|---|---|---|
|
n_wfs x n_dims array with the coefficients of a number of waveforms |
||
|
n_templates x n_dims array with the coefficients of the templates in the bank. Doesn’t need to be a regular grid |
Output variables#
Return annotation |
Docstring type |
Description |
|---|---|---|
|
Docstring#
Return the values of the coefficients in coeff_grid that most
closely match some input coefficients. Similar to rounding to the
grid spacing, but accounts for offset and the grid needn't be uniform
or rectangular, e.g. if nonphysical templates have been removed.
:param coeffs:
n_wfs x n_dims array with the coefficients of a number of waveforms
:param coeff_grid:
n_templates x n_dims array with the coefficients of the templates in
the bank. Doesn't need to be a regular grid