Re: someone please suggest regarding conversion of the snapshot binary files to .txt format

From: Antonio Bibiano <antbbn_at_gmail.com>
Date: Fri, 6 Sep 2019 09:44:40 +0200

There is a write_file function in the io.c source file, you might modify
this one, but I think you might be better off saving the snapshot in the
original format
(just in case you might want to use some other tools on your simulations)
and use some python library to read the particle position and velocities
and save them in the format you prefer.
Just search for something like "read gadget2 snapshot python" should return
a bunch of libraries/repo of people doing that in python.

Cheers,
Antonio

Il giorno ven 6 set 2019 alle ore 09:38 Apashanka Das <a.das.cosmo_at_gmail.com>
ha scritto:

> Hello,
> After running Gadget-2 the snapshot files are in binary format ,but if it
> has to be converted into .txt format containing 6 columns (x,y,z,vx,vy,vz)
> then what are the modifications that needs to be done in the file
> read_snapshot.c ,can anyone please suggest......
> Thanks,
> Apashanka
>
Received on 2019-09-06 09:45:03

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:43 CEST