gammapy/enrico

Issue_enrico_lc

Opened this issue · 0 comments

I am getting the following error in the enrico_lc command. Kindly suggest some solutions.
No Npred Plot produced
/home/sunanda/mkn421/Enrico/enrico/enrico/lightcurve.py:396: UserWarning: Attempting to set identical left == right == 532066325.0 results in singular transformations; automatically expanding.
plt.xlim(xmin=max(plt.xlim()[0],1.02min(Time)-0.02max(Time)),xmax=min(plt.xlim()[1],1.02max(Time)-0.02min(Time)))
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Computer Modern
/home/sunanda/mkn421/Enrico/enrico/enrico/lightcurve.py:463: UserWarning: FixedFormatter should only be used together with FixedLocator
ax.set_yticklabels([float(round(k,5))
/home/sunanda/mkn421/Enrico/enrico/enrico/plotting.py:399: RuntimeWarning: divide by zero encountered in log10
optimal_markersize = (0.5+4./(1.+np.log10(len(y))))
/home/sunanda/mkn421/Enrico/enrico/enrico/plotting.py:400: RuntimeWarning: divide by zero encountered in log10
optimal_errorlinewidth = (0.2+2./(1.+4.*np.log10(len(y))))
Traceback (most recent call last):
File "/home/sunanda/mkn421/Enrico/enrico/bin/enrico_plot_lc", line 21, in
liste = np.genfromtxt(sys.argv[1],dtype="str",unpack=True)
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/lib/npyio.py", line 2261, in genfromtxt
raise ValueError(errmsg)
ValueError: Some errors were detected !
Line #9 (got 1 columns instead of 3)
Line #20 (got 1 columns instead of 3)
Line #29 (got 1 columns instead of 3)
Line #37 (got 1 columns instead of 3)
Line #43 (got 1 columns instead of 3)
Line #49 (got 1 columns instead of 3)
Line #54 (got 1 columns instead of 3)
Line #70 (got 1 columns instead of 3)
Line #79 (got 1 columns instead of 3)
Line #85 (got 1 columns instead of 3)
Line #101 (got 1 columns instead of 3)
Line #115 (got 1 columns instead of 3)
Line #127 (got 1 columns instead of 3)
Line #146 (got 1 columns instead of 3)
Line #162 (got 1 columns instead of 3)
Line #170 (got 1 columns instead of 3)
Line #185 (got 1 columns instead of 3)
Line #199 (got 1 columns instead of 3)
Line #210 (got 1 columns instead of 3)
Line #216 (got 1 columns instead of 3)
Line #226 (got 1 columns instead of 3)
Line #230 (got 1 columns instead of 3)
Line #244 (got 1 columns instead of 3)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/sunanda/mkn421/Enrico/enrico/bin/enrico_plot_lc", line 30, in
lcobject.PlotLC()
File "/home/sunanda/mkn421/Enrico/enrico/enrico/lightcurve.py", line 243, in PlotLC
self._PlotLC()
File "/home/sunanda/mkn421/Enrico/enrico/enrico/lightcurve.py", line 497, in _PlotLC
plt.ylim(ymin=max(plt.ylim()[0],np.percentile(Index[~uplimIndex],1)*0.1),
File "<array_function internals>", line 180, in percentile
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4166, in percentile
return _quantile_unchecked(
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4424, in _quantile_unchecked
r, k = _ureduce(a,
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/lib/function_base.py", line 3725, in _ureduce
r = func(a, **kwargs)
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4593, in _quantile_ureduce_func
result = _quantile(arr,
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4699, in _quantile
take(arr, indices=-1, axis=DATA_AXIS)
File "<array_function internals>", line 180, in take
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 190, in take
return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
File "/home/sunanda/anaconda3/envs/fermi/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
IndexError: cannot do a non-empty take from an empty axes.