# File root name for Fisher derivatives derivRoot = Config.get("fisher","derivRoot") # Get list of parameters paramList = Config.get("fisher","paramList").split(',') # Load fiducials and derivatives fidCls = tryLoad(derivRoot+'_fCls.csv',',') dCls = {} for paramName in paramList: dCls[paramName] = tryLoad(derivRoot+'_dCls_'+paramName+'.csv',',') # Get CMB noise functions and ell ranges. if (noise_func_tt is None) or (noise_func_ee is None): fnTT, fnEE = noiseFromConfig(Config,expName,TCMB=TCMB,beamsOverride=None,noisesOverride=None,lkneeTOverride=None,lkneePOverride=None,alphaTOverride=None,alphaPOverride=None) tellmin,tellmax = list_from_config(Config,expName,'tellrange') pellmin,pellmax = list_from_config(Config,expName,'pellrange') if (noise_func_tt is not None): fnTT = cosmology.noise_pad_infinity(noise_func_tt,tellmin,tellmax) if (noise_func_ee is not None): fnEE = cosmology.noise_pad_infinity(noise_func_ee,pellmin,pellmax) # Pad CMB lensing noise with infinity outside L ranges kellmin,kellmax = list_from_config(Config,'lensing','Lrange') fnKK = cosmology.noise_pad_infinity(interp1d(ls,Nls,fill_value=np.inf,bounds_error=False),kellmin,kellmax) # Decide on what ell range to calculate the Fisher matrix
# Load fiducials and derivatives fidCls = tryLoad(derivRoot + '_fCls.csv', ',') dCls = {} for paramName in paramList: dCls[paramName] = tryLoad(derivRoot + '_dCls_' + paramName + '.csv', ',') # Load other Fisher matrices to add otherFisher = loadFishers(Config.get('fisher', 'otherFishers').split(',')) # Get CMB noise functions and ell ranges. Note that the same overriding is possible but here the beams and noises have to be lists for the different frequencies. fnTT, fnEE = noiseFromConfig(Config, expName, TCMB=TCMB, beamsOverride=None, noisesOverride=[noiseNow], lkneeTOverride=None, lkneePOverride=None, alphaTOverride=None, alphaPOverride=None) tellmin, tellmax = listFromConfig(Config, expName, 'tellrange') pellmin, pellmax = listFromConfig(Config, expName, 'pellrange') # Pad CMB lensing noise with infinity outside L ranges kellmin, kellmax = listFromConfig(Config, 'lensing', 'Lrange') fnKK = cmb.noise_pad_infinity( interp1d(ls, Nls, fill_value=np.inf, bounds_error=False), kellmin, kellmax) # Decide on what ell range to calculate the Fisher matrix ellrange = np.arange(min(tellmin, pellmin, kellmin),