Here we describe our procedure to obtain the vector magnetization in XMCD-PEEM (and SPLEEM). 

howto triangles 06 3DVector XMCD-PEEM relies on measuring XMCD images of the same place on a surface, along different relative orientations of the x-ray beam and the surface under study. Each orientation gives the dichroic signal along the x-ray beam direction. Combining three components along three non-coplanar directions, the full dichroic vector, proportional to the magnetization, can be obtained. In SPLEEM something similar can be done by measuring the spin-assymetry for three (non-coplanar) spin-polarizations of the electron beam relative to the sample. The problem with XMCD-PEEM is that rotating the sample guarantes that the imaging conditions and thus the image distortions are not the same for each angle, so images have to be corrected afterwards (step 3). Also rotating the azimuthal angle in a typical XMCD-PEEM setup involves a substantial amount of time (typically half-an-hour per rotation) due to the need to keep the same area centered and to readjust the tilt, so a full 3D sequence requires easily several hours. In contrast, SPLEEM allows to acquire a triplet in seconds, albeit without chemical sensitivity. However, if you want to do SPLEEM the available instruments are fewer than for XMCD-PEEM. One possibility is to apply for time at the SPLEEM of the National Center for Electron Microscopy at Berkeley Lab with Andreas K. Schmid. The images show here have been acquired at the CIRCE beamline in the Alba synchrotron in collaboration with Michael Foerster and Lucía Aballe.
In XMCD-PEEM even with the correction applied, information close island borders should be taken with a grain of salt. Changes in the work function close between two different materials give rise to focussing effects, so if an island is grown on a layer of a different composition, problems should be expected. 
All the work can be done in Fiji. To add the required plugins for opening UView files and to do the 3D calculation, go my ImageJ plugins information
The steps to treat SPLEEM data are the same (omitting steps 2 and 3) and but remember to use the correct angles in step 5.
 
  1. Obtain the averaged images XMCD-PEEM (or SPLEEM) at three different (non-coplanar) angles. This can be done in a very convenient way in ImageJ/Fiji with the PEEM macros for XMCD-PEEM (which includes the possibility of using a normalization image) or the simpler version I wrote for SPLEEM. The PEEM macros have been written in collaboration with Lucia Aballe and Michael Foerster, of the CIRCE beamline at the Alba synchrotron. The MultiStackReg plugin has to be installed (it can be downloaded from http://bradbusse.net/downloads.html). To use them, copy the right txt file into the ImageJ/macros/toolsets folder, and press the ">>" button (at the end of the button row). The buttons on the right part of the row will change. Hovering the mouse on them gives a hint of their usage. For example, selecting button N in the PEEM macros will ask for a normalization image, and then for a folder. It will attempt to load a sequence of XAS images ending respectively in plus or minus, drift correct each sequence (it will ask for a box around any clearly defined feature), calculate the average plus and minus, drift correct both and finally calculate the assymetry and averaged images. If drift correction does not work, do it without drift correction, or correct manually shifting images by hand (hopefully someone will write a macro or plugin for this). We assume here you already did all this, and as an example, you already have three nice looking images corresponding to the XMCD assymetry, where the x-ray beam is coming towards the left of the images, and the azimuthal position of the sample has been rotated before acquiring each image by 0, 60 and 120º respectively. The images correspond to a magnetite island which is about 2 um in lateral size. howto triangles 01 original
  2. (Un)Rotate each image (Image->Transform->Rotate). The rotation angle is minus the azimuth angle as read by the UView program in Alba. Here you have the result. As you can seen, the triangles do not look the same, due to the different distortions present on the images acquired at different azimuthal angles.howto triangles 02 rotated
  3. Deform the images so their outline features coincide. One way is to select "MultiPoint Selection" and mark as many features as desired in the three images (the same and on the same order in each image). Then use the Fiji "Plugins->Transform->Landmark Correspondences" plugin, (selecting the "affine transformation" option) to transform the second and the third image in turn using the first one as the reference.  howto triangles 03 distorted
  4. (Optional)- Set the scale of the images, by selecting "Image->Properties" and setting the width and height per pixel and the units. For the 2016 Alba PEEM, for a field of view (FOV) of 10 um it is 8.46 nm/pixel. In the future this might be read directly from the Uview data. This gives the right size for each image and allows the use of "Analyze->Tools->Scale Bar" to superimpose a calibration bar on the image (selecting overal cancel will remove it). Also use "Analyze->Tools->Calibration bar" if desired, although this one makes more sense later, after getting the XYZ or spherical components.
  5. Run the "plugins->LEEMandPEEM->getXYZ" plugin selecting the three images, and for the azimuthal angle of each image put the adquisition angle + 180 (x-ray beam coming from the right) and plus a correction depending on the FOV. For a FOV 10 um (at Alba!), the correction is usually close to -19º, for FOV 20um it is close to 0. The polar angle at the Alba PEEM is 74º. The plugin allows to use either degrees or radians. It is a good idea to save the resulting X,Y,Z images. A good way to look at the Z images is to use the UnionJack color scale (or lut): "Image->Lookuptables->unionjack" which is red above 0 and blue below. The latest version of the plugin writes out a single image stack with the X,Y,Z components as different channels. Expand them into individual images for the next plugin by doing "Image->Stacks->Stack to Images", or use "Image->Color->Make Composite" to get a nice color composite image.
    howto triangles 04 XYZ
  6. To get the result in spherical coordinates (magnitude, azimuthal angle, polar angle) run the "plugins->LEEMandPEEM->toSpherical" plugin selecting the correct starting images. The angle output can be choosen in degrees or radians. The best way to see the azimuthal image is to use the spectrum colormap "Image->lookuptables->spectrum", which is the same colormap used by Alpha N'Diaye (from Lawrence Berkeley Laboraotry) python script. To explore the images, histograms can be done from areas of the images. NOTE: at the moment and to coincide with Alpha's scripts, the polar angle 0 is INTO the image, not out from it. In the figure below, the left frame is the in-plane azimuthal angle, the middle one is the out-of-plane polar angle, and the right one is the magnitude of the dichroic signal.
     howto triangles 04 spherical
  7. To save the data in the OVF 1.0 OOMMF vector format to read it in MuMax3, OOMMF or other micromagnetism codes, use the "plugins->LEEMandPEEM->writeOVF", which will ask for the calibration (at the moment it is not reading it from the images), for the three X,Y,Z images and for a file name to save the data. The OVF format can be read with several programs. One neat example is MuView, a light program by Graham Rowlands. Or it can be converted into VTK format using "ovf2vtk" (https://www.southampton.ac.uk/~fangohr/software/ovf2vtk/) or mumax3-convert (part of MuMax3). Once in VTK the magnetization vector field can be viewed in mayavi2 or paraview.