Recovering magnetization distributions from their noisy diffraction data
Abstract
We study, using simulated experiments inspired by thin film magnetic domain patterns, the feasibility of phase retrieval in Xray diffractive imaging in the presence of intrinsic charge scattering given only photonshotnoise limited diffraction data. We detail a reconstruction algorithm to recover the sample’s magnetization distribution under such conditions, and compare its performance with that of Fourier transform holography. Concerning the design of future experiments, we also chart out the reconstruction limits of diffractive imaging when photonshotnoise and the intensity of charge scattering noise are independently varied. This work is directly relevant to the timeresolved imaging of magnetic dynamics using coherent and ultrafast radiation from Xray free electron lasers and also to broader classes of diffractive imaging experiments which suffer noisy data, missing data or both.
pacs:
75.70.Kw, 78.70.Ck, 41.60.Cr, 42.30.Rx,I Introduction.
There has been a growing interest in studying and manipulating thinfilm magnetic nanostructures Elser:2010 (); Saga:1999 (); Eisebitt:2003 (); Eisebitt:2004 (); Pierce:2003 (); Pierce:2007 (); Gutt:2010 (). Besides the commercial applicability of such studies, experimental data on the formation, dynamics and stability of magnetic nanostructures will provide clues for constructing predictive models of magnetic materials Pierce:2007 (), which may in turn drive the invention of novel devices.
A comprehensive understanding of these magnetic nanostructures involves studying extremely fast magnetic dynamics at high resolution. Ideally, this can be achieved by sequentially illuminating an evolving magnetic specimen using very short, intense pulses of coherent Xray radiation (image of such in Fig. 1). Such radiation has become available at Xray free electron laser (XFEL) facilities, which can produce femtosecond pulses with upwards of Xray photons each. Despite such high intensities, pulses are typically monochromatized and polarized for magnetic imaging at the expense of their photon flux. Furthermore, in the case of repetitive studies on the same sample, say to study a specimen’s dynamics, the intensity of the XFEL pulses may have to be reduced to prevent sample damage by energetic Xray photons. As a result of reducing pulse intensity, the diffraction signal from the weakly scattering magnetic contrast in specimens are often expected to be photonshotnoise limited Gutt:2010 (). To make matters worse, the magnetic signal may also be contaminated by strong scattering from the nonuniform charge density intrinsic to magnetic specimens.
Currently, Fourier transform holography Eisebitt:2004 () and speckle metrology Pierce:2003 () are two leading coherent Xray techniques already used to study magnetic nanostructures. Their effectiveness comes with limitations: speckle metrology is restricted to “fingerprinting” in reciprocal space (unable to resolve localized dynamics of Fig. 1); Fourier transform holography affords directspace imaging but it requires the crafting of a reference structure.
This paper describes an alternative to Fourier transform holography and speckle metrology, detailing a reconstruction algorithm that directly images extended magnetization distributions when given only transmission diffraction data, without the need for a reference illumination. This algorithm crucially uses prior information about the ensemble of magnetization distributions to reconstruct a specific distribution. To demonstrate this, we had to generate an ensemble of credible magnetization distribution to be used as scattering sources for our diffractive imaging simulations (Section III). Whereas our algorithm is robust when the ensemble magnetization values are known, it is still relevant even when given limited information about these values (Appendix B). We expect our algorithm to apply, with possibly reduced efficacy, to real magnetization distributions whose ensemble properties are less well characterized but qualitatively similar to those in this paper.
Our algorithm also exploits knowledge of the sample’s directspace support to reduce the effects of photonshotnoise in the diffraction data. To make our demonstrations relevant to ultrafast magnetic imaging with XFEL radiation, we use diffraction data with the severest levels of noise in addition to missing data in the beamstop. We compare our diffractive imaging reconstruction with the performance of Fourier transform holography at comparable noise levels.
To substantiate our methods, we include a feasibility study of noisy magnetic imaging when subjected to our described methods in the most optimistic scenario that the ensemble magnetization values are known. We expect this feasibility study to be useful in the design of future experiments.
Ii Resonant magnetic scattering.
Multilayer magnetic thin films with perpendicular magnetic anisotropy Eisebitt:2003 (); Pierce:2003 (); Eisebitt:2004 (); Pierce:2007 (); Gutt:2010 (); Hannon:1988 (); Kortright:2001 () exhibit a notable phase comprising magnetic nanostructures that can be described by a 2D coarsegrained magnetization distribution . The magnetization in this phase is effectively parallel or antiparallel to the sample’s layer normal ^{1}^{1}1Depending on the magnetostatic and domain wall energy, closure domains with inplane magnetization may form where the domain walls meet the film surface Durr:1997 (). These closure domains are negligible in the very thin films which we examine in this paper.. In this section, we briefly discuss how such magnetization distributions are encoded in the diffraction data.
In diffractive imaging, one typically measures the sample’s elastic photon scattering amplitude which varies across the sample. This scattering mechanism includes virtual transitions between core electron states and unoccupied electron states above the Fermi level Hannon:1988 (). Since these unoccupied states are spinpolarized due to the sample’s local magnetization, the photon scattering amplitude depends on the sample’s magnetization distribution .
There are, naturally, other components of the sample’s elastic scattering amplitude that are insensitive to the magnetization: , the Thomson contribution; , the anomalous charge scattering. Both of these contributions are integrated along the incident beam direction. Like , and are also treated as 2D distributions.
A magnetic specimen’s total elastic scattering amplitude is given by Hannon:1988 () as
(1)  
where and are the polarization vectors of the incident and scattered radiation. The magnetizationsensitive scattering amplitudes and are scaled to allow the magnetization to be normalized as .
The total elastic scattering amplitude of multilayer magnetic films can be simplified with a few experimental constraints. First, since the magnetization is parallel or antiparallel to the sample’s layer normal, we can replace with the longitudinal scalar distribution . More importantly, the contribution to the scattering amplitude from the last term in eq. (1) is suppressed if light were transmitted along this longitudinal direction. Second, we restrict ourselves to circularly polarized incident radiation, which is a scattering eigenstate of the 3rd term in eq. (1). This choice, however, causes the diffraction patterns from magnetic and charge distributions to interfere ^{2}^{2}2There will be no interference between charge and magnetic scattering terms if the incident radiation were linearly polarized. In this case, diffraction intensities from charge and magnetic distributions are separately added, as demonstrated in reference Eisebitt:2003 (), and the former, ideally, can be subtracted away. Determining the static, random charge scattering for subtraction is possible when the photon energy is detuned away from the corelevel resonance, hence suppressing magnetic scattering. But this subtraction may be unreliable at noisy, high signal regions where the magnetization distribution is primarily encoded. Subtraction might also be problematic in singleshot imaging, when the incident photon fluence may fluctuate between shots — guesswork is needed to match the intensities of the chargeplusmagnetic data to those of chargeonly data for reliable subtraction.. Third, in the smallangle scattering limit, we can combine the nonmagnetic scattering contributions as . These conditions produce a simplified total scattering amplitude:
(2) 
Experimently, the magnetic scattering amplitude can be dramatically increased through resonant scattering: by tuning the energy of the incident photons to match those of corelevel electron transitions in the sample (L or M edges) Eisebitt:2003 (); Pierce:2003 (); Eisebitt:2004 (); Pierce:2007 (); Gutt:2010 (); Hannon:1988 (); Kortright:2001 (). This enhances the scattering signature of the magnetization with respect to the charge distribution, which is useful since we are interested only in the former.
A difference in the correlation length of the charge distribution and that of the magnetization distribution is common, which causes a separation in the peaks of their respective diffracted power Kortright:2001 (). Potentially, one could then ignore the charge distribution when imaging the magnetization at a lower resolution. However, later sections of this paper show that magnetic imaging may still be difficult despite such a separation.
The Fraunhofer diffraction intensity from samples obeying eq. (2) is
(3) 
where , the photon fluence, crucially determines the number of diffracted photons and hence the severity of photonshotnoise. Since only the total number of diffracted photons in our simulations is experimentally relevant and can be varied by changing only , the absolute scale of the magnetic and charge scattering amplitudes in , and respectively, is immaterial. From here on, magnetic scattering amplitudes and magnetization become interchangeable because they differ only by this unimportant absolute scale. The same is true between charge scattering amplitudes and charge. Since it still serves to be consistent, we normalize the magnetic scattering amplitude in eq. (2). The ratio , however, depends on the experimental specimen and the polarization of the incident radiation. This means, of course, that is no longer strictly the photon fluence, but a variable to control the number of scattered photons.
Iii Generating magnetic domain patterns.
To simulate realistic magnetic imaging, we first need to generate magnetization distributions, or domain patterns, that resemble a wide and interesting variety of actual specimens. At a minimum, the ensemble of such domain patterns should conform to these experimental observations:

