Iterating through the pixels in the EMData object

In your Python script you can use commands like this to iterate through the pixels in an EMData object

   1 a = test_image()
   2 for k in a.get_zsize():
   3     for j in a.get_ysize():
   4         for i in a.get_xsize():
   5             pixel_value = a.get(i,j,k) # get the pixel value
   6             a.set(i,j,k,pixel_value*3) # set the pixel value