From 0a76a7e5f089819b50b201657f875920222788e8 Mon Sep 17 00:00:00 2001 From: William Cerny Date: Tue, 16 Apr 2024 10:56:06 -0400 Subject: [PATCH] Update results.py to use new extension_radial field of samples to compute extension_radial estimate Part 2 of an improvement to use the full posterior of the extension and ellipticity to derive extension_radial samples, then compute summary statistics on extension_radial. --- ugali/analysis/results.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ugali/analysis/results.py b/ugali/analysis/results.py index 99877d6..1f4425e 100644 --- a/ugali/analysis/results.py +++ b/ugali/analysis/results.py @@ -166,6 +166,8 @@ def get_results(self,**kwargs): results['dec'] = self.estimate('dec',**kwargs) results['glon'] = self.estimate('glon',**kwargs) results['glat'] = self.estimate('glat',**kwargs) + results['extension_radial'] = self.estimate('extension_radial', **kwargs) + except KeyError: logger.warn("Didn't find 'ra' or 'dec' in Samples...") if self.coordsys == 'gal': @@ -216,9 +218,9 @@ def get_results(self,**kwargs): # Radially symmetric extension (correct for ellipticity). ell,ell_err = estimate['ellipticity'] - rext,rext_err = ext*np.sqrt(1-ell),np.array(ext_err)*np.sqrt(1-ell) + rext,rext_err = results['extension_radial'] #ext*np.sqrt(1-ell),np.array(ext_err)*np.sqrt(1-ell) rext_sigma = np.nan_to_num(np.array(rext_err) - rext) - results['extension_radial'] = ugali.utils.stats.interval(rext,rext_err[0],rext_err[1]) + #results['extension_radial'] = ugali.utils.stats.interval(rext,rext_err[0],rext_err[1]) # now obsolete results['extension_radial_arcmin'] = ugali.utils.stats.interval(60*rext,60*rext_err[0],60*rext_err[1]) # Bayes factor for ellipticity