Skip to content

EUCLID: update de method get_spectrum to retrieve multiple spectra#3570

Draft
cosmoJFH wants to merge 3 commits intoastropy:mainfrom
esdc-esac-esa-int:ESA_euclid_EUCLIDMNGT-1457_retrieve_multiple_spectra
Draft

EUCLID: update de method get_spectrum to retrieve multiple spectra#3570
cosmoJFH wants to merge 3 commits intoastropy:mainfrom
esdc-esac-esa-int:ESA_euclid_EUCLIDMNGT-1457_retrieve_multiple_spectra

Conversation

@cosmoJFH
Copy link
Copy Markdown
Contributor

@cosmoJFH cosmoJFH commented Mar 26, 2026

Dear Astroquery team,

Currently the astroquery.euclid.get_spectrum() method allows one to retrieve a single spectrum associated with a given object id (as a string).

This method downloads the spectrum and stores it in a FITS file inside a (created) directory that is written locally. The output of this method is a list with the path to this FITS file, e.g.: ['<local_dir>/temp_20250327_093710/SPECTRA_RGS-sedm 2707008224650763513.fits']

We would like to be able to retrieve multiple spectra data in one single request via Astroquery. In this PR, the input parameter ids accepts a <source_id> or a designation (<data-release>+blank+<source_id>) or multiple values separated by commas or a list. In the case multiple values are used and the output_file is not set, the returned files are saved in a zip file named get_spectra_output.zip. The method always returns a dictionary where the key is the name of the returned fits file and the value is a list of Astropy Tables made from the fits file (similar to the Gaia datalink method)

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 76.78571% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.11%. Comparing base (6a3c231) to head (e4aeb53).
⚠️ Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/esa/euclid/core.py 76.36% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3570      +/-   ##
==========================================
+ Coverage   73.09%   73.11%   +0.02%     
==========================================
  Files         219      224       +5     
  Lines       20592    20873     +281     
==========================================
+ Hits        15052    15262     +210     
- Misses       5540     5611      +71     

☔ 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-1457_retrieve_multiple_spectra branch from 509b584 to 6af4e46 Compare March 26, 2026 20:28
@bsipocz bsipocz added this to the 0.4.12 milestone Mar 27, 2026
@cosmoJFH
Copy link
Copy Markdown
Contributor Author

cosmoJFH commented Mar 27, 2026

We have found an issue in the documentation, due to the changes introduced in PR #3558: 7 doctests are not displayed since we included a comment after the "doctest-skip::" For example,

.. doctest-skip::
.. Skip testing as the example requires a lot of time to download a huge file

is not correct. The comment must be included before. We have included the changes in this PR. Would you rather include these changes in a separate PR?

@cosmoJFH cosmoJFH marked this pull request as draft April 1, 2026 15:22
@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1457_retrieve_multiple_spectra branch from b3f7c53 to c700984 Compare April 2, 2026 07:49
@cosmoJFH cosmoJFH force-pushed the ESA_euclid_EUCLIDMNGT-1457_retrieve_multiple_spectra branch from 699672e to e4aeb53 Compare April 2, 2026 08:02
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