SourceND.
A multi dimensional source component.
The mixing matrix is (ndet, dim) and auto and cross power spectra
are described by an array of shape (dim, dim, nbin). Only the
lower triangular part of each matrices is considered as free
parameters.
| def smica.component.SourceND.close_form |
( |
|
self, |
|
|
|
stats, |
|
|
|
N |
|
) |
| |
Update local parameters (ie power spectra array) using a close form algorithm.
Parameters
----------
stats : array-like, shape (ndet, ndet, nbin).
Second order statistics ie empirical covariance matrices of
the observations.
N : array-like, shape (ndet, ndet, nbin).
Covariance matrices of the model deprived from the
contribution of the component.
| def smica.component.SourceND.get_theta |
( |
|
self, |
|
|
|
mixmat = None, |
|
|
|
powspec = None |
|
) |
| |
Return component parameters as a vector.
Parameters
----------
mixmat : array-like, shape (ndet, dim).
If None, values are read from inner mixing matrix.
powspec : array-like, shape (dim,dim,nbin).
If None, values are read from inner power spectra.
Returns
----------
array-like, shape (N, 1), where N is the number of free parameters.
| def smica.component.SourceND.get_thetafim |
( |
|
self, |
|
|
|
iRr, |
|
|
|
w |
|
) |
| |
Return Fisher Information Matrix.
Parameters
----------
iRr : array-like, shape (ndet, ndet, nbin).
iRr is the square root of the inverse of the covariance of the
model, which is constant for all components.
w : array-like, shape (1, nbin). w is the number of modes for each bin.
Returns
----------
array-like, shape (N, N), where N is the number of free parameters.
| def smica.component.SourceND.get_thetaroot |
( |
|
self, |
|
|
|
iRr, |
|
|
|
bin = 0 |
|
) |
| |
Return root contribution to the Fisher Information Matrix for a given bin.
Parameters
----------
iRr : array-like, shape (ndet, ndet).
iRr is the square root of the inverse of the covariance of the
model, which is constant for all components.
bin : int, bin number
Returns
----------
array-like, shape (mxm, N), where N is the number of free parameters.
| def smica.component.SourceND.get_thetaroot_local |
( |
|
self, |
|
|
|
iRr, |
|
|
|
Bq, |
|
|
|
bin = 0 |
|
) |
| |
Return root contribution to the Fisher Information Matrix of
local parameters for a given bin.
Parameters
----------
iRr : array-like, shape (ndet, ndet).
iRr is the square root of the inverse of the covariance of
the model, which is constant for all components.
Bq : array-like, shape (ndet, ndet).
Bq is the beam matrix at bin q
q : int
The bin number
Returns
-------
array-like, shape (ndet * ndet, N), where N is the number of
local free parameters and ndet the number of detectors.
| def smica.component.SourceND.get_thetascore |
( |
|
self, |
|
|
|
D |
|
) |
| |
Return likelihood first derivative values wrt component
parameters as a vector.
Parameters
----------
D : array-like, shape (ndet, ndet, nbin).
D is the first derivative of the likelihood wrt the covariance
of the model, which is constant for all components.
Returns
----------
array-like, shape (N, 1), where N is the number of free parameters.
| def smica.component.SourceND.uvech |
( |
|
self, |
|
|
|
V |
|
) |
| |
Return the matrix of auto and cross spectra from stacking vector.
Convention used is : first vector values (dim) are auto
spectra, then cross spectra (1-2, 1-3, ...). This convention
is saved into a global variable named 'Midx' in order to save
computational time.
Parameters
----------
V : array-like, shape (dim*(dim+1)/2, 1).
Vector to be convert into a symmetric matrix
Returns
-------
array-like, shape (dim, dim). A symmetric matrix.
| def smica.component.SourceND.vech |
( |
|
self, |
|
|
|
M |
|
) |
| |
Return the stacking vector of auto and cross spectra from matrix.
Convention used is : first vector values (dim) are auto
spectra, then cross spectra (1-2, 1-3, ...). This convention
is saved into a global variable named 'Vidx' in order to save
computational time.
Parameters
----------
V : array-like, shape (dim, dim).
A symmetric matrix to be convert into a vector.
Returns
-------
array-like, shape (dim*(dim+1)/2, 1).