def get_4piconv(self, ch, theta, phi, psi, horn_pointing=False): l.info('Computing dipole temperature with 4pi convolver') vel = qarray.amplitude(self.satellite_v).flatten() beta = vel / physcon.c gamma = 1./np.sqrt(1-beta**2) unit_vel = self.satellite_v/vel[:,None] if horn_pointing: # psi comes from the S channel, so there is no need # to remove psi_pol psi_nopol = psi else: # remove psi_pol psi_nopol = psi - np.radians(ch.get_instrument_db_field("psi_pol")) # rotate vel to ecliptic # phi around z #ecl_rotation = qarray.rotation([0,0,1], -phi) # theta around y ecl_rotation = qarray.norm( qarray.mult( qarray.rotation([0,0,1], -psi_nopol) , qarray.mult( qarray.rotation([0,1,0], -theta) , qarray.rotation([0,0,1], -phi) ) )) # psi around z #ecl_rotation = qarray.mult(qarray.rotation([0,0,1], -psi) , ecl_rotation) # vel in beam ref frame vel_rad = qarray.rotate(ecl_rotation, unit_vel) cosdir = qarray.arraylist_dot(vel_rad, self.beam_sum[ch.tag]).flatten() #return beta * cosdir * T_CMB return (1. / ( gamma * (1 - beta * cosdir ) ) - 1) * T_CMB
def get(self, ch, vec, maximum=False): l.info('Computing dipole temperature') #T_dipole_CMB = doppler_factor(qarray.arraylist_dot(self.satellite_v,vec).flatten()) * T_CMB vel = qarray.amplitude(self.satellite_v).flatten() beta = vel / physcon.c gamma=1/np.sqrt(1-beta**2) if maximum: cosdir = 1 else: cosdir = qarray.arraylist_dot(qarray.norm(self.satellite_v), vec).flatten() T_dipole_CMB = T_CMB / (gamma * ( 1 - beta * cosdir )) #T_dipole_CMB = T_CMB * (1 - beta * cosdir ) if self.K_CMB: return T_dipole_CMB - T_CMB else: T_dipole_RJ = ch.Planck_to_RJ( T_dipole_CMB ) - ch.Planck_to_RJ(T_CMB) return T_dipole_RJ