Throw an error if a spherical harmonics order larger than 10 is provided. (#3354)

This commit is contained in:
Kevin Sawatzky 2025-03-18 16:19:15 -05:00 committed by GitHub
parent 58f2a21771
commit 08e7043f8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,9 @@ void SphericalHarmonicsFilter::set_order(int order)
if (order < 0) {
throw std::invalid_argument {
"Spherical harmonics order must be non-negative."};
} else if (order > 10) {
throw std::invalid_argument {"Spherical harmonics orders greater than 10 "
"are currently not supported!"};
}
order_ = order;
n_bins_ = (order_ + 1) * (order_ + 1);