Repository navigation
Closed
Description
Hi guys,
I've started using sunpy to do some LYRA analysis and I've noticed that the .peek() function for the LYRA object doesn't appear to work. Is this a known problem or have misunderstood something in the installation process etc.? The error I get is
>>>lc = sunpy.lightcurve.LYRALightCurve.create(file)
>>>lc.peek()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-96-48ba98674805> in <module>()
----> 1 lc.peek()
/Users/danielr/anaconda/lib/python2.7/site-packages/sunpy/lightcurve/sources/lyra.pyc in peek(self, names, **kwargs)
57 axes = plt.gca()
58
---> 59 axes = self.data.plot(ax=axes, subplots=True, sharex=True, **kwargs)
60 #plt.legend(loc='best')
61
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/tools/plotting.pyc in plot_frame(frame, x, y, subplots, sharex, sharey, use_index, figsize, grid, legend, rot, ax, style, title, xlim, ylim, logx, logy, xticks, yticks, kind, sort_columns, fontsize, secondary_y, **kwds)
1733 secondary_y=secondary_y, **kwds)
1734
-> 1735 plot_obj.generate()
1736 plot_obj.draw()
1737 if subplots:
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/tools/plotting.pyc in generate(self)
903 self._compute_plot_data()
904 self._setup_subplots()
--> 905 self._make_plot()
906 self._post_plot_logic()
907 self._adorn_subplots()
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/tools/plotting.pyc in _make_plot(self)
1319 lines = []
1320 labels = []
-> 1321 x = self._get_xticks(convert_period=True)
1322
1323 plotf = self._get_plot_function()
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/tools/plotting.pyc in _get_xticks(self, convert_period)
1067 x = index._mpl_repr()
1068 elif is_datetype:
-> 1069 self.data = self.data.sort_index()
1070 x = self.data.index._mpl_repr()
1071 else:
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/core/frame.pyc in sort_index(self, axis, by, ascending, inplace, kind)
2626 self._update_inplace(new_data)
2627 else:
-> 2628 return self.take(indexer, axis=axis, convert=False, is_copy=False)
2629
2630 def sortlevel(self, level=0, axis=0, ascending=True, inplace=False):
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/core/generic.pyc in take(self, indices, axis, convert, is_copy)
1173 axis=baxis)
1174 else:
-> 1175 new_data = self._data.take(indices, axis=baxis)
1176
1177 result = self._constructor(new_data).__finalize__(self)
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in take(self, indexer, new_index, axis, verify)
3421 ref_items=new_axes[0],
3422 new_axis=new_axes[axis],
-> 3423 axis=axis)
3424
3425 def merge(self, other, lsuffix=None, rsuffix=None):
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in apply(self, f, *args, **kwargs)
2373
2374 else:
-> 2375 applied = getattr(blk, f)(*args, **kwargs)
2376
2377 if isinstance(applied, list):
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/core/internals.pyc in take(self, indexer, ref_items, new_axis, axis)
890 raise AssertionError('axis must be at least 1, got %d' % axis)
891 new_values = com.take_nd(self.values, indexer, axis=axis,
--> 892 allow_fill=False)
893
894 # need to preserve the ref_locs and just shift them
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/core/common.pyc in take_nd(arr, indexer, axis, out, fill_value, mask_info, allow_fill)
675 func = _get_take_nd_function(arr.ndim, arr.dtype, out.dtype,
676 axis=axis, mask_info=mask_info)
--> 677 func(arr, indexer, out, fill_value)
678 return out
679
/Users/danielr/anaconda/lib/python2.7/site-packages/pandas/algos.so in pandas.algos.take_2d_axis1_float64_float64 (pandas/algos.c:80824)()
ValueError: Big-endian buffer not supported on little-endian compilerMany thanks
Dan Ryan
Metadata
Metadata
Assignees
Labels
No labels
Activity
wafels commentedon Feb 27, 2014
This seems to be a pandas issue:
https://groups.google.com/forum/#!topic/pydata/ksIPthf2NJI
http://pandas.pydata.org/pandas-docs/dev/faq.html?highlight=endian#byte-ordering-issues
jack
On Thu, Feb 27, 2014 at 11:06 AM, DanRyanIrish [email protected]:
Cadair commentedon Feb 27, 2014
Oh holy cow! I had this issue the other day I thought it was something I was doing not an actual bona fide bug.
Thanks a lot for reporting it Dan, I will patch it tomorrow.
P.S. Seriously LYRA, little endian data?
aringlis commentedon Apr 10, 2014
This seems to be specifically an issue with pandas 0.13. I reproduce the error with 0.13 but the peek method works normally on pandas 0.12.
aringlis commentedon Apr 30, 2014
I think this issue has been resolved now.
DanRyanIrish commentedon May 5, 2014
Cheers!
On 30 Apr 2014, at 16:09, Stuart Mumford [email protected] wrote: