def __init__(self, ytype='milca', masktype=0, ascale=1.0, tausig=False): conf = misctools.load_config('COMPY') # compsep type self.ytype = conf.get('ytype', ytype) # y mask self.masktype = conf.getint('masktype', masktype) self.ymask = 'M' + str(self.masktype + 1) self.ascale = ascale # add tauxy signal sim self.tausig = tausig # tag self.ytag = self.ytype + '_' + self.ymask + '_a' + str( self.ascale) + 'deg'
def __init__(self,snmin=0,snmax=100,dtype='dr2_smica',fltr='none',lmin=1,lmax=2048,olmin=1,olmax=2048,bn=30,wtype='Lmask',ascale=1.,tausig=False): #//// load config file ////# conf = misctools.load_config('CMB') # rlz self.snmin = conf.getint('snmin',snmin) self.snmax = conf.getint('snmax',snmax) self.snum = self.snmax - self.snmin + 1 self.rlz = np.linspace(self.snmin,self.snmax,self.snum,dtype=np.int) # multipole of converted CMB alms self.lmin = conf.getint('lmin',lmin) self.lmax = conf.getint('lmax',lmax) # multipole of output CMB spectrum self.olmin = conf.getint('olmin',olmin) self.olmax = conf.getint('olmax',olmax) self.bn = conf.getint('bn',bn) self.binspc = conf.get('binspc','') # cmb map self.dtype = conf.get('dtype',dtype) self.tausig = conf.getboolean('tausig',tausig) self.fltr = conf.get('fltr',fltr) if self.fltr == 'cinv': ascale = 0. # window self.wtype = conf.get('wtype',wtype) if self.wtype == 'Fullsky': ascale = 0. self.fltr == 'nonse' self.ascale = conf.getfloat('ascale',ascale) # cmb scaling (correction to different cosmology) self.sscale = 1. if self.dtype in ['dr2_nilc','dr2_smicaffp8']: self.sscale = 1.0134 # suggested by Planck team # noise scaling (correction to underestimate of noise in sim) self.nscale = 1. if self.dtype!='dr2_nilc' and self.dtype!='dr3_nosz': self.nscale = 1.03 # derived by comparing between obs and sim spectra of HM1-HM2
def __init__(self,snmin=0,snmax=0,fltr='none',lmin=1,lmax=4096,clmin=100,olmin=1,olmax=2048,bn=30,nside=2048,wtype='com15',ascale=1.,sigma=10.): #//// load config file ////# conf = misctools.load_config('CMB') # rlz self.snmin = conf.getint('snmin',snmin) self.snmax = conf.getint('snmax',snmax) self.rlz = np.linspace(self.snmin,self.snmax,self.snmax-self.snmin+1,dtype=np.int) if self.snmin == 0: self.snum = self.snmax - self.snmin else: self.snum = self.snmax - self.snmin + 1 # multipole range of observed CMB alms self.lmin = conf.getint('lmin',lmin) self.lmax = conf.getint('lmax',lmax) # filtering multipole below clmin in addition to lx, ly before map->alm self.clmin = conf.getint('clmin',clmin) # multipoles of output CMB spectrum self.olmin = conf.getint('olmin',olmin) self.olmax = conf.getint('olmax',olmax) self.bn = conf.getint('bn',bn) self.binspc = conf.get('binspc','') # cmb map self.fltr = conf.get('fltr',fltr) # fullsky map self.nside = conf.getint('nside',nside) #Nside for fullsky cmb map self.npix = 12*self.nside**2 # window self.wtype = conf.get('wtype',wtype) self.ascale = conf.getfloat('ascale',ascale) # noise self.sigma = conf.getfloat('sigma',sigma)
def __init__(self, snmin=0, snmax=100, dtype='gnilc', freq='545', wind='G60', ascale=1.0, lmax=2048): conf = misctools.load_config('CIB') self.snmin = conf.getint('snmin', snmin) self.snmax = conf.getint('snmax', snmax) self.snum = self.snmax - self.snmin + 1 self.rlz = np.linspace(self.snmin, self.snmax, self.snum, dtype=np.int) # cib map type self.dtype = conf.get('dtype', dtype) self.freq = conf.get('freq', freq) # cib mask self.wind = conf.get('wind', wind) self.ascale = ascale # others self.lmax = conf.getint('lmax', lmax) # tag self.itag = self.dtype + '_' + self.freq + '_' + self.wind + '_a' + str( self.ascale) + 'deg' # beam if self.dtype == 'gnilc': self.ibl = CMB.beam(5., self.lmax) # check if self.dtype == 'kcib': if self.freq not in ['T+E', 'MV']: sys.exit('need freq=T+E or MV for phicib')
def __init__(self, olmax=2048, elmin=20, elmax=2048, klmin=20, klmax=2048, nside=2048, klist=['TT'], kfltr='', etype=''): conf = misctools.load_config('DELENSING') # etype self.etype = etype # kappa type self.klist = klist self.kfltr = kfltr #Newton method iteration number for obtaining anti-deflection angle in remapping self.nremap = 3 # minimum/maximum multipole of E and kappa in lensing template construction self.elmin = conf.getint('elmin', elmin) self.elmax = conf.getint('elmax', elmax) self.klmin = conf.getint('klmin', klmin) self.klmax = conf.getint('klmax', klmax) # output template self.olmax = conf.getint('dklmax', olmax) #remapping Nside/Npix for lensing template construction / remapping self.nside = nside self.npix = 12 * self.nside**2 self.l = np.linspace(0, self.olmax, self.olmax + 1)
def __init__(self, snmin=0, snmax=100, qid='boss_d01', fltr='none', lmin=1, lmax=4096, clmin=100, olmin=1, olmax=2048, bn=30, nside=2048, wind='base', ivar='base', ptsr='base', ascale=1.): #//// load config file ////# conf = misctools.load_config('CMB') # rlz self.snmin = conf.getint('snmin', snmin) self.snmax = conf.getint('snmax', snmax) self.rlz = np.linspace(self.snmin, self.snmax, self.snmax - self.snmin + 1, dtype=np.int) if self.snmin == 0: self.snum = self.snmax - self.snmin else: self.snum = self.snmax - self.snmin + 1 # multipole range of observed CMB alms self.lmin = conf.getint('lmin', lmin) self.lmax = conf.getint('lmax', lmax) # filtering multipole below clmin in addition to lx, ly before map->alm self.clmin = conf.getint('clmin', clmin) # multipoles of output CMB spectrum self.olmin = conf.getint('olmin', olmin) self.olmax = conf.getint('olmax', olmax) self.bn = conf.getint('bn', bn) self.binspc = conf.get('binspc', '') # cmb map self.qid = conf.get('qid', qid) self.fltr = conf.get('fltr', fltr) # fullsky map self.nside = conf.getint('nside', nside) #Nside for fullsky cmb map self.npix = 12 * self.nside**2 # window, ivar, ptsr self.wind = conf.get('wind', wind) if self.fltr == 'cinv': self.ascale = 0. else: self.ascale = conf.getfloat('ascale', ascale) self.apotag = 'a' + str(self.ascale) + 'deg' self.ivar = conf.get('ivar', ivar) self.ptsr = conf.get('ptsr', ptsr) if self.fltr == 'cinv': self.wtype = '_'.join([self.wind, self.ivar, self.ptsr]) else: self.wtype = '_'.join( [self.wind, self.ivar, self.ptsr, self.apotag]) # do self.doreal = conf.getboolean('doreal', False) self.dodust = conf.getboolean('dodust', False)
def __init__(self, snmin=0, snmax=100, dtype='full', freq='143', fltr='none', lmin=1, lmax=2048, olmin=1, olmax=2048, wind='base', ascale=1., biref=0.): #//// load config file ////# conf = misctools.load_config('CMB') # rlz self.snmin = conf.getint('snmin', snmin) self.snmax = conf.getint('snmax', snmax) self.snum = self.snmax - self.snmin + 1 self.rlz = np.linspace(self.snmin, self.snmax, self.snum, dtype=np.int) self.ids = ids[:snmax + 1] # multipole of converted CMB alms self.lmin = conf.getint('lmin', lmin) self.lmax = conf.getint('lmax', lmax) # multipole of output CMB spectrum self.olmin = conf.getint('olmin', olmin) self.olmax = conf.getint('olmax', olmax) # full or half mission self.dtype = conf.get('dtype', dtype) if self.dtype not in ['full', 'hm1', 'hm2']: sys.exit('data type is not supported') # cmb map self.freq = conf.get('freq', freq) self.biref = conf.getfloat('biref', biref) if not isinstance(self.biref, float): sys.error('biref value should be float') self.fltr = conf.get('fltr', fltr) if self.fltr == 'cinv': ascale = 0. # window self.wind = conf.get('wind', wind) if self.wind == 'Fullsky': ascale = 0. self.fltr == 'none' self.ascale = conf.getfloat('ascale', ascale) # cmb scaling (correction to different cosmology) self.sscale = 1. # noise scaling (correction to underestimate of noise in sim) self.nscale = 1. # beam self.ibl = get_transfer(self.freq, self.lmax) # white nosie level self.sigma = get_white_noise_level(self.freq)
def __init__(self, t='la', freq='', ntype='base_roll50', fltr='none', lmin=2, snmin=1, snmax=10, lTmin=500, lTmax=3000, ascale=5.): #//// load config file ////# #config = configparser.ConfigParser() #if np.size(sys.argv) > 1 and '.ini' in sys.argv[1]: # print('reading '+sys.argv[1]) # config.read(sys.argv[1]) #else: # config.add_section('DEFAULT') #//// get parameters ////# conf = misctools.load_config('CMB') # specify telescope # la --- LAT (default) # sa --- SAT # co --- SAT + LAT # id --- fullsky, isotropic noise self.telescope = conf.get('telescope', t) # minimum/maximum of realization index to be analyzed # the 1st index (0000) is used for real (or mock) data self.snmin = conf.getint('snmin', snmin) self.snmax = conf.getint('snmax', snmax) # use real data or not for index = 0000 self.doreal = conf.getboolean('doreal', False) # total number of realizations and array of realization index self.snum = self.snmax - self.snmin + 1 self.rlz = np.linspace(self.snmin, self.snmax, self.snum, dtype=np.int) # CMB frequency self.freq = conf.get('freq', freq) # CMB alms filtering self.fltr = conf.get('fltr', fltr) # apodization scale self.ascale = conf.getfloat('ascale', ascale) if self.telescope == 'id': self.ascale = 0. # CMB map noise type # base --- SO baseline (default) # goal --- SO goal self.ntype = conf.get('ntype', ntype) # Note that you can also specify roll-off effect on large scales to mimic actual map-making # e.g. ntype = base_roll200 --- basline noise + roll-off effect below ell<200 # set roll-off multipole # assuming "base_roll200", etc if 'roll' in ntype: self.roll = int(ntype[ntype.find('roll') + 4:]) else: self.roll = 0 # minimum/maximum multipoles of CMB alms self.lmin = conf.getint('lmin', lmin) # maximum multipole of CMB maps are fixed for each telescope if t in ['sa', 'co']: self.lmax = 2048 else: self.lmax = 4096 # minimum/maximum multipoles of CMB temperature alms for lensing reconstruction self.lTmin = conf.getint('lTmin', lTmin) self.lTmax = conf.getint('lTmax', lTmax) #//// derived parameters ////# self.nside, self.npix = mapres(self.telescope)