Generation of Simulated WaveFrontΒΆ

  • Running the Test

    The Wavefront simulator does not need GPU. you can run it on a normal machine the generation of a simulated wavefront is done with the wfc script. You can test it going in the TEST directory

      cd yourdirectoryforwf/TEST
      wfc  input_fzp_small.txt
    
    Dont forget that if your script is not in the PATH you have to prepend it with its location. If you are on a workstation with a lot of memory
    dont esitate to run the big test. It will be needed in any case as test case for the reconstruction routine ::
    
     wfc  input_fzp.txt
  • Inspecting the Output

    The simulation code creates two files

    detector_image.h5
    focal_region.h5
    

    you can easily inspect them with PyMCA and check amplitude, squared amplitude, and phase. The focal region is a stack of images that you can travel through using the arrow properly prompted by PyMca.

the following documentation has been generated automatically from the docstrings found in the source code.
class wfc.Parameters[source]

The input variables are read from the input file. The input file is written with python syntax.

The input file has to set the following variables, examples in yellow

  • E

    E=8.0
    # units are KeV
    
  • diam

    diam=200*10**(-6)
    # units are meters
    
  • delta_min : the size of the smallest FZP feature

    delta_min=70*10**(-9)
    

All distance units are meters

  • OSA : pinhole diameter

    OSA=50*10**(-6)  
    
  • CS : diameter of central stop

    CS=65*10**(-6)  
    
  • phase : a non essential phase

    phase = 0.0
    
  • off_set : slit offset horizontally. A typical choice is (CS/2+slit_h/2).

    off_set= 50.0*10**(-6)

  • slit_h : horizonal slit aperture

    slit_h=20e-6                
    
  • slit_v : vertical slit aperture

    slit_v=20e-6                
    
  • slit_far : slit-FZP distance

    slit_far= 0.2               
    
  • z_fd : focus-detector distance

    z_fd= 4.0

  • N : the number of sampling point for each dimension. Must be mor or less adapted to the fzp finest feature

    N=10000
    
  • FILE_FOR_FOCAL_DEPTH_PROFILING , on this file the program will output a 3D profile of the focal region. if set to None it will not be calculated

    FILE_FOR_FOCAL_DEPTH_PROFILING = "focal_region"
    
  • range_x_focal_dep and range_z_focal_dep, Nz_focal_dep : in case the above file name is not None, they give the sizes of the 3D box where the focal intensity is calculated, and the number of slices taken along the longitudinal axis

    range_x_focal_dep=6.2e-6
    range_z_focal_dep=.5*10**(-2)
    Nz_focal_dep = 200
    
  • FILE_FOR_DETECTOR : the field at the detector will be written on this file

    FILE_FOR_DETECTOR   ="detector_image"
    
  • detector_pixel_size : the variable name speaks on its own. This determines also the width of the calculated wavefront

    detector_pixel_size=5.0e-6

static Parameters.get_derived_pars()[source]

Derived Parameters Besides the parameters set by input, there are other very important Parameters which are deduced from the input ones

  • lambd=12.398/E
  • k=2*math.pi/lambd
  • focus=(diam*delta_min/lambd
  • OSA_position = focus*5.0/6.0
  • step=diam/N
  • range_x_focus2dect = (12.398/E)*10**(-10)*z_fd/(detector_pixel_size

Previous topic

Donwloading and Compilation of Sources

Next topic

Reconstruction od the WaveFront

This Page