Skip to content

Commit 1b346fc

Browse files
committed
Add auto-normalize kernel option for signal/image processing and update French translations
1 parent 5971e50 commit 1b346fc

4 files changed

Lines changed: 63 additions & 40 deletions

File tree

datalab/config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ class ProcSection(conf.Section, metaclass=conf.SectionMeta):
219219
# - False: FFT shift is disabled
220220
fft_shift_enabled = conf.Option()
221221

222+
# Auto-normalize convolution kernel for signal/image processing:
223+
# - True: automatically normalize kernel (default)
224+
# - False: do not normalize kernel
225+
auto_normalize_kernel = conf.Option()
226+
222227
# Ignore warnings during computation:
223228
# - True: ignore warnings
224229
# - False: do not ignore warnings
@@ -391,6 +396,8 @@ def initialize():
391396
Conf.proc.use_image_dims.get(True)
392397
Conf.proc.fft_shift_enabled.get(True)
393398
sigima_options.fft_shift_enabled.set(True) # Sync with sigima config
399+
Conf.proc.auto_normalize_kernel.get(False)
400+
sigima_options.auto_normalize_kernel.set(False) # Sync with sigima config
394401
Conf.proc.extract_roi_singleobj.get(False)
395402
Conf.proc.keep_results.get(False)
396403
Conf.proc.ignore_warnings.get(False)

datalab/gui/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,7 @@ def __edit_settings(self) -> None:
18491849
"""Edit settings"""
18501850
changed_options = edit_settings(self)
18511851
sigima_options.fft_shift_enabled.set(Conf.proc.fft_shift_enabled.get())
1852+
sigima_options.auto_normalize_kernel.set(Conf.proc.auto_normalize_kernel.get())
18521853
for option in changed_options:
18531854
if option == "color_mode":
18541855
self.__update_color_mode()

datalab/gui/settings.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ class ProcSettings(gds.DataSet):
170170
"spectrum for easier visualization and analysis."
171171
),
172172
)
173+
auto_normalize_kernel = gds.BoolItem(
174+
_("Auto-normalize convolution/deconvolution kernel"),
175+
_("Convolution"),
176+
help=_(
177+
"If enabled, convolution and deconvolution kernels will be automatically "
178+
"normalized for signal and image processing operations to preserve signal "
179+
"energy and image intensity."
180+
),
181+
)
173182
extract_roi_singleobj = gds.BoolItem(
174183
"",
175184
_("Extract ROI in single object"),

datalab/locale/fr/LC_MESSAGES/datalab.po

Lines changed: 46 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: datalab\n"
88
"Report-Msgid-Bugs-To: p.raybaut@codra.fr\n"
9-
"POT-Creation-Date: 2025-10-19 11:55+0200\n"
9+
"POT-Creation-Date: 2025-10-19 15:20+0200\n"
1010
"PO-Revision-Date: 2025-05-22 15:46+0200\n"
1111
"Last-Translator: Christophe Debonnel <c.debonnel@codra.fr>\n"
1212
"Language: fr\n"
@@ -451,42 +451,6 @@ msgstr "Afficher le panneau de contraste"
451451
msgid "Show or hide contrast adjustment panel"
452452
msgstr "Afficher ou cacher le panneau de réglage du contraste"
453453

454-
msgid "Flip or rotation"
455-
msgstr "Symétrie ou rotation"
456-
457-
msgid "Intensity profiles"
458-
msgstr "Profils d'intensité"
459-
460-
msgid "Line profile..."
461-
msgstr "Profil rectiligne..."
462-
463-
msgid "Extract horizontal or vertical profile"
464-
msgstr "Extraire un profil horizontal ou vertical"
465-
466-
msgid "Segment profile..."
467-
msgstr "Profil le long d'un segment..."
468-
469-
msgid "Extract profile along a segment"
470-
msgstr "Extraire un profil le long d'un segment"
471-
472-
msgid "Average profile..."
473-
msgstr "Profil moyen..."
474-
475-
msgid "Extract average horizontal or vertical profile"
476-
msgstr "Extraire un profil moyen horizontal ou vertical"
477-
478-
msgid "Radial profile extraction..."
479-
msgstr "Extraire le profil radial..."
480-
481-
msgid "Radial profile extraction around image centroid"
482-
msgstr "Extraire le profil radial autour du barycentre de l'image"
483-
484-
msgid "Distribute on a grid..."
485-
msgstr "Distribuer sur une grille..."
486-
487-
msgid "Reset image positions"
488-
msgstr "Réinitialiser les positions des images"
489-
490454
msgid "Thresholding"
491455
msgstr "Seuillage"
492456

@@ -547,6 +511,42 @@ msgstr "Redimensionner"
547511
msgid "Pixel binning"
548512
msgstr "Binning"
549513

514+
msgid "Flip or rotation"
515+
msgstr "Symétrie ou rotation"
516+
517+
msgid "Intensity profiles"
518+
msgstr "Profils d'intensité"
519+
520+
msgid "Line profile..."
521+
msgstr "Profil rectiligne..."
522+
523+
msgid "Extract horizontal or vertical profile"
524+
msgstr "Extraire un profil horizontal ou vertical"
525+
526+
msgid "Segment profile..."
527+
msgstr "Profil le long d'un segment..."
528+
529+
msgid "Extract profile along a segment"
530+
msgstr "Extraire un profil le long d'un segment"
531+
532+
msgid "Average profile..."
533+
msgstr "Profil moyen..."
534+
535+
msgid "Extract average horizontal or vertical profile"
536+
msgstr "Extraire un profil moyen horizontal ou vertical"
537+
538+
msgid "Radial profile extraction..."
539+
msgstr "Extraire le profil radial..."
540+
541+
msgid "Radial profile extraction around image centroid"
542+
msgstr "Extraire le profil radial autour du barycentre de l'image"
543+
544+
msgid "Distribute on a grid..."
545+
msgstr "Distribuer sur une grille..."
546+
547+
msgid "Reset image positions"
548+
msgstr "Réinitialiser les positions des images"
549+
550550
msgid "Process signal"
551551
msgstr "Traiter le signal"
552552

@@ -1273,9 +1273,6 @@ msgstr "Profil moyen"
12731273
msgid "Radial profile"
12741274
msgstr "Profil radial"
12751275

1276-
msgid "Convolution"
1277-
msgstr "Convolution"
1278-
12791276
msgid "kernel to convolve with"
12801277
msgstr "noyau de la convolution"
12811278

@@ -1976,6 +1973,15 @@ msgstr "Décalage FFT"
19761973
msgid "Enable FFT shift to center the zero-frequency component in the frequency spectrum for easier visualization and analysis."
19771974
msgstr "Activer le décalage FFT pour centrer la composante de fréquence nulle dans le spectre de fréquence pour une visualisation et une analyse plus faciles."
19781975

1976+
msgid "Auto-normalize convolution/deconvolution kernel"
1977+
msgstr "Normalisation automatique du noyau de convolution/déconvolution"
1978+
1979+
msgid "Convolution"
1980+
msgstr "Convolution"
1981+
1982+
msgid "If enabled, convolution and deconvolution kernels will be automatically normalized for signal and image processing operations to preserve signal energy and image intensity."
1983+
msgstr "Si activé, les noyaux de convolution et de déconvolution seront automatiquement normalisés pour les opérations de traitement de signaux et d'images afin de préserver l'énergie du signal et l'intensité de l'image."
1984+
19791985
msgid "Extract ROI in single object"
19801986
msgstr "Extraire les ROI dans un seul objet"
19811987

0 commit comments

Comments
 (0)