diff --git a/docs/source/conf.py b/docs/source/conf.py index 5031e66..03b9e64 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,6 +20,7 @@ intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None), 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), + 'repype': ('https://repype.readthedocs.io/en/stable/', None), } intersphinx_disabled_domains = ['std'] diff --git a/docs/source/usage.rst b/docs/source/usage.rst index f07381d..68fbfcb 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -24,13 +24,13 @@ To run SuperDSM from command line, use: .. code-block:: console - python -m 'superdsm.batch' --help + python -m 'superdsm' --help -To export (intermediate) results, use: +To run the interactive text-based user interface, use: .. code-block:: console - python -m 'superdsm.export' --help + python -m 'superdsm.textual' For details, see :ref:`batch_system`. @@ -50,16 +50,16 @@ After this initialization routine, SuperDSM is ready to use: .. code-block:: python - import superdsm.automation - pipeline = superdsm.pipeline.create_default_pipeline() - cfg = superdsm.config.Config() - data, _, _ = superdsm.automation.process_image(pipeline, cfg, img) + import superdsm + pipeline = superdsm.Pipeline() + cfg = superdsm.Config() + data, _, _ = pipeline.process_image(img, cfg) -In this example, the default set of hyperparameters will be used. The parameters can be changed using the ``cfg`` object (see the :py:class:`~superdsm.config.Config` class API). The available hyperparameters are described in the documentation of the respective stages employed in the pipeline created by the :py:meth:`~superdsm.pipeline.create_default_pipeline` function. +In this example, the default set of hyperparameters will be used. The parameters can be changed using the ``cfg`` object (see the :py:class:`repype.config.Config` class API). The available hyperparameters are described in the documentation of the respective stages employed in the pipeline. The variable ``img`` must be a two-dimensional ``numpy.ndarray`` object which represents the raw image intensities. Images can be loaded from file using :py:meth:`~superdsm.io.imread`. -The pipeline data object ``data`` is a dictionary containing all the intermediate results which might be necessary for further computations. This can also be used to obtain a graphical representation of the segmentation results: +The *pipeline data object* ``data`` is a dictionary containing all the intermediate results which might be necessary for further computations. This can also be used to obtain a graphical representation of the segmentation results: .. code-block:: python @@ -77,9 +77,9 @@ MKL_DEBUG_CPU_TYPE To take advantage of the acceleration provided by MKL on AMD CPUs, the environment variable ``MKL_DEBUG_CPU_TYPE=5`` should be set when using an AMD CPU. This usually happens automatically, unless automatic recognition of the CPU vendor fails (and a warning is shown). -SUPERDSM_INTERMEDIATE_OUTPUT +REPYPE_CLI_INTERMEDIATE - Set ``SUPERDSM_INTERMEDIATE_OUTPUT=0`` to mute the intermediate console output. + Set ``REPYPE_CLI_INTERMEDIATE=0`` to mute the intermediate console output. SUPERDSM_NUM_CPUS diff --git a/superdsm/__init__.py b/superdsm/__init__.py index 230fa89..06bf9a8 100644 --- a/superdsm/__init__.py +++ b/superdsm/__init__.py @@ -6,5 +6,6 @@ # By-pass this bug: https://github.com/flatironinstitute/sparse_dot/issues/7 from . import _mkl -from . import pipeline +from .pipeline import Pipeline +from repype.config import Config