Skip to content

Commit

Permalink
Add a partition_info on SOAP results. (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu authored Nov 1, 2023
1 parent 46ee668 commit 7038f7d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hipscat_import/soap/map_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,10 @@ def combine_partial_results(input_path, output_path):
file_pointer=file_io.append_paths_to_pointer(output_path, "unmatched_sources.csv"),
index=False,
)

primary_only = matched.groupby(["Norder", "Dir", "Npix"])["num_rows"].sum().reset_index()
file_io.write_dataframe_to_csv(
dataframe=primary_only,
file_pointer=file_io.append_paths_to_pointer(output_path, "partition_info.csv"),
index=False,
)

0 comments on commit 7038f7d

Please sign in to comment.