in Fourierspace, an azimuthally symmetric diffracted power which peaks at a particular spatial frequency (compare simulated example in Fig. 2b to those from experiments in Kortright:2001 (); Eisebitt:2003 (); Eisebitt:2004 (); Pierce:2007 (); Gutt:2010 ());
The clues to generating realistic domain patterns lie in the careful examination of the diffraction envelope shown in Fig. 2e. The spatial frequency dependence of this envelope reveals two competing effects: shortrange exchange interaction that produces ferromagnetic domains and longrange demagnetizing fields which in turn destabilize these domains.
These effects are modeled by the 2D LandauGinzburg free energy density
(4)  
where , and are temperature dependent positive quantities, and is a cutoff that defines the maximum spatial frequency. Rewriting (4) in terms of the Fourier modes of the magnetization, , we obtain in the limit the following expression:
(5)  
Defining new constants and , and rescaling by a constant, this can be rewritten in the much simplified form
(6) 
The ferromagnetic instability corresponds to and the dependence of the fluctuations as this limit is approached is controlled by the coefficient of the term quadratic in the magnetization. As a simple model for the formation of magnetic domains in real materials we will assume the distribution of fluctuations in the paramagnetic phase (), given by the equipartition theorem, is preserved when the system freezes into a particular domain pattern. The intensity in this model is given by
(7) 
Our simulations will use this form for the power spectrum with and fitted to agree with experimental data in Eisebitt:2004 (). We use dimensionless units where the maximum spatial frequency is scaled to the value .
The generation of each domain pattern begins with an array of random, uniformly distributed real numbers between 1 and +1, mimicking the hightemperature magnetization distribution in the absence of external fields. On this random state , we apply two nonphysical operations in turn:

binary projection on —
(9)
The composition of these two operations is iterated on until it converges, where the values of are unchanged upon further iteration. Thereafter, we simulated finite domain wall widths by multiplying the converged distribution with a final lowpass Fourier filter, ^{3}^{3}3To minimize the finitesize effect from sampling the distribution on a numerical array, we assumed that the coarsegraining length is considerably smaller than the width represented by one array pixel. We generated domains with twice the resolution ( and without changing in eq. (8)) then truncated the Fourierspace of the converged domain pattern back to the lower resolution .. This domain pattern is then normalized to .
Different, random initial arrays result in different domain patterns , defining an ensemble of simulated patterns. Whereas we generated domains with zero net magnetization, this recipe can be easily modified to change this net magnetization.
This recipe for generating domain patterns is easily extended to create perturbed versions of any domain pattern: we replace randomly selected circular areas in a previously converged source domain pattern with random numbers, then reapply the domain generation recipe until this perturbed pattern converges. This replacement occurs before the lowpass Fourier filter is applied to the source pattern. As an example, the pattern in Fig. 1b is a converged perturbation of the pattern in Fig. 1a.
Iv Model of charge scattering.
Since it is reasonable to expect the charge distribution to be spatially uncorrelated at the resolution of the resonant scattering experiments Kortright:2001 (); Gutt:2010 (), we model it as a 2D array of random, real numbers . Each array element of represents the charge scattering amplitude averaged over a pixel.
The statistics of the spatially uncorrelated charge distributions is characterized by its mean and standard deviation,
(10) 
which we coin charge contrast. The angle brackets denote the average over each distribution. The charge contrast should be compared to the magnetic contrast,
(11) 
The diffraction intensity in eq. (3) does not distinguish between charge and magnetic scattering, so any reconstruction can only determine their sum (see eq. (2)). Since we are interested only in recovering the magnetization distribution, the intrinsic charge distribution will contribute an inextricable scattering noise, characterized only by the signaltonoise ratio . When , it becomes visually impossible to differentiate between these distributions even if their sum were correctly reconstructed (compare Fig. 2a and 2c).
In contrast, the mean charge scattering amplitude , as later sections will show, is an immaterial constant to the reconstruction of . Nevertheless, to be consistent, we fixed using experimental data from Eisebitt:2004 ().
V Diffractive imaging as constraint satisfaction.
We can interpret the diffractive imaging experiments in the language of constraintsatisfaction problems. Essentially, the goal of diffractive imaging is to recover the true magnetization distribution subject to two constraints: its measured noisy diffraction data (Fourier constraint) and the assumed statistics on its expected magnetization (directspace constraint). This section discusses how we generated and characterized these two constraints.
v.1 Fourier constraint.
The Fourier constraint requires that the diffraction intensities of the true magnetization distribution, which we wish to recover, be statistically compatible with the measured photon data, mindful that the data includes intrinsic charge scattering.
To simulate the diffraction data, we first added each pair of randomlygenerated magnetization and charge distributions, and respectively. We confined this total scattering amplitude to a circular support (Fig. 2a, for example). Its continuous intensity distribution was scaled by to give the desired average number of scattered photons, then Poisson sampled to simulate photonshotnoise. Following this, we averaged each data with its Friedelsymmetry counterpart to make it consistent with the realvalued directspace contrast. Finally, a beamstop was applied to this symmetrized data, thus removing photon counts that would be contaminated by intense, unscattered radiation in actual experiments. The size of the beamstop was adjusted such that the remaining photon counts span two orders of magnitude (example photon data in Fig. 3). Naturally, the unmeasured Fourier amplitudes at spatial frequencies within the beamstop are unconstrained in our reconstruction algorithm.
v.2 Directspace constraint.
When discussing the directspace constraints on the magnetization it is convenient to introduce the sortedvalue representation , where is the smallest magnetization among the pixels within the support, is the next smallest, etc. and is the largest magnetization value. Within the ensemble of random domain patterns produced by the same magnetic material (and identical external parameters) the plots of the functions , with ranging from to , should be nearly the same. Figure 4 compares for one simulated domain pattern with the averaged over many patterns. The structure of is mainly a function of two lengths: the width of domains and the width of domain walls; materials with very thin domain walls will have a more steplike ^{4}^{4}4In thin magnetic films (multilayers with perpendicular anisotropy), the domain wall width scales as , where is the exchange stiffness constant and is the uniaxial anisotropy constant, both of which are constants of the material being probed Hubert (). One also finds that the domain width is proportional to the film thickness, and inversely proportional to the applied field Hubert (). As a result, a variety of contrast histograms may be observed depending on the specific material properties and geometry of the system under investigation. Here we use the magnetization constraint function shown in Fig. 4 as a prototypical example. In a real experiment, this constraint could be determined by calculating the expected widths of the domains and their walls using magnetic domain theory presented for example in Hubert () but properly relaxed to include intrinsic blurring in experimental diffractive imaging..
The simplicity of the function serves as a powerful constraint for the domain reconstructions. We will use the notation for the sortedvalue magnetization constraint. In most of our simulations we will assume is known. At zero net magnetization we have the symmetry
(12) 
Appendix B briefly describes reconstructions that only use this property and boundedness of , rather than an explicit constraint function .
The knowledge of , which includes information about the size and shape of the support , constitute the directspace constraint in our reconstructions.
v.3 Noisiness of constraints.
To prepare for systematic studies of reconstruction feasibility, we classify our diffractive imaging simulations using convenient signaltonoise parameters. One such consideration is the photonshotnoise in diffraction data.
Photonshotnoise is related to the average number of scattered photons per pixel , regardless of whether it came from the charge or magnetization distribution (refer to eq. (3)). Increasing ought to improve the chances of reconstructing the total scattering distributions. However, using as a signaltonoise parameter is too optimistic since we are only interested in recovering the magnetization distribution ^{5}^{5}5The size and shape of the beamstop also affect without practical significance to reconstruction success.. Consequently, one must still isolate the magnetization distribution from the total scattering distributions, even if the latter is correctly determined (i.e. to extract the magnetization Fig. 2a from only Fig. 2c).
To appropriately characterize the noisiness of the photon data to our goal, instead of the total scattered power , we use : the average number of photons scattered due to the magnetization in each pixel within the support . In experiments, can be estimated directly from magnetic elastic scattering amplitude , photon flux and exposure time of diffraction measurement. In our simulations, is computed as
(13) 
where is the discrete Fourier transform of the magnetization distribution ; is the number of support pixels; is the same scalar in eq. (3) which we vary to give the desired total number of scattered photons; is again set to unity inconsequentially. The product corresponds to the total number of photons scattered per pulse in the absence of charge scattering.
The other noise consideration comes from charge scattering. We assume that the specimen’s random charge distribution is unknown, which results in a harder reconstruction problem. As a consequence, the model magnetizations in Fig. 4 will not agree with those in the total scattering amplitudes of eq. (2), which includes the charge distribution. Essentially, this makes our directspace constraint noisy ^{6}^{6}6One could include the expected statistics on the charge distribution in Fig. 4. This will certainly make the directspace and Fourier constraints more compatible, potentially improving the reconstruction success rate. Even having included the charge statistics it may still be fairly challenging afterwards to isolate the magnetization distribution from these reconstructions chiefly because the exact charge distribution is unknown. Smoothing operations can remove charge contrast only if it is small compared to the magnetic contrast.. Experimental measurement of the charge distribution would certainly reduce this noise and simplify the reconstruction.
Vi Reconstruction algorithm.
vi.1 Modifying the difference map.
Seeking the true magnetization distribution is equivalent to finding the intersection of the Fourier and directspace constraint sets. Such intersections, or solutions, can be discovered using an iterative constraintsatisfaction algorithm: the difference map Elser:2007 (), which uses simple projections to these two constraints (, projection to directspace constraint; , projection to Fourier constraint).
The difference map algorithm accelerates the discovery of a solution, primarily by reducing the dimension of the search space Elser:2007 (). It is also particularly efficient in extricating the iterate from near intersections (false solutions) to prevent the search from stalling. However, the difference map algorithm was optimized for noiseless constraints sets with true intersections Elser:2003 ().
Unfortunately, photon and charge scattering noise distorts our measurement of the true Fourier constraint, demoting its intersections with the directspace constraint to near intersections, from which iterates are jettisoned. This prohibits the search from reaching the true magnetization distributions encoded in these near intersections.
To increase its reconstruction success rate, the difference map was modified to improve the stability of the iterate around a near intersection. This is accomplished by an intermediate step to the iteration (where the iteration number ), which keeps the iterate close to the Fourier constraint ^{7}^{7}7We prefer the iterate to orbit near the Fourier constraint since it is a direct experimental measurement of a particular magnetization distribution, as opposed to the directspace constraint which is a broader description of the ensemble of distributions.:
(14) 
with and as the directspace and Fourier constraint projections respectively and as the map’s modification parameter. The update on the iterate is denoted , so that it may be referenced concisely in later paragraphs.
In our reconstructions we chose , which substantially improves the iterate’s stability (Fig. 5) while reducing the number of computations in the first step of the algorithm. With , eq. (14) reduces to an instance of the original difference map. Appendix A discusses how eq. (14) is similar to the RAAR algorithm in Luke:2005 ().
The modified difference map is iteratively applied to a random, initial magnetization distribution . The norm of the map’s update , which we term the error metric, measures the average change of the iterate during the search. When the error metric drastically declines, it indicates that the difference map updates have experienced a dynamic transition and the search has likely converged (Fig. 6). Because of the inherent noise in the constraints, the error metric will never vanish as it would, had an intersection of the two constraints been found in the noiseless case. When a noticeable transition in occurs and is stable, we harvest the candidate solution of the magnetization distribution, . The correctness of this candidate solution is tested when compared against other candidate solutions from different, random, initial iterates . Consistent recovery of nearly identical candidate solutions, up to an overall multiplicative sign or spatial inversion, from random restarts asserts their credibility as the true magnetization distribution. One can smooth out the fluctuations between the candidate solutions by averaging them.
In searches using the noisiest photon data, the error metric will never show a clear transition. In such cases, recovering the true magnetization distribution is plainly impossible. Nonetheless, we can still evaluate the search results, however wrong they may be. From eq. (14), notice that also measures the distance between two points on the two constraints: and . Hence the minimum during a search signals the nearest distance between the two constraints — the best alternative to discovering an intersection. Unlike more robust candidate solutions with less noisy data, these faux solutions are never repeated with random restarts.
vi.2 Projection to directspace constraint.
The projection to the directspace constraint, , comprises the following operations on :

set all values of , for outside , equal to zero;

replaced by the magnetizations shifted and scaled to have the same mean and variance as before the projection.
Step 2 allows the mean scattering amplitude and the magnetic contrast to be indirectly constrained by the diffraction data ^{8}^{8}8The mean charge scattering amplitude is noncritical to the reconstruction since it constitutes mainly the missing intensities in the data where the diffraction intensities from the sample’s magnetization is low (see Fig. 3)..
In actual experiments where the magnetization constraint function is not readily available or simulated, one could instead project to a class of parametrized magnetization functions, where the projection determines the best parameter. When even this is impossible, imposing only the key features of on may be sufficient (Appendix B).
vi.3 Projection to Fourier constraint.
Before discussing the projection to the Fourier constraint, , we describe a modification to the diffraction data which lowers the photonshotnoise using the directspace constraint. If the scattering distribution is contained within a directspace support , the Fourier transform of the diffraction intensities — or the autocorrelation of the directspace scattering distribution — should be contained within the autocorrelation support .
We can lower the noise in the diffraction data using our knowledge of the support, hence constraining the photon data to have the expected speckles. We did so by applying an autocorrelation support constraint to the Fourier transform of the photon data — setting all values outside in the data’s Fourier transform to zero. Empirically, this specklehealing operation increases the Rfactor between the processed photon data and the true intensities (see Fig. 7).
However, the missing data within the beamstop may confuse specklehealing. These central Fourier amplitudes are indirectly constrained by the diffraction data and after numerous iterations the difference map iterate proposes preliminary intensities for them. We replace the missing photon data with these preliminary intensities before applying the specklehealing operation. In our reconstructions, the photon data was healed this way every 1000 iterations, which were then used to constrain iterations until the next healing. When the reconstruction converges under this adiabatic healing process, we are assured that it is still compatible with the photon data.
With this adiabatic specklehealing procedure in effect, the projection to the Fourier constraint, , comprises the following operations on the iterate’s Fourier transform :

