Skip to content

New WFC3 Notebook: uvis_amp_equalization#481

Draft
annierose3 wants to merge 3 commits into
spacetelescope:mainfrom
annierose3:wfc3_uvis_amp_offsets
Draft

New WFC3 Notebook: uvis_amp_equalization#481
annierose3 wants to merge 3 commits into
spacetelescope:mainfrom
annierose3:wfc3_uvis_amp_offsets

Conversation

@annierose3
Copy link
Copy Markdown
Contributor

@annierose3 annierose3 commented Apr 15, 2026

This notebook checklist has been made available to us by the Notebooks For All team.
Its purpose is to serve as a guide for both the notebook author and the technical reviewer highlighting critical aspects to consider when striving to develop an accessible and effective notebook.

The First Cell

  • The title of the notebook in a first-level heading (eg.

    or # in markdown).

  • A brief description of the notebook.
  • A table of contents in an ordered list (1., 2., etc. in Markdown).
  • The author(s) and affiliation(s) (if relevant).
  • The date first published.
  • The date last edited (if relevant).
  • A link to the notebook’s source(s) (if relevant).

The Rest of the Cells

  • There is only one H1 (# in Markdown) used in the notebook.
  • The notebook uses other heading tags in order (meaning it does not skip numbers).

Text

  • All link text is descriptive. It tells users where they will be taken if they open the link.
  • All acronyms are defined at least the first time they are used.
  • Field-specific/specialized terms are used when needed, but not excessively.

Code

  • Code sections are introduced and explained before they appear in the notebook. This can be fulfilled with a heading in a prior Markdown cell, a sentence preceding it, or a code comment in the code section.
  • Code has explanatory comments (if relevant). This is most important for long sections of code.
  • [] If the author has control over the syntax highlighting theme in the notebook, that theme has enough color contrast to be legible.
  • Code and code explanations focus on one task at a time. Unless comparison is the point of the notebook, only one method for completing the task is described at a time.

Images (None in this notebook)

  • [N/A ] All images (jpg, png, svgs) have an image description. This could be

    • [N/A ] Alt text (an alt property)
    • [N/A ] Empty alt text for decorative images/images meant to be skipped (an alt attribute with no value)
    • [N/A ] Captions
    • [ N/A] If no other options will work, the image is decribed in surrounding paragraphs.
  • [N/A] Any text present in images exists in a text form outside of the image (this can be alt text, captions, or surrounding text.)

Visualizations (still need to verify this notebook satisfies these reqs.)

  • All visualizations have an image description. Review the previous section, Images, for more information on how to add it.

  • Visualization descriptions include

    • The type of visualization (like bar chart, scatter plot, etc.)
    • Title
    • Axis labels and range
    • Key or legend
    • An explanation of the visualization’s significance to the notebook (like the trend, an outlier in the data, what the author learned from it, etc.)
  • All visualizations and their parts have enough color contrast (color contrast checker) to be legible. Remember that transparent colors have lower contrast than their opaque versions.

  • All visualizations convey information with more visual cues than color coding. Use text labels, patterns, or icons alongside color to achieve this.

  • All visualizations have an additional way for notebook readers to access the information. Linking to the original data, including a table of the data in the same notebook, or sonifying the plot are all options.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@annierose3 annierose3 marked this pull request as draft April 15, 2026 20:59
@annierose3
Copy link
Copy Markdown
Contributor Author

This notebook is still under WFC3 team review! I will update to "ready for review" when it is ready for DMD review. Thank you! :)

@bjkuhn
Copy link
Copy Markdown
Collaborator

bjkuhn commented May 4, 2026

@annierose3 Thank you for your patience! I've finished my first review and am ready to pass it back to you for edits. Make sure you create a requirements.txt file so CI can build the proper env to execute this notebook. Please let me know if you have any questions.

Great work on this notebook!! It's going to be a great addition to our repo!

"cell_type": "markdown",
"metadata": {},
"source": [
"<a id='top'></a>\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add the new ST logo to the notebook.

Add: ![STScI Logo](../../../_static/stsci_header.png) after <a id='top'></a>. Be sure there is a blank line above and below the logo so everything else renders and works properly

"\n",
"\n",
"\n",
"The amp-offset correction workflow in this notebook follows the method from [Sunnquist (2019)](https://github.com/bsunnquist/uvis-skydarks) and uses much of the same code. An overview of the steps we will take to achieve this are as follows:\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Grammar: An overview of the steps we will take to achieve this is as follows

"4. Multiply these offsets by the flat field to account for sensitivity variations.\n",
"5. Subtract the resulting amp-by-amp corrections from the original `FLC`/`FLT` data.\n",
"\n",
"If necessary, users should then re-drizzle their data using the corrected images to create new `DRZ`/`DRC` files after completing the above steps. \n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Move the info from Learning Goals into the Introduction.

The learning goals section should be brief and provide a quick bulleted list of what you do in the notebook. E.g., download data from MAST, build a segmentation map, measure the quadrants, apply flat and equalize; Or something along those lines. In my opinion, the overview of the steps should go in the introduction.

"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unless you really like them, consider removing all the horizontal lines between the sections. Our WFC3 notebooks don't use this convention. You can, however, add this line under the title if you want. Some of our notebooks do that.

"---\n",
"## 1. Introduction <a id='intro'></a>\n",
"\n",
"The WFC3/UVIS detector is made up of four amplifiers (A, B, C, D), each covering one quadrant of the 4Kx4K pixel field. Even after the standard `calwf3` pipeline reduction, small offsets to the bias level can persist between quadrants. These offsets are relatively constant across each quadrant, and sometimes show up as visible to the eye with some amps brighter than others.\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested rewording: "The WFC3/UVIS detector has four amplifiers..."

There is a double space between "as" and "visible".

Consider adding a comma between "eye" and "with"

"outputs": [],
"source": [
"for fname in files:\n",
" example_file = fname\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see any reason to alias/copy fname to a new variable example_file. For clarity, please remove example_file and just use fname.

" data[segmap > 0] = np.nan\n",
"\n",
" # Split into left (amp A/C) and right (amp B/D) halves\n",
" left, right = np.split(data, 2, axis=1)\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I didn't know np.split was a thing. That's so convenient/efficient; good work!

"metadata": {},
"source": [
"---\n",
"## 7. Step 3 — Compute the Per-Amp Offsets <a id='offsets'></a>\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This section could benefit from being a little more explicit. You say both overall mean and overall median. The overall mean is the mean of the per-amp medians

"source": [
"print('Amp medians before and after equalization\\n')\n",
"print(f'{\"File\":<30} {\"State\":<8} {\"A\":>8} {\"B\":>8} {\"C\":>8} {\"D\":>8} {\"Spread\":>8}')\n",
"print('-' * 85)\n",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

bump up 85 to ~90 so that the underline extends further

"# The following lines of code find and download the MDRIZTAB reference file which can be used as drizzle parameters\n",
"mdz = fits.getval(eq_files[0], 'MDRIZTAB', ext=0).split('$')[1]\n",
"print('Searching for the MDRIZTAB file:', mdz)\n",
"!crds sync --hst --files {mdz} --output-dir {os.environ['iref']}"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same as above; use os.system instead of !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants