Skip to content

Commit

Permalink
Update usage.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrykin authored Sep 16, 2024
1 parent 0c3fae1 commit a77efdb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
22 changes: 11 additions & 11 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion superdsm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a77efdb

Please sign in to comment.