Skip to content

Conversation

@cosmoJFH
Copy link
Contributor

@cosmoJFH cosmoJFH commented Aug 4, 2025

Dear astroquery team,

The built-in cross-match functionality (like the one available in the Astroquery.gaia package) is demanded by the community. Currently, the Astroquery.Gaia built-in cross-match tool was updated in #3320, therefore, we would like to implement a similar x-match method in the Euclid module.

cc @esdc-esac-esa-int
jira: EUCLIDMNGT-1449

@codecov
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.15%. Comparing base (b81cecb) to head (d4787d0).
⚠️ Report is 142 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3386      +/-   ##
==========================================
+ Coverage   70.07%   70.15%   +0.07%     
==========================================
  Files         232      232              
  Lines       19893    19946      +53     
==========================================
+ Hits        13940    13993      +53     
  Misses       5953     5953              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@keflavich
Copy link
Contributor

Just to be sure - this is for users to upload catalogs for server-side x-matching, right? I'm happy with this, then.

@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1449_x-match branch 2 times, most recently from f410785 to 5ff7132 Compare August 4, 2025 16:14
@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1449_x-match branch from feaf543 to 0d351b5 Compare August 4, 2025 16:32
@cosmoJFH
Copy link
Contributor Author

cosmoJFH commented Aug 4, 2025

Just to be sure - this is for users to upload catalogs for server-side x-matching, right? I'm happy with this, then.

Hi @keflavich, this function runs a (positional) x-match for:

  1. 2 user's tables, previously uploaded to the user's private area;
  2. a user's table previously uploaded to the user's private area and an Euclid catalogue;
  3. 2 Euclid catalogues.

@bsipocz bsipocz added this to the v0.4.11 milestone Aug 4, 2025
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good, I only have minor comments looking at the code.

However, as there are no remote tests I couldn't really test this in reality and relied on the assumption that this is the same in gaia thus it is expected to work just as good.

self.get_status_messages()

def cross_match_basic(self, *, table_a_full_qualified_name, table_a_column_ra, table_a_column_dec,
table_b_full_qualified_name='', table_b_column_ra='', table_b_column_dec='',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have default table names for gaia, would any of that make sense here, too?
If not, then I would still use the None as default rather than null strings.

Copy link
Contributor Author

@cosmoJFH cosmoJFH Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there exist default tables too. They are defined in the constructor

        self.main_table = conf.ENVIRONMENTS[self.environment]['main_table']
        self.main_table_ra = conf.ENVIRONMENTS[self.environment]['main_table_ra_column']
        self.main_table_dec = conf.ENVIRONMENTS[self.environment]['main_table_dec_column']

But these values cannot be used as the default values for the parameters.

We have changed the default values to None

table_b_full_qualified_name=None, table_b_column_ra=None, table_b_column_dec=None

The result is a join table with the identifies of both tables and the distance (degrees), that is returned
without metadata units. If desired, units can be added using the Units package of Astropy as follows:
results[‘separation’].unit = u.degree. To speed up the cross-match, pass the biggest table to the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
results[‘separation’].unit = u.degree. To speed up the cross-match, pass the biggest table to the
``results[‘separation’].unit = u.degree``. To speed up the cross-match, pass the biggest table to the

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes committed to the branch.

if show_server_messages:
self.get_status_messages()

def cross_match_basic(self, *, table_a_full_qualified_name, table_a_column_ra, table_a_column_dec,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be just named cross_match, or are there plans to have a more generic one like we have for gaia?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the idea is to follow the same names as in gaia. We are not 100 % that the "other" x-match will be implemented.

"""
try:
table_metadata = self.load_table(table=full_qualified_table_name, verbose=verbose)
except Exception:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a more specific, expected exception type here as not all the problems with be due to not having the table in the archive.
(I see this problem exists in the gaia module, too)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aim is to catch any exception and not to continue with the process.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap, but then just let them raise as they come as the new exception may not be correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception is propagated. Changes committed to the branch.

@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1449_x-match branch from 9b3bae8 to 6b765f5 Compare August 8, 2025 20:36
@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1449_x-match branch from ac86fa7 to d4787d0 Compare August 8, 2025 21:07
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bsipocz bsipocz merged commit 809f309 into astropy:main Aug 8, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants