Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInference 4.1.9.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cbcBayesPlotSpinDisk.py
Go to the documentation of this file.
1##python
2# Ben Farr 2016
3
4import os
5from matplotlib import (use, rc)
6use('agg')
7
8rc('text', usetex=True)
9rc('font', family='lmodern')
10
11small, big = 10, 12
12rc('axes', labelsize=big)
13rc('font',size=big)
14rc('legend', fontsize=small)
15rc('xtick', labelsize=small)
16rc('ytick', labelsize=small)
17
18from lalinference.plot import make_disk_plot
19
20USAGE='What this does is : '
21
22if __name__=='__main__':
23 import sys
24 from optparse import OptionParser
25 from lalinference import bayespputils as bppu
26
27 parser=OptionParser(USAGE)
28 parser.add_option("-o","--outpath", dest="outpath",default=None, help="make page and plots in DIR", metavar="DIR")
29 parser.add_option("-d","--data",dest="data",help="Posteriors samples file (must be in common format)")
30 (opts,args)=parser.parse_args()
31
32 if opts.outpath is None:
33 opts.outpath=os.getcwd()
34 if not os.path.isfile(opts.data):
35 print("Cannot find posterior file %s\n"%opts.data)
36 sys.exit(1)
37 else:
38 peparser=bppu.PEOutputParser('common')
39 commonResultsObj=peparser.parse(open(opts.data,'r'),info=[None,None])
40 ps,samps = commonResultsObj
41 pos = bppu.Posterior(commonResultsObj)
42 make_disk_plot(pos,opts.outpath)
def make_disk_plot(post, outpath=None)
Definition: spindisk.py:10