Skip to content

ESA Plato Astroquery module#3573

Merged
bsipocz merged 14 commits into
astropy:mainfrom
esdc-esac-esa-int:ESA_plato-new-module
Apr 6, 2026
Merged

ESA Plato Astroquery module#3573
bsipocz merged 14 commits into
astropy:mainfrom
esdc-esac-esa-int:ESA_plato-new-module

Conversation

@jespinosaar

Copy link
Copy Markdown
Contributor

Dear Astroquery Team,

Many thanks for merging PR #3511. With this, we can now proceed with the new module we already discussed.

We have been preparing a module for the PLATO Archive, to be available for the Guest Observer call for proposals, providing relevant information that may be helpful for astronomers. For this, if possible, we would like to iterate with you and merge this branch as soon as possible, so we have a pre-released version right after this is merged. You can find more information here:

https://www.cosmos.esa.int/web/plato/getting-ready

With this, we have prepared a module based on the EsaTap class we have already discussed, together with specific methods to retrieve data from these catalogues. As you will see, there is also a method to plot data, but we are detecting there if matplotlib is imported and, if not, it raises an exception. This method is also relevant, as it mimics the behavior of an application that is currently used, providing the same features in python script to our users.

With respect to tests, you will see that we have the offline tests and the documentation tests are set to be skipped. This is due to the URL of the TAP, currently not available for the public audience, but it will be opened next week. Right after the Archive is public, we will create another pull request to remove the SKIP clauses and add the remote tests, that we already have.

Many thanks for your support! Please let us know any comment you have.

Kind regards,
@jespinosaar

cc @esdc-esac-esa-int

@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.60759% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.20%. Comparing base (dbf41fd) to head (237a3e0).
⚠️ Report is 201 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/esa/plato/core.py 85.93% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3573      +/-   ##
==========================================
+ Coverage   73.10%   73.20%   +0.10%     
==========================================
  Files         224      226       +2     
  Lines       20839    20966     +127     
==========================================
+ Hits        15234    15349     +115     
- Misses       5605     5617      +12     

☔ View full report in Codecov by Harness.
📢 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.

@jespinosaar

Copy link
Copy Markdown
Contributor Author

After some iterations, I managed to pass all the checks. @bsipocz , please let me know if you have any comment

@jespinosaar

Copy link
Copy Markdown
Contributor Author

Just added the latest changes in the manual.

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this looks good for the archive launch. There are a few minor typos, and extra files, but none are blockers.

I would also think that the search_pic_* methods could be merged into one and have an extra kwarg that would select between target and contaminant to keep the API a bit simpler of practically duplicated functionalities. But this is not a strong preference.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove this file as it is not required/used with the refactored infrastructure.
(All the tests/data files are included by default in the new)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just removed this file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

normally I would say don't add this file until it's functional, but as it's already been included, we could keep it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I initially added this as a mistake, but I thought I had remove it. Now it is not included, I just removed it.

Comment thread astroquery/esa/plato/core.py Outdated
def search_catalogue(self, table_name, *, target_name=None, coordinates=None, radius=1*u.arcmin, columns=None,
get_metadata=False, output_file=None, **filters):
"""
Execute a search in one of the catalogues and associated tbles available in PLATO TAP.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Execute a search in one of the catalogues and associated tbles available in PLATO TAP.
Execute a search in one of the catalogues and associated tables available in PLATO TAP.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for spotting this, I already fixed this

Comment thread astroquery/esa/plato/core.py Outdated
Comment on lines +76 to +77
raise TypeError("Please use only target or coordinates as "
"parameter.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
raise TypeError("Please use only target or coordinates as "
"parameter.")
raise TypeError("Please use only 'target_name' or 'coordinates' as "
"parameter, not both.")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just rewrited this

custom_filters=cone_search_filter, get_metadata=get_metadata, async_job=True,
output_file=output_file, **filters)

def search_pic_target_go(self, *, target_name=None, coordinates=None, radius=1*u.arcmin, columns=None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what does go mean in the name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

GO means Guest Observer, as these methods are developed for the Guest Observer Call for Proposals

Comment thread docs/esa/plato/plato.rst
----------------------------

The Query TAP functionality facilitates the execution of custom Table Access Protocol (TAP)
queries within the PLATO ArXiv. Results can be exported to a specified

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will you spell the plato archive as Arxiv?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, the acronym chosen for PLATO Archive is PAX (Plato ArXiv). I know this is different from others, but this is how it was decided.

Comment thread astroquery/esa/plato/core.py Outdated
def search_pic_target_go(self, *, target_name=None, coordinates=None, radius=1*u.arcmin, columns=None,
get_metadata=False, output_file=None, **filters):
"""
Execute a search in PIC Target Catalogue.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Long term this could use another sentence or two of description.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added some words with more info.

@jespinosaar

Copy link
Copy Markdown
Contributor Author

I added your comments, but it seems that when removing the setup_package file this is not working. Let me check

@bsipocz

bsipocz commented Apr 6, 2026

Copy link
Copy Markdown
Member

@jespinosaar - to me it looks like the issue from the changing of the error message.

I'm happy to fix all of these up and merge it in the next hour or so, no need to spend your time with it during Easter.

@jespinosaar

Copy link
Copy Markdown
Contributor Author

@jespinosaar - to me it looks like the issue from the changing of the error message.

I'm happy to fix all of these up and merge it in the next hour or so, no need to spend your time with it during Easter.

Yes, I realized about that after checking, just added a new commit to fix this.

@jespinosaar

Copy link
Copy Markdown
Contributor Author

I agree, maybe it is a good idea to add an extra kwarg for the search_pic methods. But, for now, we were requested to include two separate methods. So, if it is ok with you, let's keep it like this for now.

On the other hand, it seems that now the pipeline will finish successfully.

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK, let's have this in for now and we can iterate as needed once the service is up and running.

@bsipocz bsipocz merged commit c09c9eb into astropy:main Apr 6, 2026
11 checks passed
coordinates=coordinates, radius=radius, columns=columns,
get_metadata=get_metadata, output_file=output_file, **filters)

def plot_plato_results(self, x, y, x_label, y_label, plot_title, *, z=None, z_label=None, error_x=None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not certain that this plotting belongs to astroquery, but we can clean this up later.

@jespinosaar

Copy link
Copy Markdown
Contributor Author

Many many thanks!! And sure, let's iterate on this later. Just let me know when the pre-release version is available, and so the new documentation

@bsipocz

bsipocz commented Apr 7, 2026

Copy link
Copy Markdown
Member

Dev release is on pypi, pip install --pre -U astroquery should be able to pick it up.

@jespinosaar

Copy link
Copy Markdown
Contributor Author

Yes, everything is working as expected, many thanks!!!

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.

2 participants