set the amplitudes of outside the beamstop to the square root of the specklehealed photon data, while retaining the phases of ;

the values within the beamstop are unchanged.
Vii Feasibility.
vii.1 Difference map reconstructions.
Unlike an actual experiment, the true magnetization distributions are known in our simulated experiments. This allows us to directly compare the reconstructions with the true distribution within the support via the following deviation measure:
(15)  
(16) 
The deviation is proportional to the square of the distance between and , which are the respective distributions normalized as unit vectors. Allowing for an overall sign in the reconstructed magnetization, deviations lie within the range .
In our simulations, reconstructions with were consistently recovered from random restarts. In actual experiments, only the consistency test is available to evaluate the reliability of the reconstructions. We deem such repeatable reconstructions to be successful.
We systematically studied the performance of our reconstruction algorithm when we varied the two signaltonoise parameters: relative magnetic contrast and the average number of photons scattered from the magnetic distribution . As Fig. 8 indicates, increasing and improves the accuracy of the reconstructions. However the same figure shows that the effects of suppressing either or are qualitatively different — lowering one variety of noise can not compensate for the reconstruction errors caused by the other.
Magnetization distributions shown in Fig. 9 are routinely reconstructed with low deviations given remarkably noisy data typical of Fig. 3: relative magnetic contrast and average scattered photons due to the magnetization in each pixel . The deviation of reconstructions from the true domain pattern at various noise levels is numerically computed in Fig. 8 and appears to be independent of the support size at a constant domain resolution (the reconstructions in Fig. 8B and Fig. 9b suffered comparable noise levels).
Reconstructions with the unmodified difference map, in eq. (14), do not converge within the range of noise parameters in Fig. 8: neither in the sense of achieving a dynamic transition in the error metric (Fig. 6) nor repeatability given random restarts. We witness this lesser performance even with reconstructions using the modified difference map when we omit either the sortedvalue magnetization constraint in the directspace projection or the specklehealing procedure or both.
vii.2 Comparison with Fourier transform holography.
To provide perspective, we compared our reconstructions with those from simulated Fourier transform holography (FTH) in Fig. 10. In FTH, the domain pattern is obtained directly from its crosscorrelation with an aptly machined reference pinhole Eisebitt:2004 (). This crosscorrelation is obtained from a simple Fourier transform of the measured diffraction intensities without the need for phase retrieval.
To make the comparison more compelling, we provided our FTH simulations with the following advantages over the nonholographic method:

