def covar(self): """Return the covariance matrix for the best-fit cos & sin amplitudes.""" # ... If we haven't already done the metric calculations, complain! if self.f_in == None: raise RuntimeError, "Must call analyze first!" if self.var: return bhacalc.covar(self.L) * self.var else: return bhacalc.covar(self.L) * self.varest
def covar(self): """Return the covariance matrix for the best-fit cos & sin amplitudes.""" #... If we haven't already done the metric calculations, complain! if self.f_in == None: raise RuntimeError, 'Must call analyze first!' if self.var: return bhacalc.covar(self.L) * self.var else: return bhacalc.covar(self.L) * self.varest
def sigmas(self): """Return the standard deviations for the best-fit harmonic amplitudes.""" #... If we haven't already done the metric calculations, complain! if self.f_in == None: raise RuntimeError, 'Must call analyze first!' if self.var: covars = bhacalc.covar(self.L) * self.var else: covars = bhacalc.covar(self.L) * self.varest sigs = zeros((self.nf)) for i in range(self.nf): i1, i2 = 2*i, 2*i+1 sigs[i] = (self.amps[i1]/self.hamps[i])**2 * covars[i1][i1] + \ (self.amps[i2]/self.hamps[i])**2 * covars[i2][i2] return sqrt(sigs)
def sigmas(self): """Return the standard deviations for the best-fit harmonic amplitudes.""" # ... If we haven't already done the metric calculations, complain! if self.f_in == None: raise RuntimeError, "Must call analyze first!" if self.var: covars = bhacalc.covar(self.L) * self.var else: covars = bhacalc.covar(self.L) * self.varest sigs = zeros((self.nf)) for i in range(self.nf): i1, i2 = 2 * i, 2 * i + 1 sigs[i] = (self.amps[i1] / self.hamps[i]) ** 2 * covars[i1][i1] + ( self.amps[i2] / self.hamps[i] ) ** 2 * covars[i2][i2] return sqrt(sigs)