2D Plummer and Sphere models!?
Closed this issue · 1 comments
Is this intentional or my error? http://nbviewer.ipython.org/github/fizxmike/bonsai_phsy241/blob/master/Plummer.ipynb?create=1
The snapshot files are in tipsy format, correct? I use this code in python to read in the data:
https://github.com/fizxmike/bonsai_phsy241/blob/master/bonsai.py
Do you guys have a better visualization/animation tool?
Thanks,
Michael
It looks like the header takes up more bytes than what would be expected from just counting the items. If you modify your reading of the header as follows below it seems to work. Currently you read the data 4 bytes shifted, which causes the x-position to contain the mass and the mass is actually the particle ID.
Fixed line:
nTot,nDim,nGas,nDark,nStar,temp = struct.unpack('iiiiii',tfile.read(24))