A one dimensional source component of fixed shape.
The mixing matrix is a column vector (ndet, 1) and power spectrum
is described by a vector (1, nbin) multiply by a constant factor.
This factor is considered as the only free parameter for power
spectrum.
| def smica.component.SourceAmpl.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.SourceAmpl.get_theta |
( |
|
self, |
|
|
|
mixmat = None, |
|
|
|
ampl = None |
|
) |
| |
Return component parameters as a vector.
Parameters
----------
mixmat : array-like, shape (ndet, 1).
If None, values are read from inner mixing matrix.
ampl : array-like, shape (1,1).
If None, values are read from inner amplitude scalar value.
Returns
----------
array-like, shape (N, 1), where N is the number of free parameters.
| def smica.component.SourceAmpl.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.SourceAmpl.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.SourceAmpl.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.SourceAmpl.score_powspec |
( |
|
self, |
|
|
|
D |
|
) |
| |
Return first derivative of the likelihood wrt power
spectra parameters (ie scalar factor ampl).
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, shape (1,1).
The score of fixed parameters is set to zero.
| def smica.component.SourceAmpl.set_powspec |
( |
|
self, |
|
|
|
powspec, |
|
|
|
bin = None, |
|
|
|
fixed = None |
|
) |
| |
Set power spectra array.
Parameters
----------
powspec : array-like, shape (dim, dim, nbin).
bin : bin number. If None, all bins are set.
fixed : array-like, shape (dim, dim, nbin)
Entries which are not equal to zero point to
fixed indices. It is also possible to use keywords 'all' and
'null' to fix (respectively) all parameters or none.