bfs = 12 sfs = bfs - 2 params = { 'axes.labelsize': bfs, 'text.fontsize': bfs, 'legend.fontsize': bfs, 'xtick.labelsize': sfs, 'ytick.labelsize': sfs} pylab.rcParams.update(params) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # 1st data file defines labels and parameter ranges: if k == 0: alllabels,alllimits,usedylimits = pappy.read_header(datafiles[k]) if (usedylimits and vb): print 'No axis limits found, using 5-sigma ranges' # Now pull out just the labels and limits we need: limits = numpy.zeros([npars,2]) ii = 0 for i in index: limits[ii,:] = alllimits[i,:] ii = ii + 1 labels = alllabels[:] # Set up dynamic axis limits, and smoothing scales: dylimits = numpy.zeros([npars,2]) smooth = numpy.zeros(npars) for i in range(npars): col = index[i]
bfs = 10 sfs = bfs - 2 params = { 'axes.labelsize': bfs, 'text.fontsize': bfs, 'legend.fontsize': bfs, 'xtick.labelsize': sfs, 'ytick.labelsize': sfs} pylab.rcParams.update(params) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # 1st data file defines labels and parameter ranges: if k == 0: alllabels,alllimits,usedylimits = pappy.read_header(datafiles[k]) if vb: print 'No axis limits found, using 5-sigma ranges' # Now pull out just the labels and limits we need: limits = numpy.zeros([npars,2]) ii = 0 for i in index: limits[ii,:] = alllimits[i,:] ii = ii + 1 labels = alllabels[:] # Set up dynamic axis limits, and smoothing scales: dylimits = numpy.zeros([npars,2]) smooth = numpy.zeros(npars) for i in range(npars): col = index[i]
else: Lhood = 0.0*data[:,0].copy() + 1.0 # Having done all that, optionally overwrite index with specified list # of column numbers. Note conversion to zero-indexed python: if columns != 'All': pieces = columns.split(',') index = [] for piece in pieces: index.append(int(piece) - 1) npars = len(index) if vb: print "Only using data in",npars,"columns (",index,"): " # Now parameter list is in index - which is fixed for other datasets labels,limits,dummy = pappy.read_header(datafile) # -------------------------------------------------------------------- # Loop over parameters, doing calculations: for i in range(npars): col = index[i] d = data[:,col].copy() mean,stdev,Neff,N95 = pappy.meansd(d,wht=wht) if histogram: dylimits = numpy.zeros([2]) dylimits[0] = mean - 10*stdev