SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
26 stars 19 forks source link

Notebook documentation cleanup and minor notebook errors #113

Closed apizzuto closed 3 years ago

apizzuto commented 3 years ago

Hey SNEWPY team! This is part of https://github.com/openjournals/joss-reviews/issues/3772.

These are a summary of some of the minor issues I ran into when working through the (truly impressive) notebooks that you all put together. First, I have a request for documentation: could you add a brief README to the directory where the notebooks live, briefly explaining what each one is for? It was a bit daunting at first when I saw there were so many and wasn't sure where to start. It's up to you, but it might be worth separating those that demonstrate core functionality (eg. SNEWPY_examples.ipynb) from those just highlighting a single model by putting all of the model ones in a subdirectory.

As for specific issues:

apizzuto commented 3 years ago

I just realized that I forgot to tag the PR about documentation https://github.com/SNEWS2/snewpy/pull/112

Another small note: in the SNEWS2.0_whitepaper_rates notebook, there are some hardcoded paths in the "Execute SNOwGLoBES" section

JostMigenda commented 3 years ago

Thanks for being so thorough in your checks!

For the notebooks that relate to a specific model, would it perhaps be better to include them in models/<MODEL_NAME>/? That way, they would also be downloaded automatically whenever someone uses $ python -c 'import snewpy; snewpy.get_models()' and be present right next to the model files in the same directory.

I’ll try to do this and fix the other issues you mention in the coming days; I am unfortunately very busy currently with a collaboration meeting and a detector monitoring shift.

apizzuto commented 3 years ago

I think that would totally make sense for a place to put them!

No rush on getting these things done. I think you have all of my comments from the review now, so I'll happily standby and give the official green light after these last few things get fixed

JostMigenda commented 3 years ago

Regarding Flavor_XForm.ipynb and FlavorTransformation.ipynb: @jpkneller, can you take a look at those? As I recall, FlavorTransformation.ipynb contains the plots you made for the ApJ paper. Maybe we should keep that one, merge in any bits from the Flavor_XForm notebook that you think are worth keeping and then delete the Flavor_XForm one? I agree with @apizzuto that it’s confusing to have two different notebooks that demo the same aspect of SNEWPY.

jpkneller commented 3 years ago

Sure thing.

JostMigenda commented 3 years ago

Flavor_XForm and FlavorTransformation are fixed in #116. In #117, I’ve already moved the model notebooks to their respective directories and fixed the issues in the Sukhbold_2015 and Fornax_2019 notebooks. I’ll try to get to the other ones in the next few days.

JostMigenda commented 3 years ago

I’ve just added commits that fix the paths in snowglobes_models.ipynb and delete SNEWS2.0_whitepaper_rates.ipynb, since it was an outdated example; the updated one with more detectors and the necessary fixes is included as a separate example script.

JostMigenda commented 3 years ago

… and I’ve renamed SNEWPY_examples.ipynb to SNOwGLoBES_usage.ipynb and added a README file describing the remaining notebooks. Plus some additional cleanup in the last few commits. I think that covers all your comments @apizzuto!?

apizzuto commented 3 years ago

You bet! Thank you @JostMigenda. Feel free to merge the draft PR and that's my last comment on the software!