Re: someone please suggest regarding conversion of the snapshot binary files to .txt format
Sir as a newcomer to C programming language I find it very difficult to
understand what modifications needs to be done ....sir for your kind
assistance will you please suggest these modifications of write_file
function in io.c file ,I have only halo particles (e.g type 2) and want 6
columns which contains x,y,z and vx,vy,vz respectively in .txt format...as
I need it for immediate nature....
Thanks,
Apashanka
On Fri 6 Sep, 2019, 1:20 PM Antonio Bibiano, <antbbn_at_gmail.com> wrote:
> 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 11:05:44
This archive was generated by hypermail 2.3.0
: 2023-01-10 10:01:32 CET