Adding BGS filter to prepare_sim#212
Conversation
…ter override option when no MT
…hen used outside of the folder
for more information, see https://pre-commit.ci
lgarrison
left a comment
There was a problem hiding this comment.
Thanks @SBouchard01! This looks good to me, just some minor nits below.
Also, any reason we need a __init__.py file? Previously we had been using namespace packages. This is probably a harmless addition, but just confirming it was intentional.
|
I think @SandyYuan can answer the questions about the different magic values and the |
Hi, sorry for the delay I'll change those tomorrow it's supposed to be The |
At Sandy's suggestion, I had a custom filter on the halos & particles subsamples to allow the BGS density to be reached in my branch of the package (it exists in the current file, but commented out). Given the recent changes in
prepare_simthat need to re-run it, I propose an implementation of that filter as an option in the official pipeline.This branch also replaces most of the print statements by logger calls for clarity and stdout buffering delays in
prepare_simandmenv.Open questions & remarks:
subsample_halosandsubmask_particlesare commented out in the code. They are functionally the same as the current ones but with some magic values changed.submask_particleshas an extra line when calling the MT (or BGS) filter:ntarget = np.minimum(ntarget, 100)that is not called for the ST usual filter. Is that intentional ? If yes, why ? If not, the statement can be moved before thesubmaskinitialization to avoid duplicate code.