Skip to content

Duplicate suffix in result title when using new_signal_result #8

@PierreRaybaut

Description

@PierreRaybaut

Duplicate suffix in result title when using new_signal_result

Description

When extracting the radial profile from an image (or any operation using new_signal_result), the result signal's title contains duplicate information regarding the suffix (e.g., the profile center coordinates).

Example

When computing a radial profile with centroid center:

  • Expected title: radial_profile(i019)|center=(192.500, 192.500)
  • Actual title: radial_profile(i019)|center=(192.500, 192.500)|center=(192.500, 192.500)

Root Cause

In sigima/proc/base.py, the new_signal_result function was adding the suffix to the title twice:

  1. First, via the formatter: title = formatter.format_1_to_1_title(name, suffix) - The formatter already appends the suffix to the title.
  2. Then, explicitly: if suffix is not None: dst.title += "|" + suffix - This redundant line added the suffix a second time.

Affected Functions

Any function that uses new_signal_result with a suffix parameter:

  • radial_profile (image profile extraction)
  • histogram (signal and image analysis)
  • Other image-to-signal conversion functions

Fix

Remove the redundant suffix addition in new_signal_result. The formatter's format_1_to_1_title method already handles suffix formatting appropriately for both SimpleTitleFormatter and PlaceholderTitleFormatter.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions