Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions doc/locale/fr/LC_MESSAGES/user_guide/features.po
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,20 @@ msgstr ""
msgid "Clip values to specified range"
msgstr "Écrêter les valeurs à une plage spécifiée"

msgid ":func:`replace_special_values <sigima.proc.signal.replace_special_values>`"
msgstr ":func:`replace_special_values <sigima.proc.signal.replace_special_values>`"

msgid ":func:`replace_special_values <sigima.proc.image.replace_special_values>`"
msgstr ":func:`replace_special_values <sigima.proc.image.replace_special_values>`"

msgid "Replace NaN, +Inf and -Inf values with configurable strategies"
msgstr "Remplacer les valeurs NaN, +Inf et -Inf avec des stratégies configurables"

msgid ":func:`offset_correction <sigima.proc.signal.offset_correction>`"
msgstr ""
msgstr ":func:`offset_correction <sigima.proc.signal.offset_correction>`"

msgid ":func:`offset_correction <sigima.proc.image.offset_correction>`"
msgstr ""
msgstr ":func:`offset_correction <sigima.proc.image.offset_correction>`"

msgid "Remove DC offset/background"
msgstr "Supprimer le décalage DC/fond continu"
Expand Down
3 changes: 3 additions & 0 deletions doc/user_guide/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ Signal Conditioning
* - :func:`clip <sigima.proc.signal.clip>`
- :func:`clip <sigima.proc.image.clip>`
- Clip values to specified range
* - :func:`replace_special_values <sigima.proc.signal.replace_special_values>`
- :func:`replace_special_values <sigima.proc.image.replace_special_values>`
- Replace NaN, +Inf and -Inf values with configurable strategies
* - :func:`offset_correction <sigima.proc.signal.offset_correction>`
- :func:`offset_correction <sigima.proc.image.offset_correction>`
- Remove DC offset/background
Expand Down
40 changes: 40 additions & 0 deletions sigima/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,43 @@ class DetectionROIGeometry(gds.LabeledEnum):

CIRCLE = "circle", _("Circle")
RECTANGLE = "rectangle", _("Rectangle")


class ReplacementStrategySignal(gds.LabeledEnum):
"""Replacement strategies for special values (NaN/Inf) in signals."""

NONE = "none", _("Do nothing")
ZERO = "zero", _("Replace with zero")
CONSTANT = "constant", _("Replace with constant")
MIN = "min", _("Replace with minimum")
MAX = "max", _("Replace with maximum")
MEAN = "mean", _("Replace with mean")
MEDIAN = "median", _("Replace with median")
DELETE = "delete", _("Delete points")
FORWARD_FILL = "ffill", _("Forward fill (previous value)")
BACKWARD_FILL = "bfill", _("Backward fill (next value)")
INTERP_LINEAR = "interp_linear", _("Interpolation: Linear")
INTERP_SPLINE = "interp_spline", _("Interpolation: Spline")
INTERP_QUADRATIC = "interp_quadratic", _("Interpolation: Quadratic")
INTERP_CUBIC = "interp_cubic", _("Interpolation: Cubic")
INTERP_PCHIP = "interp_pchip", _("Interpolation: PCHIP")
NEIGHBOR_MIN = "neighbor_min", _("N-neighbor minimum")
NEIGHBOR_MAX = "neighbor_max", _("N-neighbor maximum")
NEIGHBOR_MEAN = "neighbor_mean", _("N-neighbor mean")
NEIGHBOR_MEDIAN = "neighbor_median", _("N-neighbor median")


class ReplacementStrategyImage(gds.LabeledEnum):
"""Replacement strategies for special values (NaN/Inf) in images."""

NONE = "none", _("Do nothing")
ZERO = "zero", _("Replace with zero")
CONSTANT = "constant", _("Replace with constant")
MIN = "min", _("Replace with minimum")
MAX = "max", _("Replace with maximum")
MEAN = "mean", _("Replace with mean")
MEDIAN = "median", _("Replace with median")
NEIGHBOR_MIN = "neighbor_min", _("N-neighbor minimum")
NEIGHBOR_MAX = "neighbor_max", _("N-neighbor maximum")
NEIGHBOR_MEAN = "neighbor_mean", _("N-neighbor mean")
NEIGHBOR_MEDIAN = "neighbor_median", _("N-neighbor median")
98 changes: 89 additions & 9 deletions sigima/locale/fr/LC_MESSAGES/sigima.po
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,63 @@ msgstr "Chaque signal devient une colonne"
msgid "Rectangle"
msgstr "Rectangle"

msgid "Do nothing"
msgstr "Ne rien faire"

msgid "Replace with zero"
msgstr "Remplacer par zéro"

