./util/find_parents neglects some columns, without modifying the header of the file

Issue #3 new
Saeed Sarpas created an issue

Let's say, after running rockstar on a gadget snapshot, I've created this file: halos.ascii. For finding hosts, I run ./util/find_parents /path/to/halos.ascii > /path/to/halos_with_parents.ascii. Now the problem is, if we look at the same line in both files (let's say line number 20), the returned values are not the same (both in the precision and the number of returned columns):

$ sed '20!d' /path/to/halos.ascii
0 27 1.073e+11 1.073e+11 96.613792 79.408562 66.221397 63.788242 1.705595 0.750510 1.485546 -78.119690 -293.696686 -200.908539 5.49062e+10 9.41137e+09 -9.64795e+09 -2.2e+14 0.0516919 0.012546 16.361339 -78.119690 -293.696686 -200.908539 16.361339 19 1.073028e+11 1.021932e+11 4.087727e+10 0.000000e+00 8.073288 0.000012 0.055793 0.760884 0.174459 4.125321 22.500162 -1.209895 0.487022 0.002998 -2.077740 14.061662 9.386439 12.124948 12.124948 0.480160 1.369928e+11 4.598693e+10 49.234051 1 -1 -1 27 10000000000.000000
$ sed '20!d' /path/to/halos_with_parents.ascii
0 27 1.073e+11 107300003840.00 96.61 79.409 66.221 63 1.70560 0.75051 1.48555 -78.12 -293.70 -200.91 5.491e+10 9.411e+09 -9.648e+09 -220000002506752.00000 0.05169 1.2546e-02 1.6361e+01 -7.8120e+01 -2.9370e+02 -2.0091e+02 16.36134 19.00 107302797312.00000 102193201152.00000 40877268992.00000 0.00000 8.07329 0.00001 0.0558 7.609e-01 1.745e-01 4.125 -1

Also, here you can see the diff of the headers of these two files. The only difference is the PID column however the body of the halos_with_parents.ascii file does not contain almost the half of the columns.

$ diff <(head -n19 /path/to/halos.ascii) <(head -n19 /path/to/halos_with_parents.ascii)                                        
1c1
< #id num_p mvir mbound_vir rvir vmax rvmax vrms x y z vx vy vz Jx Jy Jz E Spin PosUncertainty VelUncertainty bulk_vx bulk_vy bulk_vz BulkVelUnc n_core m200b m200c m500c m2500c Xoff Voff spin_bullock b_to_a c_to_a A[x] A[y] A[z] b_to_a(500c) c_to_a(500c) A[x](500c) A[y](500c) A[z](500c) Rs Rs_Klypin T/|U| M_pe_Behroozi M_pe_Diemer Halfmass_Radius idx i_so i_ph num_cp mmetric
---
> #id num_p mvir mbound_vir rvir vmax rvmax vrms x y z vx vy vz Jx Jy Jz E Spin PosUncertainty VelUncertainty bulk_vx bulk_vy bulk_vz BulkVelUnc n_core m200b m200c m500c m2500c Xoff Voff spin_bullock b_to_a c_to_a A[x] A[y] A[z] b_to_a(500c) c_to_a(500c) A[x](500c) A[y](500c) A[z](500c) Rs Rs_Klypin T/|U| M_pe_Behroozi M_pe_Diemer Halfmass_Radius idx i_so i_ph num_cp mmetric PID

Comments (1)

  1. Alex Merson

    I have found similar, and it is not clear which are the properties that are missing! I also found that the number of entries in the two files are different and corresponding entries (matched using "ID") have different values for other properties (e.g Mvir)! Saeed, how did you match entries between the two files? I'm finding that the entries are not ordered the same between the two files.

  2. Log in to comment