From 25d4581a309e5f029094808e1e4ace2dc8f92929 Mon Sep 17 00:00:00 2001 From: xoubish Date: Thu, 12 Nov 2026 16:01:54 -0800 Subject: [PATCH] Fix the Q1 spectra S3 paths in the clusters tutorial The path column of euclid.objectid_spectrafile_association_q1 now holds the relative path of the FITS file (/euclid/q1/...) instead of a spectrumDM URL, so build the S3 key from that. --- tutorials/euclid/euclid_clusters_tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/euclid/euclid_clusters_tutorial.md b/tutorials/euclid/euclid_clusters_tutorial.md index b6245a7f..150c7f00 100644 --- a/tutorials/euclid/euclid_clusters_tutorial.md +++ b/tutorials/euclid/euclid_clusters_tutorial.md @@ -1321,7 +1321,7 @@ def get_n_spectra(obj_ids, n=10): skipped_hdu += 1 continue - spec_fpath_key = uri.replace("api/spectrumdm/convert/euclid/", "").split("?")[0] + spec_fpath_key = uri.removeprefix("/").removeprefix("euclid/") s3_uri = f"s3://{BUCKET_NAME}/{spec_fpath_key}" groups.setdefault(s3_uri, []).append((obj_id, hdu_index))