def make_clzz(self, pk): """Make an angular powerspectrum from the input matter powerspectrum. Uses the lmax and frequencies from the telescope object. Parameters ---------- pk : function, np.ndarray -> np.ndarray The input powerspectrum (must be vectorized). Returns ------- aps : np.ndarray[lmax+1, nfreq, nfreq] The angular powerspectrum. """ crt = corr21cm.Corr21cm(ps=pk, redshift=1.5) crt.ps_2d = True clzz = skymodel.im21cm_model( self.telescope.lmax, self.telescope.frequencies, self.telescope.num_pol_sky, cr=crt, temponly=True, ) print("Rank: %i - Finished making band." % mpiutil.rank) return clzz
def signal(self): """Compute the signal covariance matrix (on the sky). Returns ------- cv_fg : np.ndarray[pol2, pol1, l, freq1, freq2] """ if self._cvsg is None: npol = self.telescope.num_pol_sky if npol != 1 and npol != 3 and npol != 4: raise Exception("Can only handle unpolarised only (num_pol_sky \ = 1), or I, Q and U (num_pol_sky = 3).") self._cvsg = skymodel.im21cm_model(self.telescope.lmax, self.telescope.frequencies, npol) return self._cvsg
def make_clzz(self, pk): """Make an angular powerspectrum from the input matter powerspectrum. Uses the lmax and frequencies from the telescope object. Parameters ---------- pk : function, np.ndarray -> np.ndarray The input powerspectrum (must be vectorized). Returns ------- aps : np.ndarray[lmax+1, nfreq, nfreq] The angular powerspectrum. """ crt = corr21cm.Corr21cm(ps=pk, redshift=1.5) crt.ps_2d = True clzz = skymodel.im21cm_model(self.telescope.lmax, self.telescope.frequencies, self.telescope.num_pol_sky, cr = crt, temponly=True) print "Rank: %i - Finished making band." % mpiutil.rank return clzz