Skip to content
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

ascii output files #16

Open
cgclark opened this issue Dec 8, 2019 · 2 comments
Open

ascii output files #16

cgclark opened this issue Dec 8, 2019 · 2 comments

Comments

@cgclark
Copy link

cgclark commented Dec 8, 2019

Hi Vasili,

I was curious if it would be possible to have your 10,000 pt examples with same and different radii as CSV files in addition to the xyzd binary files which are there. I cannot understand how to extract the data and load it into, for example, anything except R. Learning R will take me some time.

Many thanks, Chris

@cgclark
Copy link
Author

cgclark commented Dec 9, 2019

After searching through the other issues, I did find that the following is able to accomplish this.
hexdump -v -e '4 "%f "' -e '"\n"' < packing.xyzd > centers_in_ascii.txt

Would you mind posting the 10,000 pt xyzd examples with same and different radii that are in the readme? I will send you a nice image afterwards.

@VasiliBaranov
Copy link
Owner

VasiliBaranov commented Dec 19, 2019

Hi Chris,

i'm glad that you found this way, i didn't think about it. Just a note: it is possible to extract the data in any mainstream language. I have samples in C# (using BinaryReader), Matlab (in examples), C++ (directly in the code), python. In python it will be two lines, numpy.fromfile + numpy.reshape.

You can find a lot of packings here: https://datadryad.org/stash/dataset/doi:10.5061/dryad.35td0 (i don't remember if i rescaled radii in all of them, but you will notice if particles do not touch each other). If you have any questions, please contact me. Hope this helps!

Best Regards,
Vasili

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants