Skip to content

Commit

Permalink
Use same column names.
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed Jun 17, 2024
1 parent 5454164 commit 04c0c22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/corrgi/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def autocorrelation_alignment(catalog: Catalog) -> PixelAlignment:
[
[pix.order, pix.pixel, pix.order, pix.pixel, pix.order, pix.pixel]
for pix in catalog.get_healpix_pixels()
]
],
columns=column_names,
)
result_mapping = pd.concat([upper_triangle, diagonal])
return PixelAlignment(catalog.pixel_tree, result_mapping, PixelAlignmentType.OUTER)
Expand Down
2 changes: 2 additions & 0 deletions tests/corrgi/test_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def test_autocorrelation_alignment(data_catalog_dir):
data_catalog = hipscat.read_from_hipscat(data_catalog_dir)
alignment = autocorrelation_alignment(data_catalog)
assert len(alignment.pixel_mapping) == 28
assert len(alignment.pixel_mapping.columns) == 6


def test_crosscorrelation_alignment(dr7_lrg_catalog_dir, dr7_lrg_rand_catalog_dir):
Expand All @@ -16,3 +17,4 @@ def test_crosscorrelation_alignment(dr7_lrg_catalog_dir, dr7_lrg_rand_catalog_di
## dr7_rand_catalog has 22 partitions
## 12*21 = 252
assert len(alignment.pixel_mapping) == 252
assert len(alignment.pixel_mapping.columns) == 6

0 comments on commit 04c0c22

Please sign in to comment.