Troubleshooting¶
Python imports the wrong checkout¶
import sys
import WaLSAlib
from importlib.metadata import version
print(sys.executable)
print(WaLSAlib.__file__)
print(version("WaLSAlib"))
Check the environment guidance if pip targets a different interpreter. Restart a notebook kernel after changing installations. An editable installation points at a specific source folder; pulling another clone does not change it. Avoid naming a script WaLSAlib.py, numpy.py, or scipy.py.
pip reports that the directory is not installable¶
pip install '.[walsatools]' installs the package in the current directory. Run it from the WaLSAlib repository root, which contains pyproject.toml. The example paths are also relative to that root. Follow the complete notebook setup.
Jupyter reports that jupyter-lab is not found¶
Install JupyterLab in the active environment and launch it with the same Python interpreter:
An optional dependency is missing¶
Accessing SoFT.extras needs pip install 'WaLSAlib[soft-extras]'. Model/training/prediction modules need pip install 'WaLSAlib[softg]'; the desktop label tool needs pip install 'WaLSAlib[softg-gui]'. Install into the environment running the code. If an extra is installed but import still fails, inspect the chained error for a dependency version or platform problem.
LineFit requires wavelength and line information¶
Provide wavelengths, refwavelength, and element. The spectral dimension must match the wavelength axis, and labels/rest wavelengths/per-line settings must have matching lengths. Inputs are a one-dimensional spectrum or two-dimensional stack, rather than a full image cube.
Fitted centres follow a neighbour or reach a limit¶
Plot the profile and fitting interval. Check the wavelength reference and units first, then inspect max_center_shift_nm, per-line window limits, declared close pairs, and reversal candidates. A larger window can include another line. Use the windowing guide to tune controls against representative spectra.
Core intensities appear quantised¶
The fit estimates a centre continuously, but returned intensity samples the nearest original wavelength bin. Finer centre estimates do not create an interpolated intensity measurement. See LineFit outputs.
SoFT finds no files or fails in workers¶
Supply a working directory containing 00-data/*.fits, with a trailing path separator. Use at least a short, ordered sequence of compatible two-dimensional images; verify file order yourself. Start with one worker. On systems using process spawning, run from a Python script protected by if __name__ == "__main__":. Use the complete tracking example.
Tracking produces an empty table¶
Inspect single-image detection first. Check threshold, polarity ("pos", "neg", or "both"), minimum size, image alignment, and temporal overlap. The tabulation default retains features lasting at least four frames. Large inter-frame displacements or splitting/merging can interrupt identity.
A granule prediction checkpoint will not load¶
The bundled prediction loader constructs a one-channel, two-class UNet++ with scale=1. Check that the weights match that architecture. Training with different options requires an explicitly matching inference implementation. See training and prediction.
Documentation build errors¶
Use the repository's requirements-docs.txt in a dedicated environment and run python -m mkdocs build --strict. The API hook reads the local src/ tree, so build from a complete, updated source checkout. The documentation guide explains the layout and preview commands.
Reporting a problem¶
Open a GitHub issue with your version, operating system, installation method, full traceback, parameters, and a small reproducible example. Include expected units and shapes. For observational problems, explain how the input was calibrated and sampled.