Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501691
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/bin/prof2-ncoeffs b/bin/prof2-ncoeffs
--- a/bin/prof2-ncoeffs
+++ b/bin/prof2-ncoeffs
@@ -1,47 +1,47 @@
#! /usr/bin/env python
"""\
%prog DIM [opts]
Print number of required runs for DIM dimensions.
"""
import optparse, os, sys
op = optparse.OptionParser(usage=__doc__)
op.add_option("--order", dest="ORDER", default=None, type=int, help="Global order of polynomials for interpolation")
op.add_option("-v", "--debug", dest="DEBUG", action="store_true", default=False, help="Turn on some debug messages")
op.add_option("-q", "--quiet", dest="QUIET", action="store_true", default=False, help="Turn off messages")
opts, args = op.parse_args()
## Get mandatory arguments
if len(args) < 1:
print "Argument missing... exiting\n\n"
op.print_usage()
sys.exit(1)
DIM = int(args[0])
def fmt(dim, order):
import professor2 as prof
## Load the Professor machinery
- minnruns =prof.numCoeffs(dim, order)
+ minnruns =prof.calcnumCoeffs(dim, order)
return minnruns
if opts.ORDER is None:
print "%i dimensional parameter space:\n"%DIM
orders = range(11)
minruns = [fmt(DIM, x) for x in orders]
row_format ="{:>10}{:>20}"
print row_format.format("Polynomial order", "Minimum samples")
for i in xrange(len(orders)):
print row_format.format(orders[i], minruns[i])
# row_format ="{:>6}" * (len(orders) + 1)
# print row_format.format("Polynomial order", *orders)
# print row_format.format("Minimum samples", *minruns)
else:
print "%i order polynomial in %i dimensions requires %i input sets" % (opts.ORDER, DIM, fmt(opts.ORDER, DIM))
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:58 PM (5 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486760
Default Alt Text
(1 KB)
Attached To
rPROFESSORHG professorhg
Event Timeline
Log In to Comment