-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make the position coordinates consistent across data groups #77
Conversation
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'm not sure how to request a change on a file without a commit on github, but line 41 of README.md needs to change center = data["amr"]["xyz"][ind.values]
to center = data["amr"]["position"][ind.values]
. Other than that, I have no comments.
src/osyris/plot/direction.py
Outdated
dir_vecs = np.array([[0., 0.], [1., 0.], [0., 1.]]) | ||
dir_labs = {"x": "x", "y": "y"} | ||
|
||
elif direction in ["top", "side"]: |
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.
direction.lower()
?
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 also applied it on "x", "y" and "z" strings.
zcenters = np.linspace(zmin + 0.5 * zspacing, zmax - 0.5 * zspacing, | ||
resolution['z']) | ||
|
||
if thick: |
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.
Note that this change is somewhat unrelated.
When no dx was specified for the map, the extent in z depended on the size of the cells, and was necessarily symmetrical around the origin.
This meant that at the point of generating a mesh of sampling, the z coords were not always zero, and woudl lead to empty patches in the final map, because the sampling points did not agree with the selection of points done further up.
This is essentially a renaming of
xyz
in theamr
andsink
groups toposition
, which is consistent with thepart
group.In addition, the axes on map figures now have better names:
x
andy
ifdirection='z'
pos_u
,pos_v
if the orientation is not aligned with the grid axesFixes #73
Fixes #74