comments on code and notebook structure #173
Replies: 2 comments 2 replies
-
I think Eve and I were also confused on why there were so many different forms of importing for the notebook. Should we just use |
Beta Was this translation helpful? Give feedback.
-
I've deleted the old/redundant notebooks and changed the names of the two notebooks to "demo_simulation" and "demo_full_pipeline" to try to differentiate between the notebook in which we demonstrate the simulation function (that hides the intermediate steps) and the full pipeline notebook that runs through all the functionality in the simulation. Any comments/critiques on these names? Question: with the new demo_simulation notebook there is now a massdist.h5 and an sz_sim_data.h5 file in the notebooks folder. Do we want these in the notebooks folder or should we put them in another subfolder (like we have for outfiles)? @samueldmcdermott @elaine-ran |
Beta Was this translation helpful? Give feedback.
-
Here's some thoughts on state of the code as of Oct 4, 2023. This may be revised (since I don't have a perfect understanding of all the moving parts yet, but I thought it better to write this down sooner rather than later), and if it is I'll try to remember to make a note of when the revisions happen.
Comments:
class
no longer needs to inherit fromobject
, so you may omit(object)
from the classes you define (I see this inread_yaml
andload_vars
)make_dm_halo
needs more documentation (eg units onm500min
andm500max
; also, should these be uniformly distributed or log-uniform? or what if you wanted to have choices other than a uniform random distribution, could you set a kwarg for even spacing, log uniform, etc?), and/or to be renamed (you're making a sample of different seeds, not a single DM halo with a density profile, etc) and/or to be consolidated with some other modulejupyter-notebook
-- put in some additional headings so that it's clear what each "phase" of the notebook is building towards, and have them collapsed by default so it's easy to navigatecluster
,cmb
, andnoise
attributes, perhaps)Questions:
import pkg.module as module
form and some in thefrom pkg import module
form? And is there any reason that we are dropping the context, eg why not justimport simsz
(orimport simsz as sz
if you want to save typing)?io_params
,load_vars
, andread_yaml
being used? They have similar-sounding names and each defines a single class, so it might be more useful if there was a single module whose name included one of io/load/read and it contained a few different classes for your different use cases... if this is on the right track, can they be consolidated?simtools
andutils
kind of sound similar. Can these be consolidated?Overall, it seems like there's cool physics here, just trying to help make it more visible!
Beta Was this translation helpful? Give feedback.
All reactions