Interpolate histo bin values as a function of the parameter space by loading
run data and parameter lists from run directories in $runsdir (often "mc")
TODO:
* Use weight file position matches to exclude some bins, as well as path matching
* Handle run combination file/string (write a hash of the run list into the ipol filename?)
* Support asymm error parameterisation
"""
importoptparse,os,sys
op=optparse.OptionParser(usage=__doc__)
op.add_option("--ierr",dest="IERR",default="symm",help="Whether to interpolate MC errors: none, mean, median, symm (default: %default)")#< add rel, asymm
op.add_option("-n",dest="NSAMPLES",type=int,default=1,help="Number of samples")
op.add_option("-j",dest="MULTI",type=int,default=1,help="Number of threads to use")
op.add_option("--minos",dest="MINOS",default=False,action="store_true",help="Run Minos algorithm after minimisation")
op.add_option("--wfile",dest="WFILE",default=None,help="Path to a weight file, used to restrict ipol building to a subset of bins (default: %default)")
op.add_option("--limits",dest="LIMITS",default=None,help="Simple text file with parameter limits and fixed parameters")
op.add_option("-g","--gradient",dest="GRADIENT",action="store_true",default=False,help="Run minimisation with analytic gradient (EXPERIMENTAL!)")