Skip to content

Commit b85775e

Browse files
committed
feat(documentation): add code example in index.rst
(cherry picked from commit b8aae49)
1 parent e872e3b commit b85775e

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

doc/index.rst

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ Sigima
44
**Sigima** is an advanced Python library for *scientific image and signal processing*.
55
It provides a wide range of functionalities for analyzing and processing data, including signal filtering, image enhancement, and feature extraction. Sigima is based on a simple but effective object-oriented design, making it easy to use and extend.
66

7+
With Sigima, do in 3 lines of code what would normally take dozens of lines:
8+
9+
.. code-block:: python
10+
11+
import numpy as np
12+
import sigima.objects
13+
import sigima.proc.image
14+
15+
data = np.random.normal(100, 30, (100, 100)) # Prepare test image data
16+
17+
img = sigima.objects.create_image("Noisy", data) # Create the image object
18+
img.roi = sigima.objects.create_image_roi("circle", [30, 30, 20]) # Define ROI
19+
result = sigima.proc.image.gaussian_filter(img, sigma=5.0) # Apply Gaussian filter
20+
21+
.. figure:: _static/DataLab-Banner.svg
22+
:align: center
23+
:width: 300 px
24+
:class: dark-light no-scaled-link
25+
26+
Developed and maintained by the DataLab Platform Developers, **Sigima** powers the computation backend of `DataLab <https://www.datalab-platform.com>`_.
27+
728
.. only:: html and not latex
829

930
.. grid:: 2 2 4 4
@@ -33,13 +54,6 @@ It provides a wide range of functionalities for analyzing and processing data, i
3354

3455
Getting involved in the project
3556

36-
.. figure:: _static/DataLab-Banner.svg
37-
:align: center
38-
:width: 300 px
39-
:class: dark-light no-scaled-link
40-
41-
Developed and maintained by the DataLab Platform Developers, **Sigima** powers the computation backend of `DataLab <https://www.datalab-platform.com>`_.
42-
4357
Sigima has been funded by the following stakeholders:
4458

4559
.. list-table::

doc/locale/fr/LC_MESSAGES/index.po

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ msgstr "Sigima"
2626
msgid "**Sigima** is an advanced Python library for *scientific image and signal processing*. It provides a wide range of functionalities for analyzing and processing data, including signal filtering, image enhancement, and feature extraction. Sigima is based on a simple but effective object-oriented design, making it easy to use and extend."
2727
msgstr "**Sigima** est une bibliothèque Python avancée pour le *traitement scientifique des images et des signaux*. Elle offre une large gamme de fonctionnalités pour l'analyse et le traitement des données, y compris le filtrage des signaux, l'amélioration des images et l'extraction de caractéristiques. Sigima est basée sur une conception orientée objet simple mais efficace, ce qui la rend facile à utiliser et à étendre."
2828

29+
msgid "With Sigima, do in 3 lines of code what would normally take dozens of lines:"
30+
msgstr "Avec Sigima, faites en 3 lignes de code ce qui prendrait normalement des dizaines de lignes :"
31+
32+
msgid "Developed and maintained by the DataLab Platform Developers, **Sigima** powers the computation backend of `DataLab <https://www.datalab-platform.com>`_."
33+
msgstr "Développée et maintenue par les développeurs de la plateforme DataLab, **Sigima** alimente le backend de calcul de `DataLab <https://www.datalab-platform.com>`_."
34+
2935
msgid "<svg version=\"1.1\" width=\"1.0em\" height=\"1.0em\" class=\"sd-octicon sd-octicon-rocket sd-text-info\" viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"></path></svg> User Guide"
3036
msgstr "Manuel utilisateur"
3137

3238
msgid "Installation, overview, and features"
33-
msgstr "Installation, vue d'ensemble et fonctionnalités"
39+
msgstr "Installation et fonctionnalités"
3440

3541
msgid "<svg version=\"1.1\" width=\"1.0em\" height=\"1.0em\" class=\"sd-octicon sd-octicon-code sd-text-info\" viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z\"></path></svg> Examples"
3642
msgstr "Exemples"
@@ -50,9 +56,6 @@ msgstr "Contribuer"
5056
msgid "Getting involved in the project"
5157
msgstr "S'impliquer dans le projet"
5258

53-
msgid "Developed and maintained by the DataLab Platform Developers, **Sigima** powers the computation backend of `DataLab <https://www.datalab-platform.com>`_."
54-
msgstr "Développée et maintenue par les développeurs de la plateforme DataLab, **Sigima** alimente le backend de calcul de `DataLab <https://www.datalab-platform.com>`_."
55-
5659
msgid "Sigima has been funded by the following stakeholders:"
5760
msgstr "Sigima a été financée par les parties prenantes suivantes:"
5861

doc/locale/fr/LC_MESSAGES/user_guide/index.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ msgid "Contents:"
2121
msgstr "Table des matières :"
2222

2323
msgid "User Guide"
24-
msgstr "Guide de l'utilisateur"
24+
msgstr "Manuel utilisateur"
2525

2626
msgid "<svg version=\"1.1\" width=\"1.0em\" height=\"1.0em\" class=\"sd-octicon sd-octicon-download sd-text-info\" viewBox=\"0 0 16 16\" aria-hidden=\"true\"><path d=\"M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z\"></path><path d=\"M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z\"></path></svg> Installation"
2727
msgstr "Installation"

0 commit comments

Comments
 (0)