Openuniverse tutorial updates ahead of Sep 15 webinar - #370
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tebook Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
99ba4fa to
a3175c6
Compare
There was a problem hiding this comment.
This is mostly looking good @jkrick except a few things.
Because we no longer have coadds and full images are different than what the Firefly tutorial was written for originally, the narrative has become outdated in several places. Thanks for fixing the first half of it. For the second half, it will require some substantial edits and pruning to keep the narrative relevant and code working. Maybe I should do it in a separate PR based on this PR branch?
Re firefly issues with plotting, I think IRSAViewer is more finicky when running from Fornax due to the distance and/or load. I tried using NASA cloud firefly instead and don't see any issues except rubin 3 color image as I mentioned in comments below. Let's hope Fornax image gets updated by the time of workshop to use cloud firefly.
| # Local working notes, not part of the tutorials | ||
| CLAUDE.md | ||
| OU_PR_REVIEW.md | ||
| PR_DESCRIPTION.md |
There was a problem hiding this comment.
I think these can be removed
There was a problem hiding this comment.
This could stay as it will help against accidental push of any of these files.
There was a problem hiding this comment.
In that case only CLAUDE.md should stay - the other two md files seem specific to this PR and don't apply to our repo.
There was a problem hiding this comment.
it doesn't need to apply to the repo, if e.g. Jessica creates these files for her claude then they should go in. If she doesn't use the files then I agree, it should not be in this file.
Bottom line, please add any files that doesn't belong in the repo but you have locally.
There was a problem hiding this comment.
yes, I have them locally, and don't want them pushed to the repo, so I think this tays as is.
|
|
||
| ### Use Firefly's set_stretch method to change the stretch of the image display via Python | ||
|
|
||
| The image has a lot of noise that obscures our high redshift sources of interest. You can use the Firefly GUI to change the stretch of the image display. We identify that squared stretch from -2 to 10 sigma highlights the colors of our sources better. You can also use the Firefly client's [`set_stretch`](https://caltech-ipac.github.io/firefly_client/api/firefly_client.FireflyClient.html#firefly_client.FireflyClient.set_stretch) to do this via Python. This is helpful for reproducibility and for scaling up to many images. |
There was a problem hiding this comment.
Maybe we should move it above and tweak the narrative re high redshift sources.
There was a problem hiding this comment.
I'll leave this for now, but happy to switch the order of pan/zoom and stretch if that is your recommendation.
| The saved gif loops without stopping, which makes a brief brightening hard to follow. Displaying the animation instead gives playback controls: pause it, step one epoch at a time with the arrows, drag the slider to any frame, and read the date in the corner as you go. | ||
|
|
||
| ```{code-cell} ipython3 | ||
| HTML(anim.to_jshtml(default_mode='once')) | ||
| ``` |
There was a problem hiding this comment.
This renders nicely in fornax but I'm not sure how it will look in our static HTML build. For som reason, this tutorial wasn't executed so I can't tell: https://circle.scientific-python.dev/output/job/758ba48d-7674-427e-98ba-4d12fb345d12/artifacts/0/_build/html/openuniverse2024-roman-tds-supernova
There was a problem hiding this comment.
The old timedomainsurvey notebook was on the ignore_circleci_testing list so when I renamed the tutorial, I kept it on that list. Agreed it's worth eyeballing on the site once this merges.
bsipocz
left a comment
There was a problem hiding this comment.
Thank you for the PR! I haven't noticed anything critical, most of my comments are about small things that are not blockers.
(I have not reviewed the firefly notebook, but looked through the diff for the other ones)
| # Local working notes, not part of the tutorials | ||
| CLAUDE.md | ||
| OU_PR_REVIEW.md | ||
| PR_DESCRIPTION.md |
There was a problem hiding this comment.
This could stay as it will help against accidental push of any of these files.
| The OpenUniverse2024 data live on the cloud in a public AWS S3 bucket and can be accessed anonymously using `s3fs`. This section shows how to establish that connection, navigate the directory tree, and inspect the contents of a FITS image file. | ||
|
|
||
| In the path below, `simple_model` refers to the simulated images with noise and realistic instrument effects, as opposed to `truth` images which are noise-free. The `full` simulation covers the complete survey footprint; a smaller `preview` subset is also available. See the [OpenUniverse2024 paper](https://arxiv.org/abs/2501.05632) for details on the differences. A `pointing` is a unique Roman observation visit — each pointing corresponds to one placement of the 18-detector focal plane on the sky, producing up to 18 individual FITS files (one per detector). | ||
| In the path below, `simple_model` refers to the simulated images with noise and realistic instrument effects, as opposed to `truth` images which are noise-free. The `full` simulation covers the complete survey footprint. See the [OpenUniverse2024 paper](https://arxiv.org/abs/2501.05632) for details on how it was produced. A `pointing` is a unique Roman observation visit — each pointing corresponds to one placement of the 18-detector focal plane on the sky, producing up to 18 individual FITS files (one per detector). |
There was a problem hiding this comment.
Let's try and use DOIs so we get nice references. Also cut up the paragraph to one sentence per line.
| In the path below, `simple_model` refers to the simulated images with noise and realistic instrument effects, as opposed to `truth` images which are noise-free. The `full` simulation covers the complete survey footprint. See the [OpenUniverse2024 paper](https://arxiv.org/abs/2501.05632) for details on how it was produced. A `pointing` is a unique Roman observation visit — each pointing corresponds to one placement of the 18-detector focal plane on the sky, producing up to 18 individual FITS files (one per detector). | |
| In the path below, `simple_model` refers to the simulated images with noise and realistic instrument effects, as opposed to `truth` images which are noise-free. | |
| The `full` simulation covers the complete survey footprint. See the [](https://doi.org/10.1093/mnras/staf1833) for details on how it was produced. | |
| A `pointing` is a unique Roman observation visit — each pointing corresponds to one placement of the 18-detector focal plane on the sky, producing up to 18 individual FITS files (one per detector). |
| ### 2.1 Inspect the SNANA Transient Catalog | ||
|
|
||
| `inspect_parquet_columns()` reads only the Parquet metadata footer to print the row count and column names — no data is loaded into memory. | ||
| `inspect_parquet_files()` reads only the Parquet metadata footer to print the row count and column names — no data is loaded into memory. |
| from astroquery.ipac.irsa import Irsa | ||
| from matplotlib import animation | ||
| from scipy.ndimage import rotate | ||
| from IPython.display import HTML |
There was a problem hiding this comment.
This is new, we'll need to declare ipython as a dependency, too.
There was a problem hiding this comment.
added to both the requirements and the install line
| --- | ||
| def animate_stamps(stamps, savepath, no_whitespace=True, | ||
| labels=[],labelxy=(0.05,0.95), | ||
| **kwargs): |
There was a problem hiding this comment.
I think we could drop kwargs -- we don't use it when this function is called, and while the pattern can be useful in some cases it is also very prone to bugs and unexpected behaviour.
| """ | ||
| Make an animation of a sequence of image stamps. | ||
|
|
||
| :param stamps: Must be in chronological order. |
There was a problem hiding this comment.
at some point I think we should consistently switch to numpydoc formatting rather than this AI default.
There was a problem hiding this comment.
FYI, this one was written by Lauren Alderoty from the OU team, not me. I try to remember to make all functions numpydocs style (obviously I am not perfect).
I did check that all functions in the OU notebooks are numpydocs style, and only found 2 which needed to be changed, so at least this small part of the repo is consistent.
|
|
||
| ## OpenUniverse2024 | ||
|
|
||
| [OpenUniverse2024](https://arxiv.org/abs/2501.05632) simulates the overlapping imaging surveys to be carried out by the Nancy Grace Roman Space Telescope and the Vera C. Rubin Observatory, covering roughly 70 square degrees of matched optical and infrared sky. |
There was a problem hiding this comment.
Even if we don't change the reference in the notebooks for DOI, but here in the landing page I think we should switch to it, it will give a much nicer rendering than these direct external links.
| [OpenUniverse2024](https://arxiv.org/abs/2501.05632) simulates the overlapping imaging surveys to be carried out by the Nancy Grace Roman Space Telescope and the Vera C. Rubin Observatory, covering roughly 70 square degrees of matched optical and infrared sky. | |
| [OpenUniverse2024](https://doi.org/10.1093/mnras/staf1833) simulates the overlapping imaging surveys to be carried out by the Nancy Grace Roman Space Telescope and the Vera C. Rubin Observatory, covering roughly 70 square degrees of matched optical and infrared sky. |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jkrick
left a comment
There was a problem hiding this comment.
Thanks for the comments @bsipocz and @jaladh-singhal . I think I got all of them, except most of the firefly comments which I prefer to leave for a separate PR since I was unable to get the testing working on Fornax for this.
The firefly deprecation PR might also want to touch Euclid_ERO.md and SEDs_in_Firefly.md, which call the same deprecated show_fits()
| # Local working notes, not part of the tutorials | ||
| CLAUDE.md | ||
| OU_PR_REVIEW.md | ||
| PR_DESCRIPTION.md |
There was a problem hiding this comment.
yes, I have them locally, and don't want them pushed to the repo, so I think this tays as is.
| """ | ||
| Make an animation of a sequence of image stamps. | ||
|
|
||
| :param stamps: Must be in chronological order. |
There was a problem hiding this comment.
FYI, this one was written by Lauren Alderoty from the OU team, not me. I try to remember to make all functions numpydocs style (obviously I am not perfect).
I did check that all functions in the OU notebooks are numpydocs style, and only found 2 which needed to be changed, so at least this small part of the repo is consistent.
| The saved gif loops without stopping, which makes a brief brightening hard to follow. Displaying the animation instead gives playback controls: pause it, step one epoch at a time with the arrows, drag the slider to any frame, and read the date in the corner as you go. | ||
|
|
||
| ```{code-cell} ipython3 | ||
| HTML(anim.to_jshtml(default_mode='once')) | ||
| ``` |
There was a problem hiding this comment.
The old timedomainsurvey notebook was on the ignore_circleci_testing list so when I renamed the tutorial, I kept it on that list. Agreed it's worth eyeballing on the site once this merges.
|
|
||
| ## OpenUniverse2024 | ||
|
|
||
| [OpenUniverse2024](https://arxiv.org/abs/2501.05632) simulates the overlapping imaging surveys to be carried out by the Nancy Grace Roman Space Telescope and the Vera C. Rubin Observatory, covering roughly 70 square degrees of matched optical and infrared sky. |
| The OpenUniverse2024 data live on the cloud in a public AWS S3 bucket and can be accessed anonymously using `s3fs`. This section shows how to establish that connection, navigate the directory tree, and inspect the contents of a FITS image file. | ||
|
|
||
| In the path below, `simple_model` refers to the simulated images with noise and realistic instrument effects, as opposed to `truth` images which are noise-free. The `full` simulation covers the complete survey footprint; a smaller `preview` subset is also available. See the [OpenUniverse2024 paper](https://arxiv.org/abs/2501.05632) for details on the differences. A `pointing` is a unique Roman observation visit — each pointing corresponds to one placement of the 18-detector focal plane on the sky, producing up to 18 individual FITS files (one per detector). | ||
| In the path below, `simple_model` refers to the simulated images with noise and realistic instrument effects, as opposed to `truth` images which are noise-free. The `full` simulation covers the complete survey footprint. See the [OpenUniverse2024 paper](https://arxiv.org/abs/2501.05632) for details on how it was produced. A `pointing` is a unique Roman observation visit — each pointing corresponds to one placement of the 18-detector focal plane on the sky, producing up to 18 individual FITS files (one per detector). |
|
@jaladh-singhal I propose that we merge this PR and I will take you up on your offer of working on the firefly section of that one notebook in a separate PR. Please approve if this plan works for you. |
jaladh-singhal
left a comment
There was a problem hiding this comment.
Thanks for addressing the comments @jkrick. Firefly notebook will need one more pass which I'll try to do this week as I find time.
Openuniverse tutorial updates ahead of Sep 15 webinar 4a263c1
Updates the OpenUniverse2024 tutorials to the full data release and reconciles how they find data.
Closes #309.
What changed
a reader has no reason to know an earlier subset existed.
24-value block grid while asking SIA for Rubin. Both now go through SIA, removing the grid constants,
block_wcs(),find_block(),get_roman_coadd_fpath(), and the grid-vs-header verification.exposure sits ~170° from north, the Rubin visit ~160°), so the four figures in §2/§3/§4/§6 were
previously all at different orientations. Each is now resampled onto a north-up grid keeping its own
pixel scale, so Roman's finer sampling stays visible. Whole exposures resample at coarser sampling for
display. Rotation leaves empty corners, so
stretch_color()is nan-aware. This is whatreprojectisfor now; the old
reproject_to_TAN()is gone.playback controls and visit-coverage guidance.
OpenUniverse2024group listed first, Quickstart at thetop, prefix-free titles,
simulated.mdsplit into two galleries.docstrings. Three cells were split first, since a cell folds as a unit.
Why no coadds
Neither survey's coadds are reachable through SIA for the full release.
not on a timeline that affects this PR.
The notebooks use single exposures throughout and don't mention coadds, so nothing needs rewriting when the
Roman coadds are registered. Consequence for visualization notebook: every full-release Rubin product is a single visit, so the Rubin panel is genuinely shallow
CI cost
The firefly notebook was measured end-to-end, not estimated:
Firefly: known issues, left for a separate PR
Firefly behaves inconsistently here. On some runs §5 and §7 work exactly as written — the Rubin image
displays and the region overlays appear — and on others the image does not display at all, on the same code
and inputs. I can't figure this out. This PR does not try to fix it. @jaladh-singhal please review sections 5 & 7 especially carefully, or open a new PR for any necessary changes.
firefly_client3.4.0 also deprecated two things the notebook uses, so §5 and §7 print:Notes for reviewers