Skip to content

Euclid: new method to retrieve scientific LE3 products #3313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

cosmoJFH
Copy link
Contributor

@cosmoJFH cosmoJFH commented May 7, 2025

Dear Astroquery team,

we would like to include a new method in the Euclid project to retrieve scientific LE3 products. This method is similar (in scope) to the following methods:

  1. get_product_list: It retrieves an Astropy Table object with a list of .FITS file names (i.e., products) and other relevant metadata that can be used to download the individual FITS files.
  2. get_product: It retrieves a product (i.e., a .FITS file), with data that can be analysed.
  3. get_observation_products: It retrieves a product (i.e., a .FITS file), with data that can be analysed.

We have also developed new tests.

cc @esdc-esac-esa-int

jira: EUCLIDMNGT-1275

@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1275_LE3_search_capability branch from 5ec7e07 to 8c96881 Compare May 7, 2025 10:34
Copy link

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.97%. Comparing base (79f30f8) to head (f9bed5d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3313      +/-   ##
==========================================
+ Coverage   69.87%   69.97%   +0.09%     
==========================================
  Files         232      232              
  Lines       19757    19818      +61     
==========================================
+ Hits        13806    13867      +61     
  Misses       5951     5951              

☔ 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.

@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1275_LE3_search_capability branch from 3a2b771 to f0ee810 Compare May 7, 2025 11:24
@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1275_LE3_search_capability branch from 92cdb46 to ea52f13 Compare May 7, 2025 11:47
@bsipocz bsipocz added this to the v0.4.11 milestone May 7, 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.

Overall looks good with some minor, mostly documentation-related comments.

Also, I would think a rebase would be great to remove the merge commit as well as the unrelated changes in e.g. the changelog commit.

product_type : str, optional, default None
Available product types per category and group:

#. Internal Data Products
Copy link
Member

Choose a reason for hiding this comment

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

This ~200 lines feels to be a lot, maybe we should instead refer to a docs URL in this docstring?

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 Euclid documentation is pretty complex, so we tried to provide a simple description of the available parameters that could be used. Although this information was extracted from the Euclid documentation, it is not straight forward to extract the category/group/product_type for all the LE3 types.

In any case, I will ask the Euclid team at ESAC.

Copy link
Member

Choose a reason for hiding this comment

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

Just to be clear, my suggestion is to put this into the narrative docs and refer to that from the docstring.

Copy link
Member

Choose a reason for hiding this comment

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

(given the overall complexity, I think that's a cleaner place for the users to learn more about the options, also it's more possible to give more context about the options there)

Copy link
Contributor Author

@cosmoJFH cosmoJFH May 9, 2025

Choose a reason for hiding this comment

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

We have moved the information of this method to the documentation of the Euclid module. We have included a table at the end of the document and included a reference to it in the method.

>>> le3_product_list = Euclid.get_scientific_product_list(tile_index=102034414)
>>> print("Found", len(le3_product_list), "results")
Found 12 results
>>> print(le3_product_list)
Copy link
Member

Choose a reason for hiding this comment

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

add the table printout here, or remove the print line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. The documentation was updated with the output of the functions.

>>> results = euclid.get_scientific_product_list(category='Weak Lensing Products', group='2PCF', product_type='DpdTwoPCFWLShearShear2D')
>>> print("Found", len(le3_product_list), "results")
Found 12 results
>>> print(le3_product_list)
Copy link
Member

Choose a reason for hiding this comment

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

same, either remove the print line, or add an output

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. The documentation was updated with the output of the functions.

@@ -1276,5 +1277,411 @@ def get_datalinks(self, ids, *, linking_parameter='SOURCE_ID', verbose=False):

return self.__eucliddata.get_datalinks(ids=ids, linking_parameter=linking_parameter, verbose=verbose)

def get_scientific_product_list(self, *, observation_id=None, tile_index=None, category=None, group=None,
Copy link
Member

Choose a reason for hiding this comment

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

This is a small side note from someone not exactly familiar with Euclid data products and use cases, so I could easily be in the wrong:

I'm not sure about the naming, isn't science products returned with get_product_list, too? maybe swap scientific to highlevel or something else? Or do you expect the users mostly using this method to access data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will ask to the Euclid team at ESAC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eventually, we may revise the names of the methods in the EuclidClass to e.g., homogenize the method names and reduce their length - but that is well beyond the scope of this task. So we would leave the present name of this method.

Copy link
Member

Choose a reason for hiding this comment

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

OK, that sounds good.

@@ -240,7 +240,30 @@ To get the list of products associated with a given Euclid observation_id or til
EUC_MER_BGSUB-MOSAIC-DES-Z_TILE102018211-83C32F_20241018T143526.104818Z_00.00.fits 1398 102018211 DECAM DECAM_z SCIENCE SKY 57.9990741 -51.5 IMAGE


The method returns a list of products as an astropy.table.
The method returns a list of products as an astropy.table. It is also possible to search by observation_id, but not by both parameters simultaneously.
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
The method returns a list of products as an astropy.table. It is also possible to search by observation_id, but not by both parameters simultaneously.
The method returns a list of products as an `~astropy.table.Table`. It is also possible to search by observation_id, but not by both parameters simultaneously.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Documentation updated.


Returns
-------
The list of products (astropy.table)
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest avoid using 'list' to describe a table as it's slightly misleading

Suggested change
The list of products (astropy.table)
The products in an astropy.table.Table

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.

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