p.model.illumination.phase_noise_mfs = 2.0  # (40) phase noise minimum feature size on incoming wave before aperture
p.model.illumination.aperture_type = "circ"  # (41) type of aperture: use
p.model.illumination.aperture_size = 1.0e-3  # (42) aperture diameter (meter)
p.model.illumination.aperture_edge = 2  # (43) edge width of aperture (pixel)
p.model.illumination.focal_dist = 0.08  # (44) distance from aperture to focus (meter)
p.model.illumination.prop_dist = 10e-3  # (45) focus: propagation distance (meter) from focus. parallel: propagation distance (meter) from aperture
p.model.illumination.UseConjugate = False  # (46) use the conjugate of the probe instef of the probe
p.model.illumination.antialiasing = 2.0  # (47) antialiasing factor used when generating the probe
p.model.illumination.spot_size = None  # (48) focal spot diameter (meter)
p.model.illumination.photons = 1e7  # (49) number of photons in illumination
p.model.illumination.probe = None  # (50) override if not None

p.model.sample = u.Param()
p.model.sample.source = HSV_to_P1A(
    RGB_to_HSV(
        u.imload('../resources/ptypy_logo_1M.png')
        [:, :, :-1]))  # (52) 'diffraction', None, path to a file or nd-array
p.model.sample.offset = (
    0, 0)  # (53) offset between center of object array and scan pattern
p.model.sample.zoom = 0.5  # (54) None, scalar or 2-tupel
p.model.sample.formula = None  # (55) chemical formula (string)
p.model.sample.density = 19.3  # (56) density in [g/ccm]
p.model.sample.thickness = 2000e-9  # (57) max thickness of sample
p.model.sample.ref_index = None  #0.5+0.3j                   # (58) assigned refractive index
p.model.sample.smoothing_mfs = 2.0  # (59) smooth the projection with gaussian kernel of with x pixels
p.model.sample.noise_rms = None  # (60) noise applied, relative to 2*pi in phase and relative to 1 in amplitude
p.model.sample.noise_mfs = 10  # (61) see noise rms.
p.model.sample.fill = 1.0 + 0.j  # (62) if object is smaller than the objectframe, fill with fill
p.model.sample.obj = None  # (63) override

p.model.coherence = u.Param()
p.model.coherence.Nprobe_modes = 1  # (65)
p.model.illumination.incoming = None              # (38) `None`, path to a file or any python evaluable statement yielding a 2d numpy array. If `None` defaults to array of ones
p.model.illumination.phase_noise_rms = None        # (39) phase noise amplitude on incoming wave before aperture 
p.model.illumination.phase_noise_mfs = 2.0        # (40) phase noise minimum feature size on incoming wave before aperture 
p.model.illumination.aperture_type = "circ"       # (41) type of aperture: use 
p.model.illumination.aperture_size = 1.0e-3       # (42) aperture diameter (meter)
p.model.illumination.aperture_edge = 2            # (43) edge width of aperture (pixel)
p.model.illumination.focal_dist = 0.08            # (44) distance from aperture to focus (meter)
p.model.illumination.prop_dist = 10e-3           # (45) focus: propagation distance (meter) from focus. parallel: propagation distance (meter) from aperture 
p.model.illumination.UseConjugate = False         # (46) use the conjugate of the probe instef of the probe
p.model.illumination.antialiasing = 2.0           # (47) antialiasing factor used when generating the probe
p.model.illumination.spot_size = None             # (48) focal spot diameter (meter)
p.model.illumination.photons = 1e7                # (49) number of photons in illumination
p.model.illumination.probe = None                 # (50) override if not None

p.model.sample = u.Param()
p.model.sample.source = HSV_to_P1A(RGB_to_HSV(u.imload('../resources/ptypy_logo_1M.png')[:,:,:-1]))# (52) 'diffraction', None, path to a file or nd-array 
p.model.sample.offset = (0,0)                     # (53) offset between center of object array and scan pattern
p.model.sample.zoom = 0.5                         # (54) None, scalar or 2-tupel
p.model.sample.formula = None                     # (55) chemical formula (string)
p.model.sample.density = 19.3                     # (56) density in [g/ccm]
p.model.sample.thickness = 2000e-9                 # (57) max thickness of sample
p.model.sample.ref_index = None#0.5+0.3j                   # (58) assigned refractive index
p.model.sample.smoothing_mfs = 2.0                  # (59) smooth the projection with gaussian kernel of with x pixels
p.model.sample.noise_rms = None                   # (60) noise applied, relative to 2*pi in phase and relative to 1 in amplitude
p.model.sample.noise_mfs = 10                     # (61) see noise rms.
p.model.sample.fill = 1.0+0.j                     # (62) if object is smaller than the objectframe, fill with fill
p.model.sample.obj = None                         # (63) override

