Commit 9906f9a2 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

add convenience function to compute accuracy from support and oversampling factor

parent 664bad3b
......@@ -535,9 +535,13 @@ template<typename T> class Interpolator
}
};
double epsilon_guess(size_t support, double ofactor)
{ return std::sqrt(12.)*std::exp(-(support*ofactor)); }
}
using detail_interpol_ng::Interpolator;
using detail_interpol_ng::epsilon_guess;
}
......
......@@ -256,4 +256,5 @@ PYBIND11_MODULE(pyinterpol_ng, m)
m.def("rotate_alm", &pyrotate_alm<fptype>, "alm"_a, "lmax"_a, "psi"_a, "theta"_a,
"phi"_a);
#endif
m.def("epsilon_guess", &epsilon_guess, "support"_a, "ofactor"_a);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment