Skip to content

Conversation

@troyraen
Copy link
Contributor

IRSA-7280

Starting on Wednesday, Sept 24, TAP calls for table 'euclid.objectid_spectrafile_association_q1' will return a 'path' column instead of a 'uri' column and it will contain a SpectrumDM url that will return a single spectrum instead of the full MEF. This PR updates our notebooks to accommodate.

To test: Before running any notebooks, create or edit the file ~/.astropy/config/astroquery.cfg and make sure it has at least the following lines in it. Also make sure you're connected to IPAC VPN.

[ipac.irsa]
tap_url = https://irsadev.ipac.caltech.edu/TAP

@troyraen troyraen added the content Content related issues/PRs. label Sep 23, 2025
Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

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

All the changes look good to me!

@troyraen troyraen force-pushed the raen/IRSA-7280/euclid-uri-to-path branch from e37ad9e to f796d94 Compare September 24, 2025 16:21
@troyraen
Copy link
Contributor Author

IRSA has released the SpectrumDM updates to ops. I've tested this branch and all looks good.

- WAVELENGTH is in Angstroms by default
- SIGNAL is the flux and should be multiplied by the FSCALE factor in the header
- WAVELENGTH is in Angstroms by default.
- SIGNAL is the flux. The scale factor is included in the units.
Copy link
Member

Choose a reason for hiding this comment

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

There is now no "scale factor" anywhere in this notebook, so I would suggest rephrasing and/or extending the explanation a bit more.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Expanded the description.

```{code-cell} ipython3
file_uri = urllib.parse.urljoin(Irsa.tap_url, result['uri'][0])
file_uri
spectrum_path = f"https://irsa.ipac.caltech.edu/{result['path'][0]}"
Copy link
Member

Choose a reason for hiding this comment

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

I do still feel that we should get the base url from somewhere, programatically, and not hard-wired.

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 agree that would be better but I have no idea where to get that from. What do you suggest?

Copy link
Member

Choose a reason for hiding this comment

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

open an issue in astroquery, and eventually we'll have it hardwired there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

```

In above table, we can see that the `uri` column gives us location of spectra file on IBE. We can map it to S3 bucket key to retrieve spectra file from the cloud. This is a very big FITS spectra file with multiple extensions where each extension contains spectrum of one object. The `hdu` column gives us the extension number for our object. So let's extract both of these.
In above table, we can see that the `path` column gives us a url that can be used to call the SpectrumDM service to get the spectrum of our object. We can map it to an S3 bucket key to retrieve a spectra file from the cloud. This is a very big FITS spectra file with multiple extensions where each extension contains spectrum of one object. The `hdu` column gives us the extension number for our object. So let's extract both of these.
Copy link
Member

Choose a reason for hiding this comment

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

a url that can be used to call the SpectrumDM service

Is SpectrumDM a service though? My understanding is that it's the data model and that the service will take a fits file url and turn it into a votable that follows the SpectrumDM standard -- nitpicking, but may be worth being clear and explicit in the explanation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched it to be generic and just say, "call an IRSA service".

@bsipocz
Copy link
Member

bsipocz commented Sep 24, 2025

@troyraen
Copy link
Contributor Author

KeyError was from a different notebook that I didn't realize also needed to be updated for the SpectrumDM release. So, yay CI for catching it. I pushed a fix.

@bsipocz bsipocz added the GHA buildhtml Enable extra buildhtml job on GHA label Sep 25, 2025
@bsipocz bsipocz closed this Sep 25, 2025
@bsipocz bsipocz reopened this Sep 25, 2025
@bsipocz
Copy link
Member

bsipocz commented Sep 25, 2025

(closed--reopened to retrigger CI. Is GHA htmlbuild pass, we can override the branch protection even without circleCI)

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.

One more nitpick, but overall looks good to me.

Thanks

@bsipocz bsipocz merged commit 9c446a2 into main Sep 25, 2025
@bsipocz bsipocz deleted the raen/IRSA-7280/euclid-uri-to-path branch September 25, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content Content related issues/PRs. GHA buildhtml Enable extra buildhtml job on GHA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants