Skip to content

SP-2645: added 301 notebook on image display for faint features#158

Open
garrethmartin wants to merge 10 commits into
mainfrom
tickets/SP-2645
Open

SP-2645: added 301 notebook on image display for faint features#158
garrethmartin wants to merge 10 commits into
mainfrom
tickets/SP-2645

Conversation

@garrethmartin

@garrethmartin garrethmartin commented Jun 11, 2026

Copy link
Copy Markdown

SP-2645: new tutorial on image display

@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

@@ -0,0 +1,543 @@
{

@christinawilliams christinawilliams Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question CST probably has not encountered before: In RTN-045 do we adopt a specific english spelling (British vs American)? Visualise vs visualize, and characterise, etc, but there's many other words like catalog (perhaps we should ask Melissa what to do here). If there's no policy about this then please disregard this comment!

Update from Melissa: we dont' really care about this, except to appease the spellchecker. So perhaps just look through all markdowns prior to merging to check for any other flagged spelling. I will flag here where I noticed the spellchecker flagged in the notebook aspect:

visualise -> visualize, characterise -> characterize

Also regarding lsb-202 and lsb-301, should these be capitalized since its an abbreviation? Maybe its better to list the actual notebook number instead?


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you Christina.

Spellings changed to American English for consistency.

Now using correct notebook number to refer to other notebooks in the series.

@@ -0,0 +1,543 @@
{

@christinawilliams christinawilliams Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps move the text starting with "two functions are used..." to the next markdown right before function definition

artefact -> artifact


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Now split between two code cells w/ markdown before each. Fuller explanation of sigma^ (relevant for the later notebooks)

@@ -0,0 +1,543 @@
{

@christinawilliams christinawilliams Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also add note saying convenience function for unit conversions are defined


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,543 @@
{

@christinawilliams christinawilliams Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Functions should have the inputs and outputs defined in the commented description e.g.:

def gauss(x, a, x0, sigma):

  """Evaluate a 1D Gaussian function.

  Parameters

  ----------

  x : array_like

    Input values where the Gaussian is evaluated.

  a : float

    Amplitude of the Gaussian peak.

  x0 : float

    Mean (center) of the Gaussian.

  sigma : float

    Standard deviation (width) of the Gaussian.

  Returns

  -------

  y : array_like

    Values of the Gaussian function evaluated at x.

  """

  return a * np.exp(-(x - x0)**2 / (2 * sigma**2))


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

all functions now have complete docstrings

@@ -0,0 +1,543 @@
{

@christinawilliams christinawilliams Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Define ECDFS upon first use.

centre -> center


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,462 @@
{

@christinawilliams christinawilliams Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggest splitting this cell into individual functions or group of related functions (separate from parameter definitions) so that they each get a descriptive markdown to help understand what they do

Also inputs and outputs should be defined in the functions (see example in review in 312.1)


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

now split up with docstrings added

@@ -0,0 +1,462 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggest splitting this code block and inserting some narrative markdown at each stage to help the reader


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

have split and slightly simplified

@@ -0,0 +1,462 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

artefacts -> artifacts


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

@@ -0,0 +1,462 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are there any tips to get a good science measurement for a first-time user? For example avoid background objects or exclude flux from the host or something?


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

have added some guidance to the markdown cell

@@ -0,0 +1,462 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sections 4-5 are quite fun! Nice

How does one accurately calculate the error on photometry for a weird irregular shape? Is it just the average surface brightness and then scaled by number of pixels in painted region or something?


Reply via ReviewNB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i've added a basic error calculation to the code, along with a note about how it could be done more robustly

@christinawilliams

Copy link
Copy Markdown
Contributor

Nice! I left lots of comments and suggestions in the 3 notebooks. Please let me know if you have any questions about any of it! Nice job.

@christinawilliams christinawilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left some comments and feedback in the 3 notebooks, please let me know if there are any questions! Nice job!

@garrethmartin

Copy link
Copy Markdown
Author

thank you Christina, i've addressed all your comments.

@@ -0,0 +1,608 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry if I missed this before: I think its customary to put the imports and settings definitions in different cells (and probably the latter are considered "defining parameters" below?


Reply via ReviewNB

@@ -0,0 +1,608 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it possible something didn't render correctly for lo_sigma and hi_sigma? I didn't understand these two parameters


Reply via ReviewNB

@@ -0,0 +1,608 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

RTN-045 doens't specifically say that each pre-defined functions should be in their own cell, but I think most notebooks I've used do that? Perhaps check with Melissa, suggest putting in different cells but this is perhaps not necessary.


Reply via ReviewNB

@@ -0,0 +1,608 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

artefact -> artifact


Reply via ReviewNB

@@ -0,0 +1,1243 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggest moving the parameter definitions to section 1.2 with title define parameters


Reply via ReviewNB

@@ -0,0 +1,1243 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggest splitting these in 3 cells (instantiate butler, identify patch/tract, retreive image and extract wcs params)


Reply via ReviewNB

@@ -0,0 +1,692 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggest moving comments into the markdown according to RTN-045


Reply via ReviewNB

@@ -0,0 +1,692 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggest splitting functions into their own cell


Reply via ReviewNB

@@ -0,0 +1,692 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

again suggest global parameter explanation


Reply via ReviewNB

@@ -0,0 +1,692 @@
{

@christinawilliams christinawilliams Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggest splitting these into separate steps / cells for each


Reply via ReviewNB

@christinawilliams

Copy link
Copy Markdown
Contributor

Nice! I made a few last minute minor suggestions but it looks good to go! Congrats!

@christinawilliams christinawilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! I left a few last minute suggestions but after that I think you're good to go! I left it approved so you can do it whenever ready.

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.

3 participants