template_bank_generator_HM.remove_linear_component#
Back to Module page
Summary#
Fits out a linear dependence of phase w.r.t frequency
Signature#
def remove_linear_component(phases, fs, wts, return_coeffs = False)
Name |
Type |
Default |
Description |
|---|---|---|---|
|
n_wf x len(fs) array with angles (Note that it needs to be a 2d array) |
||
|
Array with frequencies |
||
|
Weights for linear fit, note that for Gaussian w/ variance sigma^2, weights are 1/sigma |
||
|
False |
Flag to return coefficients of the linear terms |
Output variables#
Return annotation |
Docstring type |
Description |
|---|---|---|
|
|
Docstring#
Fits out a linear dependence of phase w.r.t frequency
:param phases:
n_wf x len(fs) array with angles (Note that it needs to be a 2d array)
:param fs: Array with frequencies
:param wts:
Weights for linear fit, note that for Gaussian w/ variance sigma^2,
weights are 1/sigma
:param return_coeffs: Flag to return coefficients of the linear terms
:return: 1. n_wf x len(fs) array with unweighted residuals of linear fit
2. If return_coeffs, n_wf x 2 array with coefficients of linear
and constant terms (in that order)