-
Notifications
You must be signed in to change notification settings - Fork 7
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
Script to find minimum/max values in a mesh #5
Comments
Also, as a next level script related to this (and I am not sure if this is of use to anyone besides me): Find the maximum or minimum difference between adjacent voxels for a tag on any given mesh. |
Task 1 is fairly straight forward - load into pyne as a mesh and just get min/max from there. Task 2 is more complicated - need to convert 1D index of mesh voxels to 3D index and compare values that way |
Task 2 can probably be done with numpy.reshape() and numpy.gradient()? |
I think np.reshape() would definitely be useful in that task, but it doesn't look like np.gradient() is exactly what is needed (although that would also be useful to have). My thinking is that I need to know what the maximum absolute difference between two adjacent mesh voxels is because I cannot use isosurface values that are smaller than that max difference. I don't think gradient quite calculates the right thing. |
I am finding more and more that I need this though I haven't been able to think through how to actually do this, so maybe someone else has an idea of how to do it: Given a mesh file with a set of tags, find the minimum (non-zero) value and the maximum value for that tag on the mesh. I am guessing PyNE and numpy could be used to do this.
The text was updated successfully, but these errors were encountered: