-
-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arepo parser #1867
Arepo parser #1867
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report
@@ Coverage Diff @@
## master #1867 +/- ##
==========================================
+ Coverage 62.12% 62.52% +0.39%
==========================================
Files 66 68 +2
Lines 6809 7124 +315
==========================================
+ Hits 4230 4454 +224
- Misses 2579 2670 +91
Continue to review full report at Codecov.
|
@@ -0,0 +1,220 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a shorter title. Also, you should start the notebook with some information about what Arepo is, what a snapshot is, and link Arepo's documentation/website.
Reply via ReviewNB
@@ -0,0 +1,220 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should explain what those two files are. One other suggestion: instead of using try/except, you could just put the code in a markdown codeblock and explain that it shows how to take the snapshot if you have the package installed.
Reply via ReviewNB
@@ -0,0 +1,220 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would explain what is included in the JSON file/how you get the file.
Also, see if you can link the specific section of the API, or just summarize the options (or use the python help function in the notebook, any of those work)
Reply via ReviewNB
@@ -0,0 +1,220 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,220 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before a pull request is accepted, it must meet the following criteria:
|
nan,nan,nan,nan | ||
nan,nan,nan,nan | ||
nan,nan,nan,nan | ||
nan,nan,nan,nan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these NaN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When rebinning data with scipy.stats.binned_statistic to a higher resolution, it will insert bins with NaN. This behaviour is intended/ I did not include an error for this since it does not break the export and can be adressed manually later on.
@@ -0,0 +1,364 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,364 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this works I would recommend using:
<div class="alert alert-info">
Note
insert text of note here
</div>
in a markdown cell (same for the other notes).
Reply via ReviewNB
@@ -0,0 +1,364 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,364 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do users have to generate the JSON themselves? Or can they get it from arepo? Seems like in either case the user would need the package?
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the JSON files have to be generated by the user themselves. It is really only a shortcut to having the data available for the documentation, as getting it directly from the snapshot would introduce the arepo-snap-util package as a dependency. (This is not really advisable for two reasons: a) the package contains lots of unnecessary other utilties and the reelevant parts are mostly written in c anyway. b) It is as far as I know not publicly available.)
Rewriting the snapshot reader in Python is really not feasible; besides, this PR is written for the development version anyways, which is also not publicly available. And I recon that most people who use the development version also have the arepo-snap-util package. The public version should in principle also work, but I have no idea how these snapshots are read out. Here the users can save the data to JSON files and use the parser this way. But these files have to be generated by the user, because this is intended as a fallback for exotic Arepo snapshots anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, will merge once @smithis7 comments are addressed
@@ -0,0 +1,395 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very last thing. In the parentheses it should say (see CSVY Model)
. The link is correct, just the hyperlink text does not match the link.
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs are approved
Parser for Arepo snapshots to csvy files.
Description
Consists of two distinct parts:
Motivation and context
No parser available yet, need one for my own project.
How has this been tested?
Examples
https://alexhls.github.io/tardis/branch/arepo-parser/io/configuration/components/models/converters/arepo_to_tardis.html
Type of change
Checklist