Skip to content

Commit

Permalink
Updated docstrings which are missing choices (#507)
Browse files Browse the repository at this point in the history
* Added more choices to comments

---------

Co-authored-by: Thomas Milburn <[email protected]>
  • Loading branch information
thomas-milburn and Thomas Milburn authored Oct 12, 2023
1 parent 148239f commit c544fef
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions archive/cuda_extension/engines/DM_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class DMGpu(DMNpy):
default = 'linear'
type = str
help = Subpixel interpolation; 'fourier','linear' or None for no interpolation
choices = ['fourier','linear',None]
[update_object_first]
default = True
Expand Down
1 change: 1 addition & 0 deletions archive/cuda_extension/engines/DM_npy.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class DMNpy(DM):
default = 'linear'
type = str
help = Subpixel interpolation; 'fourier','linear' or None for no interpolation
choices = ['fourier','linear',None]
[update_object_first]
default = True
Expand Down
1 change: 1 addition & 0 deletions archive/engines/DM.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class DM(PositionCorrectionEngine):
default = 'linear'
type = str
help = Subpixel interpolation; 'fourier','linear' or None for no interpolation
choices = ['fourier','linear',None]
[update_object_first]
default = True
Expand Down
2 changes: 2 additions & 0 deletions ptypy/core/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class PtyScan(object):
default = data
help = Determines what will be loaded in parallel
doc = Choose from ``None``, ``'data'``, ``'common'``, ``'all'``
choices = ['data', 'common', 'all']
[rebin]
type = int
Expand All @@ -139,6 +140,7 @@ class PtyScan(object):
<newline>
Alternatively, a 3-tuple of booleans may be provided ``(do_transpose,
do_flipud, do_fliplr)``
choices = [0, 1, 2, 3, 4, 5, 6, 7]
userlevel = 1
[min_frames]
Expand Down
1 change: 1 addition & 0 deletions ptypy/core/illumination.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
- *<template>* : one of the templates inillumination module
In 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.
choices = ['recon','stxm',None]
userlevel = 0
[photons]
Expand Down
4 changes: 4 additions & 0 deletions ptypy/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ class ScanModel(object):
default = farfield
help = Propagation type
doc = Either "farfield" or "nearfield"
choices = ['farfield', 'nearfield']
userlevel = 1
[ffttype]
type = str
default = scipy
help = FFT library
doc = Choose from "numpy", "scipy" or "fftw"
choices = ['numpy', 'scipy', 'fftw']
userlevel = 1
[data]
Expand Down Expand Up @@ -906,6 +908,7 @@ class _Full(object):
- ``'irregular'``: no assumption
**[not implemented]**
type = str
choices = ['achromatic', 'linear', 'irregular']
userlevel = 2
[coherence.probe_dispersion]
Expand All @@ -917,6 +920,7 @@ class _Full(object):
- ``'irregular'``: no assumption
**[not implemented]**
type = str
choices = ['achromatic', 'linear', 'irregular']
userlevel = 2
[resolution]
Expand Down
4 changes: 4 additions & 0 deletions ptypy/core/ptycho.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class Ptycho(Base):
- ``INSPECT``: Object Information
- ``DEBUG``: Debug
type = str, int
choices = ['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'INSPECT', 'DEBUG']
userlevel = 0
[data_type]
Expand All @@ -90,6 +91,7 @@ class Ptycho(Base):
doc = Reconstruction floating number precision (``'single'`` or
``'double'``)
type = str
choices = ['single', 'double']
userlevel = 1
[run]
Expand Down Expand Up @@ -248,6 +250,7 @@ class Ptycho(Base):
help = Options for default plotter or template name
doc = Flexible layout for default plotter is not implemented yet. Please choose one of the
templates ``'default'``,``'black_and_white'``,``'nearfield'``, ``'minimal'`` or ``'weak'``
choices = ['default', 'black_and_white', 'nearfield', 'minimal', 'weak']
userlevel = 2
[io.autoplot.dump]
Expand All @@ -269,6 +272,7 @@ class Ptycho(Base):
help = Produce timings for benchmarking the performance of data loaders and engines
doc = 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_finalize
choices = ['all', 'loading', 'engine_init', 'engine_prepare', 'engine_iterate', 'engine_finalize']
userlevel = 2
[scans]
Expand Down
1 change: 1 addition & 0 deletions ptypy/core/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
processed according to `process` in order to *simulate* a sample from e.g. a thickness
profile.
type = str, array
choices = ['recon', 'stxm', 'None']
userlevel = 0
[fill]
Expand Down
1 change: 1 addition & 0 deletions ptypy/engines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ class PositionCorrectionEngine(BaseEngine):
default = "fourier"
type = str
help = Error metric, can choose between "fourier" and "photon"
choices = ["fourier", "photon"]
[position_refinement.record]
default = False
Expand Down
1 change: 1 addition & 0 deletions ptypy/engines/projectional.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class _ProjectionEngine(PositionCorrectionEngine):
default = 'linear'
type = str
help = Subpixel interpolation; 'fourier','linear' or None for no interpolation
choices = ['fourier','linear',None]
[update_object_first]
default = True
Expand Down

0 comments on commit c544fef

Please sign in to comment.