diff --git a/README.md b/README.md index 117b6a2..374d641 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ The module `pyfunnel.py` can also be run with the following command line interfa ``` usage: pyfunnel.py [-h] --reference REFERENCE --test TEST [--output OUTPUT] [--atolx ATOLX] [--atoly ATOLY] [--ltolx LTOLX] [--ltoly LTOLY] [--rtolx RTOLX] [--rtoly RTOLY] -Run funnel binary from terminal. +Run funnel binary from terminal on two two-column CSV files. Output `errors.csv`, `lowerBound.csv`, `upperBound.csv`, `reference.csv`, `test.csv` into the output directory (`./results` by default). diff --git a/pyfunnel/pyfunnel.py b/pyfunnel/pyfunnel.py index 7e2eb11..7021b39 100755 --- a/pyfunnel/pyfunnel.py +++ b/pyfunnel/pyfunnel.py @@ -22,7 +22,7 @@ parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=( - 'Run funnel binary from terminal.\n\n' + 'Run funnel binary from terminal on two two-column CSV files.\n\n' 'Output `errors.csv`, `lowerBound.csv`, `upperBound.csv`, `reference.csv`, `test.csv` ' 'into the output directory (`./results` by default).'), epilog='Full documentation at https://github.com/lbl-srg/funnel' @@ -89,8 +89,8 @@ data[s] = dict(x=[], y=[]) with open(vars(args)[s]) as csvfile: spamreader = csv.reader(csvfile) - if (len(next(spamreader)) > 2): - raise RuntimeError("The {} CSV file cannot have more than two columns.".format(s)) + if (len(next(spamreader)) != 2): + raise RuntimeError("The {} CSV file must have exactly two columns.".format(s)) for row in spamreader: try: data[s]['x'].append(float(row[0]))