noisy diffraction signal within the beamstop region was provided;

singlepixel reference pinhole for highest possible reconstruction resolution (pinhole diameter roughly 34 nm if magnetic domains are 170 nm wide) whereas the pinhole in Eisebitt:2004 () which had an effective Xray transmission diameter of approximately 100 nm.
In our simulated FTH reconstructions, the ratio of the number of photons scattered by the magnetic contrast in each support pixel to the number which pass through each pixel of the reference pinhole is 1:50, as estimated from Eisebitt:2004 ().
At the low signaltonoise levels of Fig. 8, the low deviation reconstructions using our proposed nonholographic diffractive imaging technique are out of the reach of our implementation of FTH (compare Figs. 8 to 10). Fig. 10 also illustrates that our FTH reconstructions worsen with increasing support size because the photon fluence through the pinhole does not increase commensurately ^{9}^{9}9One could average the crosscorrelations of the magnetic contrast with multiple references to improve the FTH reconstructions as demonstrated in reference Schlotter:2006 (). The signaltonoise ratio of these averaged FTH reconstructions is expected to increase with the square root of the number of references. In our trials, the deviation of the FTH reconstruction Fig. 10e falls to 0.15 when the number of references is increased from 1 to 16. Although this deviation is acceptably low, for the same performance it still requires roughly 150 times more photons than our nonholographic technique.. This reflects the typical situation in microscopy that higher resolution necessitates a smaller field of view. Nonholographic diffractive imaging does not suffer this size dependency since only the noise per support pixel is important. While nonholographic diffractive imaging does not need the experimental fabrication of a small reference object and can use the beam’s spatial coherence more efficiently via a tighter Xray focus, it requires accurate knowledge of the support Thibault:Thesis (). These differences between the techniques make the nonholographic phase retrieval approach demonstrated here of particular interest for situations where the signal is too noisy for successful FTH of extended magnetization distributions.
Viii Conclusions.
Ultrafast imaging of magnetic nanostructures is presumably possible within the noise limits predicted by Fig. 8. This, of course, is valid only in the absence of other varieties of noise. Our study is limited to magnetic imaging without prior measurement of the random charge distribution. We speculate that the reconstruction noise limits would improve if the specimen’s charge distribution, which may fluctuate, were available.
Certainly, imposing ensemble properties of the domain patterns in our reconstruction algorithm allows magnetic imaging with remarkably noisy data. Although our reconstructions use the sortedvalue magnetization constraint, an approximate knowledge of this constraint may be satisfactory (see Appendix B). Despite restricting our simulations to a small ensemble of domain patterns, the methods we used to reconstruct these patterns should be valid for imaging a larger ensemble of ferromagnetic contrast that differ only qualitatively from ours.
Our success with the modified difference map, eq. (14), suggest its relevance to constraintsatisfaction problems that suffer from imprecise or noisy constraints. Similarly, the specklehealing procedure in this paper is pertinent to recovering missing global information common in diffractive imaging.
Ix Acknowledgements.
This work was supported by CHESS through NSF and NIH/NIGMS via NSF award DMR0225180. We thank Yoav Kallus, for his indispensable insights with regards to the domaingeneration prescription, and Victor Lo for pointing out the similarity of our modified difference map to the RAAR algorithm Luke:2005 () (see appendix A). We also thank Jyoti Mohanty for his assistance regarding magnetic domain theory.
Appendix A Similarity of modified difference map to relaxed averaged alternating reflections algorithm.
The modified difference map in eq. (14) resembles the relaxed averaged alternating reflections algorithm (RAAR) used in iterative phase retrieval Luke:2005 (). Like the modified difference map, RAAR was designed to stabilize iterates in the domain of attraction of a solution given noisy diffraction data. To see their resemblance, we combine the last 2 lines of eq. (14) as a single operation :
(17)  
(18) 
The first step in the next iteration would be
(19)  
(20) 
which is similar in structure to the RAAR update:
(21) 
Appendix B Symmetryandboundedness constraint.
For cases when the ensemble’s sortedvalue magnetization is unavailable, it could be replaced with a less restrictive value constraint. One such replacement is the magnetization’s expected symmetry in eq. (12). This occurs in magnetic samples of zero net magnetization in the absence of external fields. In addition to this symmetry constraint, the magnetization values must bounded by given our normalization. Magnetization symmetryandboundedness together constitute a weaker directspace value constraint; it is weaker because it includes magnetization functions besides the true one.
To test its effectiveness, this weaker constraint was used to reconstruct a domain pattern instead of using its true model magnetization . This mimics the experimental scenario when one attempts reconstruction even when is not completely known beyond its symmetry and boundedness. Projecting to this constraint modifies the directspace projection of Section VI.2:
(22) 
where
(23) 
Practical reconstructions using this weaker directspace constraint (Fig. 12) require the data to have slightly better signaltonoise than reconstructions using the ensemble’s list of model magnetizations (Fig. 8). This is because the weaker constraint permits model magnetizations different from the true one and is hence a lesser guide during our search for the solution.
A weaker constraint also causes smoothing of the transition in the error metric during a successful reconstruction due to the relaxation of the reconstructed magnetizations towards the true magnetization constraint function (Fig. 11). With more photons and less charge scattering noise, the magnetizations reconstructed using the symmetryandboundedness constraint (Fig. 12a) become closer to the true magnetization function. This suggests that one could obtain accurate magnetization functions from lownoise diffractive imaging experiments to be used as constraints for noisier ultrafast imaging.
We note that the symmetryandboundedness constraint has a crucial difference from the sortedvalue magnetization constraint: the former does not explicitly reject charge scattering as a source of noise while the latter does.
References
 [1] H. Saga et al. New recording method combining thermomagnetic writing and flux detection. Japanese Journal of Applied Physics, 38:1839–1840, 1999.
 [2] S. Eisebitt et al. Lensless imaging of magnetic nanostructures by xray spectroholography. Nature, 432(7019):885–8, Dec 2004.
 [3] M. S. Pierce et al. Quasistatic xray speckle metrology of microscopic magnetic returnpoint memory. Physical Review Letters, 90(17):175502, May 2003.
 [4] C. Gutt et al. Singlepulse resonant magnetic scattering using a soft xray freeelectron laser. Physical Review B, 81(10):100401, Mar 2010.
 [5] S. Eisebitt et al. Polarization effects in coherent scattering from magnetic specimen: Implications for xray holography, lensless imaging, and correlation spectroscopy. Physical Review B, 68:104419, Jan 2003.
 [6] M. S. Pierce, C. Buechler, L. Sorensen, and S. Kevan. Disorderinduced magnetic memory: Experiments and theories. Physical Review B, 75:144406, Jan 2007.
 [7] V. Elser and S. Eisebitt. Uniqueness transition in noisy phase retrieval. New Journal of Physics, 2010. Submitted.
 [8] J. P. Hannon, G. T. Trammell, M. Blume, and D. Gibbs. Xray resonance exchange scattering. Physical Review Letters, 61(10):1245, Sep 1988.
 [9] J. B. Kortright et al. Softxray smallangle scattering as a sensitive probe of magnetic and charge heterogenity. Physical Review B, 64:092401, Jan 2001.
 [10] V. Elser, I. Rankenburg, and P. Thibault. Searching with iterated maps. Proceedings of the National Academy of Sciences, 104(2):418–423, Jan 2007.
 [11] V. Elser. Phase retrieval by iterated projections. Journal of the Optical Society of America A, 20(1):40–55, 2003.
 [12] D. R. Luke. Relaxed averaged alternating reflections for diffraction imaging. Inverse problems, 21(1):37–50, 2005.
 [13] P. Thibault. Algorithmic methods in diffraction microscopy. PhD thesis, Cornell University, 2007.
 [14] H. Dürr et al. Elementspecific magnetic anisotropy determined by transverse magnetic circular xray dichroism. Science, 277:213–215, Jan 1997.
 [15] A. Hubert and R. Schäfer. Magnetic Domains: The analysis of magnetic microstructures. SpringerVerlag, Berlin Heidelberg, 1998.
 [16] W. Schlotter et al. Multiple reference fourier transform holography with soft xrays. Applied Physics, 89(163112):1–3, Jan 2006.