p.model.coherence = u.Param()
p.model.coherence.Nprobe_modes = 1                # (65) 
p.model.coherence.Nobject_modes = 1               # (66) 
p.model.illumination.incoming = None              # (38) `None`, path to a file or any python evaluable statement yielding a 2d numpy array. If `None` defaults to array of ones
p.model.illumination.phase_noise_rms = None        # (39) phase noise amplitude on incoming wave before aperture 
p.model.illumination.phase_noise_mfs = 2.0        # (40) phase noise minimum feature size on incoming wave before aperture 
p.model.illumination.aperture_type = "circ"       # (41) type of aperture: use 
p.model.illumination.aperture_size = 2.5e-6        # (42) aperture diameter (meter)
p.model.illumination.aperture_edge = 1            # (43) edge width of aperture (pixel)
p.model.illumination.focal_dist = 0.08            # (44) distance from aperture to focus (meter)
p.model.illumination.prop_dist = 4e-3           # (45) focus: propagation distance (meter) from focus. parallel: propagation distance (meter) from aperture 
p.model.illumination.UseConjugate = False         # (46) use the conjugate of the probe instef of the probe
p.model.illumination.antialiasing = 2.0           # (47) antialiasing factor used when generating the probe
p.model.illumination.spot_size = None             # (48) focal spot diameter (meter)
p.model.illumination.photons = 1e7                # (49) number of photons in illumination
p.model.illumination.probe = None                 # (50) override if not None

p.model.sample = u.Param()
p.model.sample.source = 255-u.imload('../resources/tree.bmp').astype(float).mean(-1)# (52) 'diffraction', None, path to a file or nd-array 
p.model.sample.offset = (100,400)                     # (53) offset between center of object array and scan pattern
p.model.sample.zoom = 1.0                         # (54) None, scalar or 2-tupel
p.model.sample.formula = "Ca"                     # (55) chemical formula (string)
p.model.sample.density = 1.5                      # (56) density in [g/ccm]
p.model.sample.thickness = 20e-6                  # (57) max thickness of sample
p.model.sample.ref_index = None                   # (58) assigned refractive index
p.model.sample.smoothing_mfs = None               # (59) smooth the projection with gaussian kernel of with x pixels
p.model.sample.noise_rms = None                   # (60) noise applied, relative to 2*pi in phase and relative to 1 in amplitude
p.model.sample.noise_mfs = 10                     # (61) see noise rms.
p.model.sample.fill = 1.0+0.j                     # (62) if object is smaller than the objectframe, fill with fill
p.model.sample.obj = None                         # (63) override

p.model.coherence = u.Param()
p.model.coherence.Nprobe_modes = 1                # (65) 
p.model.coherence.Nobject_modes = 1               # (66) 
Exemple #4
0
p.model.illumination.incoming = None  # (38) `None`, path to a file or any python evaluable statement yielding a 2d numpy array. If `None` defaults to array of ones
p.model.illumination.phase_noise_rms = None  # (39) phase noise amplitude on incoming wave before aperture
p.model.illumination.phase_noise_mfs = 2.0  # (40) phase noise minimum feature size on incoming wave before aperture
p.model.illumination.aperture_type = "circ"  # (41) type of aperture: use
p.model.illumination.aperture_size = 2.5e-6  # (42) aperture diameter (meter)
p.model.illumination.aperture_edge = 1  # (43) edge width of aperture (pixel)
p.model.illumination.focal_dist = 0.08  # (44) distance from aperture to focus (meter)
p.model.illumination.prop_dist = 4e-3  # (45) focus: propagation distance (meter) from focus. parallel: propagation distance (meter) from aperture
p.model.illumination.UseConjugate = False  # (46) use the conjugate of the probe instef of the probe
p.model.illumination.antialiasing = 2.0  # (47) antialiasing factor used when generating the probe
p.model.illumination.spot_size = None  # (48) focal spot diameter (meter)
p.model.illumination.photons = 1e7  # (49) number of photons in illumination
p.model.illumination.probe = None  # (50) override if not None

p.model.sample = u.Param()
p.model.sample.source = 255 - u.imload('../resources/tree.bmp').astype(
    float).mean(-1)  # (52) 'diffraction', None, path to a file or nd-array
p.model.sample.offset = (
    100, 400)  # (53) offset between center of object array and scan pattern
p.model.sample.zoom = 1.0  # (54) None, scalar or 2-tupel
p.model.sample.formula = "Ca"  # (55) chemical formula (string)
p.model.sample.density = 1.5  # (56) density in [g/ccm]
p.model.sample.thickness = 20e-6  # (57) max thickness of sample
p.model.sample.ref_index = None  # (58) assigned refractive index
p.model.sample.smoothing_mfs = None  # (59) smooth the projection with gaussian kernel of with x pixels
p.model.sample.noise_rms = None  # (60) noise applied, relative to 2*pi in phase and relative to 1 in amplitude
p.model.sample.noise_mfs = 10  # (61) see noise rms.
p.model.sample.fill = 1.0 + 0.j  # (62) if object is smaller than the objectframe, fill with fill
p.model.sample.obj = None  # (63) override

p.model.coherence = u.Param()
p.model.coherence.Nprobe_modes = 1  # (65)