Summary
Small, low-risk issues found during the pre-release audit of 1.1.6. Grouped here because none of them warrants an issue of its own.
1. Wrong wording in a signal error message
sigima/objects/signal/creation.py, in __get_signal_parameters_class:
f"Image type {stype} has no parameters class registered"
This is a signal module; the message should read "Signal type".
2. magnitude_spectrum has no guard against log10(0)
sigima/tools/signal/fourier.py computes 20 * log10(...) without clamping, which yields -inf and a RuntimeWarning whenever the spectrum contains an exact zero.
3. Undocumented Fourier conventions
fft1d uses the raw, unnormalised numpy.fft.fft; the docstring does not say so.
psd relies on scipy.signal.welch's default scaling='density'; the docstring does not state which scaling is applied.
4. Blob detection conflates sigma and radius
sigima/tools/image/detection.py::__blobs_to_coords names the third column of the scikit-image output radii and returns it as-is:
That column is scikit-image's sigma, not a radius: for blob_log and blob_dog the blob radius is approximately √2·σ, while for blob_doh it is approximately σ. The docstrings compound the confusion by describing the min_sigma / max_sigma parameters as "the minimum/maximum blob radius in pixels".
Changing the returned value would alter the size of auto-generated ROIs and of the displayed circles, so this issue only covers correcting the documentation. The convention change itself is tracked separately.
5. Undocumented input convention for the model-fitting helpers
fit_circle_model and fit_ellipse_model in sigima/tools/image/preprocessing.py expect the contour coordinates in (row, col) order; this is not documented.
Scope
Summary
Small, low-risk issues found during the pre-release audit of 1.1.6. Grouped here because none of them warrants an issue of its own.
1. Wrong wording in a signal error message
sigima/objects/signal/creation.py, in__get_signal_parameters_class:f"Image type {stype} has no parameters class registered"This is a signal module; the message should read "Signal type".
2.
magnitude_spectrumhas no guard againstlog10(0)sigima/tools/signal/fourier.pycomputes20 * log10(...)without clamping, which yields-infand aRuntimeWarningwhenever the spectrum contains an exact zero.3. Undocumented Fourier conventions
fft1duses the raw, unnormalisednumpy.fft.fft; the docstring does not say so.psdrelies onscipy.signal.welch's defaultscaling='density'; the docstring does not state which scaling is applied.4. Blob detection conflates sigma and radius
sigima/tools/image/detection.py::__blobs_to_coordsnames the third column of the scikit-image outputradiiand returns it as-is:That column is scikit-image's sigma, not a radius: for
blob_logandblob_dogthe blob radius is approximately√2·σ, while forblob_dohit is approximatelyσ. The docstrings compound the confusion by describing themin_sigma/max_sigmaparameters as "the minimum/maximum blob radius in pixels".Changing the returned value would alter the size of auto-generated ROIs and of the displayed circles, so this issue only covers correcting the documentation. The convention change itself is tracked separately.
5. Undocumented input convention for the model-fitting helpers
fit_circle_modelandfit_ellipse_modelinsigima/tools/image/preprocessing.pyexpect the contour coordinates in(row, col)order; this is not documented.Scope
sigima/objects/signal/creation.pymagnitude_spectrumagainstlog10(0)fft1dnormalisation andpsdscalingfind_blobs_log,find_blobs_dog,find_blobs_dohand__blobs_to_coords(row, col)input convention offit_circle_model/fit_ellipse_model