import numpy as np
from pysharperratio import estimateSNR
x = np.random.rand(100)
snr,r0bar,n = estimateSNR(x,1000)
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-34-95aa56a81496> in <module>()
----> 1 snr,r0bar,n = estimateSNR(x,1000)
/Users/babou/anaconda/lib/python2.7/site-packages/pysharperratio/__init__.pyc in estimateSNR(x, permutations)
87 # cwd = os.getcwd()
88 # spline_file = os.path.join(cwd, 'spline_data.csv')
---> 89 a_data = pd.read_csv('spline_data.csv',index_col=0)
90
91 # Estimate Spline
/Users/babou/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skip_footer, doublequote, delim_whitespace, as_recarray, compact_ints, use_unsigned, low_memory, buffer_lines, memory_map, float_precision)
560 skip_blank_lines=skip_blank_lines)
561
--> 562 return _read(filepath_or_buffer, kwds)
563
564 parser_f.__name__ = name
/Users/babou/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in _read(filepath_or_buffer, kwds)
313
314 # Create the parser.
--> 315 parser = TextFileReader(filepath_or_buffer, **kwds)
316
317 if (nrows is not None) and (chunksize is not None):
/Users/babou/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, f, engine, **kwds)
643 self.options['has_index_names'] = kwds['has_index_names']
644
--> 645 self._make_engine(self.engine)
646
647 def close(self):
/Users/babou/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in _make_engine(self, engine)
797 def _make_engine(self, engine='c'):
798 if engine == 'c':
--> 799 self._engine = CParserWrapper(self.f, **self.options)
800 else:
801 if engine == 'python':
/Users/babou/anaconda/lib/python2.7/site-packages/pandas/io/parsers.pyc in __init__(self, src, **kwds)
1211 kwds['allow_leading_cols'] = self.index_col is not False
1212
-> 1213 self._reader = _parser.TextReader(src, **kwds)
1214
1215 # XXX
pandas/parser.pyx in pandas.parser.TextReader.__cinit__ (pandas/parser.c:3427)()
pandas/parser.pyx in pandas.parser.TextReader._setup_parser_source (pandas/parser.c:6861)()
IOError: File spline_data.csv does not exist
I don't understand why there is this .csv File here.
A.