Esempio n. 1
0
    def getsky(self):

        lmax = 3 * self.nside - 1
        cla = skysim.clarray(self.angular_powerspectrum, lmax, self.nu_pixels)

        return (self.mean_nu(self.nu_pixels)[:, np.newaxis] +
                skysim.mkfullsky(cla, self.nside))
Esempio n. 2
0
    def getsky(self):

        lmax = 3 * self.nside - 1
        cla = skysim.clarray(self.angular_powerspectrum, lmax, self.nu_pixels)
        
        return (self.mean_nu(self.nu_pixels)[:, np.newaxis]
                + skysim.mkfullsky(cla, self.nside))
Esempio n. 3
0
    def getsky(self, debug=False, celestial=True):

        # Read in data files.
        haslam = healpy.smoothing(healpy.ud_grade(self._haslam, self.nside),
                                  degree=True,
                                  fwhm=3.0)  #hputil.coord_g2c()

        beam = 1.0
        syn = FullSkySynchrotron()

        lmax = 3 * self.nside - 1

        efreq = np.concatenate((np.array([408.0, 1420.0]), self.nu_pixels))

        cla = skysim.clarray(syn.angular_powerspectrum, lmax, efreq)

        fg = skysim.mkfullsky(cla, self.nside)

        sub408 = healpy.smoothing(fg[0], fwhm=3.0, degree=True)
        sub1420 = healpy.smoothing(fg[1], fwhm=5.8, degree=True)

        fgs = skysim.mkconstrained(cla, [(0, sub408), (1, sub1420)],
                                   self.nside)

        sc = healpy.ud_grade(self._sp_ind, self.nside)
        am = healpy.ud_grade(self._amp_map, self.nside)
        mv = healpy.smoothing(map_variance(
            healpy.smoothing(fg[0], sigma=0.5, degree=True), 16)**0.5,
                              degree=True,
                              sigma=1.0).mean()

        fgt = (am / mv) * (fg - fgs)

        fg2 = (haslam[np.newaxis, :] * ((efreq / 408.0)[:, np.newaxis]**sc) +
               fgt)[2:]

        if celestial:
            for i in range(fg2.shape[0]):
                fg2[i] = hputil.coord_g2c(fg2[i])

        if debug:
            return fg2, fg, fgs, fgt

        return fg2
Esempio n. 4
0
    def getsky(self, debug=False, celestial=True):

        # Read in data files.
        haslam = healpy.smoothing(
            healpy.ud_grade(self._haslam, self.nside), degree=True, fwhm=3.0
        )  # hputil.coord_g2c()

        beam = 1.0
        syn = FullSkySynchrotron()

        lmax = 3 * self.nside - 1

        efreq = np.concatenate((np.array([408.0, 1420.0]), self.nu_pixels))

        cla = skysim.clarray(syn.angular_powerspectrum, lmax, efreq)

        fg = skysim.mkfullsky(cla, self.nside)

        sub408 = healpy.smoothing(fg[0], fwhm=3.0, degree=True)
        sub1420 = healpy.smoothing(fg[1], fwhm=5.8, degree=True)

        fgs = skysim.mkconstrained(cla, [(0, sub408), (1, sub1420)], self.nside)

        sc = healpy.ud_grade(self._sp_ind, self.nside)
        am = healpy.ud_grade(self._amp_map, self.nside)
        mv = healpy.smoothing(
            map_variance(healpy.smoothing(fg[0], sigma=0.5, degree=True), 16) ** 0.5, degree=True, sigma=1.0
        ).mean()

        fgt = (am / mv) * (fg - fgs)

        fg2 = (haslam[np.newaxis, :] * ((efreq / 408.0)[:, np.newaxis] ** sc) + fgt)[2:]

        if celestial:
            for i in range(fg2.shape[0]):
                fg2[i] = hputil.coord_g2c(fg2[i])

        if debug:
            return fg2, fg, fgs, fgt

        return fg2
Esempio n. 5
0
    def getalms(self, lmax):

        cla = skysim.clarray(self.angular_powerspectrum, lmax, self.nu_pixels)
        
        return skysim.mkfullsky(cla, self.nside, alms=True)