Skip to content

Catalog self crossmatches fail due to suffix defaults #1275

@dougbrn

Description

@dougbrn

Bug report
The following simple example fails with ValueError: cannot reindex on an axis with duplicate labels:

import lsdb
cat = lsdb.generate_catalog(5000,100, lowest_order=4, ra_range=(15.0,25.0), dec_range=(34.0,44.0), seed=1)
cat.crossmatch(cat).compute()

This is due to the default suffix behavior causing collisions, so the suffixes need to be manually provided:
cat.crossmatch(cat, suffixes=("_l", "_r")).compute()

This should work by default, ideally. We could check for suffix collision and append (_l, _r) to them, for example

Before submitting
Please check the following:

  • I have described the situation in which the bug arose, including what code was executed, and any applicable data others will need to reproduce the problem.
  • I have included information about my environment, including the version of this package (e.g. lsdb.show_versions())
  • I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
  • If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions