Skip to content

MAST: Read product function for MastMissions#3593

Open
snbianco wants to merge 8 commits into
astropy:mainfrom
snbianco:read-product-mm
Open

MAST: Read product function for MastMissions#3593
snbianco wants to merge 8 commits into
astropy:mainfrom
snbianco:read-product-mm

Conversation

@snbianco
Copy link
Copy Markdown
Contributor

@snbianco snbianco commented May 18, 2026

A function in the MastMissions class that can read products into memory.

For FITS files, we use astropy.io.fits.open. The product files are downloaded and cached by Astropy, and then read into a HDUList object.

For ASDF files, we use fsspec and asdf. Our downloads for Roman data are redirected to S3, so these files are not downloaded and are streamed directly into asdf.AsdfFile objects.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 88.46154% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.23%. Comparing base (70dd42f) to head (7808985).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/mast/missions.py 88.46% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3593      +/-   ##
==========================================
+ Coverage   73.21%   73.23%   +0.02%     
==========================================
  Files         226      226              
  Lines       21053    21093      +40     
==========================================
+ Hits        15414    15448      +34     
- Misses       5639     5645       +6     

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

@scfleming
Copy link
Copy Markdown

Until we have a more mature version ready, can we please ensure documentation / tutorials call out that for FITS files read_product() still downloads the file locally, so people working on Roman work who may want to use this to download HST or JWST FITS files aren't surprised if read_product() is using up credits writing to local cloud storage on them?

I presume this can be avoided once there's a "get_s3_uris()" endpoint in MissionMAST for all the supported missions beyond Roman?

@snbianco snbianco force-pushed the read-product-mm branch 2 times, most recently from 617201a to cdda4a2 Compare May 27, 2026 17:05
@snbianco snbianco marked this pull request as ready for review May 27, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants