1
0
Fork 0
mirror of https://github.com/cosmo-sims/monofonIC.git synced 2024-09-19 17:03:45 +02:00

one more tuning of panphasia minimum noise grid size

This commit is contained in:
Oliver Hahn 2020-12-10 17:06:33 +01:00
parent 5dbf6d9398
commit 315790a129

View file

@ -171,21 +171,21 @@ protected:
{ {
// if ngrid is not a multiple of i_base, then we need to enlarge and then sample down // if ngrid is not a multiple of i_base, then we need to enlarge and then sample down
ngrid_ = pcf_->get_value<size_t>("setup", "GridRes"); ngrid_ = pcf_->get_value<size_t>("setup", "GridRes");
size_t ngidminsize_panphasia = pcf_->get_value_safe<size_t>("random", "PanphasiaMinRootResolution",512); int ngidminsize_panphasia = pcf_->get_value_safe<int>("random", "PanphasiaMinRootResolution",512);
grid_p_ = pdescriptor_->i_base; grid_p_ = pdescriptor_->i_base;
lextra_ = (log10((double)std::max<size_t>(ngrid_,ngidminsize_panphasia) / (double)grid_p_) + 0.001) / log10(2.0); lextra_ = (log10((double)ngrid_ / (double)grid_p_) + 0.001) / log10(2.0);
// lmin // lmin
ngrid_panphasia_ = (1 << lextra_) * grid_p_; ngrid_panphasia_ = (1 << lextra_) * grid_p_;
if( ngrid_panphasia_ < ngrid_ ){ if( ngrid_panphasia_ < ngidminsize_panphasia ){
lextra_++; lextra_++;
ngrid_panphasia_*=2; ngrid_panphasia_*=2;
} }
assert( ngrid_panphasia_ >= ngrid_ ); assert( ngrid_panphasia_ >= ngidminsize_panphasia);
clear_panphasia_thread_states(); clear_panphasia_thread_states();
music::ilog.Print("PANPHASIA: using grid size %lld (level=%d)",ngrid_panphasia_, lextra_); music::ilog.Print("PANPHASIA: using grid size %lld (level=%d)",ngrid_panphasia_, lextra_);