glass-dev / glass

Generator for Large Scale Structure
https://glass.readthedocs.io
MIT License
33 stars 8 forks source link

ENH(shells): non-negative least squares partition #141

Closed ntessore closed 11 months ago

ntessore commented 11 months ago

Adds the "nnls" method to the partition() function, which returns a non-linear least-squares solution. This should be used when each shell's contribution is required to be positive, e.g. when partitioning densities.

Closes: #140 Added: The glass.core.algorithm module. Added: The new partition(method="nnls") function computes a partition with non-negative contributions for each shell. Changed: The default method for partition() is now "nnls".