msgid "Replace with constant"
msgstr "Remplacer par une constante"

msgid "Replace with minimum"
msgstr "Remplacer par le minimum"

msgid "Replace with maximum"
msgstr "Remplacer par le maximum"

msgid "Replace with mean"
msgstr "Remplacer par la moyenne"

msgid "Replace with median"
msgstr "Remplacer par la médiane"

msgid "Delete points"
msgstr "Supprimer les points"

msgid "Forward fill (previous value)"
msgstr "Remplissage vers l'avant (valeur précédente)"

msgid "Backward fill (next value)"
msgstr "Remplissage vers l'arrière (valeur suivante)"

msgid "Interpolation: Linear"
msgstr "Interpolation linéaire"

msgid "Interpolation: Spline"
msgstr "Interpolation spline"

msgid "Interpolation: Quadratic"
msgstr "Interpolation quadratique"

msgid "Interpolation: Cubic"
msgstr "Interpolation cubique"

msgid "Interpolation: PCHIP"
msgstr "Interpolation PCHIP"

msgid "N-neighbor minimum"
msgstr "Plus proche voisin minimum"

msgid "N-neighbor maximum"
msgstr "Plus proche voisin maximum"

msgid "N-neighbor mean"
msgstr "Plus proche voisin moyenne"

msgid "N-neighbor median"
msgstr "Plus proche voisin médiane"

msgid "All supported files"
msgstr "Tous les fichiers pris en charge"

Expand Down Expand Up @@ -757,6 +814,33 @@ msgstr "Méthode de normalisation"
msgid "Method used for normalization"
msgstr "Méthode utilisée pour la normalisation"

msgid "Number of neighboring points used when a neighbor-based strategy is selected"
msgstr "Nombre de points voisins utilisés lorsqu'une stratégie basée sur les voisins est sélectionnée"

msgid "Value used when a 'Replace with constant' strategy is selected"
msgstr "Valeur utilisée lorsqu'une stratégie 'Remplacer par une constante' est sélectionnée"

msgid "Replace special values (signal)"
msgstr "Remplacer les valeurs spéciales (signal)"

msgid "NaN"
msgstr "NaN"

msgid "Strategy"
msgstr "Stratégie"

msgid "Neighbor size"
msgstr "Taille du voisinage"

msgid "+ Infinity"
msgstr "+ Infini"

msgid "- Infinity"
msgstr "- Infini"

msgid "Replace special values (image)"
msgstr "Remplacer les valeurs spéciales (image)"

msgid "rows"
msgstr "lignes"

Expand Down Expand Up @@ -1043,22 +1127,18 @@ msgstr "Translation en X"
msgid "Y translation"
msgstr "Translation en Y"

#, fuzzy
msgid "column size"
msgstr "Colonnes"
msgstr "Nombre de colonnes"

#, fuzzy
msgid "row size"
msgstr "Taille"
msgstr "Nombre de lignes"

#, fuzzy
msgid "column spacing"
msgstr "Espace entre chaque colonne"

msgid "Horizontal spacing between ROI centers, as a percentage of the automatically computed cell width (100% = evenly distributed grid)"
msgstr "Espacement horizontal entre les centres des ROI, en pourcentage de la largeur de cellule automatiquement calculée (100% = grille uniformément distribuée)"

#, fuzzy
msgid "row spacing"
msgstr "Espace entre chaque ligne"

Expand Down Expand Up @@ -1507,9 +1587,6 @@ msgstr "Ajustement polynomial"
msgid "Degree"
msgstr "Degré"

msgid "Strategy"
msgstr "Stratégie"

msgid "Location"
msgstr "Emplacement"

Expand Down Expand Up @@ -1620,3 +1697,6 @@ msgstr "Barycentre"

msgid "Plot dialog"
msgstr "Fenêtre de tracé"

msgid "Replace special values is not applicable to integer images because they cannot contain NaN or infinite values."
msgstr "Le remplacement des valeurs spéciales n'est pas applicable aux images de type entier car elles ne peuvent pas contenir de valeurs NaN ou infinies."
4 changes: 4 additions & 0 deletions sigima/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@
"PulseFeaturesParam",
"ROIGridParam",
"RadialProfileParam",
"ReplaceSpecialValuesImageParam",
"ReplaceSpecialValuesSignalParam",
"Resampling1DParam",
"Resampling2DParam",
"RescaleIntensityParam",
Expand Down Expand Up @@ -393,6 +395,8 @@
MovingMedianParam,
NormalizeParam,
PhaseParam,
ReplaceSpecialValuesImageParam,
ReplaceSpecialValuesSignalParam,
SignalsToImageParam,
SpectrumParam,
)
Expand Down
Loading
Loading