|
SMICA
1.0
|
Public Member Functions | |
| def | is_astro |
| def | set_dim |
| def | __init__ |
| def | set_mixmat |
| def | fix_mixmat |
| def | set_powspec |
| def | fix_powspec |
| def | mixmat |
| def | powspec |
| def | autopowspec |
| def | covariance |
| def | score_mixmat |
| def | score_powspec |
| def | plot_mixmat |
| def | plot_powspec |
Public Member Functions inherited from smica.component.Component | |
| def | plot_power |
| def | plot_em |
| def | set_gaussian_prior |
| def | get_penalty |
| def | get_score_penalty |
| def | get_fim_penalty |
Public Attributes | |
| dim | |
| ndet | |
| nbin | |
| name | |
Public Attributes inherited from smica.component.Component | |
| mu | |
| sigma_inv | |
A source component. Sources component contribute to the covariance R_q via a mixing matrix A, which is constant over bins, plus its auto and cross power spectra P_q. That is R_q = A P_q A'. The dimension of the component is the number of columns of the mixing matrix A. A component with a dimension greater than 1 stands for a correlated sources.
| def smica.component.Source.__init__ | ( | self, | |
| ndet, | |||
| nbin, | |||
| dim, | |||
name = None |
|||
| ) |
Initialize component parameters arrays. Parameters ---------- ndet : number of detectors nbin : number of bins dim : dimension of the correlated component name : name of the component
| def smica.component.Source.autopowspec | ( | self, | |
bin = None |
|||
| ) |
Return auto power spectra array. Parameters ---------- bin : bin number. If None, complete array is returned. Returns ------- array, shape (dim, nbin).
| def smica.component.Source.covariance | ( | self, | |
bin = None |
|||
| ) |
Return the covariance matrix(ces) (ie the contribution to the covariance of the model). Parameters ---------- bin : bin number. If None, return all matrices in a three dimensional array. Returns ------- array, shape (ndet, ndet, nbin).
| def smica.component.Source.fix_mixmat | ( | self, | |
| fixed | |||
| ) |
Fix entries of mixing matrix. Parameters ---------- fixed : array-like, shape (ndet, dim) 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.
| def smica.component.Source.fix_powspec | ( | self, | |
| fixed | |||
| ) |
Fix entries of power spectra array. Parameters ---------- 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.
| def smica.component.Source.mixmat | ( | self) |
Return mixing matrix. Returns ------- array, shape (ndet, dim).
| def smica.component.Source.plot_mixmat | ( | self, | |
freqlist = None, |
|||
compname = None, |
|||
figfile = None |
|||
| ) |
Plot mixing matrix array. Parameters ---------- freqlist : array-like, shape (ndet, 1), x axis values. compname : list, length (dim), column labels. figfile : string, filename where to save the plot.
| def smica.component.Source.plot_powspec | ( | self, | |
compname = None, |
|||
figfile = None |
|||
| ) |
Plot power spectra array. Parameters ---------- compname : list, length (dim), plot labels. figfile : string, filename where to save the plot.
| def smica.component.Source.powspec | ( | self, | |
bin = None |
|||
| ) |
Return power spectra array. Parameters ---------- bin : bin number. If None, complete array is returned. Returns ------- array, shape (dim, dim, nbin).
| def smica.component.Source.score_mixmat | ( | self, | |
| D | |||
| ) |
Return first derivative of the likelihood wrt mixing matrix parameters. 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 (ndet, dim). The score of fixed parameters is set to zero.
| def smica.component.Source.score_powspec | ( | self, | |
| D | |||
| ) |
Return first derivative of the likelihood wrt power spectra parameters. 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. B : array-like, shape (ndet, ndet, nbin). B is the instrument covariance if any Returns ------- array, shape (dim, dim, nbin). The score of fixed parameters is set to zero.
| def smica.component.Source.set_dim | ( | self, | |
| dim | |||
| ) |
Set the dimension of the component.
| def smica.component.Source.set_mixmat | ( | self, | |
| mixmat, | |||
fixed = None |
|||
| ) |
Set mixing matrix. Parameters ---------- mixmat : array-like, shape (ndet, dim). fixed : array-like, shape (ndet, dim) 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.
| def smica.component.Source.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.
1.8.4