Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add read-only warning to nbs #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions content/notebooks/aperture_photometry/aperture_photometry.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
}
},
"source": [
"# Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"# Table of Contents\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Table of Contents\n",
"- [Imports](#Imports)\n",
"- [Introduction](#Introduction)\n",
"- [Tutorial Data](#Tutorial-Data)\n",
Expand All @@ -52,7 +54,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Imports\n",
"## Imports\n",
"We are using standard libraries from the Numpy and Astropy stack.\n",
"\n",
"- *astropy*\n",
Expand Down Expand Up @@ -91,7 +93,7 @@
}
},
"source": [
"# Introduction\n",
"## Introduction\n",
"This notebook explains how to perform **forced aperture photometry** (also known as *forced photometry* or *aperture photometry*). Aperture photometry is useful for measuring the integrated fluxes for a set of specified source positions and aperture sizes. This technique is often valuable for extracting fluxes of known sources when it is impractical to fit for their positions and light distributions, or when simplicity and speed are high priorities. For example, aperture photometry can be used for:\n",
"\n",
"- **Faint sources.** If a source is too faint, then it can be difficult to fit for the source centroid, light profile, and flux.\n",
Expand All @@ -116,7 +118,7 @@
}
},
"source": [
"# Tutorial Data"
"## Tutorial Data"
]
},
{
Expand Down Expand Up @@ -151,7 +153,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Image Data\n",
"### Image Data\n",
"\n",
"We load a simulated Roman WFI image in the F106 filter generated with [Roman I-Sim](https://romanisim.readthedocs.io/) from a source catalog containing Gaia stars and simulated galaxies. This image covers a single WFI detector. It is a Level 2 (L2; calibrated rate image) file, meaning that the data were processed to flag and/or correct for detector-level effects (e.g., saturation, classic non-linearity, etc.), and that the ramp was fitted into a count rate image in units of Data Numbers (DN) per second."
]
Expand Down Expand Up @@ -191,7 +193,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Source Catalog\n",
"### Source Catalog\n",
"\n",
"We also have access to a source catalog that was used to simulate the WFI image. It contains stars and galaxies, which are labeled as `PSF` and `SER` under the column `type`. Source fluxes are available in all WFI filters (`F062`, `F087`, `F106`, `F129`, `F146`, `F158`, `F184`, `F213`) and are sampled from a lognormal distribution. Note that fluxes are all given in *maggies*, which are defined as ${\\rm maggie} \\equiv 10^{-0.4 m_{AB}}$, for an AB apparent magnitude $m_{AB}$. \n",
"\n",
Expand Down Expand Up @@ -301,7 +303,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Forced Aperture Photometry\n",
"## Forced Aperture Photometry\n",
"\n",
"Forced aperture photometry is the process of using previously known source positions to place apertures. We do this using the source catalog information above. If you do not have source positions, then you will need to do source detection first to determine the positions of sources (see [Additional Resources](#Additional-Resources))."
]
Expand All @@ -310,7 +312,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create Apertures"
"### Create Apertures"
]
},
{
Expand Down Expand Up @@ -339,7 +341,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Source Visualization"
"### Source Visualization"
]
},
{
Expand Down Expand Up @@ -369,7 +371,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Aperture Photometry with Photutils\n",
"### Aperture Photometry with Photutils\n",
"\n",
"We now perform aperture photometry on the selected sources. Note that the input catalog contained all sources in the region the WFI observed, but not all sources in the catalog were not necessarily located on a WFI detector. In that case, the apeture photometry result for that source will have a value of NaN."
]
Expand Down Expand Up @@ -428,7 +430,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Aditional Resources\n",
"## Additional Resources\n",
"The [Photutils documentation](https://photutils.readthedocs.io/en/stable/) has additional tutorials for detecting and fitting sources in images:\n",
"\n",
"- [Aperture photometry](https://photutils.readthedocs.io/en/stable/aperture.html)\n",
Expand All @@ -448,7 +450,7 @@
"## About This Notebook\n",
"\n",
"**Author:** John F. Wu, Tyler Desjardins\\\n",
"**Updated On:** 2024-12-15"
"**Updated On:** 2025-12-15"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
}
},
"source": [
"## Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook on the Roman Science Platform, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Imports\n",
"Here we import the required packages for our data access examples including:\n",
"- *asdf* for accessing ASDF files\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
}
},
"source": [
"## Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Imports\n",
"- *astropy.visualization.simple_norm* for automatically scaling image arrays\n",
"- *astropy.coordinates.SkyCoord* to create Python objects containing sky coordinate transforms\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
}
},
"source": [
"## Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Imports\n",
"Below we list the libraries we'll be using in the tutorial:\n",
"- *astropy.coordinates* to perform sky-to-detector coordinate transformations\n",
Expand Down
14 changes: 8 additions & 6 deletions content/notebooks/mosaic_pipeline/mosaic_pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
}
},
"source": [
"# Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"# Imports\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Imports\n",
" Libraries used\n",
"- *romancal* for running the processing pipeline\n",
"- *roman_datamodels* for opening Roman WFI ASDF files\n",
Expand Down Expand Up @@ -69,7 +71,7 @@
}
},
"source": [
"# Introduction\n",
"## Introduction\n",
"The purpose of this notebook is to combine multiple Level 2 (L2; calibrated rate image) data products into a Level 3 (L3; distortion-corrected, co-added image) product. Details about the Roman data levels can be found [here](https://roman-docs.stsci.edu/data-handbook-home/wfi-data-format/data-levels-and-products). The pipeline for combinging images is called the Mosaic Pipeline, and it consists of the following steps:\n",
"\n",
"1. **Flux step:** Transform pixels from instrumental units of data numbers per second (DN/s) in the L2 products into physical surface brightness units of megaJanskys per steradian (MJy/sr).\n",
Expand Down Expand Up @@ -97,7 +99,7 @@
}
},
"source": [
"# Tutorial Data\n",
"## Tutorial Data\n",
"In this tutorial, we use L2 WFI data files that are the result of RomanCal processing of L1 simulated files created with Roman I-Sim. If you have already worked through the tutorials \"Simulating WFI Imaging Data with Roman I-Sim\" and \"Calibrating WFI Exposures with RomanCal,\" then you may already have these files saved locally. If not, then these files are also stored in the science platform S3 bucket. For more information on how to access these data, see the Data Discovery and Access tutorial.\n",
"\n",
"The L2 products that we will use for the tutorial represent two WFI detectors (WFI01 and WFI02) with four different pointings that have small dithers between them. As this has not been optimized for oversampling, and only for gap-filling between detectors, we will create a mosaicked L3 product that uses the native pixel scale."
Expand All @@ -107,9 +109,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Making WFI Mosaics\n",
"## Making WFI Mosaics\n",
"\n",
"## Generating the Association File\n",
"### Generating the Association File\n",
"\n",
"Association table files (often abbreviated \"association files\" or \"ASN files\") are JavaScript Object Notation (JSON) formatted files files that list the input products that should be processed together and the output products that should be created. In the Mosaic Pipeline, association files specifically enumerate the input L2 products that are used to create a single L3 product.\n",
"\n",
Expand Down
4 changes: 3 additions & 1 deletion content/notebooks/pandeia/pandeia.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
}
},
"source": [
"## Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Introduction\n",
"\n",
"**Pandeia** is a high-fidelity exposure time calculator developed by STScI to characterize optimal observing setups for user-created astronomical scenes. It supports the Roman Wide Field Instrument (WFI) as well as the James Webb Space Telescope's full complement of instruments.\n",
Expand Down
4 changes: 3 additions & 1 deletion content/notebooks/rist/rist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
}
},
"source": [
"## Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Introduction\n",
"Roman Interactive Sensitivity Tool (RIST) is a simulation tool designed to help users quickly explore the feasibility of observations for the Wide Field Instrument (WFI). RIST is a simplified version of [Pandeia](https://www.stsci.edu/roman/science-planning-toolbox/pandeia) (the Exposure Time Calculator) -- it uses a pre-computed grid of exposure time calculations with Pandeia that sample a set of exposure parameters and observing setups.\n",
"\n",
Expand Down
12 changes: 8 additions & 4 deletions content/notebooks/roman_cutouts/roman_cutouts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
"source": [
"# Creating Cutouts of Roman Data with Astrocut\n",
"\n",
"---"
"---\n",
"\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it."
]
},
{
Expand All @@ -25,9 +31,7 @@
"6. [Create Image Cutout in ASDF Format](#Create-Image-Cutout-in-ASDF-Format)\n",
"7. [Partial Image Cutouts](#Partial-Image-Cutouts)\n",
"8. [Additional Resources](#Additional-Resources)\n",
"9. [About this Notebook](#About-this-Notebook)\n",
"\n",
"---"
"9. [About this Notebook](#About-this-Notebook)\n"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion content/notebooks/romancal/romancal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
}
},
"source": [
"## Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Imports\n",
" Libraries used\n",
"- *romancal* for running the processing pipeline\n",
Expand Down
22 changes: 12 additions & 10 deletions content/notebooks/romanisim/romanisim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
}
},
"source": [
"# Kernel Information\n",
"## Kernel Information and Read-Only Status\n",
"\n",
"To run this notebook, please select the \"Roman Calibration\" kernel at the top right of your window.\n",
"\n",
"# Table of Contents\n",
"This notebook is read-only. You can run cells and make edits, but you must save changes to a different location. We recommend saving the notebook within your home directory, or to a new folder within your home (e.g. <span style=\"font-variant:small-caps;\">file > save notebook as > my-nbs/nb.ipynb</span>). Note that a directory must exist before you attempt to add a notebook to it.\n",
"\n",
"## Table of Contents\n",
"- [Imports](#Imports)\n",
"- [Introduction](#Introduction)\n",
"- [Tutorial Data](#Tutorial-Data)\n",
Expand All @@ -51,7 +53,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Imports\n",
"## Imports\n",
" Libraries used\n",
"- *argparse* for formatting input options in romanisim\n",
"- *astroquery.gaia* for querying the Gaia catalog\n",
Expand Down Expand Up @@ -95,7 +97,7 @@
}
},
"source": [
"# Introduction\n",
"## Introduction\n",
"\n",
"The purpose of this notebook is to show how to generate simulated Level 1 (L1; uncalibrated ramp cubes) and Level 2 (L2; calibrated rate images) Roman Wide Field Instrument (WFI) Advanced Scientific Data Format (ASDF) files with Roman I-Sim (package name `romanisim`). Details about the Roman data levels can be found in the [Data Levels and Products](https://roman-docs.stsci.edu/data-handbook-home/wfi-data-format/data-levels-and-products) article in the Roman Documentation System (RDox). Briefly, a L1 file contains a single uncalibrated ramp exposure in units of Data Numbers (DN). L1 files are three-dimensional data cubes, one dimension for time and two dimensions for image coordinates, that are shaped as arrays with (N resultants, 4096 image rows, 4096 image columns). A resultant is a sample up-the-ramp, and represents either a single read of the WFI detectors or multiple reads that have been combined. The L2 WFI data are calibrated images in instrumental units of DN / second. They are two-dimensional arrays shaped as (4088 image rows, 4088 image columns)."
]
Expand All @@ -115,7 +117,7 @@
}
},
"source": [
"# Tutorial Data\n",
"## Tutorial Data\n",
"\n",
"In this tutorial, we will create necessary data in memory or retrieve it from a catalog service. Catalog files are also available in the RSP S3 bucket, and can be streamed into memory using `astropy.table.Table` and the `s3fs` package instructions in the Data Discovery and Access tutorial. Also see the RSP documentation for more information on the catalogs available in the S3 bucket."
]
Expand All @@ -128,7 +130,7 @@
}
},
"source": [
"# Source Catalog Generation\n",
"## Source Catalog Generation\n",
"\n",
"The `romanisim` package offers two options for generating source catalogs:\n",
"1. Retrieve the source catalog from Gaia; or\n",
Expand Down Expand Up @@ -372,9 +374,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Advanced Use Cases\n",
"## Advanced Use Cases\n",
"\n",
"## Dithered Observations\n",
"### Dithered Observations\n",
"\n",
"Dithering is the process of shifting the telescope position slightly such that astronomical sources fall on different pixel positions compared to the previous observation. Dithers comes in two types: \n",
"- Large dithers for filling the gaps between the detectors on the sky and rejection of pixels affected by undesirable effects\n",
Expand Down Expand Up @@ -556,7 +558,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Parallelized Simulations\n",
"### Parallelized Simulations\n",
"\n",
"Often, we will want to run a simulation using multiple detectors rather than just one at a time. Looping over the above in a serial fashion can take quite a long time, so we want to parallelize the work. In the example below, we will show how to parallelize the procedure with `Dask`. These cells are commented out by default, so to run them you need to uncomment all of the lines. Comments in code cells are marked with two # symbols (e.g., `## Comment`), so be sure to remove only the leading single # symbol."
]
Expand Down Expand Up @@ -682,7 +684,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Aditional Resources\n",
"## Additional Resources\n",
"- [Roman I-Sim Documentation](https://romanisim.readthedocs.io/en/latest/index.html)\n",
"- [RomanCal Documentation](https://roman-pipeline.readthedocs.io/en/latest/index.html)\n",
"- [Roman Documentation System (RDox)](https://roman-docs.stsci.edu)"
Expand Down
Loading