[Review]: 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.

All good catches!  Thanks!  I have made the changes as per the review.


On Wed, Aug 6, 2014 at 7:05 AM, dpshelio <notifications@github.com> wrote:

> In sunpy/map/mapcube.py:
>
> > @@ -241,10 +245,35 @@ def peek(self, gamma=None, resample=None, **kwargs):
> >              self[0].cmap.set_gamma(gamma)
> >
> >          if resample:
> > -            #This assumes that the maps a homogenous!
> > -            #TODO: Update this!
> > -            resample = np.array(len(self.maps)-1) * np.array(resample)
> > -            for amap in self.maps:
> > -                amap.resample(resample)
> > +            if self.all_maps_same_shape:
>
> Should this be self.all_maps_same_shape()? in the documentation above it
> says so.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/sunpy/sunpy/pull/1072/files#r15867328>.
>