cherab / core

The core source repository for the Cherab project.
https://www.cherab.info
Other
44 stars 24 forks source link

invert_regularised_nnls returns zero emissivity profiles in bolometer demos #438

Closed vsnever closed 2 months ago

vsnever commented 3 months ago

It appears that the nnls() method is reimplemented in SciPy 1.12, and due to some changes in the termination criteria, inversion_with_raytransfer.py, inversion_with_voxels.py bolometer demos and admit_tomographic_inversion.py from #427 return zero emissivity profiles.

Normalising the c_matrix and d_vector by d_vector.max() before passing them to nnls(), solves the problem.

Also, the new nnls implementation is much slower if atol is not set. I suggest adding **kwargs to invert_regularised_nnls() so that the user can control maxiter and atol parameters.

vsnever commented 2 months ago

Fixed in #439.