Parameter tree structure¶
Note
This section needs to be reworked to account for the recursive nature for PtyPy’s parameter tree. Please use the examples in the templates folder to craft your own scripts.
io¶
- io(Param)¶
default =
Param({})
io.interaction¶
- io.interaction(Param)¶
default =
Param({})
- io.interaction.server(Param)¶
default =
Param({})
- io.interaction.server.active(bool)¶
Activation switch
Set to
False
for no ZeroMQ interaction serverdefault =
True
- io.interaction.server.address(str)¶
The address the server is listening to.
Wenn running ptypy on a remote server, it is the servers network address.
default =
'tcp://127.0.0.1'
- io.interaction.server.port(int)¶
The port the server is listening to.
Make sure to pick an unused port with a few unused ports close to it.
default =
5560
- io.interaction.server.connections(int)¶
Number of concurrent connections on the server
A range
[port : port+connections]
of ports adjacentport
will be opened on demand for connecting clients.default =
10
- io.interaction.server.poll_timeout(float)¶
Network polling interval
Network polling interval, in milliseconds.
default =
10.0
- io.interaction.server.pinginterval(float)¶
Interval to check pings
Interval with which to check pings, in seconds.
default =
2
- io.interaction.server.pingtimeout(float)¶
Ping time out
Ping time out: client disconnected after this period, in seconds.
default =
10
- io.interaction.client(Param)¶
default =
Param({})
- io.interaction.client.address(str)¶
The address the server is listening to.
Wenn running ptypy on a remote server, it is the servers network address.
default =
'tcp://127.0.0.1'
- io.interaction.client.port(int)¶
The port the server is listening to.
Make sure to pick an unused port with a few unused ports close to it.
default =
5560
- io.interaction.client.poll_timeout(float)¶
Network polling interval
Network polling interval, in milliseconds.
default =
100.0
- io.interaction.client.pinginterval(float)¶
Interval to check pings
Interval with which to check pings, in seconds.
default =
1
- io.interaction.client.connection_timeout(float)¶
Timeout for dead server
Timeout for dead server, in milliseconds.
default =
3600000.0
scandata¶
- scandata(Param)¶
default =
Param({})
scandata.PtyScan¶
- scandata.PtyScan(Param)¶
default =
Param({})
- scandata.PtyScan.name(str)¶
default =
'PtyScan'
- scandata.PtyScan.dfile(str)¶
File path where prepared data will be saved in the
ptyd
format.default =
None
- scandata.PtyScan.chunk_format(str)¶
Appendix to saved files if save == ‘link’
default =
'.chunk%02d'
- scandata.PtyScan.save(str)¶
Saving mode
Mode to use to save data to file.
None
: No saving'merge'
: attemts to merge data in single chunk [not implemented]'append'
: appends each chunk in master *.ptyd file'link'
: appends external links in master *.ptyd file and stores chunks separately
in the path given by the link. Links file paths are relative to master file.
default =
None
- scandata.PtyScan.auto_center(bool)¶
Determine if center in data is calculated automatically
False
, no automatic centeringNone
, only ifcenter
isNone
True
, it will be enforced
default =
None
- scandata.PtyScan.load_parallel(str)¶
Determines what will be loaded in parallel
Choose from
None
,'data'
,'common'
,'all'
default =
'data'
- scandata.PtyScan.rebin(int)¶
Rebinning factor
Rebinning factor for the raw data frames.
'None'
or1
both mean no binningdefault =
None (>1, <32)
- scandata.PtyScan.orientation(int, tuple, list)¶
Data frame orientation
Choose
None
or0
: correct orientation1
: invert columns (numpy.flip_lr)2
: invert rows (numpy.flip_ud)3
: invert columns, invert rows4
: transpose (numpy.transpose)4+i
: tranpose + other operations from above
Alternatively, a 3-tuple of booleans may be provided
(do_transpose, do_flipud, do_fliplr)
default =
None
- scandata.PtyScan.min_frames(int)¶
Minimum number of frames loaded by each node
default =
1 (>1)
- scandata.PtyScan.positions_theory(ndarray)¶
Theoretical positions for this scan
If provided, experimental positions from
PtyScan
subclass will be ignored. If data preparation is called from Ptycho instance, the calculated positions from theptypy.core.xy.from_pars()
dict will be inserted heredefault =
None
- scandata.PtyScan.num_frames(int)¶
Maximum number of frames to be prepared
If positions_theory are provided, num_frames will be ovverriden with the number of positions available
default =
None
- scandata.PtyScan.label(str)¶
The scan label
Unique string identifying the scan
default =
None
- scandata.PtyScan.experimentID(str)¶
Name of the experiment
If None, a default value will be provided by the recipe. unused
default =
None
- scandata.PtyScan.version(float)¶
TODO: Explain this and decide if it is a user parameter.
default =
0.1
- scandata.PtyScan.shape(int, tuple)¶
Shape of the region of interest cropped from the raw data.
Cropping dimension of the diffraction frame Can be None, (dimx, dimy), or dim. In the latter case shape will be (dim, dim).
default =
256
- scandata.PtyScan.center(list, tuple, str)¶
Center (pixel) of the optical axes in raw data
If
None
, this parameter will be set byauto_center
or elsewheredefault =
'fftshift'
- scandata.PtyScan.psize(float, tuple)¶
Detector pixel size
Dimensions of the detector pixels (in meters)
default =
0.000172 (>0.0)
- scandata.PtyScan.distance(float)¶
Sample to detector distance
In meters.
default =
7.19 (>0.0)
- scandata.PtyScan.energy(float)¶
Photon energy of the incident radiation in keV
default =
7.2 (>0.0)
- scandata.PtyScan.add_poisson_noise(bool)¶
Decides whether the scan should have poisson noise or not
default =
False
scandata.PtydScan¶
- scandata.PtydScan(Param)¶
default =
Param({})
- scandata.PtydScan.name(str)¶
default =
'PtydScan'
- scandata.PtydScan.dfile(str)¶
Prepared data file path
If source is
None
or'file'
, data will be loaded from this file and processing as well as saving is deactivated. If source is the path to a file, data will be saved to this file.default =
None
- scandata.PtydScan.chunk_format(str)¶
Appendix to saved files if save == ‘link’
default =
'.chunk%02d'
- scandata.PtydScan.save(str)¶
Saving mode
Mode to use to save data to file.
None
: No saving'merge'
: attemts to merge data in single chunk [not implemented]'append'
: appends each chunk in master *.ptyd file'link'
: appends external links in master *.ptyd file and stores chunks separately
in the path given by the link. Links file paths are relative to master file.
default =
None
- scandata.PtydScan.auto_center(bool)¶
Determine if center in data is calculated automatically
False
, no automatic centeringNone
, only ifcenter
isNone
True
, it will be enforced
default =
None
- scandata.PtydScan.load_parallel(str)¶
Determines what will be loaded in parallel
Choose from
None
,'data'
,'common'
,'all'
default =
'data'
- scandata.PtydScan.rebin(int)¶
Rebinning factor
Rebinning factor for the raw data frames.
'None'
or1
both mean no binningdefault =
None (>1, <32)
- scandata.PtydScan.orientation(int, tuple, list)¶
Data frame orientation
Choose
None
or0
: correct orientation1
: invert columns (numpy.flip_lr)2
: invert rows (numpy.flip_ud)3
: invert columns, invert rows4
: transpose (numpy.transpose)4+i
: tranpose + other operations from above
Alternatively, a 3-tuple of booleans may be provided
(do_transpose, do_flipud, do_fliplr)
default =
None
- scandata.PtydScan.min_frames(int)¶
Minimum number of frames loaded by each node
default =
1 (>1)
- scandata.PtydScan.positions_theory(ndarray)¶
Theoretical positions for this scan
If provided, experimental positions from
PtyScan
subclass will be ignored. If data preparation is called from Ptycho instance, the calculated positions from theptypy.core.xy.from_pars()
dict will be inserted heredefault =
None
- scandata.PtydScan.num_frames(int)¶
Maximum number of frames to be prepared
If positions_theory are provided, num_frames will be ovverriden with the number of positions available
default =
None
- scandata.PtydScan.label(str)¶
The scan label
Unique string identifying the scan
default =
None
- scandata.PtydScan.experimentID(str)¶
Name of the experiment
If None, a default value will be provided by the recipe. unused
default =
None
- scandata.PtydScan.version(float)¶
TODO: Explain this and decide if it is a user parameter.
default =
0.1
- scandata.PtydScan.shape(int, tuple)¶
Shape of the region of interest cropped from the raw data.
Cropping dimension of the diffraction frame Can be None, (dimx, dimy), or dim. In the latter case shape will be (dim, dim).
default =
256
- scandata.PtydScan.center(list, tuple, str)¶
Center (pixel) of the optical axes in raw data
If
None
, this parameter will be set byauto_center
or elsewheredefault =
'fftshift'
- scandata.PtydScan.psize(float, tuple)¶
Detector pixel size
Dimensions of the detector pixels (in meters)
default =
0.000172 (>0.0)
- scandata.PtydScan.distance(float)¶
Sample to detector distance
In meters.
default =
7.19 (>0.0)
- scandata.PtydScan.energy(float)¶
Photon energy of the incident radiation in keV
default =
7.2 (>0.0)
- scandata.PtydScan.add_poisson_noise(bool)¶
Decides whether the scan should have poisson noise or not
default =
False
- scandata.PtydScan.source(str, NoneType)¶
Alternate source file path if data is meant to be reprocessed.
None for input shall be deprecated in future
default =
'file'
scandata.MoonFlowerScan¶
- scandata.MoonFlowerScan(Param)¶
default =
Param({})
- scandata.MoonFlowerScan.name(str)¶
default =
'MoonFlowerScan'
- scandata.MoonFlowerScan.dfile(str)¶
File path where prepared data will be saved in the
ptyd
format.default =
None
- scandata.MoonFlowerScan.chunk_format(str)¶
Appendix to saved files if save == ‘link’
default =
'.chunk%02d'
- scandata.MoonFlowerScan.save(str)¶
Saving mode
Mode to use to save data to file.
None
: No saving'merge'
: attemts to merge data in single chunk [not implemented]'append'
: appends each chunk in master *.ptyd file'link'
: appends external links in master *.ptyd file and stores chunks separately
in the path given by the link. Links file paths are relative to master file.
default =
None
- scandata.MoonFlowerScan.auto_center(bool)¶
Determine if center in data is calculated automatically
False
, no automatic centeringNone
, only ifcenter
isNone
True
, it will be enforced
default =
None
- scandata.MoonFlowerScan.load_parallel(str)¶
Determines what will be loaded in parallel
Choose from
None
,'data'
,'common'
,'all'
default =
'data'
- scandata.MoonFlowerScan.rebin(int)¶
Rebinning factor
Rebinning factor for the raw data frames.
'None'
or1
both mean no binningdefault =
None (>1, <32)
- scandata.MoonFlowerScan.orientation(int, tuple, list)¶
Data frame orientation
Choose
None
or0
: correct orientation1
: invert columns (numpy.flip_lr)2
: invert rows (numpy.flip_ud)3
: invert columns, invert rows4
: transpose (numpy.transpose)4+i
: tranpose + other operations from above
Alternatively, a 3-tuple of booleans may be provided
(do_transpose, do_flipud, do_fliplr)
default =
None
- scandata.MoonFlowerScan.min_frames(int)¶
Minimum number of frames loaded by each node
default =
1 (>1)
- scandata.MoonFlowerScan.positions_theory(ndarray)¶
Theoretical positions for this scan
If provided, experimental positions from
PtyScan
subclass will be ignored. If data preparation is called from Ptycho instance, the calculated positions from theptypy.core.xy.from_pars()
dict will be inserted heredefault =
None
- scandata.MoonFlowerScan.num_frames(int)¶
Number of frames to simulate
default =
100
- scandata.MoonFlowerScan.label(str)¶
The scan label
Unique string identifying the scan
default =
None
- scandata.MoonFlowerScan.experimentID(str)¶
Name of the experiment
If None, a default value will be provided by the recipe. unused
default =
None
- scandata.MoonFlowerScan.version(float)¶
TODO: Explain this and decide if it is a user parameter.
default =
0.1
- scandata.MoonFlowerScan.shape(int, tuple)¶
Shape of the region of interest cropped from the raw data.
Cropping dimension of the diffraction frame Can be None, (dimx, dimy), or dim. In the latter case shape will be (dim, dim).
default =
128
- scandata.MoonFlowerScan.center(list, tuple, str)¶
Center (pixel) of the optical axes in raw data
If
None
, this parameter will be set byauto_center
or elsewheredefault =
'fftshift'
- scandata.MoonFlowerScan.psize(float, tuple)¶
Detector pixel size
Dimensions of the detector pixels (in meters)
default =
0.000172 (>0.0)
- scandata.MoonFlowerScan.distance(float)¶
Sample to detector distance
In meters.
default =
7.19 (>0.0)
- scandata.MoonFlowerScan.energy(float)¶
Photon energy of the incident radiation in keV
default =
7.2 (>0.0)
- scandata.MoonFlowerScan.add_poisson_noise(bool)¶
Decides whether the scan should have poisson noise or not
default =
True
- scandata.MoonFlowerScan.density(float)¶
Position distance in fraction of illumination frame
default =
0.2
- scandata.MoonFlowerScan.model(str)¶
The scan pattern
default =
'round'
- scandata.MoonFlowerScan.photons(float)¶
Total number of photons for Poisson noise
default =
100000000.0
- scandata.MoonFlowerScan.psf(float)¶
Point spread function of the detector
default =
0.0
- scandata.MoonFlowerScan.block_wait_count(int)¶
Signals a WAIT to the model after this many blocks.
default =
0
scandata.QuickScan¶
- scandata.QuickScan(Param)¶
default =
Param({})
- scandata.QuickScan.name(str)¶
default =
'MoonFlowerScan'
- scandata.QuickScan.dfile(str)¶
File path where prepared data will be saved in the
ptyd
format.default =
None
- scandata.QuickScan.chunk_format(str)¶
Appendix to saved files if save == ‘link’
default =
'.chunk%02d'
- scandata.QuickScan.save(str)¶
Saving mode
Mode to use to save data to file.
None
: No saving'merge'
: attemts to merge data in single chunk [not implemented]'append'
: appends each chunk in master *.ptyd file'link'
: appends external links in master *.ptyd file and stores chunks separately
in the path given by the link. Links file paths are relative to master file.
default =
None
- scandata.QuickScan.auto_center(bool)¶
Determine if center in data is calculated automatically
False
, no automatic centeringNone
, only ifcenter
isNone
True
, it will be enforced
default =
None
- scandata.QuickScan.load_parallel(str)¶
Determines what will be loaded in parallel
Choose from
None
,'data'
,'common'
,'all'
default =
'data'
- scandata.QuickScan.rebin(int)¶
Rebinning factor
Rebinning factor for the raw data frames.
'None'
or1
both mean no binningdefault =
None (>1, <32)
- scandata.QuickScan.orientation(int, tuple, list)¶
Data frame orientation
Choose
None
or0
: correct orientation1
: invert columns (numpy.flip_lr)2
: invert rows (numpy.flip_ud)3
: invert columns, invert rows4
: transpose (numpy.transpose)4+i
: tranpose + other operations from above
Alternatively, a 3-tuple of booleans may be provided
(do_transpose, do_flipud, do_fliplr)
default =
None
- scandata.QuickScan.min_frames(int)¶
Minimum number of frames loaded by each node
default =
1 (>1)
- scandata.QuickScan.positions_theory(ndarray)¶
Theoretical positions for this scan
If provided, experimental positions from
PtyScan
subclass will be ignored. If data preparation is called from Ptycho instance, the calculated positions from theptypy.core.xy.from_pars()
dict will be inserted heredefault =
None
- scandata.QuickScan.num_frames(int)¶
Number of frames to simulate
default =
100
- scandata.QuickScan.label(str)¶
The scan label
Unique string identifying the scan
default =
None
- scandata.QuickScan.experimentID(str)¶
Name of the experiment
If None, a default value will be provided by the recipe. unused
default =
None
- scandata.QuickScan.version(float)¶
TODO: Explain this and decide if it is a user parameter.
default =
0.1
- scandata.QuickScan.shape(int, tuple)¶
Shape of the region of interest cropped from the raw data.
Cropping dimension of the diffraction frame Can be None, (dimx, dimy), or dim. In the latter case shape will be (dim, dim).
default =
64
- scandata.QuickScan.center(list, tuple, str)¶
Center (pixel) of the optical axes in raw data
If
None
, this parameter will be set byauto_center
or elsewheredefault =
'fftshift'
- scandata.QuickScan.psize(float, tuple)¶
Detector pixel size
Dimensions of the detector pixels (in meters)
default =
0.000172 (>0.0)
- scandata.QuickScan.distance(float)¶
Sample to detector distance
In meters.
default =
7.19 (>0.0)
- scandata.QuickScan.energy(float)¶
Photon energy of the incident radiation in keV
default =
7.2 (>0.0)
- scandata.QuickScan.add_poisson_noise(bool)¶
Decides whether the scan should have poisson noise or not
default =
False
- scandata.QuickScan.density(float)¶
Position distance in fraction of illumination frame
default =
0.05
scandata.SimScan¶
- scandata.SimScan(Param)¶
default =
Param({})
- scandata.SimScan.illumination(Param, str)¶
Illumination parameters
default =
Param({})
- scandata.SimScan.illumination.aperture(Param)¶
Beam aperture parameters
default =
Param({})
- scandata.SimScan.illumination.aperture.rotate(float)¶
Rotate aperture by this value
default =
0.0
- scandata.SimScan.illumination.aperture.central_stop(float)¶
size of central stop as a fraction of aperture.size
If not None: places a central beam stop in aperture. The value given here is the fraction of the beam stop compared to size
default =
None (>0.0, <1.0)
- scandata.SimScan.illumination.aperture.diffuser(tuple)¶
Noise in the transparen part of the aperture
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
None
- scandata.SimScan.illumination.aperture.edge(float)¶
Edge width of aperture (in pixels!)
default =
2.0
- scandata.SimScan.illumination.aperture.form(NoneType, str)¶
One of None, ‘rect’ or ‘circ’
One of: -
None
: no aperture, this may be useful for nearfield -'rect'
: rectangular aperture -'circ'
: circular aperturedefault =
'circ'
- scandata.SimScan.illumination.aperture.offset(float, tuple, list)¶
Offset between center of aperture and optical axes
May also be a tuple (vertical,horizontal) for size in case of an asymmetric offset
default =
0.0
- scandata.SimScan.illumination.aperture.size(float, tuple, list)¶
Aperture width or diameter
May also be a tuple (vertical,horizontal) in case of an asymmetric aperture
default =
None (>0.0)
- scandata.SimScan.illumination.diversity(Param, NoneType)¶
Probe mode(s) diversity parameters
Can be
None
i.e. no diversitydefault =
Param({})
- scandata.SimScan.illumination.diversity.noise(tuple, list)¶
Noise in each non-primary mode of the illumination.
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
(0.5, 1.0)
- scandata.SimScan.illumination.diversity.power(tuple, float, list)¶
Power of modes relative to main mode (zero-layer)
default =
0.1 (>0.0, <1.0)
- scandata.SimScan.illumination.diversity.shift(float)¶
Lateral shift of modes relative to main mode
[not implemented]
default =
None
- scandata.SimScan.illumination.model(str, ndarray)¶
Type of illumination model
One of: -
None
: model initialitziation defaults to flat array filled with the specified number of photons -'recon'
: load model from previous reconstruction, see recon Parameters -'stxm'
: Estimate model from autocorrelation of mean diffraction data - <resource> : one of ptypys internal image resource strings - <template> : one of the templates inillumination moduleIn script, you may pass a numpy.ndarray here directly as the model. It is considered as incoming wavefront and will be propagated according to propagation with an optional aperture applied before.
default =
None
- scandata.SimScan.illumination.photons(int, float, NoneType)¶
Number of photons in the incident illumination
A value specified here will take precedence over calculated statistics from the loaded data.
default =
None (>0)
- scandata.SimScan.illumination.propagation(Param)¶
Parameters for propagation after aperture plane
Propagation to focus takes precedence to parallel propagation if foccused is not
None
default =
Param({})
- scandata.SimScan.illumination.propagation.antialiasing(float)¶
Antialiasing factor
Antialiasing factor used when generating the probe. (numbers larger than 2 or 3 are memory hungry) [Untested]
default =
1
- scandata.SimScan.illumination.propagation.focussed(NoneType, float)¶
Propagation distance from aperture to focus
If
None
or0
: No focus propagationdefault =
None
- scandata.SimScan.illumination.propagation.parallel(NoneType, float)¶
Parallel propagation distance
If
None
or0
: No parallel propagationdefault =
None
- scandata.SimScan.illumination.propagation.spot_size(NoneType, float)¶
Focal spot diameter
If not
None
, this parameter is used to generate the appropriate aperture size instead ofsize
default =
None (>0.0)
- scandata.SimScan.illumination.recon(Param)¶
Parameters to load from previous reconstruction
default =
Param({})
- scandata.SimScan.illumination.recon.label(NoneType, str)¶
Scan label of diffraction that is to be used for probe estimate
If
None
, own scan label is useddefault =
None
- scandata.SimScan.illumination.recon.rfile(str)¶
Path to a
.ptyr
compatible filedefault =
'\\*.ptyr'
- scandata.SimScan.sample(Param, str)¶
default =
Param({})
- scandata.SimScan.sample.model(str, ndarray)¶
Type of initial object model
One of: -
None
: model initialitziation defaults to flat array filled fill -'recon'
: load model from STXM analysis of diffraction data -'stxm'
: Estimate model from autocorrelation of mean diffraction data - <resource> : one of ptypys internal model resource strings - <template> : one of the templates in sample module In script, you may pass a numpy.array here directly as the model. This array will be processed according to process in order to simulate a sample from e.g. a thickness profile.default =
None
- scandata.SimScan.sample.fill(float, complex)¶
Default fill value
default =
1
- scandata.SimScan.sample.recon(Param)¶
Parameters to load from previous reconstruction
default =
Param({})
- scandata.SimScan.sample.recon.rfile(str)¶
Path to a
.ptyr
compatible filedefault =
'\\*.ptyr'
- scandata.SimScan.sample.stxm(Param)¶
STXM analysis parameters
default =
Param({})
- scandata.SimScan.sample.stxm.label(str)¶
Scan label of diffraction that is to be used for probe estimate
None
, own scan label is useddefault =
None
- scandata.SimScan.sample.process(Param, NoneType)¶
Model processing parameters
Can be
None
, i.e. no processingdefault =
Param({})
- scandata.SimScan.sample.process.offset(tuple, list)¶
Offset between center of object array and scan pattern
default =
(0, 0) (>0.0)
- scandata.SimScan.sample.process.zoom(list, tuple, float)¶
Zoom value for object simulation.
If
None
, leave the array untouched. Otherwise the modeled or loaded image will be resized usingzoom()
.default =
None (>0.0)
- scandata.SimScan.sample.process.formula(str)¶
Chemical formula
A Formula compatible with a cxro database query,e.g.
'Au'
or'NaCl'
or'H2O'
default =
None
- scandata.SimScan.sample.process.density(float)¶
Density in [g/ccm]
Only used if formula is not None
default =
1
- scandata.SimScan.sample.process.thickness(float)¶
Maximum thickness of sample
If
None
, the absolute values of loaded source array will be useddefault =
1e-06
- scandata.SimScan.sample.process.ref_index(list, tuple)¶
Assigned refractive index, tuple of format (real, complex)
If
None
, treat source array as projection of refractive index a+bj for (a, b). If a refractive index is provided the array’s absolute value will be used to scale the refractive index.default =
(0.5, 0.0) (>0.0)
- scandata.SimScan.sample.process.smoothing(int)¶
Smoothing scale
Smooth the projection with gaussian kernel of width given by smoothing_mfs
default =
2 (>0)
- scandata.SimScan.sample.diversity(Param)¶
Probe mode(s) diversity parameters
Can be
None
i.e. no diversitydefault =
Param({})
- scandata.SimScan.sample.diversity.noise(tuple)¶
Noise in the generated modes of the illumination
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
None
- scandata.SimScan.sample.diversity.power(tuple, float)¶
Power of modes relative to main mode (zero-layer)
default =
0.1
- scandata.SimScan.sample.diversity.shift(float)¶
Lateral shift of modes relative to main mode
[not implemented]
default =
None
- scandata.SimScan.xy(Param)¶
default =
Param({})
- scandata.SimScan.xy.override(ndarray)¶
default =
None
- scandata.SimScan.xy.model(str)¶
None, ‘round’, ‘raster’, ‘spiral’ or array-like
default =
None
- scandata.SimScan.xy.extent(float, tuple)¶
default =
1.5e-05
- scandata.SimScan.xy.spacing(float)¶
Step size (grid spacing)
default =
1.5e-06
- scandata.SimScan.xy.steps(int)¶
default =
10
- scandata.SimScan.xy.offset(float)¶
default =
0.0
- scandata.SimScan.xy.jitter(float)¶
default =
None
- scandata.SimScan.xy.count(int)¶
default =
None
- scandata.SimScan.name(str)¶
default =
'SimScan'
- scandata.SimScan.dfile(str)¶
File path where prepared data will be saved in the
ptyd
format.default =
None
- scandata.SimScan.chunk_format(str)¶
Appendix to saved files if save == ‘link’
default =
'.chunk%02d'
- scandata.SimScan.save(str)¶
Saving mode
Mode to use to save data to file.
None
: No saving'merge'
: attemts to merge data in single chunk [not implemented]'append'
: appends each chunk in master *.ptyd file'link'
: appends external links in master *.ptyd file and stores chunks separately
in the path given by the link. Links file paths are relative to master file.
default =
None
- scandata.SimScan.auto_center(bool)¶
Determine if center in data is calculated automatically
False
, no automatic centeringNone
, only ifcenter
isNone
True
, it will be enforced
default =
None
- scandata.SimScan.load_parallel(str)¶
Determines what will be loaded in parallel
Choose from
None
,'data'
,'common'
,'all'
default =
'data'
- scandata.SimScan.rebin(int)¶
Rebinning factor
Rebinning factor for the raw data frames.
'None'
or1
both mean no binningdefault =
None (>1, <32)
- scandata.SimScan.orientation(int, tuple, list)¶
Data frame orientation
Choose
None
or0
: correct orientation1
: invert columns (numpy.flip_lr)2
: invert rows (numpy.flip_ud)3
: invert columns, invert rows4
: transpose (numpy.transpose)4+i
: tranpose + other operations from above
Alternatively, a 3-tuple of booleans may be provided
(do_transpose, do_flipud, do_fliplr)
default =
None
- scandata.SimScan.min_frames(int)¶
Minimum number of frames loaded by each node
default =
1 (>1)
- scandata.SimScan.positions_theory(ndarray)¶
Theoretical positions for this scan
If provided, experimental positions from
PtyScan
subclass will be ignored. If data preparation is called from Ptycho instance, the calculated positions from theptypy.core.xy.from_pars()
dict will be inserted heredefault =
None
- scandata.SimScan.num_frames(int)¶
Maximum number of frames to be prepared
If positions_theory are provided, num_frames will be ovverriden with the number of positions available
default =
None
- scandata.SimScan.label(str)¶
The scan label
Unique string identifying the scan
default =
None
- scandata.SimScan.experimentID(str)¶
Name of the experiment
If None, a default value will be provided by the recipe. unused
default =
None
- scandata.SimScan.version(float)¶
TODO: Explain this and decide if it is a user parameter.
default =
0.1
- scandata.SimScan.shape(int, tuple)¶
Shape of the region of interest cropped from the raw data.
Cropping dimension of the diffraction frame Can be None, (dimx, dimy), or dim. In the latter case shape will be (dim, dim).
default =
256
- scandata.SimScan.center(list, tuple, str)¶
Center (pixel) of the optical axes in raw data
If
None
, this parameter will be set byauto_center
or elsewheredefault =
'fftshift'
- scandata.SimScan.psize(float, tuple)¶
Detector pixel size
Dimensions of the detector pixels (in meters)
default =
0.000172 (>0.0)
- scandata.SimScan.distance(float)¶
Sample to detector distance
In meters.
default =
7.19 (>0.0)
- scandata.SimScan.energy(float)¶
Photon energy of the incident radiation in keV
default =
7.2 (>0.0)
- scandata.SimScan.add_poisson_noise(bool)¶
Decides whether the scan should have poisson noise or not
default =
False
- scandata.SimScan.pos_noise(float)¶
Uniformly distributed noise in xy experimental positions
default =
1e-10
- scandata.SimScan.pos_scale(float, list)¶
Amplifier for noise.
Will be extended to match number of positions. Maybe used to only put nois on individual points
default =
0.0
- scandata.SimScan.pos_drift(float, list)¶
Drift or offset paramter
Noise independent drift. Will be extended like pos_scale.
default =
0.0
- scandata.SimScan.detector(str, Param)¶
default =
Param({})
- scandata.SimScan.frame_size(float, tuple)¶
Final frame size when saving
If None, no cropping/padding happens.
default =
None
- scandata.SimScan.psf(float, tuple, ndarray)¶
Parameters for gaussian convolution or convolution kernel after propagation
Use it for simulating partial coherence.
default =
None
- scandata.SimScan.verbose_level(int)¶
Verbose level when simulating
default =
1
- scandata.SimScan.plot(bool)¶
default =
True
- scandata.SimScan.propagation(str)¶
farfield or nearfield
default =
'farfield'
scan¶
- scan(Param)¶
default =
Param({})
scan.ScanModel¶
- scan.ScanModel(Param)¶
default =
Param({})
- scan.ScanModel.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.ScanModel.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.ScanModel.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.ScanModel.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.ScanModel.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.ScanModel.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.ScanModel.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.ScanModel.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.BlockScanModel¶
- scan.BlockScanModel(Param)¶
default =
Param({})
- scan.BlockScanModel.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.BlockScanModel.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.BlockScanModel.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.BlockScanModel.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.BlockScanModel.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.BlockScanModel.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.BlockScanModel.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.BlockScanModel.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.Vanilla¶
- scan.Vanilla(Param)¶
default =
Param({})
- scan.Vanilla.name(str)¶
default =
'Vanilla'
- scan.Vanilla.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.Vanilla.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.Vanilla.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.Vanilla.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.Vanilla.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.Vanilla.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.Vanilla.illumination.size(float)¶
Initial probe size
The probe is initialized as a flat circle.
default =
None
- scan.Vanilla.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.Vanilla.sample.fill(float, complex)¶
Initial sample value
The sample is initialized with this value everywhere.
default =
1
- scan.Vanilla.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.BlockVanilla¶
- scan.BlockVanilla(Param)¶
default =
Param({})
- scan.BlockVanilla.name(str)¶
default =
'Vanilla'
- scan.BlockVanilla.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.BlockVanilla.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.BlockVanilla.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.BlockVanilla.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.BlockVanilla.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.BlockVanilla.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.BlockVanilla.illumination.size(float)¶
Initial probe size
The probe is initialized as a flat circle.
default =
None
- scan.BlockVanilla.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.BlockVanilla.sample.fill(float, complex)¶
Initial sample value
The sample is initialized with this value everywhere.
default =
1
- scan.BlockVanilla.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.Full¶
- scan.Full(Param)¶
default =
Param({})
- scan.Full.name(str)¶
default =
'Full'
- scan.Full.coherence(Param)¶
Coherence parameters
default =
Param({}) (>0.0)
- scan.Full.coherence.num_probe_modes(int)¶
Number of probe modes
default =
1 (>0)
- scan.Full.coherence.num_object_modes(int)¶
Number of object modes
default =
1 (>0)
- scan.Full.coherence.energies(list)¶
?
?
default =
[1.0]
- scan.Full.coherence.spectrum(list)¶
Amplitude of relative energy bins if the probe modes have a different energy
default =
[1.0] (>0.0)
- scan.Full.coherence.object_dispersion(str)¶
Energy dispersive response of the object
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.Full.coherence.probe_dispersion(str)¶
Energy dispersive response of the probe
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.Full.resolution(NoneType, float)¶
Will force the reconstruction to adapt to the given resolution, this might lead to cropping/padding in diffraction space which could reduce performance.
Half-period resolution given in [m]
default =
None (>0.0)
- scan.Full.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.Full.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.Full.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.Full.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.Full.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.Full.illumination(Param, str)¶
Illumination parameters
default =
Param({})
- scan.Full.illumination.aperture(Param)¶
Beam aperture parameters
default =
Param({})
- scan.Full.illumination.aperture.rotate(float)¶
Rotate aperture by this value
default =
0.0
- scan.Full.illumination.aperture.central_stop(float)¶
size of central stop as a fraction of aperture.size
If not None: places a central beam stop in aperture. The value given here is the fraction of the beam stop compared to size
default =
None (>0.0, <1.0)
- scan.Full.illumination.aperture.diffuser(tuple)¶
Noise in the transparen part of the aperture
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
None
- scan.Full.illumination.aperture.edge(float)¶
Edge width of aperture (in pixels!)
default =
2.0
- scan.Full.illumination.aperture.form(NoneType, str)¶
One of None, ‘rect’ or ‘circ’
One of: -
None
: no aperture, this may be useful for nearfield -'rect'
: rectangular aperture -'circ'
: circular aperturedefault =
'circ'
- scan.Full.illumination.aperture.offset(float, tuple, list)¶
Offset between center of aperture and optical axes
May also be a tuple (vertical,horizontal) for size in case of an asymmetric offset
default =
0.0
- scan.Full.illumination.aperture.size(float, tuple, list)¶
Aperture width or diameter
May also be a tuple (vertical,horizontal) in case of an asymmetric aperture
default =
None (>0.0)
- scan.Full.illumination.diversity(Param, NoneType)¶
Probe mode(s) diversity parameters
Can be
None
i.e. no diversitydefault =
Param({})
- scan.Full.illumination.diversity.noise(tuple, list)¶
Noise in each non-primary mode of the illumination.
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
(0.5, 1.0)
- scan.Full.illumination.diversity.power(tuple, float, list)¶
Power of modes relative to main mode (zero-layer)
default =
0.1 (>0.0, <1.0)
- scan.Full.illumination.diversity.shift(float)¶
Lateral shift of modes relative to main mode
[not implemented]
default =
None
- scan.Full.illumination.model(str, ndarray)¶
Type of illumination model
One of: -
None
: model initialitziation defaults to flat array filled with the specified number of photons -'recon'
: load model from previous reconstruction, see recon Parameters -'stxm'
: Estimate model from autocorrelation of mean diffraction data - <resource> : one of ptypys internal image resource strings - <template> : one of the templates inillumination moduleIn script, you may pass a numpy.ndarray here directly as the model. It is considered as incoming wavefront and will be propagated according to propagation with an optional aperture applied before.
default =
None
- scan.Full.illumination.photons(int, float, NoneType)¶
Number of photons in the incident illumination
A value specified here will take precedence over calculated statistics from the loaded data.
default =
None (>0)
- scan.Full.illumination.propagation(Param)¶
Parameters for propagation after aperture plane
Propagation to focus takes precedence to parallel propagation if foccused is not
None
default =
Param({})
- scan.Full.illumination.propagation.antialiasing(float)¶
Antialiasing factor
Antialiasing factor used when generating the probe. (numbers larger than 2 or 3 are memory hungry) [Untested]
default =
1
- scan.Full.illumination.propagation.focussed(NoneType, float)¶
Propagation distance from aperture to focus
If
None
or0
: No focus propagationdefault =
None
- scan.Full.illumination.propagation.parallel(NoneType, float)¶
Parallel propagation distance
If
None
or0
: No parallel propagationdefault =
None
- scan.Full.illumination.propagation.spot_size(NoneType, float)¶
Focal spot diameter
If not
None
, this parameter is used to generate the appropriate aperture size instead ofsize
default =
None (>0.0)
- scan.Full.illumination.recon(Param)¶
Parameters to load from previous reconstruction
default =
Param({})
- scan.Full.illumination.recon.label(NoneType, str)¶
Scan label of diffraction that is to be used for probe estimate
If
None
, own scan label is useddefault =
None
- scan.Full.illumination.recon.rfile(str)¶
Path to a
.ptyr
compatible filedefault =
'\\*.ptyr'
- scan.Full.sample(Param, str)¶
default =
Param({})
- scan.Full.sample.model(str, ndarray)¶
Type of initial object model
One of: -
None
: model initialitziation defaults to flat array filled fill -'recon'
: load model from STXM analysis of diffraction data -'stxm'
: Estimate model from autocorrelation of mean diffraction data - <resource> : one of ptypys internal model resource strings - <template> : one of the templates in sample module In script, you may pass a numpy.array here directly as the model. This array will be processed according to process in order to simulate a sample from e.g. a thickness profile.default =
None
- scan.Full.sample.fill(float, complex)¶
Default fill value
default =
1
- scan.Full.sample.recon(Param)¶
Parameters to load from previous reconstruction
default =
Param({})
- scan.Full.sample.recon.rfile(str)¶
Path to a
.ptyr
compatible filedefault =
'\\*.ptyr'
- scan.Full.sample.stxm(Param)¶
STXM analysis parameters
default =
Param({})
- scan.Full.sample.stxm.label(str)¶
Scan label of diffraction that is to be used for probe estimate
None
, own scan label is useddefault =
None
- scan.Full.sample.process(Param, NoneType)¶
Model processing parameters
Can be
None
, i.e. no processingdefault =
Param({})
- scan.Full.sample.process.offset(tuple, list)¶
Offset between center of object array and scan pattern
default =
(0, 0) (>0.0)
- scan.Full.sample.process.zoom(list, tuple, float)¶
Zoom value for object simulation.
If
None
, leave the array untouched. Otherwise the modeled or loaded image will be resized usingzoom()
.default =
None (>0.0)
- scan.Full.sample.process.formula(str)¶
Chemical formula
A Formula compatible with a cxro database query,e.g.
'Au'
or'NaCl'
or'H2O'
default =
None
- scan.Full.sample.process.density(float)¶
Density in [g/ccm]
Only used if formula is not None
default =
1
- scan.Full.sample.process.thickness(float)¶
Maximum thickness of sample
If
None
, the absolute values of loaded source array will be useddefault =
1e-06
- scan.Full.sample.process.ref_index(list, tuple)¶
Assigned refractive index, tuple of format (real, complex)
If
None
, treat source array as projection of refractive index a+bj for (a, b). If a refractive index is provided the array’s absolute value will be used to scale the refractive index.default =
(0.5, 0.0) (>0.0)
- scan.Full.sample.process.smoothing(int)¶
Smoothing scale
Smooth the projection with gaussian kernel of width given by smoothing_mfs
default =
2 (>0)
- scan.Full.sample.diversity(Param)¶
Probe mode(s) diversity parameters
Can be
None
i.e. no diversitydefault =
Param({})
- scan.Full.sample.diversity.noise(tuple)¶
Noise in the generated modes of the illumination
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
None
- scan.Full.sample.diversity.power(tuple, float)¶
Power of modes relative to main mode (zero-layer)
default =
0.1
- scan.Full.sample.diversity.shift(float)¶
Lateral shift of modes relative to main mode
[not implemented]
default =
None
- scan.Full.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.BlockFull¶
- scan.BlockFull(Param)¶
default =
Param({})
- scan.BlockFull.name(str)¶
default =
'Full'
- scan.BlockFull.coherence(Param)¶
Coherence parameters
default =
Param({}) (>0.0)
- scan.BlockFull.coherence.num_probe_modes(int)¶
Number of probe modes
default =
1 (>0)
- scan.BlockFull.coherence.num_object_modes(int)¶
Number of object modes
default =
1 (>0)
- scan.BlockFull.coherence.energies(list)¶
?
?
default =
[1.0]
- scan.BlockFull.coherence.spectrum(list)¶
Amplitude of relative energy bins if the probe modes have a different energy
default =
[1.0] (>0.0)
- scan.BlockFull.coherence.object_dispersion(str)¶
Energy dispersive response of the object
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.BlockFull.coherence.probe_dispersion(str)¶
Energy dispersive response of the probe
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.BlockFull.resolution(NoneType, float)¶
Will force the reconstruction to adapt to the given resolution, this might lead to cropping/padding in diffraction space which could reduce performance.
Half-period resolution given in [m]
default =
None (>0.0)
- scan.BlockFull.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.BlockFull.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.BlockFull.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.BlockFull.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.BlockFull.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.BlockFull.illumination(Param, str)¶
Illumination parameters
default =
Param({})
- scan.BlockFull.illumination.aperture(Param)¶
Beam aperture parameters
default =
Param({})
- scan.BlockFull.illumination.aperture.rotate(float)¶
Rotate aperture by this value
default =
0.0
- scan.BlockFull.illumination.aperture.central_stop(float)¶
size of central stop as a fraction of aperture.size
If not None: places a central beam stop in aperture. The value given here is the fraction of the beam stop compared to size
default =
None (>0.0, <1.0)
- scan.BlockFull.illumination.aperture.diffuser(tuple)¶
Noise in the transparen part of the aperture
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
None
- scan.BlockFull.illumination.aperture.edge(float)¶
Edge width of aperture (in pixels!)
default =
2.0
- scan.BlockFull.illumination.aperture.form(NoneType, str)¶
One of None, ‘rect’ or ‘circ’
One of: -
None
: no aperture, this may be useful for nearfield -'rect'
: rectangular aperture -'circ'
: circular aperturedefault =
'circ'
- scan.BlockFull.illumination.aperture.offset(float, tuple, list)¶
Offset between center of aperture and optical axes
May also be a tuple (vertical,horizontal) for size in case of an asymmetric offset
default =
0.0
- scan.BlockFull.illumination.aperture.size(float, tuple, list)¶
Aperture width or diameter
May also be a tuple (vertical,horizontal) in case of an asymmetric aperture
default =
None (>0.0)
- scan.BlockFull.illumination.diversity(Param, NoneType)¶
Probe mode(s) diversity parameters
Can be
None
i.e. no diversitydefault =
Param({})
- scan.BlockFull.illumination.diversity.noise(tuple, list)¶
Noise in each non-primary mode of the illumination.
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
(0.5, 1.0)
- scan.BlockFull.illumination.diversity.power(tuple, float, list)¶
Power of modes relative to main mode (zero-layer)
default =
0.1 (>0.0, <1.0)
- scan.BlockFull.illumination.diversity.shift(float)¶
Lateral shift of modes relative to main mode
[not implemented]
default =
None
- scan.BlockFull.illumination.model(str, ndarray)¶
Type of illumination model
One of: -
None
: model initialitziation defaults to flat array filled with the specified number of photons -'recon'
: load model from previous reconstruction, see recon Parameters -'stxm'
: Estimate model from autocorrelation of mean diffraction data - <resource> : one of ptypys internal image resource strings - <template> : one of the templates inillumination moduleIn script, you may pass a numpy.ndarray here directly as the model. It is considered as incoming wavefront and will be propagated according to propagation with an optional aperture applied before.
default =
None
- scan.BlockFull.illumination.photons(int, float, NoneType)¶
Number of photons in the incident illumination
A value specified here will take precedence over calculated statistics from the loaded data.
default =
None (>0)
- scan.BlockFull.illumination.propagation(Param)¶
Parameters for propagation after aperture plane
Propagation to focus takes precedence to parallel propagation if foccused is not
None
default =
Param({})
- scan.BlockFull.illumination.propagation.antialiasing(float)¶
Antialiasing factor
Antialiasing factor used when generating the probe. (numbers larger than 2 or 3 are memory hungry) [Untested]
default =
1
- scan.BlockFull.illumination.propagation.focussed(NoneType, float)¶
Propagation distance from aperture to focus
If
None
or0
: No focus propagationdefault =
None
- scan.BlockFull.illumination.propagation.parallel(NoneType, float)¶
Parallel propagation distance
If
None
or0
: No parallel propagationdefault =
None
- scan.BlockFull.illumination.propagation.spot_size(NoneType, float)¶
Focal spot diameter
If not
None
, this parameter is used to generate the appropriate aperture size instead ofsize
default =
None (>0.0)
- scan.BlockFull.illumination.recon(Param)¶
Parameters to load from previous reconstruction
default =
Param({})
- scan.BlockFull.illumination.recon.label(NoneType, str)¶
Scan label of diffraction that is to be used for probe estimate
If
None
, own scan label is useddefault =
None
- scan.BlockFull.illumination.recon.rfile(str)¶
Path to a
.ptyr
compatible filedefault =
'\\*.ptyr'
- scan.BlockFull.sample(Param, str)¶
default =
Param({})
- scan.BlockFull.sample.model(str, ndarray)¶
Type of initial object model
One of: -
None
: model initialitziation defaults to flat array filled fill -'recon'
: load model from STXM analysis of diffraction data -'stxm'
: Estimate model from autocorrelation of mean diffraction data - <resource> : one of ptypys internal model resource strings - <template> : one of the templates in sample module In script, you may pass a numpy.array here directly as the model. This array will be processed according to process in order to simulate a sample from e.g. a thickness profile.default =
None
- scan.BlockFull.sample.fill(float, complex)¶
Default fill value
default =
1
- scan.BlockFull.sample.recon(Param)¶
Parameters to load from previous reconstruction
default =
Param({})
- scan.BlockFull.sample.recon.rfile(str)¶
Path to a
.ptyr
compatible filedefault =
'\\*.ptyr'
- scan.BlockFull.sample.stxm(Param)¶
STXM analysis parameters
default =
Param({})
- scan.BlockFull.sample.stxm.label(str)¶
Scan label of diffraction that is to be used for probe estimate
None
, own scan label is useddefault =
None
- scan.BlockFull.sample.process(Param, NoneType)¶
Model processing parameters
Can be
None
, i.e. no processingdefault =
Param({})
- scan.BlockFull.sample.process.offset(tuple, list)¶
Offset between center of object array and scan pattern
default =
(0, 0) (>0.0)
- scan.BlockFull.sample.process.zoom(list, tuple, float)¶
Zoom value for object simulation.
If
None
, leave the array untouched. Otherwise the modeled or loaded image will be resized usingzoom()
.default =
None (>0.0)
- scan.BlockFull.sample.process.formula(str)¶
Chemical formula
A Formula compatible with a cxro database query,e.g.
'Au'
or'NaCl'
or'H2O'
default =
None
- scan.BlockFull.sample.process.density(float)¶
Density in [g/ccm]
Only used if formula is not None
default =
1
- scan.BlockFull.sample.process.thickness(float)¶
Maximum thickness of sample
If
None
, the absolute values of loaded source array will be useddefault =
1e-06
- scan.BlockFull.sample.process.ref_index(list, tuple)¶
Assigned refractive index, tuple of format (real, complex)
If
None
, treat source array as projection of refractive index a+bj for (a, b). If a refractive index is provided the array’s absolute value will be used to scale the refractive index.default =
(0.5, 0.0) (>0.0)
- scan.BlockFull.sample.process.smoothing(int)¶
Smoothing scale
Smooth the projection with gaussian kernel of width given by smoothing_mfs
default =
2 (>0)
- scan.BlockFull.sample.diversity(Param)¶
Probe mode(s) diversity parameters
Can be
None
i.e. no diversitydefault =
Param({})
- scan.BlockFull.sample.diversity.noise(tuple)¶
Noise in the generated modes of the illumination
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
None
- scan.BlockFull.sample.diversity.power(tuple, float)¶
Power of modes relative to main mode (zero-layer)
default =
0.1
- scan.BlockFull.sample.diversity.shift(float)¶
Lateral shift of modes relative to main mode
[not implemented]
default =
None
- scan.BlockFull.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.OPRModel¶
- scan.OPRModel(Param)¶
default =
Param({})
- scan.OPRModel.name(str)¶
default =
'Full'
- scan.OPRModel.coherence(Param)¶
Coherence parameters
default =
Param({}) (>0.0)
- scan.OPRModel.coherence.num_probe_modes(int)¶
Number of probe modes
default =
1 (>0)
- scan.OPRModel.coherence.num_object_modes(int)¶
Number of object modes
default =
1 (>0)
- scan.OPRModel.coherence.energies(list)¶
?
?
default =
[1.0]
- scan.OPRModel.coherence.spectrum(list)¶
Amplitude of relative energy bins if the probe modes have a different energy
default =
[1.0] (>0.0)
- scan.OPRModel.coherence.object_dispersion(str)¶
Energy dispersive response of the object
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.OPRModel.coherence.probe_dispersion(str)¶
Energy dispersive response of the probe
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.OPRModel.resolution(NoneType, float)¶
Will force the reconstruction to adapt to the given resolution, this might lead to cropping/padding in diffraction space which could reduce performance.
Half-period resolution given in [m]
default =
None (>0.0)
- scan.OPRModel.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.OPRModel.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.OPRModel.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.OPRModel.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.OPRModel.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.OPRModel.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.OPRModel.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.OPRModel.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.BlockOPRModel¶
- scan.BlockOPRModel(Param)¶
default =
Param({})
- scan.BlockOPRModel.name(str)¶
default =
'Full'
- scan.BlockOPRModel.coherence(Param)¶
Coherence parameters
default =
Param({}) (>0.0)
- scan.BlockOPRModel.coherence.num_probe_modes(int)¶
Number of probe modes
default =
1 (>0)
- scan.BlockOPRModel.coherence.num_object_modes(int)¶
Number of object modes
default =
1 (>0)
- scan.BlockOPRModel.coherence.energies(list)¶
?
?
default =
[1.0]
- scan.BlockOPRModel.coherence.spectrum(list)¶
Amplitude of relative energy bins if the probe modes have a different energy
default =
[1.0] (>0.0)
- scan.BlockOPRModel.coherence.object_dispersion(str)¶
Energy dispersive response of the object
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.BlockOPRModel.coherence.probe_dispersion(str)¶
Energy dispersive response of the probe
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.BlockOPRModel.resolution(NoneType, float)¶
Will force the reconstruction to adapt to the given resolution, this might lead to cropping/padding in diffraction space which could reduce performance.
Half-period resolution given in [m]
default =
None (>0.0)
- scan.BlockOPRModel.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.BlockOPRModel.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.BlockOPRModel.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.BlockOPRModel.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.BlockOPRModel.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.BlockOPRModel.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.BlockOPRModel.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.BlockOPRModel.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.GradFull¶
- scan.GradFull(Param)¶
default =
Param({})
- scan.GradFull.name(str)¶
default =
'Full'
- scan.GradFull.coherence(Param)¶
Coherence parameters
default =
Param({}) (>0.0)
- scan.GradFull.coherence.num_probe_modes(int)¶
Number of probe modes
default =
1 (>0)
- scan.GradFull.coherence.num_object_modes(int)¶
Number of object modes
default =
1 (>0)
- scan.GradFull.coherence.energies(list)¶
?
?
default =
[1.0]
- scan.GradFull.coherence.spectrum(list)¶
Amplitude of relative energy bins if the probe modes have a different energy
default =
[1.0] (>0.0)
- scan.GradFull.coherence.object_dispersion(str)¶
Energy dispersive response of the object
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.GradFull.coherence.probe_dispersion(str)¶
Energy dispersive response of the probe
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.GradFull.resolution(NoneType, float)¶
Will force the reconstruction to adapt to the given resolution, this might lead to cropping/padding in diffraction space which could reduce performance.
Half-period resolution given in [m]
default =
None (>0.0)
- scan.GradFull.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.GradFull.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.GradFull.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.GradFull.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.GradFull.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.GradFull.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.GradFull.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.GradFull.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.BlockGradFull¶
- scan.BlockGradFull(Param)¶
default =
Param({})
- scan.BlockGradFull.name(str)¶
default =
'Full'
- scan.BlockGradFull.coherence(Param)¶
Coherence parameters
default =
Param({}) (>0.0)
- scan.BlockGradFull.coherence.num_probe_modes(int)¶
Number of probe modes
default =
1 (>0)
- scan.BlockGradFull.coherence.num_object_modes(int)¶
Number of object modes
default =
1 (>0)
- scan.BlockGradFull.coherence.energies(list)¶
?
?
default =
[1.0]
- scan.BlockGradFull.coherence.spectrum(list)¶
Amplitude of relative energy bins if the probe modes have a different energy
default =
[1.0] (>0.0)
- scan.BlockGradFull.coherence.object_dispersion(str)¶
Energy dispersive response of the object
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.BlockGradFull.coherence.probe_dispersion(str)¶
Energy dispersive response of the probe
One of: -
None
or'achromatic'
: no dispersion -'linear'
: linear response model -'irregular'
: no assumption [not implemented]default =
None
- scan.BlockGradFull.resolution(NoneType, float)¶
Will force the reconstruction to adapt to the given resolution, this might lead to cropping/padding in diffraction space which could reduce performance.
Half-period resolution given in [m]
default =
None (>0.0)
- scan.BlockGradFull.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.BlockGradFull.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.BlockGradFull.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.BlockGradFull.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.BlockGradFull.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.BlockGradFull.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.BlockGradFull.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.BlockGradFull.resample(int, NoneType)¶
Resampling fraction of the image frames w.r.t. diffraction frames
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
scan.Bragg3dModel¶
- scan.Bragg3dModel(Param)¶
default =
Param({})
- scan.Bragg3dModel.illumination(Param, str)¶
Container for probe initialization model
default =
Param({})
- scan.Bragg3dModel.illumination.aperture(Param)¶
Beam aperture parameters
default =
Param({})
- scan.Bragg3dModel.illumination.aperture.rotate(float)¶
Rotate aperture by this value
default =
0.0
- scan.Bragg3dModel.illumination.aperture.central_stop(float)¶
size of central stop as a fraction of aperture.size
If not None: places a central beam stop in aperture. The value given here is the fraction of the beam stop compared to size
default =
None (>0.0, <1.0)
- scan.Bragg3dModel.illumination.aperture.diffuser(tuple)¶
Noise in the transparen part of the aperture
Can be either: -
None
: no noise -2-tuple
: noise in phase (amplitude (rms), minimum feature size) -4-tuple
: noise in phase & modulus (rms, mfs, rms_mod, mfs_mod)default =
None
- scan.Bragg3dModel.illumination.aperture.edge(float)¶
Edge width of aperture (in pixels!)
default =
2.0
- scan.Bragg3dModel.illumination.aperture.form(NoneType, str)¶
One of None, ‘rect’ or ‘circ’
One of: -
None
: no aperture, this may be useful for nearfield -'rect'
: rectangular aperture -'circ'
: circular aperturedefault =
'circ'
- scan.Bragg3dModel.illumination.aperture.offset(float, tuple, list)¶
Offset between center of aperture and optical axes
May also be a tuple (vertical,horizontal) for size in case of an asymmetric offset
default =
0.0
- scan.Bragg3dModel.illumination.aperture.size(float, tuple, list)¶
Aperture width or diameter
May also be a tuple (vertical,horizontal) in case of an asymmetric aperture
default =
None (>0.0)
- scan.Bragg3dModel.illumination.model(str, ndarray)¶
Type of illumination model
One of: -
None
: model initialitziation defaults to flat array filled with the specified number of photons -'recon'
: load model from previous reconstruction, see recon Parameters -'stxm'
: Estimate model from autocorrelation of mean diffraction data - <resource> : one of ptypys internal image resource strings - <template> : one of the templates inillumination moduleIn script, you may pass a numpy.ndarray here directly as the model. It is considered as incoming wavefront and will be propagated according to propagation with an optional aperture applied before.
default =
None
- scan.Bragg3dModel.illumination.photons(int, float, NoneType)¶
Number of photons in the incident illumination
A value specified here will take precedence over calculated statistics from the loaded data.
default =
None (>0)
- scan.Bragg3dModel.illumination.propagation(Param)¶
Parameters for propagation after aperture plane
Propagation to focus takes precedence to parallel propagation if foccused is not
None
default =
Param({})
- scan.Bragg3dModel.illumination.propagation.antialiasing(float)¶
Antialiasing factor
Antialiasing factor used when generating the probe. (numbers larger than 2 or 3 are memory hungry) [Untested]
default =
1
- scan.Bragg3dModel.illumination.propagation.focussed(NoneType, float)¶
Propagation distance from aperture to focus
If
None
or0
: No focus propagationdefault =
None
- scan.Bragg3dModel.illumination.propagation.parallel(NoneType, float)¶
Parallel propagation distance
If
None
or0
: No parallel propagationdefault =
None
- scan.Bragg3dModel.illumination.propagation.spot_size(NoneType, float)¶
Focal spot diameter
If not
None
, this parameter is used to generate the appropriate aperture size instead ofsize
default =
None (>0.0)
- scan.Bragg3dModel.illumination.recon(Param)¶
Parameters to load from previous reconstruction
default =
Param({})
- scan.Bragg3dModel.illumination.recon.label(NoneType, str)¶
Scan label of diffraction that is to be used for probe estimate
If
None
, own scan label is useddefault =
None
- scan.Bragg3dModel.illumination.recon.rfile(str)¶
Path to a
.ptyr
compatible filedefault =
'\\*.ptyr'
- scan.Bragg3dModel.illumination.size(float)¶
Initial probe size
The probe is initialized as a flat circle.
default =
None
- scan.Bragg3dModel.name(str)¶
default =
'Bragg3dModel'
- scan.Bragg3dModel.tags(list)¶
Comma seperated string tags describing the data input
[deprecated?]
default =
['dummy']
- scan.Bragg3dModel.propagation(str)¶
Propagation type
Either “farfield” or “nearfield”
default =
'farfield'
- scan.Bragg3dModel.ffttype(str)¶
FFT library
Choose from “numpy”, “scipy” or “fftw”
default =
'scipy'
- scan.Bragg3dModel.data(Param)¶
Link to container for data preparation
default =
scandata.PtyScan
- scan.Bragg3dModel.data.name(str)¶
Name of the PtyScan subclass to use
default =
None
- scan.Bragg3dModel.sample(Param, str)¶
Container for sample initialization model
default =
Param({})
- scan.Bragg3dModel.sample.fill(float, complex)¶
Initial sample value
The sample is initialized with this value everywhere.
default =
1
- scan.Bragg3dModel.resample(int, NoneType)¶
Diffraction resampling CURRENTLY NOT SUPPORTED FOR BRAGG CASE
A resampling of 2 means that the image frame is to be sampled (in the detector plane) twice as densely as the raw diffraction data.
default =
1
engine¶
- engine(Param)¶
default =
Param({})
engine.DM¶
- engine.DM(Param)¶
default =
Param({})
- engine.DM.numiter(int)¶
Total number of iterations
For on-the-fly (live) processing, the reconstruction engine will iterate at least this many times after all data has been loaded.
default =
20 (>1)
- engine.DM.numiter_contiguous(int)¶
Number of iterations without interruption
The engine will not return control to the caller until this number of iterations is completed (not processing server requests, I/O operations, …).
default =
1 (>1)
- engine.DM.probe_support(float, NoneType)¶
Valid probe area as fraction of the probe frame
Defines a circular area centered on the probe frame, in which the probe is allowed to be nonzero.
default =
0.7 (>0.0)
- engine.DM.probe_fourier_support(float, NoneType)¶
Valid probe area in frequency domain as fraction of the probe frame
Defines a circular area centered on the probe frame (in frequency domain), in which the probe is allowed to be nonzero.
default =
None (>0.0)
- engine.DM.record_local_error(bool)¶
If True, save the local map of errors into the runtime dictionary.
default =
False
- engine.DM.position_refinement(Param, bool)¶
If True refine scan positions
default =
Param({})
- engine.DM.position_refinement.method(str)¶
Annealing or GridSearch
default =
'Annealing'
- engine.DM.position_refinement.start(int)¶
Number of iterations until position refinement starts
If None, position refinement starts at first iteration
default =
None
- engine.DM.position_refinement.stop(int)¶
Number of iterations after which positon refinement stops
If None, position refinement stops after last iteration
default =
None
- engine.DM.position_refinement.interval(int)¶
Frequency of position refinement
default =
1
- engine.DM.position_refinement.nshifts(int)¶
Number of random shifts calculated in each position refinement step (has to be multiple of 4)
default =
4
- engine.DM.position_refinement.amplitude(float)¶
Distance from original position per random shift [m]
default =
1e-06
- engine.DM.position_refinement.amplitude_decay(bool)¶
After each interation, multiply amplitude by factor (stop - iteration) / (stop - start)
default =
True
- engine.DM.position_refinement.max_shift(float)¶
Maximum distance from original position [m]
default =
2e-06
- engine.DM.position_refinement.metric(str)¶
Error metric, can choose between “fourier” and “photon”
default =
'fourier'
- engine.DM.position_refinement.record(bool)¶
record movement of positions
default =
False
- engine.DM.probe_update_start(int)¶
Number of iterations before probe update starts
default =
2 (>0)
- engine.DM.subpix_start(int)¶
Number of iterations before starting subpixel interpolation
default =
0 (>0)
- engine.DM.subpix(str)¶
Subpixel interpolation; ‘fourier’,’linear’ or None for no interpolation
default =
'linear'
- engine.DM.update_object_first(bool)¶
If True update object before probe
default =
True
- engine.DM.overlap_converge_factor(float)¶
Threshold for interruption of the inner overlap loop
The inner overlap loop refines the probe and the object simultaneously. This loop is escaped as soon as the overall change in probe, relative to the first iteration, is less than this value.
default =
0.05 (>0.0)
- engine.DM.overlap_max_iterations(int)¶
Maximum of iterations for the overlap constraint inner loop
default =
10 (>1)
- engine.DM.probe_inertia(float)¶
Weight of the current probe estimate in the update
default =
1e-09 (>0.0)
- engine.DM.object_inertia(float)¶
Weight of the current object in the update
default =
0.0001 (>0.0)
- engine.DM.fourier_power_bound(float)¶
If rms error of model vs diffraction data is smaller than this value, Fourier constraint is met
For Poisson-sampled data, the theoretical value for this parameter is 1/4. Set this value higher for noisy data. By default, power bound is calculated using fourier_relax_factor
default =
None
- engine.DM.fourier_relax_factor(float)¶
A factor used to calculate the Fourier power bound as 0.25 * fourier_relax_factor**2 * maximum power in diffraction data
Set this value higher for noisy data.
default =
0.05 (>0.0)
- engine.DM.obj_smooth_std(float)¶
Gaussian smoothing (pixel) of the current object prior to update
If None, smoothing is deactivated. This smoothing can be used to reduce the amplitude of spurious pixels in the outer, least constrained areas of the object.
default =
None (>0.0)
- engine.DM.clip_object(tuple)¶
Clip object amplitude into this interval
default =
None
- engine.DM.probe_center_tol(float)¶
Pixel radius around optical axes that the probe mass center must reside in
default =
None (>0.0)
- engine.DM.compute_log_likelihood(bool)¶
A switch for computing the log-likelihood error (this can impact the performance of the engine)
default =
True
- engine.DM.alpha(float)¶
Mix parameter between Difference Map (alpha=1.) and Alternating Projections (alpha=0.)
default =
1.0 (>0.0)
- engine.DM.name(str)¶
default =
'DM'
engine.RAAR¶
- engine.RAAR(Param)¶
default =
Param({})
- engine.RAAR.numiter(int)¶
Total number of iterations
For on-the-fly (live) processing, the reconstruction engine will iterate at least this many times after all data has been loaded.
default =
20 (>1)
- engine.RAAR.numiter_contiguous(int)¶
Number of iterations without interruption
The engine will not return control to the caller until this number of iterations is completed (not processing server requests, I/O operations, …).
default =
1 (>1)
- engine.RAAR.probe_support(float, NoneType)¶
Valid probe area as fraction of the probe frame
Defines a circular area centered on the probe frame, in which the probe is allowed to be nonzero.
default =
0.7 (>0.0)
- engine.RAAR.probe_fourier_support(float, NoneType)¶
Valid probe area in frequency domain as fraction of the probe frame
Defines a circular area centered on the probe frame (in frequency domain), in which the probe is allowed to be nonzero.
default =
None (>0.0)
- engine.RAAR.record_local_error(bool)¶
If True, save the local map of errors into the runtime dictionary.
default =
False
- engine.RAAR.position_refinement(Param, bool)¶
If True refine scan positions
default =
Param({})
- engine.RAAR.position_refinement.method(str)¶
Annealing or GridSearch
default =
'Annealing'
- engine.RAAR.position_refinement.start(int)¶
Number of iterations until position refinement starts
If None, position refinement starts at first iteration
default =
None
- engine.RAAR.position_refinement.stop(int)¶
Number of iterations after which positon refinement stops
If None, position refinement stops after last iteration
default =
None
- engine.RAAR.position_refinement.interval(int)¶
Frequency of position refinement
default =
1
- engine.RAAR.position_refinement.nshifts(int)¶
Number of random shifts calculated in each position refinement step (has to be multiple of 4)
default =
4
- engine.RAAR.position_refinement.amplitude(float)¶
Distance from original position per random shift [m]
default =
1e-06
- engine.RAAR.position_refinement.amplitude_decay(bool)¶
After each interation, multiply amplitude by factor (stop - iteration) / (stop - start)
default =
True
- engine.RAAR.position_refinement.max_shift(float)¶
Maximum distance from original position [m]
default =
2e-06
- engine.RAAR.position_refinement.metric(str)¶
Error metric, can choose between “fourier” and “photon”
default =
'fourier'
- engine.RAAR.position_refinement.record(bool)¶
record movement of positions
default =
False
- engine.RAAR.probe_update_start(int)¶
Number of iterations before probe update starts
default =
2 (>0)
- engine.RAAR.subpix_start(int)¶
Number of iterations before starting subpixel interpolation
default =
0 (>0)
- engine.RAAR.subpix(str)¶
Subpixel interpolation; ‘fourier’,’linear’ or None for no interpolation
default =
'linear'
- engine.RAAR.update_object_first(bool)¶
If True update object before probe
default =
True
- engine.RAAR.overlap_converge_factor(float)¶
Threshold for interruption of the inner overlap loop
The inner overlap loop refines the probe and the object simultaneously. This loop is escaped as soon as the overall change in probe, relative to the first iteration, is less than this value.
default =
0.05 (>0.0)
- engine.RAAR.overlap_max_iterations(int)¶
Maximum of iterations for the overlap constraint inner loop
default =
10 (>1)
- engine.RAAR.probe_inertia(float)¶
Weight of the current probe estimate in the update
default =
1e-09 (>0.0)
- engine.RAAR.object_inertia(float)¶
Weight of the current object in the update
default =
0.0001 (>0.0)
- engine.RAAR.fourier_power_bound(float)¶
If rms error of model vs diffraction data is smaller than this value, Fourier constraint is met
For Poisson-sampled data, the theoretical value for this parameter is 1/4. Set this value higher for noisy data. By default, power bound is calculated using fourier_relax_factor
default =
None
- engine.RAAR.fourier_relax_factor(float)¶
A factor used to calculate the Fourier power bound as 0.25 * fourier_relax_factor**2 * maximum power in diffraction data
Set this value higher for noisy data.
default =
0.05 (>0.0)
- engine.RAAR.obj_smooth_std(float)¶
Gaussian smoothing (pixel) of the current object prior to update
If None, smoothing is deactivated. This smoothing can be used to reduce the amplitude of spurious pixels in the outer, least constrained areas of the object.
default =
None (>0.0)
- engine.RAAR.clip_object(tuple)¶
Clip object amplitude into this interval
default =
None
- engine.RAAR.probe_center_tol(float)¶
Pixel radius around optical axes that the probe mass center must reside in
default =
None (>0.0)
- engine.RAAR.compute_log_likelihood(bool)¶
A switch for computing the log-likelihood error (this can impact the performance of the engine)
default =
True
- engine.RAAR.beta(float)¶
Beta parameter for RAAR algorithm
default =
0.75 (>0.0)
- engine.RAAR.name(str)¶
default =
'RAAR'
engine.EPIE¶
- engine.EPIE(Param)¶
default =
Param({})
- engine.EPIE.numiter(int)¶
Total number of iterations
For on-the-fly (live) processing, the reconstruction engine will iterate at least this many times after all data has been loaded.
default =
20 (>1)
- engine.EPIE.numiter_contiguous(int)¶
Number of iterations without interruption
The engine will not return control to the caller until this number of iterations is completed (not processing server requests, I/O operations, …).
default =
1 (>1)
- engine.EPIE.probe_support(float, NoneType)¶
Valid probe area as fraction of the probe frame
Defines a circular area centered on the probe frame, in which the probe is allowed to be nonzero.
default =
0.7 (>0.0)
- engine.EPIE.probe_fourier_support(float, NoneType)¶
Valid probe area in frequency domain as fraction of the probe frame
Defines a circular area centered on the probe frame (in frequency domain), in which the probe is allowed to be nonzero.
default =
None (>0.0)
- engine.EPIE.record_local_error(bool)¶
If True, save the local map of errors into the runtime dictionary.
default =
False
- engine.EPIE.position_refinement(Param, bool)¶
If True refine scan positions
default =
Param({})
- engine.EPIE.position_refinement.method(str)¶
Annealing or GridSearch
default =
'Annealing'
- engine.EPIE.position_refinement.start(int)¶
Number of iterations until position refinement starts
If None, position refinement starts at first iteration
default =
None
- engine.EPIE.position_refinement.stop(int)¶
Number of iterations after which positon refinement stops
If None, position refinement stops after last iteration
default =
None
- engine.EPIE.position_refinement.interval(int)¶
Frequency of position refinement
default =
1
- engine.EPIE.position_refinement.nshifts(int)¶
Number of random shifts calculated in each position refinement step (has to be multiple of 4)
default =
4
- engine.EPIE.position_refinement.amplitude(float)¶
Distance from original position per random shift [m]
default =
1e-06
- engine.EPIE.position_refinement.amplitude_decay(bool)¶
After each interation, multiply amplitude by factor (stop - iteration) / (stop - start)
default =
True
- engine.EPIE.position_refinement.max_shift(float)¶
Maximum distance from original position [m]
default =
2e-06
- engine.EPIE.position_refinement.metric(str)¶
Error metric, can choose between “fourier” and “photon”
default =
'fourier'
- engine.EPIE.position_refinement.record(bool)¶
record movement of positions
default =
False
- engine.EPIE.probe_update_start(int)¶
Number of iterations before probe update starts
default =
0 (>0)
- engine.EPIE.probe_center_tol(float)¶
Pixel radius around optical axes that the probe mass center must reside in
default =
None (>0.0)
- engine.EPIE.compute_log_likelihood(bool)¶
A switch for computing the log-likelihood error (this can impact the performance of the engine)
default =
True
- engine.EPIE.alpha(float)¶
Parameter for adjusting the step size of the object update
default =
1.0 (>0.0)
- engine.EPIE.beta(float)¶
Parameter for adjusting the step size of the probe update
default =
1.0 (>0.0)
- engine.EPIE.object_norm_is_global(bool)¶
Calculate the object norm based on the global object instead of the local object
default =
False
- engine.EPIE.name(str)¶
default =
'EPIE'
engine.SDR¶
- engine.SDR(Param)¶
default =
Param({})
- engine.SDR.numiter(int)¶
Total number of iterations
For on-the-fly (live) processing, the reconstruction engine will iterate at least this many times after all data has been loaded.
default =
20 (>1)
- engine.SDR.numiter_contiguous(int)¶
Number of iterations without interruption
The engine will not return control to the caller until this number of iterations is completed (not processing server requests, I/O operations, …).
default =
1 (>1)
- engine.SDR.probe_support(float, NoneType)¶
Valid probe area as fraction of the probe frame
Defines a circular area centered on the probe frame, in which the probe is allowed to be nonzero.
default =
0.7 (>0.0)
- engine.SDR.probe_fourier_support(float, NoneType)¶
Valid probe area in frequency domain as fraction of the probe frame
Defines a circular area centered on the probe frame (in frequency domain), in which the probe is allowed to be nonzero.
default =
None (>0.0)
- engine.SDR.record_local_error(bool)¶
If True, save the local map of errors into the runtime dictionary.
default =
False
- engine.SDR.position_refinement(Param, bool)¶
If True refine scan positions
default =
Param({})
- engine.SDR.position_refinement.method(str)¶
Annealing or GridSearch
default =
'Annealing'
- engine.SDR.position_refinement.start(int)¶
Number of iterations until position refinement starts
If None, position refinement starts at first iteration
default =
None
- engine.SDR.position_refinement.stop(int)¶
Number of iterations after which positon refinement stops
If None, position refinement stops after last iteration
default =
None
- engine.SDR.position_refinement.interval(int)¶
Frequency of position refinement
default =
1
- engine.SDR.position_refinement.nshifts(int)¶
Number of random shifts calculated in each position refinement step (has to be multiple of 4)
default =
4
- engine.SDR.position_refinement.amplitude(float)¶
Distance from original position per random shift [m]
default =
1e-06
- engine.SDR.position_refinement.amplitude_decay(bool)¶
After each interation, multiply amplitude by factor (stop - iteration) / (stop - start)
default =
True
- engine.SDR.position_refinement.max_shift(float)¶
Maximum distance from original position [m]
default =
2e-06
- engine.SDR.position_refinement.metric(str)¶
Error metric, can choose between “fourier” and “photon”
default =
'fourier'
- engine.SDR.position_refinement.record(bool)¶
record movement of positions
default =
False
- engine.SDR.probe_update_start(int)¶
Number of iterations before probe update starts
default =
0 (>0)
- engine.SDR.probe_center_tol(float)¶
Pixel radius around optical axes that the probe mass center must reside in
default =
None (>0.0)
- engine.SDR.compute_log_likelihood(bool)¶
A switch for computing the log-likelihood error (this can impact the performance of the engine)
default =
True
- engine.SDR.sigma(float)¶
Relaxed Fourier reflection parameter.
default =
1 (>0.0)
- engine.SDR.tau(float)¶
Relaxed modulus constraint parameter.
default =
1 (>0.0)
- engine.SDR.beta_probe(float)¶
Parameter for adjusting the step size of the probe update
default =
0.1 (>0.0)
- engine.SDR.beta_object(float)¶
Parameter for adjusting the step size of the object update
default =
0.9 (>0.0)
- engine.SDR.name(str)¶
default =
'SDR'
engine.ML¶
- engine.ML(Param)¶
default =
Param({})
- engine.ML.numiter(int)¶
Total number of iterations
For on-the-fly (live) processing, the reconstruction engine will iterate at least this many times after all data has been loaded.
default =
20 (>1)
- engine.ML.numiter_contiguous(int)¶
Number of iterations without interruption
The engine will not return control to the caller until this number of iterations is completed (not processing server requests, I/O operations, …).
default =
1 (>1)
- engine.ML.probe_support(float, NoneType)¶
Valid probe area as fraction of the probe frame
Defines a circular area centered on the probe frame, in which the probe is allowed to be nonzero.
default =
0.7 (>0.0)
- engine.ML.probe_fourier_support(float, NoneType)¶
Valid probe area in frequency domain as fraction of the probe frame
Defines a circular area centered on the probe frame (in frequency domain), in which the probe is allowed to be nonzero.
default =
None (>0.0)
- engine.ML.record_local_error(bool)¶
If True, save the local map of errors into the runtime dictionary.
default =
False
- engine.ML.position_refinement(Param, bool)¶
If True refine scan positions
default =
Param({})
- engine.ML.position_refinement.method(str)¶
Annealing or GridSearch
default =
'Annealing'
- engine.ML.position_refinement.start(int)¶
Number of iterations until position refinement starts
If None, position refinement starts at first iteration
default =
None
- engine.ML.position_refinement.stop(int)¶
Number of iterations after which positon refinement stops
If None, position refinement stops after last iteration
default =
None
- engine.ML.position_refinement.interval(int)¶
Frequency of position refinement
default =
1
- engine.ML.position_refinement.nshifts(int)¶
Number of random shifts calculated in each position refinement step (has to be multiple of 4)
default =
4
- engine.ML.position_refinement.amplitude(float)¶
Distance from original position per random shift [m]
default =
1e-06
- engine.ML.position_refinement.amplitude_decay(bool)¶
After each interation, multiply amplitude by factor (stop - iteration) / (stop - start)
default =
True
- engine.ML.position_refinement.max_shift(float)¶
Maximum distance from original position [m]
default =
2e-06
- engine.ML.position_refinement.metric(str)¶
Error metric, can choose between “fourier” and “photon”
default =
'fourier'
- engine.ML.position_refinement.record(bool)¶
record movement of positions
default =
False
- engine.ML.name(str)¶
default =
'ML'
- engine.ML.ML_type(str)¶
Likelihood model
One of ‘gaussian’, poisson’ or ‘euclid’.
default =
'gaussian'
- engine.ML.floating_intensities(bool)¶
Adaptive diffraction pattern rescaling
If True, allow for adaptative rescaling of the diffraction pattern intensities (to correct for incident beam intensity fluctuations).
default =
False
- engine.ML.intensity_renormalization(float)¶
Rescales the intensities so they can be interpreted as Poisson counts.
default =
1.0 (>0.0)
- engine.ML.reg_del2(bool)¶
Whether to use a Gaussian prior (smoothing) regularizer
default =
False
- engine.ML.reg_del2_amplitude(float)¶
Amplitude of the Gaussian prior if used
default =
0.01 (>0.0)
- engine.ML.smooth_gradient(float)¶
Smoothing preconditioner
Sigma for gaussian filter (turned off if 0.)
default =
0.0
- engine.ML.smooth_gradient_decay(float)¶
Decay rate for smoothing preconditioner
Sigma for gaussian filter will reduce exponentially at this rate
default =
0.0
- engine.ML.scale_precond(bool)¶
Whether to use the object/probe scaling preconditioner
This parameter can give faster convergence for weakly scattering samples.
default =
False
- engine.ML.scale_probe_object(float)¶
Relative scale of probe to object
default =
1.0 (>0.0)
- engine.ML.probe_update_start(int)¶
Number of iterations before probe update starts
default =
2 (>0)
- engine.ML.poly_line_coeffs(str)¶
How many coefficients to be used in the the linesearch
choose between the ‘quadratic’ approximation (default) or ‘all’
default =
'quadratic'
engine.DM_3dBragg¶
- engine.DM_3dBragg(Param)¶
default =
Param({})
- engine.DM_3dBragg.numiter(int)¶
Total number of iterations
For on-the-fly (live) processing, the reconstruction engine will iterate at least this many times after all data has been loaded.
default =
20 (>1)
- engine.DM_3dBragg.numiter_contiguous(int)¶
Number of iterations without interruption
The engine will not return control to the caller until this number of iterations is completed (not processing server requests, I/O operations, …).
default =
1 (>1)
- engine.DM_3dBragg.probe_support(float, NoneType)¶
Valid probe area as fraction of the probe frame
Defines a circular area centered on the probe frame, in which the probe is allowed to be nonzero.
default =
0.7 (>0.0)
- engine.DM_3dBragg.probe_fourier_support(float, NoneType)¶
Valid probe area in frequency domain as fraction of the probe frame
Defines a circular area centered on the probe frame (in frequency domain), in which the probe is allowed to be nonzero.
default =
None (>0.0)
- engine.DM_3dBragg.record_local_error(bool)¶
If True, save the local map of errors into the runtime dictionary.
default =
False
- engine.DM_3dBragg.position_refinement(Param, bool)¶
If True refine scan positions
default =
Param({})
- engine.DM_3dBragg.position_refinement.method(str)¶
Annealing or GridSearch
default =
'Annealing'
- engine.DM_3dBragg.position_refinement.start(int)¶
Number of iterations until position refinement starts
If None, position refinement starts at first iteration
default =
None
- engine.DM_3dBragg.position_refinement.stop(int)¶
Number of iterations after which positon refinement stops
If None, position refinement stops after last iteration
default =
None
- engine.DM_3dBragg.position_refinement.interval(int)¶
Frequency of position refinement
default =
1
- engine.DM_3dBragg.position_refinement.nshifts(int)¶
Number of random shifts calculated in each position refinement step (has to be multiple of 4)
default =
4
- engine.DM_3dBragg.position_refinement.amplitude(float)¶
Distance from original position per random shift [m]
default =
1e-06
- engine.DM_3dBragg.position_refinement.amplitude_decay(bool)¶
After each interation, multiply amplitude by factor (stop - iteration) / (stop - start)
default =
True
- engine.DM_3dBragg.position_refinement.max_shift(float)¶
Maximum distance from original position [m]
default =
2e-06
- engine.DM_3dBragg.position_refinement.metric(str)¶
Error metric, can choose between “fourier” and “photon”
default =
'fourier'
- engine.DM_3dBragg.position_refinement.record(bool)¶
record movement of positions
default =
False
- engine.DM_3dBragg.probe_update_start(int)¶
Number of iterations before probe update starts
default =
2 (>0)
- engine.DM_3dBragg.subpix_start(int)¶
Number of iterations before starting subpixel interpolation
default =
0 (>0)
- engine.DM_3dBragg.subpix(str)¶
Subpixel interpolation; ‘fourier’,’linear’ or None for no interpolation
default =
'linear'
- engine.DM_3dBragg.update_object_first(bool)¶
If True update object before probe
default =
True
- engine.DM_3dBragg.overlap_converge_factor(float)¶
Threshold for interruption of the inner overlap loop
The inner overlap loop refines the probe and the object simultaneously. This loop is escaped as soon as the overall change in probe, relative to the first iteration, is less than this value.
default =
0.05 (>0.0)
- engine.DM_3dBragg.overlap_max_iterations(int)¶
Maximum of iterations for the overlap constraint inner loop
default =
10 (>1)
- engine.DM_3dBragg.probe_inertia(float)¶
Weight of the current probe estimate in the update
default =
1e-09 (>0.0)
- engine.DM_3dBragg.object_inertia(float)¶
Weight of the current object in the update
default =
0.0001 (>0.0)
- engine.DM_3dBragg.fourier_power_bound(float)¶
If rms error of model vs diffraction data is smaller than this value, Fourier constraint is met
For Poisson-sampled data, the theoretical value for this parameter is 1/4. Set this value higher for noisy data. By default, power bound is calculated using fourier_relax_factor
default =
None
- engine.DM_3dBragg.fourier_relax_factor(float)¶
A factor used to calculate the Fourier power bound as 0.25 * fourier_relax_factor**2 * maximum power in diffraction data
Set this value higher for noisy data.
default =
0.05 (>0.0)
- engine.DM_3dBragg.obj_smooth_std(float)¶
Gaussian smoothing (pixel) of the current object prior to update
If None, smoothing is deactivated. This smoothing can be used to reduce the amplitude of spurious pixels in the outer, least constrained areas of the object.
default =
None (>0.0)
- engine.DM_3dBragg.clip_object(tuple)¶
Clip object amplitude into this interval
default =
None
- engine.DM_3dBragg.probe_center_tol(float)¶
Pixel radius around optical axes that the probe mass center must reside in
default =
None (>0.0)
- engine.DM_3dBragg.compute_log_likelihood(bool)¶
A switch for computing the log-likelihood error (this can impact the performance of the engine)
default =
True
- engine.DM_3dBragg.alpha(float)¶
Mix parameter between Difference Map (alpha=1.) and Alternating Projections (alpha=0.)
default =
1.0 (>0.0)
- engine.DM_3dBragg.name(str)¶
default =
'DM_3dBragg'
- engine.DM_3dBragg.sample_support(Param)¶
Sample support settings
default =
Param({})
- engine.DM_3dBragg.sample_support.type(str)¶
Sample support geometry
Options are ‘thinlayer’ for one-dimensional support as function of z, ‘rod’ for one-dimensional radial support around the z axis.
default =
'thinlayer'
- engine.DM_3dBragg.sample_support.size(float)¶
Support thickness or radius
This parameter is ignored when shrink wrapping is used.
default =
2e-07
- engine.DM_3dBragg.sample_support.coefficient(float)¶
Scaling of region outside the support
Sample amplitude is multiplied by this value outside the support region
default =
0.1 (>0.0, <1.0)
- engine.DM_3dBragg.sample_support.shrinkwrap(Param)¶
Shrink wrap settings. None for no shrink wrap.
default =
Param({})
- engine.DM_3dBragg.sample_support.shrinkwrap.smooth(float)¶
Shrink wrap smoothing parameter in pixels
Sigma of gaussian with which to smooth object profile before applying shrink wrap. Pass None for no smoothing. Values < .3 make little sense.
default =
1.0 (>0.3)
- engine.DM_3dBragg.sample_support.shrinkwrap.cutoff(float)¶
Shrink wrap cutoff parameter
The support is truncated where the object profile has decayed to this value relative to the maximum.
default =
0.5
- engine.DM_3dBragg.sample_support.shrinkwrap.monotonic(bool)¶
Require the object profile to be monotonic
If the object profile increases again after the maximum, then the support is cut off. Set the cutoff parameter low to make this the dominating criterion.
default =
True
- engine.DM_3dBragg.sample_support.shrinkwrap.start(int)¶
Start shrink wrap after this iteration
default =
10
- engine.DM_3dBragg.sample_support.shrinkwrap.plot(bool)¶
Pass shrink wrap information to the plot client
Puts shrink wrap information in the runtime dict. The plot client can choose to plot it if it likes.
default =
False
ptycho¶
- ptycho(Param)¶
default =
Param({})
- ptycho.verbose_level(str, int)¶
Verbosity level
Verbosity level for information logging. -
CRITICAL
: Only critical errors -ERROR
: All errors -WARNING
: Warning -INFO
: Process Information -INSPECT
: Object Information -DEBUG
: Debugdefault =
'ERROR'
- ptycho.data_type(str)¶
Reconstruction floating number precision
Reconstruction floating number precision (
'single'
or'double'
)default =
'single'
- ptycho.run(str)¶
Reconstruction identifier
Reconstruction run identifier. If
None
, the run name will be constructed at run time from other information.default =
None
- ptycho.frames_per_block(int)¶
Max number of frames per block of data
This parameter determines the size of buffer arrays for GPUs. Reduce this number if you run out of memory on the GPU.
default =
100000 (>1)
- ptycho.min_frames_for_recon(int)¶
Minimum number of frames to be loaded before reconstruction can start.
For on-the-fly (live) processing, the first reconstruction engine will wait until this many frames have been loaded.
default =
0
- ptycho.dry_run(bool)¶
Dry run switch
Run everything skipping all memory and cpu-heavy steps (and file saving). NOT IMPLEMENTED
default =
False
- ptycho.ipython_kernel(bool)¶
Start an ipython kernel for debugging
Start an ipython kernel for debugging.
default =
False
ptycho.io¶
- ptycho.io(Param)¶
Global parameters for I/O
Global parameter container for I/O settings.
default =
Param({})
- ptycho.io.home(str)¶
Base directory for all I/O
home is the root directory for all input/output operations. All other path parameters that are relative paths will be relative to this directory.
default =
'./'
- ptycho.io.rfile(str)¶
Reconstruction file name (or format string)
Reconstruction file name or format string (constructed against runtime dictionary)
default =
'recons/%(run)s/%(run)s_%(engine)s_%(iterations)04d.ptyr'
- ptycho.io.rformat(str)¶
Reconstruction file format
Choose a reconstruction file format for after engine completion. -
'minimal'
: Bare minimum of information -'dls'
: Custom format for Diamond Light Source -'used_params'
: Same as minimal but including all used parametersdefault =
'minimal'
- ptycho.io.interaction(Param)¶
ZeroMQ interactor options
Options for the communications server
default =
Param({})
- ptycho.io.interaction.active(bool)¶
turns on the interaction
If True the interaction starts, if False all interaction is turned off
default =
True
- ptycho.io.interaction.server(Param)¶
Link to server parameter tree
default =
io.interaction.server
- ptycho.io.interaction.client(Param)¶
Link to client parameter tree
default =
io.interaction.client
- ptycho.io.autosave(Param)¶
Auto-save options
Options for automatic saving during reconstruction.
default =
Param({})
- ptycho.io.autosave.active(bool)¶
Activation switch
If
True
the current reconstruction will be saved at regular intervals.default =
True
- ptycho.io.autosave.interval(int)¶
Auto-save interval
If
>0
the current reconstruction will be saved at regular intervals according to thedefault =
10 (>-1)
- ptycho.io.autosave.rfile(str)¶
Auto-save file name (or format string)
Auto-save file name or format string (constructed against runtime dictionary)
default =
'dumps/%(run)s/%(run)s_%(engine)s_%(iterations)04d.ptyr'
- ptycho.io.autoplot(Param)¶
Plotting client parameters
Container for the plotting.
default =
Param({})
- ptycho.io.autoplot.active(bool)¶
Activation switch
If
True
the current reconstruction will be plotted at regular intervals.default =
True
- ptycho.io.autoplot.imfile(str)¶
Plot images file name (or format string)
Plot images file name (or format string).
default =
'plots/%(run)s/%(run)s_%(engine)s_%(iterations)04d.png'
- ptycho.io.autoplot.interval(int)¶
Number of iterations between plot updates
Requests to the server will happen with this iteration intervals. Note that this will work only if interaction.polling_interval is smaller or equal to this number. If
interval =0
plotting is disabled which should be used, when ptypy is run on a cluster.default =
1 (>-1)
- ptycho.io.autoplot.threaded(bool)¶
Live plotting switch
If
True
, a plotting client will be spawned in a new thread and connected at initialization. IfFalse
, the master node will carry out the plotting, pausing the reconstruction. This option should be set toTrue
when ptypy is run on an isolated workstation.default =
True
- ptycho.io.autoplot.layout(str)¶
Options for default plotter or template name
Flexible layout for default plotter is not implemented yet. Please choose one of the templates
'default'
,``’black_and_white’,
’nearfield’, ``'minimal'
or'weak'
default =
'default'
- ptycho.io.autoplot.dump(bool)¶
Switch to dump plots as image files
Switch to dump plots as image files during reconstruction.
default =
False
- ptycho.io.autoplot.make_movie(bool)¶
Produce reconstruction movie after the reconstruction.
Switch to request the production of a movie from the dumped plots at the end of the reconstruction.
default =
False
- ptycho.io.benchmark(str)¶
Produce timings for benchmarking the performance of data loaders and engines
Switch to get timings and save results to a json file in p.io.home Choose
'all'
for timing data loading, engine_init, engine_prepare, engine_iterate and engine_finalizedefault =
None
ptycho.scans¶
- ptycho.scans(Param)¶
Container for instances of scan parameters
default =
Param({})
- ptycho.scans.scan_00(Param)¶
Wildcard: multiple entries with arbitrary names are accepted.
Wildcard entry for list of scans to load. See
scan
default =
scan.ScanModel
ptycho.engines¶
- ptycho.engines(Param)¶
Container for instances of engine parameters
default =
Param({})