def lip_c(hch): """ Compute the Lipschitz Ct """ nhch = np.shape(hch) n_freq = nhch[0] nex = nhch[2] nef = 0 return plk.PLK(n_freq, nex, nef).LipC(hch)
def apply_ht(hch, xin): """ Apply Pseudo-Inverse of H """ nhch = np.shape(hch) n_freq = nhch[0] nex = nhch[2] nef = 0 return plk.PLK(n_freq, nex, nef).applyHt(hch, xin)
def applyh_pinv(hch, xin, epsi=1e-3): """ Apply Pseudo-Inverse of H """ nhch = np.shape(hch) n_freq = nhch[0] nex = nhch[2] nef = 0 eps = np.array([epsi]).astype('double') return plk.PLK(n_freq, nex, nef).applyH_Pinv(hch, xin, eps)
def diff_mbb(beta, temp, freq): """ differential of the modified black body""" n_freq = len(freq) nex = len(temp) nef = 0 mbb = plk.PLK(n_freq, nex, nef).d_mbb(freq, temp, beta) return mbb
def colorcor(beta, temp, freq, freqb, transb): """colour correction calculation """ n_freq = len(freq) nex = len(temp) ccfact = np.zeros((n_freq, len(beta))) mbb = np.zeros((n_freq, len(beta))) for rval in range(n_freq): nef = len(freqb[rval]) nu0 = np.array(freq[rval]) qres = plk.PLK(n_freq, nex, nef).ccfact(freqb[rval].astype('float64'), \ transb[rval].astype('float64'), temp, beta, nu0) ccfact[rval, :] = qres[0, :] mbb[rval, :] = qres[1, :] return ccfact, mbb