Functions to get information out of a MapCube.

I added in three functions:
_maps_have_same_number_of_x_and_y_pixels 
 - tests if all the maps have the same number of x and y pixels

data()
 - takes the image data in a mapcube and returns a 3d numpy array

meta()
 - returns the meta objects from each map in a list

These functions are handy when working with mapcubes.  Often when you have done what you have to do with your mapcubes, you just want the information out (particularly the image data).  These functions make it easy to do that.  If these functions are acceptable I'll work on the documentation and testing.

Thanks!

so maybe instead of *mapcube.data() *it should be *mapcube.as_array* ?

instead of *mapcube.meta()* it should be *mapcube.map_metas?*




On Sun, Jun 22, 2014 at 9:44 AM, Stuart Mumford <notifications@github.com>
wrote:

> In sunpy/map/mapcube.py:
>
> >
> >          return MapCubeAnimator(self, **kwargs)
> > +
> > +    def _maps_have_same_number_of_x_and_y_pixels(self):
>
> Ok, so firstly, properties are functions that are accessed like
> attributes, so no they do not take up RAM.
>
> I don't think we should have .data and .meta for mapcube in the way you
> have defined the functions, as they are not the actual underlying data and
> metadata for the MapCube. So I think having the functions you have
> defined as helper methods is great, but we shouldn't confuse where the
> actual data source is with re-using the same API as the other datatypes but
> them not having the same meaning.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/sunpy/sunpy/pull/1072/files#r14054548>.
>