Reconstruction od the WaveFront ================================= * **Running the Test** **The Wavefront generator need a GPU machine** the generation of a simulated wavefront is done with the **wfc** script. You can test it going in the *TEST* directory. * The launch in OAR is done simply :: cd yourdirectoryforwf/TEST WFR your_input.txt * The launch on a private PC is not more difficult, just specify the card number you want to use :: cd yourdirectoryforwf/TEST WFR your_input.txt my_pc_name,GPU_N0 where GPU_N0 may be 0 or 1 or something else, it depends on your PC. **ATTENTION** : before runnign the example given in TEST you must create the simulated file to fit. To do this you must : * first run the input_fzp.txt example with the wavefront simulator * Then you must prepare a *numpyarray.npy* data file doing this you can do some sort of pretreatement. The way I do it is using a PyMca_ widget, using ipython. You better be on a recent installation. At ESRF try logging on the **rnice6** cluster. There the tools are quite up-to-date. Dont set any environment variable, it' already OK. Now we pretreat the simulated data like this :: >ipython --q4thread now you are in the ipython environment :: from PyMca import MaskImageWidget w=MaskImageWidget.MaskImageWidget() import h5py f=h5py.File("detector_image.h5") data=f['map_squareamplitude'][:] w.setImageData(data) w.show() you have now a beautiful widget from PyMca * select with the mouse a mask over the ROI When you have selected the ROI :: w=MaskImageWidget.MaskImageWidget() w.setImageData(data) w.show() mask = w.getSelectionMask() datamasked=data*mask datamasked.dump("datasim.npy") Your data are now in *datasim.npy*, ready for the wavefront reconstruction * READY TO LAUNCH THE RECONSTRUCTION :: WFR inputwfr_sim.txt * **Inspecting the Output** The simulation code creates several files Documentation : TODO **WARNING** The docstrings in *.py* are not ready yet. I just include some autodoc. At least one can navigate the code * The parameters are dealt by *ParametersR_module.py* : *the following documentation has been generated automatically from the docstrings found in the source code.* .. automodule:: ParametersR_module :members: Parameters :noindex: * The calculation is done by *wfr.py* module : *the following documentation has been generated automatically from the docstrings found in the source code.* .. automodule:: wfr :members: :noindex: .. _PyMCA: http://pymca.sourceforge.net/