Problem: run_fissa was called with export_to_matfile, which routes the results through Python's savemat; for a single-layer/single-trial stack, FISSA returns per-ROI object arrays with differing component counts, and savemat crashed trying to pack those arrays into one homogeneous array (the (5,1) + inhomogeneous part ValueError).
Fix: branch when nLayers==1: instead of exporting to a matfile, it reads FISSA's returned tuple directly in MATLAB, pulling each ROI's separated neuron trace (row 1 of its 5×nFrames block) and storing it in activity_fissa_corrected. The existing 4-layer pipeline behaves exactly as before.