Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerw committed Jul 19, 2024
2 parents 162e8db + 1666e85 commit e0dc86b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nptracer/gengaLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, path_to_sim):
self.path_to_sim = path_to_sim
self.file_columns = ['t', 'i1', 'm1', 'r1', 'x1', 'y1', 'z1', 'vx1', 'vy1', 'vz1', 'Sx1', 'Sy1', 'Sz1',\
'amin1', 'amax1', 'emin1', 'emax1', 'aecount1', 'aecountT1', 'enccountT1', 'test1']
self.cols_to_use = self.file_columns
self.cols_to_use = self.file_columns[0:10]

# Get the central mass from the .par file
with open(self.path_to_sim + 'param.dat', 'r') as file:
Expand Down Expand Up @@ -48,6 +48,7 @@ def read_snaps(self):
df_alldata = pd.concat(alldata, ignore_index=True)
df_alldata.sort_values(by='t', inplace=True, ignore_index=True)

print(df_alldata.columns)
for idx, c in enumerate(df_alldata.columns):
df_alldata.rename(columns={c: self.columns[idx]}, inplace=True)

Expand Down

0 comments on commit e0dc86b

Please sign in to comment.